Skip to content

Commit

Permalink
Production Release - 9th Feb 2022 (#72)
Browse files Browse the repository at this point in the history
* change requirements & issues ui in new project setup (#51)

* change requirements & issues ui in new project setup

* use icons as buttons in requirements & issues

* add color to checked radio label

* add theme & alert.js files code

* remove css for image radio buttons

* add dropdown filter for global admin (#55)

* add dropdown filter for global admin

* change isAdmin values

* show filter for super admin

* Fix the redux (#59)

* Initial placeholder changes

* Data table for release

* Add Edit Release placeholder

* View release UI changes

* Intial redux setup for using datamesh

* GET devpartner and project service

* GET queries using Datamesh

* code cleanup part 1

* code cleanup part 2

* code cleanup part 3

* Fix the redux (service queries)

* Add overflow menu (Kanban view)

* add overflow menu to cards

* add edit & delete options for cards in overflow menu

* Fix lint problems

Co-authored-by: RadhikaPPatel <70138493+RadhikaPPatel@users.noreply.github.com>

* Modify feature and issues form

* update feature & issue form

* remove options for tag field

* Integration with BE (Product, Features, Issues, Convert to Issue) (#65)

* Integrate create product with BE

* Integrate features for BE

* Integrate issues with BE

* Integrate convert to issues to BE

* User redirect to forms based on user type

* show different forms for developer and product team

* change user type to select text field

* resolve linting errors

* update user survey_status after filling product/developer forms

* based on survey_status show form or dashboard

* update user in context after user patch request

* Changes for user form redirect

Co-authored-by: RadhikaPPatel <70138493+RadhikaPPatel@users.noreply.github.com>

* Hide pages and dashboard for Production

* Hide navbar

Co-authored-by: MounikaReddy15 <60848892+MounikaReddy15@users.noreply.github.com>
  • Loading branch information
RadhikaPPatel and MounikaReddy15 authored Feb 9, 2022
1 parent 433dbe9 commit 6f70314
Show file tree
Hide file tree
Showing 98 changed files with 11,828 additions and 10,714 deletions.
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
"@date-io/moment": "^1.3.13",
"@emotion/react": "^11.7.1",
"@emotion/styled": "^11.6.0",
"@fortawesome/fontawesome-svg-core": "^1.2.36",
"@fortawesome/free-brands-svg-icons": "^5.15.4",
"@fortawesome/react-fontawesome": "^0.1.16",
"@mui/icons-material": "^5.2.5",
"@mui/lab": "^5.0.0-alpha.61",
"@mui/material": "^5.2.5",
Expand All @@ -25,6 +28,8 @@
"i18next-browser-languagedetector": "^3.0.1",
"immutability-helper": "3.0.1",
"lodash": "^4.17.21",
"moment-timezone": "^0.5.34",
"mui-datatables": "^4.0.0",
"npm": "^6.9.0",
"polished": "^3.2.0",
"prop-types": "^15.7.2",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Alerts/Alerts.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@ const mapStateToProps = (state, ownProps) => ({
...state.alertReducer,
});

export default connect(mapStateToProps)(Alerts);
export default connect(mapStateToProps)(Alerts);
12 changes: 8 additions & 4 deletions src/components/Copyright/Copyright.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import React, { useContext } from 'react';
import { AppBar, Toolbar, Typography, Link } from '@mui/material';
import makeStyles from '@mui/styles/makeStyles';
import {
AppBar,
Toolbar,
Typography,
Link,
} from '@mui/material';
import { AppContext } from '@context/App.context';
import Support from './Support';
import Services from './Services';
Expand Down Expand Up @@ -53,9 +58,8 @@ const Copyright = () => {
{'Copyright © '}
<Link color="inherit" href="https://example.com/" target="_blank">
{app.title}
</Link>{' '}
{new Date().getFullYear()}
{'.'}
</Link>
{` ${new Date().getFullYear()}.`}
</Typography>
</div>
</Toolbar>
Expand Down
8 changes: 6 additions & 2 deletions src/components/Copyright/Services.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import React, { useState } from 'react';
import { Button, Link, Menu, MenuItem } from '@mui/material';

import makeStyles from '@mui/styles/makeStyles';
import {
Button,
Link,
Menu,
MenuItem,
} from '@mui/material';

const useStyles = makeStyles((theme) => ({
link: {
Expand Down
7 changes: 6 additions & 1 deletion src/components/Copyright/Support.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import React, { useState } from 'react';
import { Button, Link, Menu, MenuItem } from '@mui/material';
import makeStyles from '@mui/styles/makeStyles';
import {
Button,
Link,
Menu,
MenuItem,
} from '@mui/material';
import { routes } from '@routes/routesConstants';

const useStyles = makeStyles((theme) => ({
Expand Down
216 changes: 216 additions & 0 deletions src/components/DataTableWrapper/DataTableWrapper.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,216 @@
import React from 'react';
import MUIDataTable from 'mui-datatables';
import makeStyles from '@mui/styles/makeStyles';
import {
Grid,
Button,
IconButton,
Box,
Typography,
} from '@mui/material';
import {
Add as AddIcon,
Edit as EditIcon,
Delete as DeleteIcon,
} from '@mui/icons-material';
import Loader from '@components/Loader/Loader';
import ConfirmModal from '@components/Modal/ConfirmModal';

const useStyles = makeStyles((theme) => ({
dashboardHeading: {
fontWeight: 'bold',
marginBottom: '0.5em',
},
iconButton: {
padding: theme.spacing(1.5, 0.5),
},
dataTableBody: {
'&:nth-of-type(odd)': {
backgroundColor: '#4F4D4D',
},
'&:nth-of-type(even)': {
backgroundColor: '#383636',
},
'&:hover': {
backgroundColor: '#000 !important',
},
},
dataTable: {
'& .MuiPaper-root': {
backgroundColor: '#383636',
},
'& tr > th': {
backgroundColor: '#383636',
},
},
}));

const DataTableWrapper = ({
loading,
rows,
columns,
filename,
addButtonHeading,
onAddButtonClick,
children,
editAction,
deleteAction,
openDeleteModal,
setDeleteModal,
handleDeleteModal,
deleteModalTitle,
tableHeight,
tableHeader,
hideAddButton,
selectable,
selected,
customSort,
noCustomTheme,
noSpace,
noOptionsIcon,
}) => {
const classes = useStyles();

let finalColumns = [];
if (editAction) {
finalColumns = [
...finalColumns,
{
name: 'Edit',
options: {
filter: false,
sort: false,
empty: true,
customBodyRenderLite: (dataIndex) => (
<IconButton
className={classes.iconButton}
onClick={() => editAction(rows[dataIndex])}
>
<EditIcon />
</IconButton>
),
},
},
];
}
if (deleteAction) {
finalColumns = [
...finalColumns,
{
name: 'Delete',
options: {
filter: false,
sort: false,
empty: true,
customBodyRenderLite: (dataIndex) => (
<IconButton
onClick={() => deleteAction(rows[dataIndex])}
>
<DeleteIcon />
</IconButton>
),
},
},
];
}
finalColumns = [
...finalColumns,
...columns,
];

const options = {
download: !noOptionsIcon,
print: !noOptionsIcon,
search: !noOptionsIcon,
viewColumns: !noOptionsIcon,
filter: !noOptionsIcon,
filterType: 'multiselect',
responsive: 'standard',
tableBodyHeight: tableHeight || '',
selectableRows: selectable && selectable.rows
? selectable.rows
: 'none',
selectToolbarPlacement: 'none',
selectableRowsHeader: selectable && selectable.rowsHeader
? selectable.rowsHeader
: true,
selectableRowsHideCheckboxes: selectable && selectable.rowsHideCheckboxes
? selectable.rowsHideCheckboxes
: false,
rowsSelected: selected || [],
rowsPerPageOptions: [5, 10, 15],
downloadOptions: noOptionsIcon
? {
filename: 'nothing.csv',
separator: ',',
}
: {
filename: `${filename}.csv`,
separator: ',',
},
textLabels: {
body: {
noMatch: 'No data to display',
},
},
setRowProps: (row, dataIndex, rowIndex) => !noCustomTheme && ({
className: classes.dataTableBody,
}),
customSort,
};

return (
<Box mt={noSpace ? 0 : 5} mb={noSpace ? 0 : 5}>
{loading && <Loader open={loading} />}
<div>
{!hideAddButton && (
<Box mb={3} mt={2}>
<Button
type="button"
variant="contained"
color="primary"
onClick={onAddButtonClick}
>
<AddIcon />
{` ${addButtonHeading}`}
</Button>
</Box>
)}
{tableHeader && (
<Typography
className={classes.dashboardHeading}
variant="h4"
>
{tableHeader}
</Typography>
)}
<Grid
className={`${!noCustomTheme && classes.dataTable}`}
container
spacing={2}
>
<Grid item xs={12}>
<MUIDataTable
data={rows}
columns={finalColumns}
options={options}
/>
</Grid>
</Grid>
{children}
</div>

{deleteAction && (
<ConfirmModal
open={openDeleteModal}
setOpen={setDeleteModal}
submitAction={handleDeleteModal}
title={deleteModalTitle}
submitText="Delete"
/>
)}
</Box>
);
};

export default DataTableWrapper;
18 changes: 9 additions & 9 deletions src/components/DatePicker/DatePicker.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import React from "react";
import React from 'react';
import makeStyles from '@mui/styles/makeStyles';
import { TextField } from '@mui/material';
import AdapterDateFns from '@mui/lab/AdapterDateFns';
import LocalizationProvider from '@mui/lab/LocalizationProvider';
import { TextField } from "@mui/material"
import DatePicker from '@mui/lab/DatePicker';
import DateTimePicker from '@mui/lab/DateTimePicker';
import CustomizedTooltips from "@components/ToolTip/ToolTip";
import CustomizedTooltips from '@components/ToolTip/ToolTip';

const useStyles = makeStyles((theme) => ({
root: {
display: "flex",
alignItems: "center",
display: 'flex',
alignItems: 'center',
},
}));

Expand All @@ -34,7 +34,7 @@ const DatePickerComponent = ({
value={selectedDate}
onChange={handleDateChange}
format="MM/dd/yyyy HH:mm:ss"
renderInput={(props) => <TextField {...props} label={label} fullWidth margin="normal" />}
renderInput={(props) => <TextField {...props} label={label} fullWidth margin="normal" />}
/>
) : (
<DatePicker
Expand All @@ -43,9 +43,9 @@ const DatePickerComponent = ({
id="date-picker-inline"
value={selectedDate}
onChange={handleDateChange}
renderInput={(props) => <TextField {...props} label={label} fullWidth margin="normal" />}
renderInput={(props) => <TextField {...props} label={label} fullWidth margin="normal" />}
KeyboardButtonProps={{
"aria-label": "change date",
'aria-label': 'change date',
}}
/>

Expand All @@ -56,4 +56,4 @@ const DatePickerComponent = ({
);
};

export default DatePickerComponent;
export default DatePickerComponent;
13 changes: 9 additions & 4 deletions src/components/InlineEditor/InlineEditor.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import React, { useState, useEffect, useRef } from 'react';
import { Typography, TextField, Box, Grid } from '@mui/material';
import makeStyles from '@mui/styles/makeStyles';
import { Edit as EditIcon } from '@mui/icons-material';
import {
Typography,
TextField,
Box,
Grid,
} from '@mui/material';
import EditIcon from '@mui/icons-material/Edit';

const useStyles = makeStyles((theme) => ({
nonEditMode: {
Expand Down Expand Up @@ -103,7 +108,7 @@ export const InlineEditor = ({
tag={tag}
size="small"
variant="outlined"
autoFocus={true}
autoFocus
ref={node}
name={`${id}`}
type="text"
Expand All @@ -129,7 +134,7 @@ export const InlineEditor = ({
<EditIcon
className={classes.editIcon}
onClick={() => setEditing(true)}
></EditIcon>
/>
</Grid>
)}
</Grid>
Expand Down
3 changes: 1 addition & 2 deletions src/components/Loader/Loader.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react';
import { Backdrop, CircularProgress } from '@mui/material';

import makeStyles from '@mui/styles/makeStyles';
import { Backdrop, CircularProgress } from '@mui/material';

const useStyles = makeStyles((theme) => ({
backdrop: {
Expand Down
Loading

0 comments on commit 6f70314

Please sign in to comment.