feat(political-office): enhance political office benefits and salary computation
All checks were successful
Deploy to production / deploy (push) Successful in 3m6s
All checks were successful
Deploy to production / deploy (push) Successful in 3m6s
- Added a new hierarchyLevel field to PoliticalOfficeType for better categorization of political roles. - Updated computePoliticalDailySalaryPayout function to incorporate hierarchy level in salary calculations, allowing for more dynamic salary adjustments based on office rank. - Modified SQL scripts to reflect changes in political office benefits, ensuring compatibility with the new salary structure. - Enhanced localization files to support updated benefit descriptions and salary formats across multiple languages. - Improved UI components to display the new salary calculations and benefits accurately in the PoliticsView.
This commit is contained in:
35
backend/sql/add_political_office_hierarchy_level.sql
Normal file
35
backend/sql/add_political_office_hierarchy_level.sql
Normal file
@@ -0,0 +1,35 @@
|
||||
-- Stufe pro politischem Amt (Tageshonorar: exponentielles Modell nach Stufe im Backend).
|
||||
-- Entspricht Migration 20260403120000-political-office-hierarchy-level.cjs
|
||||
|
||||
ALTER TABLE falukant_type.political_office_type
|
||||
ADD COLUMN IF NOT EXISTS hierarchy_level INTEGER NOT NULL DEFAULT 1;
|
||||
|
||||
UPDATE falukant_type.political_office_type AS pot
|
||||
SET hierarchy_level = sub.lvl
|
||||
FROM (VALUES
|
||||
('assessor', 1),
|
||||
('councillor', 1),
|
||||
('council', 2),
|
||||
('beadle', 2),
|
||||
('town-clerk', 2),
|
||||
('mayor', 3),
|
||||
('master-builder', 2),
|
||||
('village-major', 2),
|
||||
('judge', 3),
|
||||
('bailif', 3),
|
||||
('taxman', 2),
|
||||
('sheriff', 3),
|
||||
('consultant', 3),
|
||||
('treasurer', 4),
|
||||
('hangman', 2),
|
||||
('territorial-council', 3),
|
||||
('territorial-council-speaker', 4),
|
||||
('ruler-consultant', 4),
|
||||
('state-administrator', 4),
|
||||
('super-state-administrator', 5),
|
||||
('governor', 5),
|
||||
('ministry-helper', 4),
|
||||
('minister', 5),
|
||||
('chancellor', 6)
|
||||
) AS sub(name, lvl)
|
||||
WHERE pot.name = sub.name;
|
||||
Reference in New Issue
Block a user