This commit is contained in:
seb
2026-10-08 01:44:40 +02:00
parent 8bc912c567
commit 243eba5fc6
7 changed files with 718 additions and 27 deletions

View File

@@ -63,6 +63,22 @@ const actions = {
return terminal;
},
/**
* Update a posterminal.
* @param {number} terminalId
* @param {object} patch
*/
async update(terminalId, patch) {
const res = await posterminalApi.update(terminalId, patch);
const updated = res.posterminal;
posterminalAutomat.setState({
terminals: posterminalAutomat.state.terminals.map((t) =>
t.id === terminalId ? { ...t, ...updated } : t
),
});
return updated;
},
/**
* Delete a posterminal.
* @param {number} terminalId