Skip to content

Conversation

@hikahana
Copy link
Contributor

@hikahana hikahana commented Jun 29, 2025

対応Issue

resolve #0

概要

  • 火気使用申請機能の新規実装

実装詳細

  • 火気使用申請機能
    • 火気使用申請の登録、一覧表示、編集、削除機能を追加
    • 年度ごとの絞り込み、CSVダウンロード機能を追加
    • ダッシュボードにサマリー情報を表示
    • サイドバーにメニュー項目を追加

画面スクリーンショット等

image
image
image

image
image

テスト項目

  • 火気使用申請
    • 新規申請が正しく登録できるか
    • 一覧画面にデータが正しく表示されるか
    • 年度での絞り込みが機能するか
    • CSVが正しくダウンロードされるか
    • 編集、削除が正しく行えるか
    • ダッシュボードの数値が正しいか
  • 既存機能
    • 各画面でのCSV/PDFダウンロードが正常に行えるか
    • 各画面の表示が崩れていないか

備考

@hikahana hikahana self-assigned this Jun 29, 2025
@hikahana hikahana changed the title Feat/hikahana/fire equpment admin UI 火器使用申請UIの作成 Jun 30, 2025
@hikahana hikahana changed the title 火器使用申請UIの作成 【admin】火器使用申請UIの作成 Jul 1, 2025
@hikahana hikahana marked this pull request as ready for review July 6, 2025 10:43
Copy link
Collaborator

@izuizu0424 izuizu0424 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

動作確認OKだと思います!

管理者画面 画像
image
「使用場所」→「使用用途」でお願いします.
詳細ページは「使用方法」になっていたので,ここも「使用用途」統一でお願いします
image

今全部の情報をページで見れるようになっているんですが,言ってたようにここに申請状況の欄を足すと,使用用途と備考欄が狭くなってしまうかなと思うので,備考欄は詳細ページのみでよろしくお願いします.
詳しいデザインで指定しておらず,すみません

end
bom = "\uFEFF"
csv_data = CSV.generate(bom) do |csv|
column_name = %w(ID 団体名 品目 数量 燃料 使用場所 持ち帰り 備考)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

figmaだと火気の名称 , 火気の台数 , 使用用途 だった

Suggested change
column_name = %w(ID 団体名 品目 数量 燃料 使用場所 持ち帰り 備考)
column_name = %w(ID 団体名 火気の名称 火気の台数 燃料 使用用途 持ち帰り 備考)

Comment on lines 506 to 515
column_name = %w(参加団体名 PR文 URL アナウンス有無)
column_name = %w(参加団体名 PR文 PR画像)
csv << column_name
@public_relations.each do |public_relations|
# データが存在しない場合はスキップする
if public_relations.nil?
@public_relations.each do |public_relation|
if public_relation.nil?
next
end
column_values = [
public_relations.group.name,
public_relations.blurb,
public_relations.picture_path,
public_relations.is_announcement_requested ? "有" : "無",
public_relation.group.name,
public_relation.pr_comment,
public_relation.pr_image,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

なぜかpublic_relationsも変更されてる
|public_relations||public_relation| にするのは良さげ

order.quantity,
fuel_jp,
order.usage,
order.is_takeaway ? 'はい' : 'いいえ',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

csv出力に持ち帰るかどうかはいらないかも
持ち帰る にしないと登録できないから

Suggested change
order.is_takeaway ? 'はい' : 'いいえ',

その場合、column_name から 持ち帰り を消す

@harata-t
Copy link
Collaborator

harata-t commented Jul 12, 2025

バックエンド:controller
管理者(Vue.js):index.vue
管理者(Vue.js):_id.vue
おそらくユーザー画面(Next.js)

で燃料enumの変換ロジックが重複するから、まとめられるならまとめたい感

@hikahana
Copy link
Contributor Author

hikahana commented Jul 18, 2025

@harata-t
ディレクトリ跨って重複するのはむずいなーって感じする。
APIのロジックに組み込むかフロント対応でよしなにするでも良さそうな感じするけど
個人的にはvueとnextjsでフロントが変わるから頑張ってapiの中でenum変換処理してレスポンスをstring形式で返した方が良いかも?

@hikahana
Copy link
Contributor Author

こんな感じです。

申請状況一覧
image

一覧ページ
image

詳細ページ
image

@hikahana hikahana requested review from harata-t and izuizu0424 July 20, 2025 07:16
Copy link
Collaborator

@harata-t harata-t left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@izuizu0424 izuizu0424 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

レビュー遅くなってすみません
csv出力なんですが,持って帰らない場合もあったと思うのでパラディンさんと要確認です
その他は大丈夫でした.

@hikahana
Copy link
Contributor Author

hikahana commented Aug 8, 2025

パラディンとよりも総務側でどのパターンのcsvがほしいかを確認すべきなのでは?

@harata-t
Copy link
Collaborator

harata-t commented Aug 8, 2025

バンバンslackで聞いちゃおう

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants