Skip to content

Commit

Permalink
[feat]登録・編集モーダル バリデーション追加
Browse files Browse the repository at this point in the history
  • Loading branch information
Kubosaka committed Nov 23, 2023
1 parent f1f9370 commit 2320679
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions view/next-project/src/components/yearperiods/AddModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ const OpenAddModal: FC<ModalProps> = (props) => {
onClick={() => {
submit(formData);
}}
disabled={
String(formData.year) === '' || formData.startedAt === '' || formData.endedAt === ''
}
>
登録する
</PrimaryButton>
Expand Down
3 changes: 3 additions & 0 deletions view/next-project/src/components/yearperiods/EditModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ export default function EditModal(props: ModalProps) {
onClick={() => {
submitYearRecords(formData);
}}
disabled={
String(formData.year) === '' || formData.startedAt === '' || formData.endedAt === ''
}
>
登録する
</PrimaryButton>
Expand Down

0 comments on commit 2320679

Please sign in to comment.