feat: 火気使用申請のユーザー画面制御を追加#2040
Conversation
📝 WalkthroughWalkthroughA new user-page-settings control flag ( Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
user/src/pages/home/index.tsx (1)
4-4: ⚡ Quick winAvoid duplicating
UserPageSettingstype in this page.The local type can drift from
user/src/api/userPageSettingAPI.ts. Reusing the shared type will reduce contract mismatch risk.♻️ Suggested simplification
-import { useGetUserPageSettings } from '@/api/userPageSettingAPI'; +import { + useGetUserPageSettings, + type UserPageSettings, +} from '@/api/userPageSettingAPI'; @@ -type UserPageSettings = { - isEditPlace?: boolean; - isEditRentalOrder?: boolean; - isEditPowerOrder?: boolean; - isEditPublicRelation?: boolean; - isEditEmployee?: boolean; - isEditVenueMap?: boolean; - isEditFoodProduct?: boolean; - isEditPurchaseList?: boolean; - isEditCookingProcess?: boolean; - isEditFireEquipmentOrder?: boolean; - isEditStageOrder?: boolean; - isEditStageCommonOption?: boolean; - isRegistGroup?: boolean; - isEditSubRep?: boolean; -};Also applies to: 24-39
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@user/src/pages/home/index.tsx` at line 4, This file defines a local UserPageSettings type that duplicates the one in user/src/api/userPageSettingAPI.ts; remove the local type declarations and instead import the shared UserPageSettings type from the API module and use it everywhere the page currently references the local type (e.g., in state, props, and function signatures around the useGetUserPageSettings usage and related variables on lines ~24-39); update any type annotations to refer to the imported UserPageSettings and ensure there are no leftover local declarations or conflicting names.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@user/src/pages/home/index.tsx`:
- Line 4: This file defines a local UserPageSettings type that duplicates the
one in user/src/api/userPageSettingAPI.ts; remove the local type declarations
and instead import the shared UserPageSettings type from the API module and use
it everywhere the page currently references the local type (e.g., in state,
props, and function signatures around the useGetUserPageSettings usage and
related variables on lines ~24-39); update any type annotations to refer to the
imported UserPageSettings and ensure there are no leftover local declarations or
conflicting names.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 71513448-029b-448f-8396-fe4a8dd481b6
⛔ Files ignored due to path filters (1)
admin_view/nuxt-project/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (9)
admin_view/nuxt-project/package.jsonadmin_view/nuxt-project/pages/user_page_setting/index.vueapi/app/controllers/user_page_settings_controller.rbapi/db/fixtures/develop/user_page_setting.rbapi/db/fixtures/production/user_page_setting.rbapi/db/migrate/20260501000001_add_is_edit_fire_equipment_order_to_user_page_settings.rbapi/db/schema.rbuser/src/api/userPageSettingAPI.tsuser/src/pages/home/index.tsx
💤 Files with no reviewable changes (1)
- admin_view/nuxt-project/package.json
|
@YosukeIida |
対応Issue
resolve #2036
概要
受付中/受付終了として表示します実装詳細
user_page_settingsにis_edit_fire_equipment_orderを追加UserPageSettingsControllerでis_edit_fire_equipment_orderを更新可能に変更ユーザー画面制御に火気使用申請の行とスイッチを追加FireEquipmentにisDeadline={!userPageSettings?.isEditFireEquipmentOrder}を渡すように変更is_edit_fire_equipment_order: trueを追加injectを削除npm install時にInvalid Version: 1.0.0beta2で失敗していたため画面スクリーンショット等
テスト項目
make build-gm3-macdocker compose run --rm user pnpm run type-checkdocker compose run --rm user pnpm run lintユーザー画面制御で火気使用申請を OFF にすると,user 側で受付終了になり,申請フォームが開かないことユーザー画面制御で火気使用申請を ON に戻すと,user 側で受付中になり,申請内容と修正ボタンが表示されることdocker compose run --rm api rails test備考
docker compose run --rm api rails testは既存 fixture の schema 不整合で失敗しましたapi/test/fixtures/assign_rental_items.ymlが現在の schema と一致していないためuser_page_settings/ 火気使用申請制御とは別件ですSummary by CodeRabbit
New Features
Chores