Skip to content

feat: 物品割当に貸出場所を追加#2028

Draft
hikahana wants to merge 1 commit intogm3/developfrom
codex/assign-rental-items-rental-place
Draft

feat: 物品割当に貸出場所を追加#2028
hikahana wants to merge 1 commit intogm3/developfrom
codex/assign-rental-items-rental-place

Conversation

@hikahana
Copy link
Copy Markdown
Contributor

課題と解決策

  • assign_rental_items に元の在庫場所しかなく、物品を集約して受け渡す貸出場所を保持できなかった
  • assign_rental_items に rental_place_id を追加し、stocker_places を参照する形で貸出場所を保持するようにした
  • 物品割当 API、CSV/PDF、旧管理画面の一覧・詳細・編集を貸出場所に対応させた

検証結果

  • docker compose run --rm api rails db:migrate
  • docker compose run --rm api rails db:migrate RAILS_ENV=test
  • docker compose run --rm --no-deps api ruby -c app/models/assign_rental_item.rb app/models/stocker_place.rb app/controllers/assign_rental_items_controller.rb app/controllers/api/v1/assign_rental_items_api_controller.rb app/controllers/api/v1/output_csv_controller.rb db/migrate/20260420000001_add_rental_place_id_to_assign_rental_items.rb test/models/assign_rental_item_test.rb test/controllers/assign_rental_items_controller_test.rb
  • docker compose run --rm admin_view npm run build
  • 手動 API 確認: GET/POST/PUT/DELETE /assign_rental_items, POST /api/v1/get_refinement_assign_rental_item

補足

  • rails test は既存の employees fixture が現行 schema と不整合なため失敗することを確認済み(今回の変更起因ではない)

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 21, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 51567469-6442-49eb-9419-4d6002758956

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/assign-rental-items-rental-place

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant