Commit Graph

57 Commits

Author SHA1 Message Date
seb
cf1c8d1126 u 2026-10-10 02:14:03 +02:00
seb
f840a12b78 u 2026-10-09 19:02:19 +02:00
seb
178055f1d8 u 2026-10-09 18:26:01 +02:00
seb
d36c2827cc u 2026-10-08 16:11:44 +02:00
seb
191a0b29e2 u 2026-10-05 19:04:48 +02:00
seb
4718cb5726 u 2026-10-04 21:22:05 +02:00
seb
067ddc088c u 2026-10-04 19:12:30 +02:00
seb
2158ac475b u 2026-10-04 18:56:55 +02:00
seb
3b74c12f4e u 2026-10-03 23:13:40 +02:00
seb
84e547660e u 2026-10-01 17:40:04 +02:00
seb
894f72eba5 u 2026-09-30 17:35:22 +02:00
seb
0cafa11a32 u 2026-09-27 21:01:30 +02:00
seb
516feb51d4 u 2026-09-27 16:47:37 +02:00
seb
e7f92ebef8 u 2026-09-26 23:06:05 +02:00
seb
e491ecfa47 u 2026-09-26 07:34:37 +02:00
seb
387147ccf3 u 2026-09-25 07:27:22 +02:00
seb
f8f61a1212 u 2026-09-24 23:26:25 +02:00
seb
dce65db435 bench 2026-09-22 08:31:01 +02:00
seb
cca131d83a sqlite 2026-09-22 07:25:16 +02:00
seb
53a20c4353 refactor: introduce database provider abstraction, isolate MSSQL layer
- Add provider contract (src/providers/provider.js): query() -> {rows,
  rowsAffected, insertId}, callback transaction(fn), exec() for stored
  procs, initialize/purge lifecycle
- Add MssqlProvider (src/providers/mssql/index.js) wrapping an mssql
  ConnectionPool with normalized results, tx commit/rollback and
  constraint-error classifiers (unique 2627/2601, FK 547)
- LibDashStore constructor now takes a provider instead of a pool
  (breaking); adds LibDashStore.create() async factory; keeps pool as
  transitional bridge until store modules are converted (see TODO.md)
- Move MSSQL-specific code into the provider: src/sql/* ->
  src/providers/mssql/queries/*, src/schema.js ->
  src/providers/mssql/schema.js, purge SQL -> purgeSql.js
- Update scripts, generate-schema-graph.js and package.json exports
  (./providers/mssql, ./providers/provider)
- Add TODO.md with the remaining provider/SQLite migration plan

No SQL or behavioral changes.
2026-09-20 13:51:01 +02:00
seb
70e0a9ddc4 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.
2026-08-07 04:29:35 +02:00
seb
c290fe8f4b Add customergroup sort with bulk order and locked implicit names.
Reorder via customergroup.order (exact id list → sort 0…n-1); block renaming POS/Lieferanten while still allowing create/update of other groups by name.
2026-08-07 03:38:01 +02:00
seb
b095ab6199 Add quote and order stores plus ledger hash_version.
Mirror delivery on manifest for quote/order with customer entityId (excluding Lieferanten/POS), and support entity.list role=customer for pickers.
2026-08-06 19:58:35 +02:00
seb
3b77a1c946 Add entity address/contact tables and CRUD for entity resources 2026-08-06 05:43:50 +02:00
seb
0b7e40ac9c Add company-scoped delivery store on manifest 2026-08-06 05:32:48 +02:00
seb
4f46967f28 Add supplier CRUD on entity with Lieferanten group and entityhistory 2026-08-06 03:56:32 +02:00
seb
561ba5bb99 Store Google profile picture bytes on google_auth 2026-08-05 11:08:06 +02:00
seb
d1eb2716ae Link articlehistory to companyuser; store Google picture and sub on google_auth 2026-08-05 10:57:50 +02:00
seb
46c85fe29e Add articlehistory on updateBySku and getHistoryBySku 2026-08-05 09:17:17 +02:00
seb
d8d66ce105 Add category.move to reparent a category.
Validates both source and target via resolveCategoryAccess so the new
parent must be a category of the same authorized company, and guards
against moving into a descendant (cycle). Assigns next sibling sort.
2026-08-03 03:01:02 +02:00
seb
b070607357 Add category.order to reorder siblings under a parent.
Sets each direct child's sort to its index in the given categoryIds,
scoped by parentId. Validates the set matches the current children.
2026-08-02 19:41:54 +02:00
seb
b890843445 u 2026-08-02 19:01:00 +02:00
seb
787e411547 Add company-scoped brand and company settings API.
brand now carries a NOT NULL company_id (unique per (company_id, name))
with brand.list/upsert/delete backed by resolveCompanyAccess. Adds
companysetting key-value store (list/get/set/delete, frontend flag).
2026-08-01 06:59:27 +02:00
seb
12e83a7ffb Add company-scoped unit list/upsert/delete and article unit patches.
Units are isolated per company; article detail exposes full unit shape, and unused units can be deleted safely via FK NO ACTION.
2026-08-01 06:12:24 +02:00
seb
54700a145e Add article.setPricesBySku to replace POS prices for a SKU.
Gives dashback a single store call that atomically replaces all price rows for the article’s poscustomergroup.
2026-08-01 05:16:50 +02:00
seb
1756dc7ef0 u 2026-08-01 03:37:45 +02:00
seb
69a24192d3 u 2026-08-01 02:15:21 +02:00
seb
59c874144b u 2026-08-01 01:59:05 +02:00
seb
671064bf3f u 2026-08-01 01:36:49 +02:00
seb
e8326e22ac u 2026-07-31 19:49:07 +02:00
seb
c2e128cb55 u 2026-07-31 17:50:06 +02:00
seb
7e1e96d3cd u 2026-07-31 16:17:33 +02:00
seb
f9dec6d51a u 2026-07-31 16:06:51 +02:00
seb
6cc6dbb9e8 u 2026-07-31 15:36:48 +02:00
seb
818d799f63 u 2026-07-31 09:09:34 +02:00
seb
99dd76075e u 2026-07-31 09:00:14 +02:00
seb
4f98082061 u 2026-07-31 07:42:19 +02:00
seb
bbd69e8c7c u 2026-07-31 07:22:34 +02:00
seb
02bca8e236 u 2026-07-31 05:57:23 +02:00
seb
a57e81fe30 u 2026-07-31 05:43:41 +02:00