feat(auth): per-user UI language preference (sq default, en)
Add users.language ('sq'|'en', default 'sq'; migration 0003). Returned from
/api/auth/login and /api/auth/me (read from the DB, not the JWT — so changing it
needs no re-login). New PUT /api/auth/language for self-service. Loaded on login
and restored from any booth. Printed tickets stay Albanian (customer-facing).
This commit is contained in:
@@ -22,6 +22,12 @@ export const users = sqliteTable("users", {
|
||||
role: text("role", {
|
||||
enum: ["admin", "operator", "cashier", "readonly"],
|
||||
}).notNull(),
|
||||
// Preferred UI language for this user (operator-facing). Loaded on login and
|
||||
// restored from any booth. Albanian is the default. Printed tickets are NOT
|
||||
// governed by this — they're always Albanian (customer-facing). See i18n.md.
|
||||
language: text("language", { enum: ["sq", "en"] })
|
||||
.notNull()
|
||||
.default("sq"),
|
||||
createdAt: text("created_at")
|
||||
.notNull()
|
||||
.default(sql`(current_timestamp)`),
|
||||
|
||||
Reference in New Issue
Block a user