diff --git a/apcd-cms/src/apps/admin_exception/views.py b/apcd-cms/src/apps/admin_exception/views.py index a3ab2b30..470438bf 100644 --- a/apcd-cms/src/apps/admin_exception/views.py +++ b/apcd-cms/src/apps/admin_exception/views.py @@ -119,8 +119,6 @@ def getDate(row): entity_name = title_case(exception[21]) status = title_case(exception[19]) if exception[19] else 'None' outcome = title_case(exception[5]) if exception[5] else 'None' - status = title_case(exception[19]) if exception[19] else 'None' - outcome = title_case(exception[5]) if exception[5] else 'None' if entity_name not in context['org_options']: context['org_options'].append(entity_name) # to make sure All is first in the dropdown filter options after sorting alphabetically diff --git a/apcd-cms/src/client/src/components/Admin/EditExceptionModal/EditExceptionModal.tsx b/apcd-cms/src/client/src/components/Admin/EditExceptionModal/EditExceptionModal.tsx index a3e90fb9..05e147f4 100644 --- a/apcd-cms/src/client/src/components/Admin/EditExceptionModal/EditExceptionModal.tsx +++ b/apcd-cms/src/client/src/components/Admin/EditExceptionModal/EditExceptionModal.tsx @@ -21,6 +21,7 @@ import * as Yup from 'yup'; import { ExceptionRow } from 'hooks/admin'; import { formatDate } from 'utils/dateUtil'; import styles from './EditExceptionModal.module.css'; +import FieldWrapper from 'core-wrappers/FieldWrapperFormik'; import Button from 'core-components/Button'; interface EditRecordModalProps { @@ -219,6 +220,7 @@ const EditExceptionModal: React.FC = ({ setShowSuccessMessage(false); setShowErrorMessage(false); }; + const closeBtn = ( - ) : null} + {/* Filter by Organization */} + + Filter by Organization: + + + {status !== 'Pending' || org !== 'All' ? ( + + ) : null} + diff --git a/apcd-cms/src/client/src/components/Admin/ViewExceptionModal/ViewExceptionModal.tsx b/apcd-cms/src/client/src/components/Admin/ViewExceptionModal/ViewExceptionModal.tsx index ec61000a..5fd3193b 100644 --- a/apcd-cms/src/client/src/components/Admin/ViewExceptionModal/ViewExceptionModal.tsx +++ b/apcd-cms/src/client/src/components/Admin/ViewExceptionModal/ViewExceptionModal.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Modal, ModalHeader, ModalBody, Row, Col } from 'reactstrap'; import { ExceptionModalContent, ExceptionRow } from 'hooks/admin'; -import { formatDate } from 'utils/dateUtil'; +import { formatModalDate } from 'utils/dateUtil'; import styles from './ViewExceptionModal.module.css'; export const ViewExceptionModal: React.FC<{ @@ -50,7 +50,7 @@ export const ViewExceptionModal: React.FC<{ Created- {(created_at && formatDate(created_at)) || 'None'} + {(created_at && formatModalDate(created_at)) || 'None'} @@ -130,7 +130,7 @@ export const ViewExceptionModal: React.FC<{ Last Updated- {(updated_at && formatDate(updated_at)) || 'None'} + {(updated_at && formatModalDate(updated_at)) || 'None'}
diff --git a/apcd-cms/src/client/src/utils/dateUtil.ts b/apcd-cms/src/client/src/utils/dateUtil.ts index 869fbb3d..98ee0454 100644 --- a/apcd-cms/src/client/src/utils/dateUtil.ts +++ b/apcd-cms/src/client/src/utils/dateUtil.ts @@ -14,6 +14,11 @@ export const formatDate = (dateString: string | number | Date): string => { }).format(date); }; +export const formatModalDate = (dateString: string | number | Date): string => { + return formatDate(dateString).replace('.',''). + replace('AM','a.m.').replace('PM','p.m.'); +}; + /** * * @param period string - Jan. 2024 as example