feat: Pane2にD&Dとアーカイブを追加

- Pane2 の候補者カードを D&D で並び替え・アーカイブできるように
- README のサンプル画面スクリーンショットを最新版に差し替え
This commit is contained in:
snc777
2026-05-09 16:12:21 +09:00
parent f6a781c47e
commit 7cb2209735
12 changed files with 887 additions and 142 deletions
+47
View File
@@ -64,3 +64,50 @@ describe("schema rejects invalid data", () => {
expect(workspaceSchema.safeParse({ icon: "" }).success).toBe(false);
});
});
describe("candidate.archived の取り扱い", () => {
const baseCandidate = {
id: "c-archived-test",
profile: {
name: "テスト 太郎",
birthday: "",
source: "",
email: "",
phone: "",
address: "",
recruiter: "",
desiredSalaryMin: "",
desiredSalaryMax: "",
availableStartDate: "",
careerText: "",
motivationFull: "",
},
scorecards: [],
stage: "screening" as const,
};
it("archived 未指定なら false がデフォルトで埋まる", () => {
const result = candidatesSchema.safeParse([baseCandidate]);
expect(result.success).toBe(true);
if (result.success) {
expect(result.data[0].archived).toBe(false);
}
});
it("archived: true を許容する", () => {
const result = candidatesSchema.safeParse([
{ ...baseCandidate, archived: true },
]);
expect(result.success).toBe(true);
if (result.success) {
expect(result.data[0].archived).toBe(true);
}
});
it("archived が boolean でなければ不可", () => {
const result = candidatesSchema.safeParse([
{ ...baseCandidate, archived: "yes" },
]);
expect(result.success).toBe(false);
});
});
+1
View File
@@ -104,6 +104,7 @@ describe("getCandidateAverageScore / getScorecardsAverageScore", () => {
},
scorecards: [],
stage: "screening",
archived: false,
};
expect(getCandidateAverageScore(candidate)).toBeNull();
expect(getScorecardsAverageScore([])).toBeNull();