fix persisting of many to many entity

This commit is contained in:
dswbx
2025-02-18 15:43:19 +01:00
parent 400db84dd5
commit f494735a79
12 changed files with 86 additions and 70 deletions

View File

@@ -262,18 +262,18 @@ function EntityDetailInner({
navigate(routes.data.entity.edit(other.entity.name, row.id));
}
function handleClickNew() {
try {
let handleClickNew: any;
try {
if (other.entity.type !== "system") {
const ref = relation.getReferenceQuery(other.entity, id, other.reference);
navigate(routes.data.entity.create(other.entity.name), {
query: ref.where
});
//navigate(routes.data.entity.create(other.entity.name) + `?${query}`);
} catch (e) {
console.error("handleClickNew", e);
handleClickNew = () => {
navigate(routes.data.entity.create(other.entity.name), {
query: ref.where
});
//navigate(routes.data.entity.create(other.entity.name) + `?${query}`);
};
}
}
} catch (e) {}
if (!$q.data) {
return null;