forked from baron/baron-sso
5ee9a46663 반영 code-check 오류 수정
This commit is contained in:
@@ -796,15 +796,15 @@ function UserDetailPage() {
|
||||
payload.metadata = {
|
||||
...metadata,
|
||||
additionalAppointments: appointments,
|
||||
primaryTenantId: primaryAppointment?.tenantId,
|
||||
primaryTenantName: primaryAppointment?.tenantName,
|
||||
primaryTenantSlug: primaryAppointment?.tenantSlug,
|
||||
primaryTenantIsOwner: primaryAppointment?.isOwner ?? false,
|
||||
primaryTenantId: primary?.tenantId,
|
||||
primaryTenantName: primary?.tenantName,
|
||||
primaryTenantSlug: primary?.tenantSlug,
|
||||
primaryTenantIsOwner: primary?.isOwner ?? false,
|
||||
};
|
||||
payload.tenantSlug = primaryAppointment?.tenantSlug;
|
||||
payload.primaryTenantId = primaryAppointment?.tenantId;
|
||||
payload.primaryTenantName = primaryAppointment?.tenantName;
|
||||
payload.primaryTenantIsOwner = primaryAppointment?.isOwner ?? false;
|
||||
payload.tenantSlug = primary?.tenantSlug;
|
||||
payload.primaryTenantId = primary?.tenantId;
|
||||
payload.primaryTenantName = primary?.tenantName;
|
||||
payload.primaryTenantIsOwner = primary?.isOwner ?? false;
|
||||
}
|
||||
|
||||
mutation.mutate(payload);
|
||||
|
||||
@@ -40,6 +40,7 @@ import {
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from "../../components/ui/select";
|
||||
import { Switch } from "../../components/ui/switch";
|
||||
import {
|
||||
Table,
|
||||
TableBody,
|
||||
@@ -702,39 +703,25 @@ function UserListPage() {
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
<div className="flex items-center gap-2">
|
||||
<Select
|
||||
value={user.status}
|
||||
onValueChange={(value: "active" | "inactive") =>
|
||||
<Switch
|
||||
checked={user.status === "active"}
|
||||
onCheckedChange={(checked) =>
|
||||
statusMutation.mutate({
|
||||
userId: user.id,
|
||||
status: value,
|
||||
status: checked ? "active" : "inactive",
|
||||
})
|
||||
}
|
||||
disabled={
|
||||
statusMutation.isPending ||
|
||||
user.id === profile?.id
|
||||
}
|
||||
>
|
||||
<SelectTrigger
|
||||
className="h-8 w-[112px]"
|
||||
aria-label={t(
|
||||
"ui.admin.users.list.toggle_status",
|
||||
"{{name}} 활성 상태",
|
||||
{ name: user.name },
|
||||
)}
|
||||
data-testid={`user-status-select-${user.id}`}
|
||||
>
|
||||
<SelectValue />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="active">
|
||||
{t("ui.common.status.active", "활성")}
|
||||
</SelectItem>
|
||||
<SelectItem value="inactive">
|
||||
{t("ui.common.status.inactive", "비활성")}
|
||||
</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
aria-label={t(
|
||||
"ui.admin.users.list.toggle_status",
|
||||
"{{name}} 활성 상태",
|
||||
{ name: user.name },
|
||||
)}
|
||||
data-testid={`user-status-toggle-${user.id}`}
|
||||
/>
|
||||
<span className="text-sm text-muted-foreground">
|
||||
{t(`ui.common.status.${user.status}`, user.status)}
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user