diff --git a/app/(auth)/login/page.tsx b/app/(auth)/login/page.tsx index fa918ab..0a27964 100644 --- a/app/(auth)/login/page.tsx +++ b/app/(auth)/login/page.tsx @@ -160,7 +160,7 @@ function BrandPanel() { Alles im Blick. Alles Manner.

- Stammdaten, Planstellen und Berichtslinien der Alpenwerk Industrie GmbH — jederzeit auch zu einem beliebigen + Stammdaten, Planstellen und Berichtslinien der Josef Manner & Comp. AG — jederzeit auch zu einem beliebigen Stichtag.

diff --git a/app/layout.tsx b/app/layout.tsx index 783cfda..6f901d9 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -33,7 +33,7 @@ const din = Barlow({ export const metadata: Metadata = { title: "Alpenwerk HR", - description: "HR-Stammdaten- und Organisationsmanagement für Alpenwerk Industrie GmbH", + description: "HR-Stammdaten- und Organisationsmanagement für die Josef Manner & Comp. AG", // Added to the home screen on iOS this opens without Safari's chrome and // keeps the app's own name rather than the page title. appleWebApp: { capable: true, title: "Alpenwerk HR", statusBarStyle: "default" }, diff --git a/db/migrations/20261109120000_gesellschaft_oe_0000.sql b/db/migrations/20261109120000_gesellschaft_oe_0000.sql new file mode 100644 index 0000000..154f842 --- /dev/null +++ b/db/migrations/20261109120000_gesellschaft_oe_0000.sql @@ -0,0 +1,39 @@ +-- Die Gesellschaft trägt die Orgnummer „OE-0000". +-- +-- Die Organisationseinheiten des Unternehmens sind als OE-nnnn nummeriert; +-- die oberste Einheit gehört in dieselbe Reihe. Die Austauschdatei der +-- Organisationsstruktur erkennt eine Einheit an ihrer Orgnummer: trüge die +-- Gesellschaft in der Datenbank eine andere, wäre die oberste Zeile der +-- Datei eine zweite Gesellschaft, und unter ihr liesse sich nichts anlegen. +-- +-- Andere Tabellen verweisen über die ID auf die Einheit, nicht über die +-- Orgnummer; die Änderung betrifft nur diese Spalte. +-- +-- Umgestellt wird nur die Nummer aus der Anlage (10000000), und nur, solange +-- OE-0000 nicht schon vergeben ist. + +with umgestellt as ( + update org_units + set org_number = 'OE-0000' + where org_number = '10000000' + and unit_type = 'Gesellschaft' + and parent_id is null + and not exists (select 1 from org_units where org_number = 'OE-0000') + returning org_number, name +) +insert into audit_log (actor_user_id, actor_name, action, target_label, details) +select null, 'Wartung', 'Orgnummer geändert', + org_number || ' · ' || name, + 'Bisherige Orgnummer: 10000000' + from umgestellt; + +do $pruefung$ +begin + if exists ( + select 1 from org_units + where org_number = '10000000' and unit_type = 'Gesellschaft' and parent_id is null + ) and not exists (select 1 from org_units where org_number = 'OE-0000') then + raise exception 'Die Gesellschaft trägt weiterhin die Orgnummer 10000000.'; + end if; +end +$pruefung$;