Skip to content

Commit 03f2196

Browse files
aster-voidnakaterm
andauthored
初期登録画面 の daisyUI 移行 (#519)
# PRの概要 ## 具体的な変更内容 ![スクリーンショット 2024-11-10 164141](https://github.com/user-attachments/assets/281dfcb7-2f4c-4bae-9429-7a161f1215e5) ## 影響範囲 ## 動作要件 ## 補足 ## レビューリクエストを出す前にチェック! - [ ] 改めてセルフレビューしたか - [ ] 手動での動作検証を行ったか - [ ] server の機能追加ならば、テストを書いたか - 理由: 書いた | server の機能追加ではない - [ ] 間違った使い方が存在するならば、それのドキュメントをコメントで書いたか - 理由: 書いた | 間違った使い方は存在しない - [ ] わかりやすいPRになっているか <!-- レビューリクエスト後は、Slackでもメンションしてお願いすることを推奨します。 --> --------- Co-authored-by: naka-12 <[email protected]>
1 parent 00df094 commit 03f2196

File tree

24 files changed

+628
-1822
lines changed

24 files changed

+628
-1822
lines changed

bun.lockb

-2.69 KB
Binary file not shown.

common/consts.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,20 @@ export const DAY_TO_JAPANESE_MAP = new Map<Day, string>([
1010
["sun", "日"],
1111
]);
1212

13-
export const ACTIVE_DAYS = ["mon", "tue", "wed", "thu", "fri", "sat"] as const;
13+
export const ACTIVE_DAYS = ["mon", "tue", "wed", "thu", "fri"] as const;
14+
15+
export const sortSlots = (
16+
slots: {
17+
day: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun" | "other";
18+
period: number;
19+
}[],
20+
) => {
21+
const order = ["mon", "tue", "wed", "thu", "fri", "sat", "sun", "other"];
22+
return slots.sort((a, b) => {
23+
const dayComparison = order.indexOf(a.day) - order.indexOf(b.day);
24+
if (dayComparison !== 0) {
25+
return dayComparison;
26+
}
27+
return a.period - b.period;
28+
});
29+
};

0 commit comments

Comments
 (0)