Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit19fcd6f

Browse files
committed
fix: format
1 parent55ed653 commit19fcd6f

File tree

5 files changed

+22
-18
lines changed

5 files changed

+22
-18
lines changed

‎site/src/api/queries/organizations.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -316,10 +316,9 @@ export const workspacePermissionsByOrganization = (
316316
queryKey:["workspaces",organizationIds.sort(),"permissions"],
317317
queryFn:async()=>{
318318
constprefixedChecks=organizationIds.flatMap((orgId)=>
319-
Object.entries(workspacePermissionChecks(orgId,userId)).map(([key,val])=>[
320-
`${orgId}.${key}`,
321-
val,
322-
]),
319+
Object.entries(workspacePermissionChecks(orgId,userId)).map(
320+
([key,val])=>[`${orgId}.${key}`,val],
321+
),
323322
);
324323

325324
constresponse=awaitAPI.checkAuthorization({

‎site/src/modules/permissions/workspaces.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
exportconstworkspacePermissionChecks=(organizationId:string,userId:string)=>
1+
exportconstworkspacePermissionChecks=(
2+
organizationId:string,
3+
userId:string,
4+
)=>
25
({
36
createWorkspace:{
47
object:{

‎site/src/pages/CreateWorkspacePage/CreateWorkspacePage.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@ const CreateWorkspacePage: FC = () => {
6767
constpermissionsQuery=useQuery(
6868
templateQuery.data
6969
?checkAuthorization({
70-
checks:workspacePermissionChecks(templateQuery.data.organization_id,me.id),
70+
checks:workspacePermissionChecks(
71+
templateQuery.data.organization_id,
72+
me.id,
73+
),
7174
})
7275
:{enabled:false},
7376
);

‎site/src/pages/TemplatePage/TemplateLayout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import { ErrorAlert } from "components/Alert/ErrorAlert";
55
import{Loader}from"components/Loader/Loader";
66
import{Margins}from"components/Margins/Margins";
77
import{TabLink,Tabs,TabsList}from"components/Tabs/Tabs";
8-
import{workspacePermissionChecks}from"modules/permissions/workspaces";
98
import{useAuthenticated}from"contexts/auth/RequireAuth";
9+
import{workspacePermissionChecks}from"modules/permissions/workspaces";
1010
import{
1111
typeFC,
1212
typePropsWithChildren,

‎site/src/pages/TemplatePage/TemplatePageHeader.tsx

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -179,17 +179,16 @@ export const TemplatePageHeader: FC<TemplatePageHeaderProps> = ({
179179
<PageHeader
180180
actions={
181181
<>
182-
{!template.deprecated&&
183-
workspacePermissions.createWorkspace&&(
184-
<Button
185-
variant="contained"
186-
startIcon={<AddIcon/>}
187-
component={RouterLink}
188-
to={`${templateLink}/workspace`}
189-
>
190-
Create Workspace
191-
</Button>
192-
)}
182+
{!template.deprecated&&workspacePermissions.createWorkspace&&(
183+
<Button
184+
variant="contained"
185+
startIcon={<AddIcon/>}
186+
component={RouterLink}
187+
to={`${templateLink}/workspace`}
188+
>
189+
Create Workspace
190+
</Button>
191+
)}
193192

194193
{permissions.canUpdateTemplate&&(
195194
<TemplateMenu

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp