Skip to content

Commit

Permalink
bug/WP-820-exp-date-exception-edit-modal (#402)
Browse files Browse the repository at this point in the history
* bug/WP-820-exp-date-exception-edit-modal

* - Adds new label for clarity
  • Loading branch information
sophia-massie authored Dec 11, 2024
1 parent 5a54828 commit a5dc6f6
Showing 1 changed file with 6 additions and 23 deletions.
Original file line number Diff line number Diff line change
@@ -1,31 +1,14 @@
import React, { useState, useEffect } from 'react';
import {
Modal,
ModalBody,
ModalHeader,
Label,
FormGroup,
Row,
Col,
Alert,
} from 'reactstrap';
import {
Field,
ErrorMessage,
useFormik,
FormikHelpers,
FormikProvider,
} from 'formik';
import { Modal, ModalBody, ModalHeader, Row, Col, Alert } from 'reactstrap';
import { Field, useFormik, FormikHelpers, FormikProvider } from 'formik';
import { fetchUtil } from 'utils/fetchUtil';
import * as Yup from 'yup';
import { ExceptionRow } from 'hooks/admin';
import { formatDate } from 'utils/dateUtil';
import styles from './EditExceptionModal.module.css';

import QueryWrapper from 'core-wrappers/QueryWrapper';
import FieldWrapper from 'core-wrappers/FieldWrapperFormik';
import Button from 'core-components/Button';
import Message from 'core-components/Message';

interface EditRecordModalProps {
isOpen: boolean;
Expand Down Expand Up @@ -287,7 +270,7 @@ const EditExceptionModal: React.FC<EditRecordModalProps> = ({
<Col md={3}>
<FieldWrapper
name="approved_expiration_date"
label="Expiration Date"
label="Approved Expiration Date"
required={false}
>
<Field
Expand All @@ -306,10 +289,10 @@ const EditExceptionModal: React.FC<EditRecordModalProps> = ({
className="form-text text-muted"
style={{ fontStyle: 'italic' }}
>
Current:{' '}
{exception.approved_expiration_date
Requested Expy Date:{' '}
{exception.view_modal_content.requested_expiration_date
? new Date(
exception.approved_expiration_date
exception.view_modal_content.requested_expiration_date
).toLocaleDateString()
: 'None'}
</small>
Expand Down

0 comments on commit a5dc6f6

Please sign in to comment.