forked from baron/baron-sso
refactor(adminfront): rename legacy companyCode to tenantSlug across frontend (#426)
This commit is contained in:
@@ -202,7 +202,7 @@ function UserDetailPage() {
|
||||
phone: "",
|
||||
role: "user",
|
||||
status: "active",
|
||||
companyCode: "",
|
||||
tenantSlug: "",
|
||||
department: "",
|
||||
position: "",
|
||||
jobTitle: "",
|
||||
@@ -243,7 +243,7 @@ function UserDetailPage() {
|
||||
phone: user.phone || "",
|
||||
role: user.role,
|
||||
status: user.status,
|
||||
companyCode: user.companyCode || "",
|
||||
tenantSlug: user.tenantSlug || "",
|
||||
department: user.department || "",
|
||||
position: user.position || "",
|
||||
jobTitle: user.jobTitle || "",
|
||||
@@ -377,7 +377,7 @@ function UserDetailPage() {
|
||||
<div className="relative">
|
||||
<select
|
||||
className="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary disabled:opacity-50"
|
||||
{...register("companyCode")}
|
||||
{...register("tenantSlug")}
|
||||
disabled={
|
||||
profile?.role === "tenant_admin" &&
|
||||
userAffiliatedTenants.length <= 1
|
||||
@@ -428,7 +428,7 @@ function UserDetailPage() {
|
||||
to={`/tenants/${jt.id}`}
|
||||
className={`inline-flex items-center gap-1 px-2 py-0.5 rounded border text-[11px] transition-colors ${
|
||||
jt.id ===
|
||||
tenants.find((t) => t.slug === watch("companyCode"))
|
||||
tenants.find((t) => t.slug === watch("tenantSlug"))
|
||||
?.id
|
||||
? "bg-primary/10 border-primary/30 text-primary font-bold"
|
||||
: "bg-background border-border text-muted-foreground hover:border-primary/50"
|
||||
|
||||
Reference in New Issue
Block a user