行政版: コピー・貼り付け・キーボード入力・自動シフトが行政の勤務帯・休み種別に未対応

Open
#258 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 12 days

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript
Domain
frontend

Research direction

Start with cellClipboard.ts (cellText), resolveShiftInput.ts (resolveShiftInput and suggestShiftInputs) and minDayOffStep.ts, then read how CellFace renders shortName, startHour and reason so the text matches. Add shortName matching and reason-tagged day-off parsing while keeping the existing startHour and "休" behaviour for the hotel version. Done when pasting and typing "A" or "週" resolve correctly in the administrative version and the hotel tests still pass; the minDayOffStep reason choice needs a maintainer decision (see #257).

Written by the indexing model from the issue text.

Description

enhancement Shiftonton

現状

勤務表のセル操作(コピー・貼り付け・キーボード入力・自動シフト)はホテル版の前提で作られており、行政版で期待通り動かない箇所がある。

問題の一覧

コピー&ペースト(cellClipboard.ts)
  • cellText: reasonつき休み("週","祝"等)が常に「休」としてコピーされる
  • cellText: 勤務帯が startHour(時刻)でコピーされる。行政は shortName(A, B, ①等)であるべき
  • 貼り付け時に「週」「A」等のテキストが resolveShiftInput で解決できず「読めない文字」になる
キーボード入力(resolveShiftInput.ts)
  • shortName による勤務帯の一致に未対応("A" → A勤務が解決されない)
  • reason付き休みの入力に未対応("週" → { kind: "day-off", reason: "週" } にならない)
  • suggestShiftInputs も shortName の前方一致に未対応
自動シフト(minDayOffStep.ts)
  • 最低休日数を確保するステップが { kind: "day-off" }(reason なし)で休みを置く
  • 行政では reason なしの休みは意味が曖昧(issue #257 と関連)

修正方針

  • cellText: CellFace の表示ロジック(shortName ?? startHour, reason ?? "休")と一致させる
  • resolveShiftInput: shortName マッチを追加。DayOffType の shortName も day-off として解決する(引数で渡す)
  • suggestShiftInputs: shortName の前方一致を追加
  • minDayOffStep: 要検討(希望がない日に置く休みの reason をどう決めるか)
  • ホテル版に影響が出ないよう、既存の startHour マッチや "休" → reason なしの挙動は維持する

関連

  • #257 「休」をカテゴリ表示にする — reason なしの day-off を廃止
Dominant language
TypeScript
Stars
1
Forks
0
Avg merge
9d 13h
Merged PRs (30d)
10

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from fumicode/bublys-org

All issues in fumicode/bublys-org

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.