Kostenstelle umbenennen, in der Oberflaeche und im Import
rename_cost_center aendert nur die Bezeichnung; die Nummer bleibt, sie verbindet die Kostenstelle mit dem fuehrenden System und jeder Kontierung. Kein Stichtag, die bisherige Bezeichnung steht im Audit-Log. Positionen: Knopf "Kostenstelle umbenennen" mit Auswahl und neuer Bezeichnung. Blatt Kostenstellen: eine andere Bezeichnung bei vorhandener Nummer benennt um. Geprueft: Rauchtest Schritt 23 (Bezeichnung neu, Nummer und Kontierung bleiben, Protokoll) 35/35; Integrationstest Umbenennen per Import; alle Migrationen auf leerer Datenbank, zweiter Lauf leer; lint, tsc, types:check, 1014 Unit-Tests, Waechter.
This commit is contained in:
@@ -273,7 +273,6 @@ describe.skipIf(!process.env.DATABASE_URL)("Import gegen die Datenbank", () => {
|
||||
const heute = todayIso();
|
||||
const { nr, a, b } = await bestand(tx);
|
||||
const kst = await rufe<string>(tx, "create_cost_center", { code: "IMPORT-K", name: "Import Kostenstelle", valid_from: "2020-01-01" });
|
||||
void kst;
|
||||
const kontakt = await rufe<string>(tx, "add_emergency_contact", { employee_id: a, name: "Alt Kontakt", phone: "+43 5", relation: "Kind" });
|
||||
await rufe(tx, "add_emergency_contact", { employee_id: a, name: "Weg Kontakt", phone: "+43 6", relation: "Kind" });
|
||||
await rufe(tx, "add_employee_dependent", { employee_id: a, first_name: "Weg", last_name: "Import", relationship: "Kind" });
|
||||
@@ -283,6 +282,7 @@ describe.skipIf(!process.env.DATABASE_URL)("Import gegen die Datenbank", () => {
|
||||
|
||||
const mappe = await herunterladen(tx, heute);
|
||||
setze(mappe, "Organisationseinheiten", "IMPORT-1", { Bezeichnung: "Import umbenannt" });
|
||||
setze(mappe, "Kostenstellen", "IMPORT-K", { Bezeichnung: "Import Kostenstelle umbenannt" });
|
||||
setze(mappe, "Planstellen", "ID9204", { Tätigkeit: "Import Ganz Neu", Kostenstelle: "IMPORT-K", "Gültig bis": new Date(Date.UTC(2099, 0, 1)) });
|
||||
const notfall = mappe.getWorksheet("Notfallkontakte")!;
|
||||
notfall.eachRow((row, z) => {
|
||||
@@ -307,6 +307,10 @@ describe.skipIf(!process.env.DATABASE_URL)("Import gegen die Datenbank", () => {
|
||||
.where("p.position_number", "=", "ID9204")
|
||||
.executeTakeFirstOrThrow();
|
||||
expect(ps4).toEqual({ title: "Import Ganz Neu", valid_to: "2099-01-01" });
|
||||
expect(await tx.selectFrom("cost_centers").select(["code", "name"]).where("id", "=", kst).executeTakeFirstOrThrow()).toEqual({
|
||||
code: "IMPORT-K",
|
||||
name: "Import Kostenstelle umbenannt",
|
||||
});
|
||||
const kontakte = await tx.selectFrom("employee_emergency_contacts").select(["name", "phone", "relation"]).where("employee_id", "=", a).orderBy("name").execute();
|
||||
expect(kontakte).toEqual([
|
||||
{ name: "Alt Kontakt", phone: "+43 7", relation: "Kind" },
|
||||
|
||||
Reference in New Issue
Block a user