Skip to content

Commit a444af3

Browse files
authored
[APCD] Exception, Submission and navigation bugs (#401)
* Bugs from testing session * revert testing change
1 parent a5dc6f6 commit a444af3

File tree

11 files changed

+27
-22
lines changed

11 files changed

+27
-22
lines changed

apcd_cms/src/apps/submissions/views.py

+1
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ def _set_submissions(submission):
107107
'received_timestamp': submission['received_timestamp'],
108108
'updated_at': submission['updated_at'],
109109
'payor_code': submission['payor_code'],
110+
'entity_name': submission['entity_name'],
110111
'view_modal_content': submission['view_modal_content'],
111112
}
112113
for submission in submission_content:

apcd_cms/src/client/src/components/Admin/Extensions/AdminExtensions.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export const AdminExtensions: React.FC = () => {
4949
return (
5050
<SectionMessage type="error">
5151
There was an error loading the page.{''}
52-
<a href="https://txapcd.org/workbench/dashboard/tickets/create">
52+
<a href="/workbench/dashboard/tickets/create" className="wb-link">
5353
Please submit a ticket.
5454
</a>
5555
</SectionMessage>

apcd_cms/src/client/src/components/Admin/Submissions/AdminSubmissions.tsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import LoadingSpinner from 'core-components/LoadingSpinner';
99
import SectionMessage from 'core-components/SectionMessage';
1010
import Button from 'core-components/Button';
1111
import Paginator from 'core-components/Paginator';
12-
import { Link } from 'react-router-dom';
1312
import styles from './AdminSubmissions.module.css';
1413
import { formatDate } from 'utils/dateUtil';
1514
import { titleCase } from 'utils/stringUtil';
@@ -66,9 +65,9 @@ export const AdminSubmissions: React.FC = () => {
6665
return (
6766
<SectionMessage type="error">
6867
There was an error loading the page.{' '}
69-
<Link to="/workbench/dashboard/tickets/create" className="wb-link">
68+
<a href="/workbench/dashboard/tickets/create" className="wb-link">
7069
Please submit a ticket.
71-
</Link>
70+
</a>
7271
</SectionMessage>
7372
);
7473
}

apcd_cms/src/client/src/components/Admin/ViewExceptionModal/ViewExceptionModal.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import { Modal, ModalHeader, ModalBody, Row, Col } from 'reactstrap';
3-
import { ExceptionModalContent, ExceptionRow } from 'hooks/admin';
3+
import { ExceptionRow } from 'hooks/admin';
44
import { formatModalDate } from 'utils/dateUtil';
55
import styles from './ViewExceptionModal.module.css';
66

apcd_cms/src/client/src/components/Admin/ViewUsers/ViewUsers.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ export const ViewUsers: React.FC = () => {
9292
<div>
9393
<h1>List Users</h1>
9494
<hr />
95-
<p style={{ marginBottom: '30px' }}>List of all system users attached to a submitter.</p>
95+
<p style={{ marginBottom: '30px' }}>
96+
List of all system users attached to a submitter.
97+
</p>
9698
<hr />
9799
<div className="filter-container">
98100
<div className="filter-content">

apcd_cms/src/client/src/components/Forms/Registrations/RegistrationForm.tsx

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { useEffect } from 'react';
2-
import { Formik, Form, Field, ErrorMessage } from 'formik';
2+
import { Formik, Form, Field } from 'formik';
33
import * as Yup from 'yup';
4-
import { FormGroup, Label, FormFeedback } from 'reactstrap';
4+
import { FormGroup, Label } from 'reactstrap';
55
import Button from 'core-components/Button';
66
import { useNavigate, useSearchParams } from 'react-router-dom';
77
import {
@@ -215,9 +215,8 @@ export const RegistrationForm: React.FC<{
215215
: `register/request-to-submit/api/`;
216216
submitForm({ url, body: values });
217217
};
218-
const navigate = useNavigate();
219218
const handleClick = () => {
220-
navigate('/workbench/dashboard');
219+
window.location.href = '/workbench/dashboard';
221220
};
222221

223222
if (isLoading) {

apcd_cms/src/client/src/components/Registrations/RegistrationList/RegistrationList.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ export const RegistrationList: React.FC<{
4545
<>
4646
<p className="c-message c-message--error">
4747
An error occurred loading your registrations. For help,{' '}
48-
<a href="/workbench/dashboard">submit a ticket</a>.
48+
<a href="/workbench/dashboard/tickets/create" className="wb-link">
49+
Please submit a ticket.
50+
</a>
4951
</p>
5052
<a className="c-button c-button--primary" href="/">
5153
Back to Home

apcd_cms/src/client/src/components/Submissions/ViewFileSubmissions/ViewSubmissions.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ export const ViewFileSubmissions: React.FC = () => {
8585
return (
8686
<SectionMessage type="error">
8787
There was an error loading the page.{' '}
88-
<Link to="/workbench/dashboard/tickets/create" className="wb-link">
88+
<a href="/workbench/dashboard/tickets/create" className="wb-link">
8989
Please submit a ticket.
90-
</Link>
90+
</a>
9191
</SectionMessage>
9292
);
9393
}

apcd_cms/src/client/src/components/Submitter/Exceptions/ExceptionForm.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ export const ExceptionForm: React.FC<{ index: number }> = ({ index }) => {
9090
{entitiesError && (
9191
<SectionMessage type="error">
9292
There was an error finding your associated businesses.{' '}
93-
<Link to="/workbench/dashboard/tickets/create" className="wb-link">
93+
<a href="/workbench/dashboard/tickets/create" className="wb-link">
9494
Please submit a ticket.
95-
</Link>
95+
</a>
9696
</SectionMessage>
9797
)}
9898
</FieldWrapper>

apcd_cms/src/client/src/components/Submitter/Exceptions/ExceptionFormPage.tsx

+7-4
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ export const ExceptionFormPage: React.FC = () => {
6060
.required('Business name is required'),
6161
fileType: Yup.string().required('File type is required'),
6262
fieldCode: Yup.string().required('Field code is required'),
63-
expiration_date: Yup.date().required('Expiration date is required')
63+
expiration_date: Yup.date()
64+
.required('Expiration date is required')
6465
.max('9999-12-31', 'Expiration date must be MM/DD/YYYY')
6566
.min('0001-01-01', 'Expiration date must be MM/DD/YYYY'),
6667
requested_threshold: Yup.number().required(
@@ -81,9 +82,11 @@ export const ExceptionFormPage: React.FC = () => {
8182
}),
8283
expirationDateOther: Yup.mixed().when('exceptionType', {
8384
is: 'other',
84-
then: (schema) => Yup.date().required('Required')
85-
.max('9999-12-31', 'Date must be MM/DD/YYYY')
86-
.min('0001-01-01', 'Date must be MM/DD/YYYY'),
85+
then: (schema) =>
86+
Yup.date()
87+
.required('Required')
88+
.max('9999-12-31', 'Date must be MM/DD/YYYY')
89+
.min('0001-01-01', 'Date must be MM/DD/YYYY'),
8790
otherwise: (schema) => schema.strip(),
8891
}),
8992
otherExceptionBusinessName: Yup.mixed().when('exceptionType', {

apcd_cms/src/client/src/components/Submitter/Extensions/ExtensionFormInfo.tsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import {
77
ApplicableDataPeriod,
88
} from 'hooks/entities';
99
import SectionMessage from 'core-components/SectionMessage';
10-
import { Link } from 'react-router-dom';
1110
import FieldWrapper from 'core-wrappers/FieldWrapperFormik';
1211

1312
const maxDate = new Date();
@@ -79,9 +78,9 @@ const ExtensionFormInfo: React.FC<{
7978
{!submitterData && (
8079
<SectionMessage type="error">
8180
There was an error finding your associated businesses.{' '}
82-
<Link to="/workbench/dashboard/tickets/create" className="wb-link">
81+
<a href="/workbench/dashboard/tickets/create" className="wb-link">
8382
Please submit a ticket.
84-
</Link>
83+
</a>
8584
</SectionMessage>
8685
)}
8786
</FieldWrapper>

0 commit comments

Comments
 (0)