// Copyright (C) The Arvados Authors. All rights reserved. // // SPDX-License-Identifier: AGPL-3.0 import React from "react"; import { Dialog, DialogTitle, DialogContent, DialogActions, Button, Typography, Grid } from "@material-ui/core"; import { WithDialogProps } from "store/dialog/with-dialog"; import { withDialog } from 'store/dialog/with-dialog'; import { WithStyles, withStyles } from '@material-ui/core/styles'; import { ArvadosTheme } from 'common/custom-theme'; import { compose } from "redux"; import { PermissionResource } from "models/permission"; import { MEMBER_ATTRIBUTES_DIALOG } from 'store/group-details-panel/group-details-panel-actions'; type CssRules = 'rightContainer' | 'leftContainer' | 'spacing'; const styles = withStyles((theme: ArvadosTheme) => ({ rightContainer: { textAlign: 'right', paddingRight: theme.spacing.unit * 2, color: theme.palette.grey["500"] }, leftContainer: { textAlign: 'left', paddingLeft: theme.spacing.unit * 2 }, spacing: { paddingTop: theme.spacing.unit * 2 }, })); interface GroupAttributesDataProps { data: PermissionResource; } type GroupAttributesProps = GroupAttributesDataProps & WithStyles; export const GroupMemberAttributesDialog = compose( withDialog(MEMBER_ATTRIBUTES_DIALOG), styles)( (props: WithDialogProps & GroupAttributesProps) => Attributes {props.data && attributes(props.data, props.classes)} ); const attributes = (memberGroup: PermissionResource, classes: any) => { const { uuid, ownerUuid, createdAt, modifiedAt, modifiedByUserUuid, name, etag, href, linkClass } = memberGroup; return ( {name && Name} {ownerUuid && Owner uuid} {createdAt && Created at} {modifiedAt && Modified at} {modifiedByUserUuid && Modified by user uuid} {uuid && uuid} {linkClass && Link Class} {etag && Etag} {href && Href} {name} {ownerUuid} {createdAt} {modifiedAt} {modifiedByUserUuid} {uuid} {linkClass} {etag} {href} ); };