🔱: [client] sync upgrade with 5 commits [trident-sync]

chore:
chore:
chore: editRequest 判断form.id不为空
chore:
This commit is contained in:
GitHub Actions Bot
2023-11-23 19:24:19 +00:00
parent 3393bde820
commit 282f8b4e02
109 changed files with 743 additions and 120 deletions
@@ -6,7 +6,9 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
return await api.GetList(query);
};
const editRequest = async ({ form, row }: EditReq) => {
form.id = row.id;
if (form.id == null) {
form.id = row.id;
}
return await api.UpdateObj(form);
};
const delRequest = async ({ row }: DelReq) => {
@@ -5,7 +5,9 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
return await api.GetList(query);
};
const editRequest = async ({ form, row }: EditReq) => {
form.id = row.id;
if (form.id == null) {
form.id = row.id;
}
return await api.UpdateObj(form);
};
const delRequest = async ({ row }: DelReq) => {
@@ -6,7 +6,9 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
return await api.GetList(query);
};
const editRequest = async ({ form, row }: EditReq) => {
form.id = row.id;
if (form.id == null) {
form.id = row.id;
}
return await api.UpdateObj(form);
};
const delRequest = async ({ row }: DelReq) => {
@@ -5,7 +5,9 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
return await api.GetList(query);
};
const editRequest = async ({ form, row }: EditReq) => {
form.id = row.id;
if (form.id == null) {
form.id = row.id;
}
return await api.UpdateObj(form);
};
const delRequest = async ({ row }: DelReq) => {
@@ -6,7 +6,9 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
return await api.GetList(query);
};
const editRequest = async ({ form, row }: EditReq) => {
form.id = row.id;
if (form.id == null) {
form.id = row.id;
}
return await api.UpdateObj(form);
};
const delRequest = async ({ row }: DelReq) => {
@@ -7,7 +7,9 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
return await api.GetList(query);
};
const editRequest = async ({ form, row }: EditReq) => {
form.id = row.id;
if (form.id == null) {
form.id = row.id;
}
return await api.UpdateObj(form);
};
const delRequest = async ({ row }: DelReq) => {
@@ -7,7 +7,9 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
return await api.GetList(query);
};
const editRequest = async ({ form, row }: EditReq) => {
form.id = row.id;
if (form.id == null) {
form.id = row.id;
}
return await api.UpdateObj(form);
};
const delRequest = async ({ row }: DelReq) => {
@@ -6,7 +6,9 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
return await api.GetList(query);
};
const editRequest = async ({ form, row }: EditReq) => {
form.id = row.id;
if (form.id == null) {
form.id = row.id;
}
return await api.UpdateObj(form);
};
const delRequest = async ({ row }: DelReq) => {
@@ -5,7 +5,9 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
return await api.GetList(query);
};
const editRequest = async ({ form, row }: EditReq) => {
form.id = row.id;
if (form.id == null) {
form.id = row.id;
}
return await api.UpdateObj(form);
};
const delRequest = async ({ row }: DelReq) => {
@@ -6,7 +6,9 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
return await api.GetList(query);
};
const editRequest = async ({ form, row }: EditReq) => {
form.id = row.id;
if (form.id == null) {
form.id = row.id;
}
return await api.UpdateObj(form);
};
const delRequest = async ({ row }: DelReq) => {
@@ -2,7 +2,9 @@ import * as api from "./api.js";
import { CreateCrudOptionsProps, dict, CreateCrudOptionsRet, EditReq, DelReq, AddReq } from "@fast-crud/fast-crud";
export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOptionsRet {
const editRequest = async ({ form, row }: EditReq) => {
form.id = row.id;
if (form.id == null) {
form.id = row.id;
}
return await api.UpdateObj(form);
};
const delRequest = async ({ row }: DelReq) => {
@@ -6,7 +6,9 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
return await api.GetList(query);
};
const editRequest = async ({ form, row }: EditReq) => {
form.id = row.id;
if (form.id == null) {
form.id = row.id;
}
return await api.UpdateObj(form);
};
const delRequest = async ({ row }: DelReq) => {
@@ -6,7 +6,9 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
return await api.GetList(query);
};
const editRequest = async ({ form, row }: EditReq) => {
form.id = row.id;
if (form.id == null) {
form.id = row.id;
}
return await api.UpdateObj(form);
};
const delRequest = async ({ row }: DelReq) => {
@@ -6,7 +6,9 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
return await api.GetList(query);
};
const editRequest = async ({ form, row }: EditReq) => {
form.id = row.id;
if (form.id == null) {
form.id = row.id;
}
return await api.UpdateObj(form);
};
const delRequest = async ({ row }: DelReq) => {
@@ -5,7 +5,9 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
return await api.GetList(query);
};
const editRequest = async ({ form, row }: EditReq) => {
form.id = row.id;
if (form.id == null) {
form.id = row.id;
}
return await api.UpdateObj(form);
};
const delRequest = async ({ row }: DelReq) => {
@@ -6,7 +6,9 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
return await api.GetList(query);
};
const editRequest = async ({ form, row }: EditReq) => {
form.id = row.id;
if (form.id == null) {
form.id = row.id;
}
return await api.UpdateObj(form);
};
const delRequest = async ({ row }: DelReq) => {
@@ -6,7 +6,9 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
return await api.GetList(query);
};
const editRequest = async ({ form, row }: EditReq) => {
form.id = row.id;
if (form.id == null) {
form.id = row.id;
}
return await api.UpdateObj(form);
};
const delRequest = async ({ row }: DelReq) => {
@@ -8,7 +8,9 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
return await api.GetList(query);
};
const editRequest = async ({ form, row }: EditReq) => {
form.id = row.id;
if (form.id == null) {
form.id = row.id;
}
return await api.UpdateObj(form);
};
const delRequest = async ({ row }: DelReq) => {
@@ -6,7 +6,9 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
return await api.GetList(query);
};
const editRequest = async ({ form, row }: EditReq) => {
form.id = row.id;
if (form.id == null) {
form.id = row.id;
}
return await api.UpdateObj(form);
};
const delRequest = async ({ row }: DelReq) => {
@@ -6,7 +6,9 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
return await api.GetList(query);
};
const editRequest = async ({ form, row }: EditReq) => {
form.id = row.id;
if (form.id == null) {
form.id = row.id;
}
return await api.UpdateObj(form);
};
const delRequest = async ({ row }: DelReq) => {
@@ -5,7 +5,9 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
return await api.GetList(query);
};
const editRequest = async ({ form, row }: EditReq) => {
form.id = row.id;
if (form.id == null) {
form.id = row.id;
}
return await api.UpdateObj(form);
};
const delRequest = async ({ row }: DelReq) => {
@@ -6,7 +6,9 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
return await api.GetList(query);
};
const editRequest = async ({ form, row }: EditReq) => {
form.id = row.id;
if (form.id == null) {
form.id = row.id;
}
return await api.UpdateObj(form);
};
const delRequest = async ({ row }: DelReq) => {
@@ -7,7 +7,9 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
return await api.GetList(query);
};
const editRequest = async ({ form, row }: EditReq) => {
form.id = row.id;
if (form.id == null) {
form.id = row.id;
}
return await api.UpdateObj(form);
};
const delRequest = async ({ row }: DelReq) => {
@@ -5,7 +5,9 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
return await api.GetList(query);
};
const editRequest = async ({ form, row }: EditReq) => {
form.id = row.id;
if (form.id == null) {
form.id = row.id;
}
return await api.UpdateObj(form);
};
const delRequest = async ({ row }: DelReq) => {