Add entity customer numbers and scope APIs via selected company.
Entity gets an optional unique-per-company number with allocate/peek/isNumberFree helpers. Company-scoped store methods no longer take companyId and resolve google_auth.selected_company instead.
This commit is contained in:
@@ -10,7 +10,7 @@ Deletes a brand for a company by its id.
|
||||
|
||||
```js
|
||||
const fn = del(pool);
|
||||
await fn(42, 1, 3);
|
||||
await fn(42, 3);
|
||||
```
|
||||
|
||||
## `brand.list`
|
||||
@@ -21,7 +21,7 @@ Lists the brands of a company.
|
||||
|
||||
```js
|
||||
const fn = list(pool);
|
||||
const brands = await fn(42, 1);
|
||||
const brands = await fn(42);
|
||||
// => [{ id, name, gsprpinfo }]
|
||||
```
|
||||
|
||||
@@ -33,6 +33,6 @@ Creates or updates a brand for a company, keyed by name.
|
||||
|
||||
```js
|
||||
const fn = upsert(pool);
|
||||
const brand = await fn(42, 1, { name: 'Coca-Cola', gsprpinfo: 'x' });
|
||||
const brand = await fn(42, { name: 'Coca-Cola', gsprpinfo: 'x' });
|
||||
// => { id, name, gsprpinfo }
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user