1
0
forked from baron/baron-sso

chore: formatting and linting cleanup via code-check

This commit is contained in:
2026-06-02 18:53:56 +09:00
parent bf64f82507
commit f76dd4e60d
10 changed files with 266 additions and 323 deletions

View File

@@ -4,7 +4,6 @@ import { Building2, Sparkles } from "lucide-react";
import { useCallback, useMemo, useState } from "react";
import { useNavigate, useSearchParams } from "react-router-dom";
import { Button } from "../../../components/ui/button";
import { Checkbox } from "../../../components/ui/checkbox";
import {
Card,
CardContent,
@@ -12,6 +11,7 @@ import {
CardHeader,
CardTitle,
} from "../../../components/ui/card";
import { Checkbox } from "../../../components/ui/checkbox";
import { Input } from "../../../components/ui/input";
import { Label } from "../../../components/ui/label";
import { Textarea } from "../../../components/ui/textarea";

View File

@@ -24,8 +24,6 @@ function TenantDetailPage() {
const profileRole = normalizeAdminRole(profile?.role);
const canAccessSchema = profileRole === "super_admin";
Broadway
const showWorksmobileEntry = canShowWorksmobileEntry(tenantQuery.data);
const isPermissionsTab = location.pathname.includes("/permissions");
const isOrganizationTab = location.pathname.includes("/organization");

View File

@@ -19,12 +19,13 @@ export type WorksmobileAccessProfile = {
}>;
};
export function isWorksmobileExcludedConfig(
config?: Record<string, unknown>,
) {
export function isWorksmobileExcludedConfig(config?: Record<string, unknown>) {
const rawValue = config?.worksmobileExcluded;
return (
rawValue === true || String(rawValue ?? "").trim().toLowerCase() === "true"
rawValue === true ||
String(rawValue ?? "")
.trim()
.toLowerCase() === "true"
);
}

View File

@@ -80,14 +80,10 @@ describe("tenant org config", () => {
});
it("reads, writes, and removes the Worksmobile exclusion flag", () => {
expect(
readTenantOrgConfig({ worksmobileExcluded: true }),
).toMatchObject({
expect(readTenantOrgConfig({ worksmobileExcluded: true })).toMatchObject({
worksmobileExcluded: true,
});
expect(
readTenantOrgConfig({ worksmobileExcluded: "true" }),
).toMatchObject({
expect(readTenantOrgConfig({ worksmobileExcluded: "true" })).toMatchObject({
worksmobileExcluded: true,
});
expect(

View File

@@ -986,14 +986,13 @@ function UserCreatePage() {
}
>
<option value=""></option>
{getTenantGradeOptions(
appointment,
tenants,
).map((grade) => (
<option key={grade} value={grade}>
{grade}
</option>
))}
{getTenantGradeOptions(appointment, tenants).map(
(grade) => (
<option key={grade} value={grade}>
{grade}
</option>
),
)}
</select>
</div>
<div className="space-y-2">