feat: add admin components for input, metrics, tables, and user forms
- Introduced AdminInput component for standardized input fields. - Created AdminMetricCard for displaying metrics with customizable tones. - Added AdminPlaceholderTable for loading states in tables. - Developed AdminSectionCard for consistent section layouts. - Implemented AdminSectionShell for organizing admin sections. - Added AdminSelect for dropdown selections with v-model support. - Created AdminTable for displaying tabular data with loading and empty states. - Introduced AdminTextarea for multi-line text input. - Developed AdminUserFormFields for user creation and editing forms. - Added useAdminPageHeader composable for managing admin page header state.
This commit is contained in:
@@ -65,10 +65,6 @@ const notificationTypes = computed(() => [
|
||||
const isInitialLoading = computed(() => isPending.value && !preferencesSnapshot.value);
|
||||
const isInteractionDisabled = computed(() => saving.value || isInitialLoading.value || !preferencesSnapshot.value);
|
||||
|
||||
const refetchPreferences = () => refetch((fetchError) => {
|
||||
throw fetchError;
|
||||
});
|
||||
|
||||
watch(preferencesSnapshot, (snapshot) => {
|
||||
if (!snapshot) return;
|
||||
notificationSettings.value = createNotificationSettingsDraft(snapshot);
|
||||
@@ -93,7 +89,7 @@ const handleSave = async () => {
|
||||
await rpcClient.updatePreferences(
|
||||
toNotificationPreferencesPayload(notificationSettings.value),
|
||||
);
|
||||
await refetchPreferences();
|
||||
await refetch();
|
||||
|
||||
toast.add({
|
||||
severity: 'success',
|
||||
|
||||
Reference in New Issue
Block a user