This commit is contained in:
seb
2026-07-31 07:42:19 +02:00
parent 39c5820947
commit 4f98082061
6 changed files with 70 additions and 0 deletions

View File

@@ -99,6 +99,7 @@ const MENU = {
{ value: 'category.updateParentId', label: 'updateParentId', hint: 'id, parentId' },
{ value: 'category.delete', label: 'delete', hint: 'id' },
{ value: 'category.getTree', label: 'getTree', hint: 'rootId → rows' },
{ value: 'category.getTreeForCompany', label: 'getTreeForCompany', hint: 'authId, companyId → rows' },
],
},
companyuser: {
@@ -338,6 +339,16 @@ async function runMethod(client, action) {
if (rootId == null) return;
return ['rows', await client.category.getTree(Number(rootId))];
}
case 'category.getTreeForCompany': {
const authId = await askInt('google_auth id');
if (authId == null) return;
const companyId = await askInt('company id');
if (companyId == null) return;
return [
'rows',
await client.category.getTreeForCompany(Number(authId), Number(companyId)),
];
}
case 'companyuser.add': {
const companyId = await askInt('Company id');
if (companyId == null) return;