Skip to content

Commit

Permalink
Merge pull request #520 from AI4Bharat/CL-579
Browse files Browse the repository at this point in the history
CL-579 -- sorted project task list and added bg music in VO task export
  • Loading branch information
harsh12-99 authored Dec 13, 2023
2 parents c91a7f6 + 093d17b commit d65c39a
Show file tree
Hide file tree
Showing 6 changed files with 165 additions and 94 deletions.
13 changes: 9 additions & 4 deletions src/common/ExportDialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
Typography,
} from "@mui/material";
import CloseIcon from "@mui/icons-material/Close";
import { speakerInfoOptions } from "config";
import { speakerInfoOptions, bgMusicOptions } from "config";

const ExportDialog = ({
open,
Expand All @@ -27,7 +27,8 @@ const ExportDialog = ({
handleExportSubmitClick,
handleExportRadioButtonChange,
}) => {
const { transcription, translation, voiceover, speakerInfo } = exportTypes;
const { transcription, translation, voiceover, speakerInfo, bgMusic } =
exportTypes;

const transcriptExportTypes = useSelector(
(state) => state.getTranscriptExportTypes.data.export_types
Expand Down Expand Up @@ -140,8 +141,12 @@ const ExportDialog = ({
</DialogActions>
</>
) : (
<></>
)}

{taskType?.includes("VOICEOVER") && (
<>
{/* <DialogContentText id="select-speaker-info" sx={{ mt: 2 }}>
<DialogContentText id="select-speaker-info" sx={{ mt: 2 }}>
Background Music
</DialogContentText>
<DialogActions sx={{ my: 1, justifyContent: "flex-start" }}>
Expand All @@ -160,7 +165,7 @@ const ExportDialog = ({
))}
</RadioGroup>
</FormControl>
</DialogActions> */}
</DialogActions>
</>
)}

Expand Down
45 changes: 0 additions & 45 deletions src/config/tableColumns.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,51 +270,6 @@ export const taskListColumns = [
customBodyRender: renderTaskListColumnCell,
},
},
{
name: "created_at",
label: "Created At",
options: {
display: false,
customBodyRender: (value, tableMeta) => {
const { tableData: data, rowIndex } = tableMeta;
const selectedTask = data[rowIndex];

return (
<Box
style={{
color: selectedTask.is_active ? "" : "grey",
}}
>
{moment(value).format("DD/MM/YYYY HH:mm:ss")}
</Box>
);
},
},
},

{
name: "updated_at",
label: "Updated At",
options: {
display: false,
customBodyRender: (value, tableMeta) => {
const { tableData: data, rowIndex } = tableMeta;
const selectedTask = data[rowIndex];

return (
<Box
style={{
color: selectedTask.is_active ? "" : "grey",
}}
>
{moment(value).format("DD/MM/YYYY HH:mm:ss")}
</Box>
);
},
},
},


{
name: "src_language_label",
label: "Source Language",
Expand Down
6 changes: 4 additions & 2 deletions src/containers/Organization/OrgLevelTaskList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -725,9 +725,10 @@ const OrgLevelTaskList = () => {
name: "created_at",
label: "Created At",
options: {
filter: false,
sort: false,
canBeSorted: true,
display: columnDisplay.createdAt,
display: columnDisplay.created_at,
customHeadLabelRender: CustomTableHeader,
customBodyRender: (value, tableMeta) => {
const { tableData: data, rowIndex } = tableMeta;
Expand All @@ -750,7 +751,8 @@ const OrgLevelTaskList = () => {
name: "updated_at",
label: "Updated At",
options: {
display: columnDisplay.createdAt,
filter: false,
display: columnDisplay.updated_at,
sort: false,
canBeSorted: true,
customHeadLabelRender: CustomTableHeader,
Expand Down
Loading

0 comments on commit d65c39a

Please sign in to comment.