feat(admin): add configurable order views (#13211)

Adds support for configurable order views.

https://github.com/user-attachments/assets/ed4a5f61-1667-4ed7-9478-423894f3eba6
This commit is contained in:
Sebastian Rindom
2025-09-01 17:04:18 +00:00
committed by GitHub
parent f8d8eeace1
commit c717535ca2
22 changed files with 1735 additions and 384 deletions
@@ -40,23 +40,10 @@ export const GET = async (
default_type: "code",
})
} else {
// Check if the user has an explicit preference
const activeViewPref = await settingsService.getUserPreference(
req.auth_context.actor_id,
`active_view.${req.params.entity}`
)
// If there's no preference and the view is a system default, it means we're falling back to system default
const isDefaultActive =
!activeViewPref && viewConfiguration.is_system_default
res.json({
view_configuration: viewConfiguration,
is_default_active: isDefaultActive,
default_type:
isDefaultActive && viewConfiguration.is_system_default
? "system"
: undefined,
is_default_active: viewConfiguration.is_system_default,
default_type: viewConfiguration.is_system_default ? "system" : undefined,
})
}
}