-
Notifications
You must be signed in to change notification settings - Fork 3
火器使用申請のUI作成 #1925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: gm3/develop
Are you sure you want to change the base?
火器使用申請のUI作成 #1925
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ありがとうございます!デザインレビューのみです!
何も入力していないとき,すでに値が入っていたんですがこれは実装の段階で改善されますかね?

火気使用申請で「いいえ」を選択するとき以下のようなListを表示してほしいです!

すみませんデザインから間違ってました...
火器ではなく火気です

- 火気使用申請
- 火気を使用しますか?
- 火気の名称
- 火気の台数
- 火気を毎日テントから持ち帰ることができますか
- 火気は毎日持って帰ることができない場合を除き,基本的に持ち帰ってくだい。
火気をテント内に残す行為は火事の原因になります。
この部分を注意書き含めデザインに沿って変更お願いします
現在の実装

figma

登録を押してもカード化しないのでカード化までお願いします!
登録出来たらトースト表示をお願いします!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| required | ||
| options={[ | ||
| { | ||
| id: 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
下のも含め、constantに入れるようにしました
| <p className="max-w-[400px] break-words text-xs text-[#484848]"> | ||
| 火気は毎日持って帰ることができない場合を除き、基本的に持ち帰ってください。 | ||
| <br /> | ||
| 火気はテント内に残す行為は火事の原因になります。 | ||
| </p> | ||
| <p className="max-w-[400px] break-words text-xs text-[#484848]"> | ||
| いいえを押した場合は火気の備考欄に理由を記載して下さい。 | ||
| </p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
対応しました。
|
コンフリクトの解消、API型とFORM型の命名規則の統一、UIの調整を対応しました |




resolve #1908
概要
実装詳細
このプルリクエストでは、コンポーネント、フック、検証スキーマなど、消防設備申請を管理するための新機能が導入されます。これらの変更により、ユーザーは消防設備申請フォームを送信、編集、検証できるようになり、登録状況と期限に基づく条件付きロジックもサポートされます。
火器使用申請機能の実装:
コアコンポーネント:
FireEquipment.tsx: 期限と登録状況に応じた条件付きレンダリングを含む、消防設備申請のメインコンポーネントを実装します。FireEquipmentForm.tsx: 消防設備の詳細を送信するための詳細なフォームを提供します。名前、数量、燃料の種類、用途、備考などのフィールドが含まれます。FireEquipmentFormView.tsx: 登録ステータスと編集モードを処理するロジックでフォームをラップします。データ処理と検証:
hooks.ts: 消防設備の状態、フォームの送信、検証ロジックを管理するためのカスタムフックを追加します。登録済みおよび未登録の消防設備シナリオのサポートが含まれます。 [1] [2]schema.ts:消防設備フォームのZod検証スキーマを定義します。これには、持ち帰り状況に基づくコメントの条件付き検証が含まれます。ユーティリティと定数:
constant.ts: 消防設備フォームのフィールドとラジオボタンのオプションに列挙型と定数を導入します。 [1] [2]既存のコードベースとの統合:
Storybook とコンポーネントのインデックス作成:
FireEquipment.stories.tsx: テストとドキュメント作成を容易にするために、消防設備コンポーネントの Storybook ストーリーを追加します。index.ts: アプリケーション全体で使用するために新しいコンポーネントをエクスポートします。 [1] [2]ホームページ統合:
home/index.tsx:消防設備コンポーネントをホームページに統合し、ユーザーがその機能にアクセスできるようにします。 [1] [2]フォームの機能強化:
TextArea.tsx:フォーム フィールドの使いやすさを向上させるために、カスタム必須メッセージのサポートが追加されました。 [1] [2]Radio.tsx:Option型を再利用のためにエクスポートしますラジオボタンの設定で。これらの変更により、消防設備アプリケーションを管理するための堅牢なシステムが導入され、検証、条件付きレンダリング、既存のワークフローとの統合を通じてユーザーエクスペリエンスが向上します。
画面スクリーンショット等
テスト項目
備考