mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
fix: fix frontend build errors (#17252)
This commit is contained in:
@ -66,7 +66,10 @@ const CreateWorkspacePageExperimental: FC = () => {
|
|||||||
const permissionsQuery = useQuery(
|
const permissionsQuery = useQuery(
|
||||||
templateQuery.data
|
templateQuery.data
|
||||||
? checkAuthorization({
|
? checkAuthorization({
|
||||||
checks: workspacePermissionChecks(templateQuery.data.organization_id),
|
checks: workspacePermissionChecks(
|
||||||
|
templateQuery.data.organization_id,
|
||||||
|
me.id,
|
||||||
|
),
|
||||||
})
|
})
|
||||||
: { enabled: false },
|
: { enabled: false },
|
||||||
);
|
);
|
||||||
|
@ -25,12 +25,7 @@ import {
|
|||||||
useMemo,
|
useMemo,
|
||||||
useState,
|
useState,
|
||||||
} from "react";
|
} from "react";
|
||||||
import { Link } from "react-router-dom";
|
import { getFormHelpers, nameValidator } from "utils/formUtils";
|
||||||
import {
|
|
||||||
getFormHelpers,
|
|
||||||
nameValidator,
|
|
||||||
onChangeTrimmed,
|
|
||||||
} from "utils/formUtils";
|
|
||||||
import {
|
import {
|
||||||
type AutofillBuildParameter,
|
type AutofillBuildParameter,
|
||||||
getInitialRichParameterValues,
|
getInitialRichParameterValues,
|
||||||
@ -258,7 +253,7 @@ export const CreateWorkspacePageViewExperimental: FC<
|
|||||||
<hgroup>
|
<hgroup>
|
||||||
<h2 className="text-xl font-semibold m-0">General</h2>
|
<h2 className="text-xl font-semibold m-0">General</h2>
|
||||||
<p className="text-sm text-content-secondary mt-0">
|
<p className="text-sm text-content-secondary mt-0">
|
||||||
{permissions.createWorkspaceForUser
|
{permissions.createWorkspace
|
||||||
? "Only admins can create workspaces for other users."
|
? "Only admins can create workspaces for other users."
|
||||||
: "The name of your new workspace."}
|
: "The name of your new workspace."}
|
||||||
</p>
|
</p>
|
||||||
@ -305,7 +300,7 @@ export const CreateWorkspacePageViewExperimental: FC<
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{permissions.createWorkspaceForUser && (
|
{permissions.createWorkspace && (
|
||||||
<div className="flex flex-col gap-2 flex-1">
|
<div className="flex flex-col gap-2 flex-1">
|
||||||
<Label className="text-sm" htmlFor={`${id}-workspace-name`}>
|
<Label className="text-sm" htmlFor={`${id}-workspace-name`}>
|
||||||
Owner
|
Owner
|
||||||
|
Reference in New Issue
Block a user