Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop2 #533

Merged
merged 22 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
b4993e7
CL-589 -- retained the filters and tab index in task list
harsh12-99 Dec 18, 2023
c0d28fc
fixed org owner permission issues
harsh12-99 Dec 18, 2023
4a8917b
Merge pull request #523 from AI4Bharat/CL-594
harsh12-99 Dec 18, 2023
f193e3a
CL-595 -- video dialog code refactor and snackbar fix
harsh12-99 Dec 18, 2023
536de94
Merge pull request #524 from AI4Bharat/CL-595
harsh12-99 Dec 18, 2023
7bb569a
Merge pull request #525 from AI4Bharat/CL-589
harsh12-99 Dec 19, 2023
0a4b6c8
CL-596 -- fixed update video details api payload
harsh12-99 Dec 20, 2023
d026b8b
Merge pull request #526 from AI4Bharat/CL-596
harsh12-99 Dec 20, 2023
8c05126
newsletter preview integrated separately
AlpanaMajhi Dec 21, 2023
fe6e0f6
update ui of new letter templates
harsh12-99 Dec 21, 2023
aec42d4
added category and preview for template 3 html
harsh12-99 Dec 26, 2023
69b0ac3
fixed position of category field
harsh12-99 Dec 26, 2023
27c2746
Merge pull request #527 from AI4Bharat/newsletter-new-ui
harsh12-99 Dec 26, 2023
15e9360
Merge branch 'develop2' into CL-605-Email-Reports
harsh12-99 Dec 28, 2023
e746cfe
Merge pull request #528 from AI4Bharat/CL-605-Email-Reports
harsh12-99 Dec 28, 2023
242557e
cleared project report when reports page is unmounted
harsh12-99 Dec 28, 2023
ef8cb84
Merge pull request #530 from AI4Bharat/CL-612
harsh12-99 Dec 28, 2023
075aa8c
updated newletter subscription flow and added unsubscribe page
harsh12-99 Jan 4, 2024
b308071
Merge pull request #531 from AI4Bharat/CL-613
harsh12-99 Jan 4, 2024
179aed1
fixed checkbox label font size
harsh12-99 Jan 4, 2024
b7e84a9
Merge pull request #532 from AI4Bharat/CL-613
harsh12-99 Jan 4, 2024
49b1b56
update email and update categories
AlpanaMajhi Jan 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added public/mail.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 33 additions & 25 deletions src/common/FilterList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,19 @@ import {
Checkbox,
Grid,
} from "@mui/material";
import { useSelector } from "react-redux";
import { useDispatch, useSelector } from "react-redux";
import { useEffect } from "react";

const FilterList = ({
id,
open,
anchorEl,
currentFilters,
updateFilters,
taskList,
handleClose,
updateFilters,
}) => {
const classes = DatasetStyle();
const dispatch = useDispatch();

const transcriptionLanguage = useSelector(
(state) => state.getSupportedLanguages.transcriptionLanguage
Expand All @@ -36,23 +37,28 @@ const FilterList = ({
(state) => state.getSupportedLanguages.translationLanguage
);

const [selectedType, setSelectedType] = useState(currentFilters.taskType);
const [selectedStatus, setSelectedStatus] = useState(currentFilters.status);
const [selectedSrcLanguage, setSelectedSrcLanguage] = useState(
currentFilters.srcLanguage
);
const [selectedTgtLanguage, setSelectedTgtLanguage] = useState(
currentFilters.tgtLanguage
);
const [selectedType, setSelectedType] = useState([]);
const [selectedStatus, setSelectedStatus] = useState([]);
const [selectedSrcLanguage, setSelectedSrcLanguage] = useState([]);
const [selectedTgtLanguage, setSelectedTgtLanguage] = useState([]);

useEffect(() => {
setSelectedType(currentFilters.taskType);
setSelectedStatus(currentFilters.status);
setSelectedSrcLanguage(currentFilters.srcLanguage);
setSelectedTgtLanguage(currentFilters.tgtLanguage);
}, [currentFilters]);

const handleChange = (e) => {
updateFilters({
...currentFilters,
taskType: selectedType,
status: selectedStatus,
srcLanguage: selectedSrcLanguage,
tgtLanguage: selectedTgtLanguage,
});
const handleChange = () => {
dispatch(
updateFilters({
...currentFilters,
taskType: selectedType,
status: selectedStatus,
srcLanguage: selectedSrcLanguage,
tgtLanguage: selectedTgtLanguage,
})
);
handleClose();
};

Expand Down Expand Up @@ -124,12 +130,14 @@ const FilterList = ({
};

const handleChangeCancelAll = () => {
updateFilters({
taskType: [],
status: [],
srcLanguage: [],
tgtLanguage: [],
});
dispatch(
updateFilters({
taskType: [],
status: [],
srcLanguage: [],
tgtLanguage: [],
})
);
handleClose();
};

Expand Down
2 changes: 1 addition & 1 deletion src/common/TabPanel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const TabPanel = (props) => {
aria-labelledby={`simple-tab-${index}`}
{...other}
>
{value === index && <Box sx={{ p: 3 }}>{children}</Box>}
{value === index && <Box sx={{ py: 3 }}>{children}</Box>}
</div>
);
};
27 changes: 18 additions & 9 deletions src/common/TableSearchPopover.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { useState } from "react";
import { Button, Divider, Popover, Box, TextField } from "@mui/material";
import { useDispatch } from "react-redux";

const TableSearchPopover = ({
open,
Expand All @@ -9,24 +10,32 @@ const TableSearchPopover = ({
currentFilters,
updateFilters,
}) => {
const dispatch = useDispatch();

const [searchValue, setSearchValue] = useState(
currentFilters[searchedCol.name]
);

const handleSubmitSearch = async (e) => {
document.getElementById(searchedCol.name + "_btn").style.color = "#2C2799";
updateFilters({
...currentFilters,
[searchedCol.name]: searchValue,
});

dispatch(
updateFilters({
...currentFilters,
[searchedCol.name]: searchValue,
})
);

handleClose();
};

const handleClearSearch = (e) => {
updateFilters({
...currentFilters,
[searchedCol.name]: "",
});
const handleClearSearch = () => {
dispatch(
updateFilters({
...currentFilters,
[searchedCol.name]: "",
})
);
setSearchValue("");
document.getElementById(searchedCol.name + "_btn").style.color =
"rgba(0, 0, 0, 0.54)";
Expand Down
40 changes: 40 additions & 0 deletions src/common/UnsubscribeHeader.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { AppBar, Box, Container, Toolbar, Typography } from "@mui/material";
import React from "react";
import { useNavigate } from "react-router-dom";
import { headerStyle } from "styles";

const UnsubscribeHeader = () => {
const classes = headerStyle();
const navigate = useNavigate();

return (
<AppBar position="fixed">
<Container maxWidth="xl">
<Toolbar disableGutters className={classes.toolbar}>
<Box
className={classes.logoContainer}
onClick={() => navigate("/login")}
>
<Box className={classes.imageBox}>
<img
src={"Chitralekha_Logo_Transparent.png"}
alt="ai4bharat"
className={classes.Logo}
/>
<Typography variant="h4" sx={{ color: "black" }}>
Chitralekha
</Typography>
</Box>
<Box>
<Typography className={classes.poweredByText}>
Powered by EkStep Foundation
</Typography>
</Box>
</Box>
</Toolbar>
</Container>
</AppBar>
);
};

export default UnsubscribeHeader;
Loading
Loading