feat(planning): ship holiday-aware planning and assistant upgrades
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { AllocationStatus } from "@capakraken/shared";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { analyzeUtilization, findCapacityWindows } from "../capacity-analyzer.js";
|
||||
import type { CapacityAnalysisInput } from "../capacity-analyzer.js";
|
||||
@@ -28,7 +29,7 @@ describe("analyzeUtilization", () => {
|
||||
startDate: new Date("2026-03-09"), // Monday
|
||||
endDate: new Date("2026-03-13"), // Friday
|
||||
hoursPerDay: 8,
|
||||
status: "CONFIRMED",
|
||||
status: AllocationStatus.CONFIRMED,
|
||||
projectName: "Project A",
|
||||
isChargeable: true,
|
||||
},
|
||||
@@ -53,7 +54,7 @@ describe("analyzeUtilization", () => {
|
||||
startDate: new Date("2026-03-09"),
|
||||
endDate: new Date("2026-03-09"),
|
||||
hoursPerDay: 5,
|
||||
status: "CONFIRMED",
|
||||
status: AllocationStatus.CONFIRMED,
|
||||
projectName: "A",
|
||||
isChargeable: true,
|
||||
},
|
||||
@@ -61,7 +62,7 @@ describe("analyzeUtilization", () => {
|
||||
startDate: new Date("2026-03-09"),
|
||||
endDate: new Date("2026-03-09"),
|
||||
hoursPerDay: 5,
|
||||
status: "CONFIRMED",
|
||||
status: AllocationStatus.CONFIRMED,
|
||||
projectName: "B",
|
||||
isChargeable: true,
|
||||
},
|
||||
@@ -82,7 +83,7 @@ describe("analyzeUtilization", () => {
|
||||
startDate: new Date("2026-03-09"),
|
||||
endDate: new Date("2026-03-09"),
|
||||
hoursPerDay: 2,
|
||||
status: "CONFIRMED",
|
||||
status: AllocationStatus.CONFIRMED,
|
||||
projectName: "A",
|
||||
isChargeable: true,
|
||||
},
|
||||
@@ -103,7 +104,7 @@ describe("analyzeUtilization", () => {
|
||||
startDate: new Date("2026-03-09"),
|
||||
endDate: new Date("2026-03-13"),
|
||||
hoursPerDay: 8,
|
||||
status: "CANCELLED",
|
||||
status: AllocationStatus.CANCELLED,
|
||||
projectName: "Cancelled",
|
||||
isChargeable: true,
|
||||
},
|
||||
@@ -125,7 +126,7 @@ describe("analyzeUtilization", () => {
|
||||
startDate: new Date("2026-03-09"),
|
||||
endDate: new Date("2026-03-09"),
|
||||
hoursPerDay: 4,
|
||||
status: "CONFIRMED",
|
||||
status: AllocationStatus.CONFIRMED,
|
||||
projectName: "Chargeable",
|
||||
isChargeable: true,
|
||||
},
|
||||
@@ -133,7 +134,7 @@ describe("analyzeUtilization", () => {
|
||||
startDate: new Date("2026-03-09"),
|
||||
endDate: new Date("2026-03-09"),
|
||||
hoursPerDay: 4,
|
||||
status: "CONFIRMED",
|
||||
status: AllocationStatus.CONFIRMED,
|
||||
projectName: "Internal",
|
||||
isChargeable: false,
|
||||
},
|
||||
@@ -190,7 +191,7 @@ describe("findCapacityWindows", () => {
|
||||
startDate: new Date("2026-03-09"),
|
||||
endDate: new Date("2026-03-13"),
|
||||
hoursPerDay: 4,
|
||||
status: "CONFIRMED",
|
||||
status: AllocationStatus.CONFIRMED,
|
||||
},
|
||||
],
|
||||
new Date("2026-03-09"),
|
||||
@@ -209,7 +210,7 @@ describe("findCapacityWindows", () => {
|
||||
startDate: new Date("2026-03-09"),
|
||||
endDate: new Date("2026-03-13"),
|
||||
hoursPerDay: 8,
|
||||
status: "CONFIRMED",
|
||||
status: AllocationStatus.CONFIRMED,
|
||||
},
|
||||
],
|
||||
new Date("2026-03-09"),
|
||||
@@ -226,7 +227,7 @@ describe("findCapacityWindows", () => {
|
||||
startDate: new Date("2026-03-09"),
|
||||
endDate: new Date("2026-03-13"),
|
||||
hoursPerDay: 8,
|
||||
status: "CANCELLED",
|
||||
status: AllocationStatus.CANCELLED,
|
||||
},
|
||||
],
|
||||
new Date("2026-03-09"),
|
||||
@@ -244,7 +245,7 @@ describe("findCapacityWindows", () => {
|
||||
startDate: new Date("2026-03-11"), // Wed only fully booked
|
||||
endDate: new Date("2026-03-11"),
|
||||
hoursPerDay: 8,
|
||||
status: "CONFIRMED",
|
||||
status: AllocationStatus.CONFIRMED,
|
||||
},
|
||||
],
|
||||
new Date("2026-03-09"), // Mon
|
||||
@@ -264,7 +265,7 @@ describe("findCapacityWindows", () => {
|
||||
startDate: new Date("2026-03-09"),
|
||||
endDate: new Date("2026-03-09"),
|
||||
hoursPerDay: 6,
|
||||
status: "CONFIRMED",
|
||||
status: AllocationStatus.CONFIRMED,
|
||||
},
|
||||
],
|
||||
new Date("2026-03-09"),
|
||||
|
||||
Reference in New Issue
Block a user