fix: fix detail view rendering in docker#7
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors data fetching logic in three list view components (RoleListView, PermissionListView, and AccountListView) to fix rendering issues in Docker. Despite the PR title mentioning "detail view", the changes are actually in list views.
Changes:
- Consolidated separate watch and fetch calls into a single watch with
immediate: trueoption - Added null checks for tenantId before triggering fetch operations
- Removed
isTenantReadychecks from template loading conditions
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/views/RoleListView.vue | Refactored tenant watch to use immediate option and added tenantId null check; removed isTenantReady from loading condition |
| src/views/PermissionListView.vue | Refactored tenant watch to use immediate option and added tenantId null check; removed isTenantReady from loading condition |
| src/views/AccountListView.vue | Refactored tenant watch to use immediate option and added tenantId null check; removed isTenantReady from loading condition |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <button @click="goToCreateRole">Create New Role</button> | ||
|
|
||
| <div v-if="!isTenantReady || loading"> | ||
| <div v-if="loading"> |
There was a problem hiding this comment.
The removal of the isTenantReady check can result in displaying "No roles found" when a system admin first loads the page before tenant selection completes. This is misleading. Consider importing tenantsLoading and isSystemAdmin from useTenant and updating the condition to: v-if="loading || (isSystemAdmin && tenantsLoading)" to show a loading state while tenants are being loaded for system administrators.
| <button @click="goToCreatePermission">Create New Permission</button> | ||
|
|
||
| <div v-if="!isTenantReady || loading"> | ||
| <div v-if="loading"> |
There was a problem hiding this comment.
The removal of the isTenantReady check can result in displaying "No permissions found" when a system admin first loads the page before tenant selection completes. This is misleading. Consider importing tenantsLoading and isSystemAdmin from useTenant and updating the condition to: v-if="loading || (isSystemAdmin && tenantsLoading)" to show a loading state while tenants are being loaded for system administrators.
| </div> | ||
|
|
||
| <div v-if="!isTenantReady || loading" class="tui-loading">Loading accounts</div> | ||
| <div v-if="loading" class="tui-loading">Loading accounts</div> |
There was a problem hiding this comment.
The removal of the isTenantReady check can result in displaying "No accounts found" when a system admin first loads the page before tenant selection completes. This is misleading. Consider importing tenantsLoading and isSystemAdmin from useTenant and updating the condition to: v-if="loading || (isSystemAdmin && tenantsLoading)" to show a loading state while tenants are being loaded for system administrators.
## [1.0.6](v1.0.5...v1.0.6) (2026-02-04) ### Bug Fixes * fix detail view rendering in docker ([#7](#7)) ([02d5c95](02d5c95))
|
🎉 This PR is included in version 1.0.6 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
No description provided.