diff --git a/plugins/employees/README.md b/plugins/employees/README.md index 844f8a6..8912c9e 100644 --- a/plugins/employees/README.md +++ b/plugins/employees/README.md @@ -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 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. -Create the canonical table and point `employee_db_*` at it: +**Option B - self-hosted directory (managed in-app)** for sites with no HR +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 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/`. -This can be a dedicated MySQL database or another schema on the same server as -the main app DB - the plugin connects to it independently. - -> 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. +In self-hosted mode the `directoryemployees` table lives in the main app DB, so +no separate database is required. ## Adapting a different site schema (recommended: a view)