-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from melpsh/003-sep-27-compliance-tracker-cont…
…rol-pane 003 sep 27 compliance tracker control pane
- Loading branch information
Showing
15 changed files
with
1,530 additions
and
256 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
134 changes: 134 additions & 0 deletions
134
Clients/src/presentation/components/Inputs/Dropdowns/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
import { Grid, Stack, Typography, useTheme } from "@mui/material"; | ||
import { useState } from "react"; | ||
import Select from "../Select"; | ||
import DatePicker from "../Datepicker"; | ||
import Field from "../Field"; | ||
|
||
const DropDowns = () => { | ||
const [status, setStatus] = useState<string | number>(""); | ||
const [approver, setApprover] = useState<string | number>(""); | ||
const [riskReview, setRiskReview] = useState<string | number>(""); | ||
const [owner, setOwner] = useState<string | number>(""); | ||
const [reviewer, setReviewer] = useState<string | number>(""); | ||
const theme = useTheme(); | ||
|
||
const inputStyles = { width: 200, height: 34 }; | ||
|
||
return ( | ||
<> | ||
<Stack | ||
display="flex" | ||
flexDirection="row" | ||
justifyContent="space-between" | ||
alignItems="center" | ||
> | ||
<Select | ||
id="status" | ||
label="Status:" | ||
value={status} | ||
onChange={(e) => setStatus(e.target.value)} | ||
items={[ | ||
{ _id: 10, name: "Waiting" }, | ||
{ _id: 20, name: "In progress" }, | ||
{ _id: 30, name: "Done" }, | ||
]} | ||
sx={inputStyles} | ||
/> | ||
|
||
<Select | ||
id="Approver" | ||
label="Approver:" | ||
value={approver} | ||
onChange={(e) => setApprover(e.target.value)} | ||
items={[ | ||
{ _id: 10, name: "Option 1" }, | ||
{ _id: 20, name: "Option 2" }, | ||
{ _id: 30, name: "Option 3" }, | ||
]} | ||
sx={inputStyles} | ||
/> | ||
|
||
<Select | ||
id="Risk review" | ||
label="Risk review:" | ||
value={riskReview} | ||
onChange={(e) => setRiskReview(e.target.value)} | ||
items={[ | ||
{ _id: 10, name: "Acceptable risk" }, | ||
{ _id: 20, name: "Residual risk" }, | ||
{ _id: 30, name: "Unacceptable risk" }, | ||
]} | ||
sx={inputStyles} | ||
/> | ||
</Stack> | ||
|
||
{/* Second Row */} | ||
<Stack | ||
display="flex" | ||
flexDirection="row" | ||
justifyContent="space-between" | ||
alignItems="center" | ||
sx={{ mt: 3 }} | ||
> | ||
<Select | ||
id="Owner" | ||
label="Owner:" | ||
value={owner} | ||
onChange={(e) => setOwner(e.target.value)} | ||
items={[ | ||
{ _id: 10, name: "Option 1" }, | ||
{ _id: 20, name: "Option 2" }, | ||
{ _id: 30, name: "Option 3" }, | ||
]} | ||
sx={inputStyles} | ||
/> | ||
|
||
<Select | ||
id="Reviewer" | ||
label="Reviewer:" | ||
value={reviewer} | ||
onChange={(e) => setReviewer(e.target.value)} | ||
items={[ | ||
{ _id: 10, name: "Option 1" }, | ||
{ _id: 20, name: "Option 2" }, | ||
{ _id: 30, name: "Option 3" }, | ||
]} | ||
sx={inputStyles} | ||
/> | ||
|
||
<DatePicker | ||
label="Due date:" | ||
sx={inputStyles} | ||
/> | ||
</Stack> | ||
|
||
<Typography | ||
fontSize={13} | ||
fontWeight={400} | ||
sx={{ textAlign: "left", mt: 4, ml: 2 }} | ||
> | ||
Implementation details: | ||
</Typography> | ||
<Grid container sx={{ mt: 3 }}> | ||
<Grid | ||
item | ||
xs={12} | ||
sx={{ | ||
height: 73, | ||
borderRadius: theme.shape.borderRadius, | ||
"& .MuiInputBase-root": { | ||
height: "73px", | ||
}, | ||
"& .MuiOutlinedInput-input": { | ||
paddingTop: "20px", | ||
}, | ||
}} | ||
> | ||
<Field type="description" /> | ||
</Grid> | ||
</Grid> | ||
</> | ||
); | ||
}; | ||
|
||
export default DropDowns; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
Clients/src/presentation/components/Modals/ComplianceFeedback/ComplianceFeedback.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
import { Box, Typography, Tooltip, IconButton } from "@mui/material"; | ||
import React, { useState } from "react"; | ||
import CloudUpload from "../../../assets/icons/cloudUpload.svg"; | ||
import RichTextEditor from "../../../components/RichTextEditor/index"; | ||
|
||
interface AuditorFeedbackProps { | ||
activeSection: string; | ||
} | ||
|
||
const AuditorFeedback: React.FC<AuditorFeedbackProps> = ({ activeSection }) => { | ||
const [file, setFile] = useState<File | null>(null); | ||
|
||
const handleFileUpload = (e: React.ChangeEvent<HTMLInputElement>) => { | ||
if (e.target.files && e.target.files[0]) { | ||
setFile(e.target.files[0]); | ||
} | ||
}; | ||
|
||
const UploadFile = () => { | ||
document.getElementById("file-upload")?.click(); | ||
}; | ||
|
||
const handleContentChange = (content: string) => { | ||
console.log("Updated content: ", content); | ||
}; | ||
|
||
return ( | ||
<Box sx={{ width: "100%", padding: 2 }}> | ||
<Typography sx={{ mb: 2 }}> | ||
{activeSection === "Evidence" ? "Evidence:" : "Auditor Feedback:"} | ||
</Typography> | ||
|
||
{/* Use the RichTextEditor component */} | ||
<RichTextEditor onContentChange={handleContentChange} /> | ||
|
||
{/* File Upload */} | ||
<Box | ||
sx={{ | ||
display: "flex", | ||
flexDirection: "row-reverse", | ||
border: "1px dotted", | ||
borderColor: "#D0D5DD", | ||
width: 472, | ||
alignItems: "center", | ||
cursor: "pointer", | ||
}} | ||
onClick={UploadFile} | ||
> | ||
<Typography sx={{ color: "black", padding: 5, marginLeft: 1, paddingLeft: 0 }}> | ||
You can also drag and drop, or click to upload a feedback. | ||
</Typography> | ||
<Tooltip title="Attach a file"> | ||
<IconButton component="label"> | ||
<img | ||
src={CloudUpload} | ||
alt="Upload" | ||
style={{ height: 19, width: 20 }} | ||
/> | ||
<input type="file" hidden id="file-upload" onChange={handleFileUpload} /> | ||
</IconButton> | ||
</Tooltip> | ||
</Box> | ||
|
||
{file && ( | ||
<Typography variant="body2" sx={{ mt: 2 }}> | ||
Attached file: {file.name} | ||
</Typography> | ||
)} | ||
</Box> | ||
); | ||
}; | ||
|
||
export default AuditorFeedback; |
Oops, something went wrong.