1
0
forked from baron/baron-sso

feat: enhance tenant admin experience with form locking and column visibility settings

This commit is contained in:
2026-03-04 13:55:54 +09:00
parent 88720b48c4
commit 2b4b40c0d9
3 changed files with 105 additions and 6 deletions

View File

@@ -16,6 +16,7 @@ import { Input } from "../../components/ui/input";
import { Label } from "../../components/ui/label";
import {
type UserUpdateRequest,
fetchMe,
fetchTenant,
fetchTenants,
fetchUser,
@@ -42,6 +43,11 @@ function UserDetailPage() {
const [error, setError] = React.useState<string | null>(null);
const [successMsg, setSuccessMsg] = React.useState<string | null>(null);
const { data: profile } = useQuery({
queryKey: ["me"],
queryFn: fetchMe,
});
const {
data: user,
isLoading,
@@ -332,6 +338,7 @@ function UserDetailPage() {
id="companyCode"
className="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50"
{...register("companyCode")}
disabled={profile?.role === "tenant_admin"}
>
<option value="">
{t(