Closed SuzukiTakamasa closed 5 months ago
現行のロジック (schedule.year === year && schedule.month === month && schedule.from_date <= day && schedule.to_date >= day) &&
変更後のロジック const isDisplayed = () => { //関数の中身 }
現行のschedule表示ロジック (schedule.year === year && schedule.month === month && schedule.from_date <= day && schedule.to_date >= day) &&
変更後のschedule表示ロジック ((schedule.from_year <= year && schedule.to_year >= year) && (schedule.from_year === schedule.to_year ? schedule.from_month <= month && schedule.to_month >= month : schedule.from_month <= 12 && schedule.to_month >= 1) && (schedule.from_month === schedule.to_month ? schedule.from_date <= day && schedule.to_date >= day : schedule.from_month <= numerOfDate && schedule.to_month >= 1) &&
from、toのバリデーション disabled={fromYear > toYear} disabled={fromYear === toYear && fromMonth > toMonth} disabled={fromYear === toYear && fromMonth === toMonth && fromDate > toDate}
フロントエンド、バックエンドそれぞれにバリデーションを実装する
対応済み
scgedulesテーブルに以下のカラムを追加する