This commit is contained in:
seb
2026-07-31 16:17:33 +02:00
parent 14297a1568
commit 7e1e96d3cd
6 changed files with 132 additions and 46 deletions

View File

@@ -109,6 +109,11 @@ const MENU = {
label: 'createUnderParent',
hint: 'googleAuthId, parentId, name → row',
},
{
value: 'article.getBySku',
label: 'getBySku',
hint: 'googleAuthId, sku → row',
},
],
},
companyuser: {
@@ -382,6 +387,18 @@ async function runMethod(client, action) {
}),
];
}
case 'article.getBySku': {
const googleAuthId = await askInt('google_auth id');
if (googleAuthId == null) return;
const sku = await askText('sku', {
validate: (v) => (!v?.trim() ? 'Required' : undefined),
});
if (sku == null) return;
return [
'result',
await client.article.getBySku(Number(googleAuthId), sku),
];
}
case 'companyuser.add': {
const companyId = await askInt('Company id');
if (companyId == null) return;