This commit is contained in:
Viet An
2026-06-05 20:12:34 +07:00
parent 3254c64f7d
commit 541f99f82a
13 changed files with 47 additions and 83 deletions

View File

@@ -266,7 +266,7 @@ const store = useStore();
const {
$find,
$getdata,
$updateapi,
$patchapi,
$findapi,
$getapi,
$empty,
@@ -361,7 +361,7 @@ async function update() {
record.value.updater = store.login.id;
record.value.updater_time = new Date();
let rs = record.value.id
? await $updateapi("people", record.value)
? await $patchapi("people", record.value)
: await $insertapi("people", { data: record.value, notify: false });
if (rs === "error") return;
if (!record.value.id) $snackbar(`Người liên quan đã được khởi tạo với mã <b>${rs.code}</b>`, "Success");