|
1 |
| -import Table from "@mui/material/Table"; |
2 |
| -import TableBody from "@mui/material/TableBody"; |
3 |
| -import TableCell from "@mui/material/TableCell"; |
4 |
| -import TableContainer from "@mui/material/TableContainer"; |
5 |
| -import TableHead from "@mui/material/TableHead"; |
6 |
| -import TableRow from "@mui/material/TableRow"; |
7 | 1 | import type {
|
8 | 2 | Organization,
|
9 | 3 | OrganizationSyncSettings,
|
@@ -48,6 +42,13 @@ import {
|
48 | 42 | } from "components/Popover/Popover";
|
49 | 43 | import { Spinner } from "components/Spinner/Spinner";
|
50 | 44 | import { Switch } from "components/Switch/Switch";
|
| 45 | +import { |
| 46 | + Table, |
| 47 | + TableBody, |
| 48 | + TableCell, |
| 49 | + TableHeader, |
| 50 | + TableRow, |
| 51 | +} from "components/Table/Table"; |
51 | 52 | import { useFormik } from "formik";
|
52 | 53 | import { Check, ChevronDown, CornerDownLeft, Plus, Trash } from "lucide-react";
|
53 | 54 | import { type FC, type KeyboardEventHandler, useId, useState } from "react";
|
@@ -218,7 +219,7 @@ export const IdpOrgSyncPageView: FC<IdpSyncPageViewProps> = ({
|
218 | 219 | {form.errors.field}
|
219 | 220 | </p>
|
220 | 221 | )}
|
221 |
| - <div className="flex flex-col gap-4"> |
| 222 | + <div className="flex flex-col gap-7"> |
222 | 223 | <div className="flex flex-row pt-8 gap-2 justify-between items-start">
|
223 | 224 | <div className="grid items-center gap-1">
|
224 | 225 | <Label className="text-sm" htmlFor={`${id}-idp-org-name`}>
|
@@ -318,7 +319,7 @@ export const IdpOrgSyncPageView: FC<IdpSyncPageViewProps> = ({
|
318 | 319 | placeholder="Select organization"
|
319 | 320 | emptyIndicator={
|
320 | 321 | <p className="text-center text-md text-content-primary">
|
321 |
| - All organizations selected |
| 322 | + No organizations found |
322 | 323 | </p>
|
323 | 324 | }
|
324 | 325 | />
|
@@ -415,40 +416,38 @@ interface IdpMappingTableProps {
|
415 | 416 |
|
416 | 417 | const IdpMappingTable: FC<IdpMappingTableProps> = ({ isEmpty, children }) => {
|
417 | 418 | return (
|
418 |
| - <TableContainer> |
419 |
| - <Table> |
420 |
| - <TableHead> |
421 |
| - <TableRow> |
422 |
| - <TableCell width="45%">IdP organization</TableCell> |
423 |
| - <TableCell width="55%">Coder organization</TableCell> |
424 |
| - <TableCell width="10%" /> |
425 |
| - </TableRow> |
426 |
| - </TableHead> |
427 |
| - <TableBody> |
428 |
| - <ChooseOne> |
429 |
| - <Cond condition={isEmpty}> |
430 |
| - <TableRow> |
431 |
| - <TableCell colSpan={999}> |
432 |
| - <EmptyState |
433 |
| - message={"No organization mappings"} |
434 |
| - isCompact |
435 |
| - cta={ |
436 |
| - <Link |
437 |
| - href={docs("/admin/users/idp-sync#organization-sync")} |
438 |
| - > |
439 |
| - How to set up IdP organization sync |
440 |
| - </Link> |
441 |
| - } |
442 |
| - /> |
443 |
| - </TableCell> |
444 |
| - </TableRow> |
445 |
| - </Cond> |
| 419 | + <Table> |
| 420 | + <TableHeader> |
| 421 | + <TableRow> |
| 422 | + <TableCell width="45%">IdP organization</TableCell> |
| 423 | + <TableCell width="55%">Coder organization</TableCell> |
| 424 | + <TableCell width="10%" /> |
| 425 | + </TableRow> |
| 426 | + </TableHeader> |
| 427 | + <TableBody> |
| 428 | + <ChooseOne> |
| 429 | + <Cond condition={isEmpty}> |
| 430 | + <TableRow> |
| 431 | + <TableCell colSpan={999}> |
| 432 | + <EmptyState |
| 433 | + message={"No organization mappings"} |
| 434 | + isCompact |
| 435 | + cta={ |
| 436 | + <Link |
| 437 | + href={docs("/admin/users/idp-sync#organization-sync")} |
| 438 | + > |
| 439 | + How to set up IdP organization sync |
| 440 | + </Link> |
| 441 | + } |
| 442 | + /> |
| 443 | + </TableCell> |
| 444 | + </TableRow> |
| 445 | + </Cond> |
446 | 446 |
|
447 |
| - <Cond>{children}</Cond> |
448 |
| - </ChooseOne> |
449 |
| - </TableBody> |
450 |
| - </Table> |
451 |
| - </TableContainer> |
| 447 | + <Cond>{children}</Cond> |
| 448 | + </ChooseOne> |
| 449 | + </TableBody> |
| 450 | + </Table> |
452 | 451 | );
|
453 | 452 | };
|
454 | 453 |
|
|
0 commit comments