docs: employee README - in-app self-hosted management now built

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
cproudlock
2026-07-10 08:56:50 -04:00
parent 56b7874f8d
commit f04deba011

View File

@@ -72,8 +72,13 @@ people with no photo; the UI falls back to initials.
**Option A - map an existing HR/directory database** (see the view recipe **Option A - map an existing HR/directory database** (see the view recipe
below). Use this when the site already has a system of record for people. below). Use this when the site already has a system of record for people.
**Option B - stand up a self-hosted directory** for sites with no HR database. **Option B - self-hosted directory (managed in-app)** for sites with no HR
Create the canonical table and point `employee_db_*` at it: database. Set `employee_directory_mode` to `selfhosted` and manage people under
**Settings > Employee Directory** (add / edit / delete + CSV import) - no SQL
needed. The app owns a `directoryemployees` table (migration 7d16); the lookup
APIs read it automatically in this mode.
If you would rather load it with SQL, the canonical table is equivalent to:
```sql ```sql
CREATE DATABASE shopdb_directory CHARACTER SET utf8mb4; CREATE DATABASE shopdb_directory CHARACTER SET utf8mb4;
@@ -94,11 +99,8 @@ VALUES (123456, 'Jane', 'Doe', 'Inspection', 'Quality Tech', '123456.jpg');
``` ```
Put photo files (named as in `Picture`) under the app's `static/employees/`. Put photo files (named as in `Picture`) under the app's `static/employees/`.
This can be a dedicated MySQL database or another schema on the same server as In self-hosted mode the `directoryemployees` table lives in the main app DB, so
the main app DB - the plugin connects to it independently. no separate database is required.
> A future enhancement could manage this self-hosted directory in-app (add /
> edit people, CSV import) so a site needs no direct SQL. Not built yet.
## Adapting a different site schema (recommended: a view) ## Adapting a different site schema (recommended: a view)