feat: add classification-based filtering and fix company name display
- Added classification column to companies table - Created excluded_classifications setting (default: Tools Only) - Updated kiosk stats and activity APIs to filter by classification - Added comprehensive classification filtering UI with checkboxes - Support for common classifications (Tools Only, Wulff Consulting Client, Customer) - Allow custom classification entry - Fixed company name display in settings (convert string IDs properly) - Classification filtering works alongside company ID exclusions
This commit is contained in:
parent
62ec703f81
commit
1d99a8f659
4 changed files with 176 additions and 10 deletions
14
migrations/020_add_company_classification.sql
Normal file
14
migrations/020_add_company_classification.sql
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
-- Add classification column to companies table
|
||||
-- This will store the classification name (e.g., "Tools Only", "Wulff Consulting Client", "Customer")
|
||||
ALTER TABLE companies ADD COLUMN IF NOT EXISTS classification VARCHAR(255);
|
||||
|
||||
-- Create index for faster filtering
|
||||
CREATE INDEX IF NOT EXISTS idx_companies_classification ON companies(classification);
|
||||
|
||||
-- Add classification to kiosk settings
|
||||
INSERT INTO kiosk_settings (setting_key, setting_value, description) VALUES
|
||||
('excluded_classifications', 'Tools Only', 'Comma-separated list of company classifications to exclude from kiosk')
|
||||
ON CONFLICT (setting_key) DO NOTHING;
|
||||
|
||||
-- Add comment
|
||||
COMMENT ON COLUMN companies.classification IS 'Company classification (e.g., Tools Only, Wulff Consulting Client, Customer)';
|
||||
Loading…
Add table
Add a link
Reference in a new issue