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:
@@ -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,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user