Skip to content

Commit

Permalink
Merge pull request #1295 from dmm-com/feature/linkage/google
Browse files Browse the repository at this point in the history
Added new library to be able to linkage google applications
  • Loading branch information
hinashi authored Oct 8, 2024
2 parents ed9797b + 5d39010 commit 495817d
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 6 deletions.
55 changes: 49 additions & 6 deletions frontend/src/components/entry/EntryControlMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ interface EntryControlProps {
handleClose: (entryId: number) => void;
setToggle?: () => void;
disableChangeHistory?: boolean;
customDetailPath?: string;
customEditPath?: string;
customCopyPath?: string;
customACLPath?: string;
customHistoryPath?: string;
customACLHistoryPath?: string;
}

export const EntryControlMenu: FC<EntryControlProps> = ({
Expand All @@ -40,6 +46,12 @@ export const EntryControlMenu: FC<EntryControlProps> = ({
handleClose,
setToggle,
disableChangeHistory = false,
customDetailPath,
customEditPath,
customCopyPath,
customACLPath,
customHistoryPath,
customACLHistoryPath,
}) => {
const { enqueueSnackbar } = useSnackbar();
const history = useHistory();
Expand Down Expand Up @@ -76,26 +88,57 @@ export const EntryControlMenu: FC<EntryControlProps> = ({
}}
>
<Box sx={{ width: 150 }}>
<MenuItem component={Link} to={entryDetailsPath(entityId, entryId)}>
<MenuItem
component={Link}
to={
customDetailPath
? customDetailPath
: entryDetailsPath(entityId, entryId)
}
>
<Typography>詳細</Typography>
</MenuItem>
<MenuItem component={Link} to={entryEditPath(entityId, entryId)}>
<MenuItem
component={Link}
to={
customEditPath ? customEditPath : entryEditPath(entityId, entryId)
}
>
<Typography>編集</Typography>
</MenuItem>
<MenuItem component={Link} to={copyEntryPath(entityId, entryId)}>
<MenuItem
component={Link}
to={
customCopyPath ? customCopyPath : copyEntryPath(entityId, entryId)
}
>
<Typography>コピー</Typography>
</MenuItem>
<MenuItem component={Link} to={aclPath(entryId)}>
<MenuItem
component={Link}
to={customACLPath ? customACLPath : aclPath(entryId)}
>
<Typography>ACL 設定</Typography>
</MenuItem>
<MenuItem
component={Link}
to={showEntryHistoryPath(entityId, entryId)}
to={
customHistoryPath
? customHistoryPath
: showEntryHistoryPath(entityId, entryId)
}
disabled={disableChangeHistory}
>
<Typography>変更履歴</Typography>
</MenuItem>
<MenuItem component={Link} to={aclHistoryPath(entryId)}>
<MenuItem
component={Link}
to={
customACLHistoryPath
? customACLHistoryPath
: aclHistoryPath(entryId)
}
>
<Typography>ACL 変更履歴</Typography>
</MenuItem>
<Confirmable
Expand Down
16 changes: 16 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
"@jest/globals": "^27.0.6",
"@mui/icons-material": "^5.2.1",
"@mui/material": "^5.11.3",
"@react-oauth/google": "^0.12.1",
"@types/encoding-japanese": "^2.2.1",
"@types/react-beautiful-dnd": "^13.1.4",
"@types/react-router-dom": "^5.3.3",
Expand Down

0 comments on commit 495817d

Please sign in to comment.