- Added customer_id and contact_id filters to the list_opportunities endpoint for improved querying. - Implemented a redirect for opportunity detail pages to a new format. - Refactored SubscriptionMatrixService to load invoices from a local snapshot instead of an external service, improving performance and reliability. - Updated settings to include 'pipeline' as a case type and added a new section for managing ignored product texts in the invoice error finder. - Introduced a new user_sag_create_preferences table to store per-user default case types for new cases. - Enhanced frontend settings page with invoice error finder configuration options and improved handling of ignored product texts. - Added migrations to support new features, including resolved status for invoice error finder issues and user-specific case type preferences.
16 lines
670 B
SQL
16 lines
670 B
SQL
-- Per-user default for the type selected on the new-case page.
|
|
CREATE TABLE IF NOT EXISTS user_sag_create_preferences (
|
|
user_id INTEGER PRIMARY KEY REFERENCES users(user_id) ON DELETE CASCADE,
|
|
default_case_type VARCHAR(50) NOT NULL DEFAULT 'ticket',
|
|
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
|
);
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_user_sag_create_preferences_updated_at
|
|
ON user_sag_create_preferences(updated_at DESC);
|
|
|
|
-- Make pipeline available in installations that already have the configured list.
|
|
UPDATE settings
|
|
SET value = ((value::jsonb || '["pipeline"]'::jsonb)::text)
|
|
WHERE key = 'case_types'
|
|
AND NOT (value::jsonb ? 'pipeline');
|