Skip to content

Commit

Permalink
removed unecessary comments
Browse files Browse the repository at this point in the history
  • Loading branch information
zaramalik03 committed Dec 3, 2024
1 parent 5ff6940 commit 4229664
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 29 deletions.
27 changes: 0 additions & 27 deletions FrontEndReact/src/View/Admin/View/ViewDashboard/Notifications.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import "bootstrap/dist/css/bootstrap.css";
import "../../../../SBStyles.css";
import { Box, Typography } from "@mui/material";
import CustomButton from "../../../Student/View/Components/CustomButton.js";
import { genericResourcePUT } from "../../../../utility.js";
import SendMessageModal from '../../../Components/SendMessageModal.js';
import CustomDataTable from "../../../Components/CustomDataTable.js";

Expand All @@ -15,13 +14,11 @@ class ViewNotification extends Component {
errorMessage: null,
isLoaded: null,
showDialog: false,
// notes: '',
emailSubject: '',
emailMessage: '',
notificationSent: false,

errors: {
// notes:''
emailSubject: '',
emailMessage: '',
}
Expand Down Expand Up @@ -51,14 +48,6 @@ class ViewNotification extends Component {

var emailMessage = this.state.emailMessage;

var navbar = this.props.navbar;

var state = navbar.state;

var chosenAssessmentTask = state.chosenAssessmentTask;

var date = new Date();

if (emailSubject.trim() === '' && emailMessage.trim() === '') {
this.setState({
errors: {
Expand Down Expand Up @@ -91,20 +80,6 @@ class ViewNotification extends Component {
return;
}

// genericResourcePUT(
// this, JSON.stringify({
// "notification_date": date,
// "notification_subject": emailSubject,
// "notification_message": emailMessage
// })
// ).then((result) => {
// if (result !== undefined && result.errorMessage === null) {
// this.setState({
// showDialog: false,
// notificationSent: date,
// });
// }
// });
};

render() {
Expand Down Expand Up @@ -140,8 +115,6 @@ class ViewNotification extends Component {
</Box>
<Box className="table-spacing">
<CustomDataTable
// columns={columns}
// options={options}
/>
</Box>
</Box>
Expand Down
4 changes: 2 additions & 2 deletions FrontEndReact/src/View/Components/SendMessageModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ export default function SendMessageModal ( props ) {
<Button
variant="contained"
onClick={() => {
props.sendNotification(); // Send the message
props.handleDialog(); // Close the dialog
props.sendNotification();
props.handleDialog();
}}
aria-label="addMessagePromptSendNotificationButton"
>
Expand Down

0 comments on commit 4229664

Please sign in to comment.