Wizard: choose "create tables here" vs "connect your own database" per plugin
Answers the confusion of asking for a DB connection while also offering to create the tables. Each self-host-capable plugin (employees, usb) now shows a mode choice; the external connection fields appear only for "connect your own database". Default is self-hosted (create tables here) - the external path is the niche/our-site option. - provisioning_note gains mode_setting; employee_directory_mode + usb_directory_ mode settings (both default 'selfhosted'). - Wizard renders the radio, shows the note for self-hosted and the config fields for external, and saves the chosen mode. Employees works fully in both modes. USB self-hosted ROUTING is still TODO - the USB routes read the external cmmc_usb schema; wiring them to the app-owned tables is the remaining work (tracked). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -265,10 +265,17 @@ def build_default_settings():
|
||||
},
|
||||
{
|
||||
'key': 'employee_directory_mode',
|
||||
'value': 'external',
|
||||
'value': 'selfhosted',
|
||||
'valuetype': 'string',
|
||||
'category': 'site',
|
||||
'description': "Employee directory source: 'external' (a separate HR database) or 'selfhosted' (managed in-app under Employees)"
|
||||
'description': "Employee directory source: 'selfhosted' (tables in this app, default) or 'external' (a separate HR database)"
|
||||
},
|
||||
{
|
||||
'key': 'usb_directory_mode',
|
||||
'value': 'selfhosted',
|
||||
'valuetype': 'string',
|
||||
'category': 'site',
|
||||
'description': "USB check-in/out source: 'selfhosted' (tables in this app, default) or 'external' (a separate cmmc_usb database)"
|
||||
},
|
||||
{
|
||||
'key': 'site_base_url',
|
||||
|
||||
Reference in New Issue
Block a user