Align store calls with selected-company scoping and add entity numbers.

Drop companyId from company-scoped store wrappers and routes, add GET /entity/next-number plus optional number on entity create/update, and document dashdbschema API.md lookup in sibling-repos.
This commit is contained in:
seb
2026-08-07 06:22:13 +02:00
parent 2767568f5a
commit e6c24654dd
36 changed files with 496 additions and 189 deletions

View File

@@ -1,36 +1,36 @@
import { getStore } from './store.js';
export async function list(googleAuthId, companyId) {
export async function list(googleAuthId) {
const store = await getStore();
return store.posterminal.list(googleAuthId, companyId);
return store.posterminal.list(googleAuthId);
}
export async function upsert(googleAuthId, companyId, data) {
export async function upsert(googleAuthId, data) {
const store = await getStore();
return store.posterminal.upsert(googleAuthId, companyId, data);
return store.posterminal.upsert(googleAuthId, data);
}
export async function remove(googleAuthId, companyId, id) {
export async function remove(googleAuthId, id) {
const store = await getStore();
return store.posterminal.delete(googleAuthId, companyId, id);
return store.posterminal.delete(googleAuthId, id);
}
export async function setOn(googleAuthId, companyId, posterminalId, categoryId) {
export async function setOn(googleAuthId, posterminalId, categoryId) {
const store = await getStore();
return store.posterminal.setOn(googleAuthId, companyId, posterminalId, categoryId);
return store.posterminal.setOn(googleAuthId, posterminalId, categoryId);
}
export async function setOff(googleAuthId, companyId, posterminalId, categoryId) {
export async function setOff(googleAuthId, posterminalId, categoryId) {
const store = await getStore();
return store.posterminal.setOff(googleAuthId, companyId, posterminalId, categoryId);
return store.posterminal.setOff(googleAuthId, posterminalId, categoryId);
}
export async function setOnAll(googleAuthId, companyId, posterminalId) {
export async function setOnAll(googleAuthId, posterminalId) {
const store = await getStore();
return store.posterminal.setOnAll(googleAuthId, companyId, posterminalId);
return store.posterminal.setOnAll(googleAuthId, posterminalId);
}
export async function setOffAll(googleAuthId, companyId, posterminalId) {
export async function setOffAll(googleAuthId, posterminalId) {
const store = await getStore();
return store.posterminal.setOffAll(googleAuthId, companyId, posterminalId);
return store.posterminal.setOffAll(googleAuthId, posterminalId);
}