standardize header, save all button for targets, fix update site on resource

This commit is contained in:
Milo Schwartz
2024-11-13 20:08:05 -05:00
parent cf3cf4d827
commit 44b932937f
33 changed files with 577 additions and 397 deletions

View File

@@ -29,6 +29,7 @@ import {
} from "@app/components/Credenza";
import { useOrgContext } from "@app/hooks/useOrgContext";
import { CreateRoleBody, CreateRoleResponse } from "@server/routers/role";
import { formatAxiosError } from "@app/lib/utils";
type CreateRoleFormProps = {
open: boolean;
@@ -74,9 +75,10 @@ export default function CreateRoleForm({
toast({
variant: "destructive",
title: "Failed to create role",
description:
e.response?.data?.message ||
"An error occurred while creating the role.",
description: formatAxiosError(
e,
"An error occurred while creating the role."
),
});
});

View File

@@ -36,6 +36,7 @@ import {
SelectValue,
} from "@app/components/ui/select";
import { RoleRow } from "./RolesTable";
import { formatAxiosError } from "@app/lib/utils";
type CreateRoleFormProps = {
open: boolean;
@@ -71,9 +72,10 @@ export default function DeleteRoleForm({
toast({
variant: "destructive",
title: "Failed to fetch roles",
description:
e.message ||
"An error occurred while fetching the roles",
description: formatAxiosError(
e,
"An error occurred while fetching the roles"
),
});
});
@@ -109,9 +111,10 @@ export default function DeleteRoleForm({
toast({
variant: "destructive",
title: "Failed to remove role",
description:
e.response?.data?.message ||
"An error occurred while removing the role.",
description: formatAxiosError(
e,
"An error occurred while removing the role."
),
});
});