rename(phase 1): CapaKraken → Nexus across code, UI, docs, CI (#61)
CI / Architecture Guardrails (push) Successful in 2m38s
CI / Assistant Split Regression (push) Successful in 3m33s
CI / Typecheck (push) Successful in 3m51s
CI / Lint (push) Successful in 5m2s
CI / E2E Tests (push) Has been cancelled
CI / Fresh-Linux Docker Deploy (push) Has been cancelled
CI / Release Images (push) Has been cancelled
CI / Build (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled

rename(phase 1): CapaKraken → Nexus across code, UI, docs, CI (#61)

Co-authored-by: Hartmut Nörenberg <hn@hartmut-noerenberg.com>
Co-committed-by: Hartmut Nörenberg <hn@hartmut-noerenberg.com>
This commit was merged in pull request #61.
This commit is contained in:
2026-05-21 16:28:40 +02:00
committed by Hartmut
parent d9a7ec0338
commit b41c1d2501
943 changed files with 24548 additions and 16832 deletions
@@ -1,4 +1,4 @@
import { AllocationStatus } from "@capakraken/shared";
import { AllocationStatus } from "@nexus/shared";
import { describe, expect, it } from "vitest";
import { detectOverlaps, validateAvailability } from "../allocation/availability-validator.js";
@@ -24,12 +24,14 @@ describe("validateAvailability", () => {
});
it("detects conflict when combined hours exceed availability", () => {
const existing = [{
startDate: new Date("2025-01-06"),
endDate: new Date("2025-01-10"),
hoursPerDay: 6,
status: AllocationStatus.CONFIRMED,
}];
const existing = [
{
startDate: new Date("2025-01-06"),
endDate: new Date("2025-01-10"),
hoursPerDay: 6,
status: AllocationStatus.CONFIRMED,
},
];
const result = validateAvailability(
new Date("2025-01-06"),
@@ -44,12 +46,14 @@ describe("validateAvailability", () => {
});
it("passes when combined hours exactly match availability", () => {
const existing = [{
startDate: new Date("2025-01-06"),
endDate: new Date("2025-01-10"),
hoursPerDay: 4,
status: AllocationStatus.CONFIRMED,
}];
const existing = [
{
startDate: new Date("2025-01-06"),
endDate: new Date("2025-01-10"),
hoursPerDay: 4,
status: AllocationStatus.CONFIRMED,
},
];
const result = validateAvailability(
new Date("2025-01-06"),
@@ -63,12 +67,14 @@ describe("validateAvailability", () => {
});
it("ignores cancelled allocations", () => {
const existing = [{
startDate: new Date("2025-01-06"),
endDate: new Date("2025-01-10"),
hoursPerDay: 8,
status: AllocationStatus.CANCELLED,
}];
const existing = [
{
startDate: new Date("2025-01-06"),
endDate: new Date("2025-01-10"),
hoursPerDay: 8,
status: AllocationStatus.CANCELLED,
},
];
const result = validateAvailability(
new Date("2025-01-06"),
@@ -105,11 +111,9 @@ describe("detectOverlaps", () => {
};
it("detects overlapping allocations", () => {
const overlaps = detectOverlaps(
new Date("2025-01-08"),
new Date("2025-01-15"),
[existingAlloc],
);
const overlaps = detectOverlaps(new Date("2025-01-08"), new Date("2025-01-15"), [
existingAlloc,
]);
expect(overlaps).toContain("alloc-1");
});
@@ -134,11 +138,7 @@ describe("detectOverlaps", () => {
it("ignores cancelled allocations", () => {
const cancelled = { ...existingAlloc, status: AllocationStatus.CANCELLED };
const overlaps = detectOverlaps(
new Date("2025-01-08"),
new Date("2025-01-15"),
[cancelled],
);
const overlaps = detectOverlaps(new Date("2025-01-08"), new Date("2025-01-15"), [cancelled]);
expect(overlaps).toHaveLength(0);
});
});