Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove incomplete warnings on submission summary page #2387

Merged
merged 14 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ export const ContractDetailsSummarySection = ({
}
caption="Contract"
documentCategory="Contract"
isEditing={isEditing}
hideDynamicFeedback={!isEditing}
/>
<UploadedDocumentsTable
documents={convertFromSubmissionDocumentsToGenericDocuments(
Expand All @@ -330,7 +330,7 @@ export const ContractDetailsSummarySection = ({
caption="Contract supporting documents"
documentCategory="Contract-supporting"
isSupportingDocuments
isEditing={isEditing}
hideDynamicFeedback={!isEditing}
/>
</SectionCard>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ export const RateDetailsSummarySection = ({
rateInfo.rateDocuments,
documentDateLookupTable
)}
packagesWithSharedRateCerts={refreshPackagesWithSharedRateCert(
packagesWithSharedRateCerts={isPreviousSubmission? []:refreshPackagesWithSharedRateCert(
rateInfo
)}
previousSubmissionDate={
Expand All @@ -369,7 +369,7 @@ export const RateDetailsSummarySection = ({
multipleDocumentsAllowed={false}
caption="Rate certification"
documentCategory="Rate certification"
isEditing={isEditing}
hideDynamicFeedback={!isEditing}
/>
) : (
<span className="srOnly">'LOADING...'</span>
Expand All @@ -380,7 +380,7 @@ export const RateDetailsSummarySection = ({
rateInfo.supportingDocuments,
documentDateLookupTable
)}
packagesWithSharedRateCerts={refreshPackagesWithSharedRateCert(
packagesWithSharedRateCerts={isPreviousSubmission? []: refreshPackagesWithSharedRateCert(
rateInfo
)}
previousSubmissionDate={
Expand All @@ -391,9 +391,8 @@ export const RateDetailsSummarySection = ({
: null
}
caption="Rate supporting documents"
isSupportingDocuments
documentCategory="Rate-supporting"
isEditing={isEditing}
hideDynamicFeedback={!isEditing}
/>
) : (
<span className="srOnly">'LOADING...'</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ describe('SingleRateSummarySection', () => {
).toBeInTheDocument()
})
// can delete the next test when linked rates flag is permanently on
it('renders documents with linked submissions correctly (legacy feature)', async () => {
it('renders documents with linked submissions correctly for CMS users (legacy feature)', async () => {
const rateData = rateDataMock()
const parentContractRev = rateData.revisions[0].contractRevisions[0]
const rateDoc = rateData.revisions[0].formData.rateDocuments[0]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,17 @@ const relatedSubmissions = (
{contractRevisions.map((contractRev) => (
<li key={contractRev.contract.id}>
<Link
asCustom={NavLink}
to={`/submissions/${contractRev.contract.id}`}
>
{packageName(
contractRev.contract.stateCode,
contractRev.contract.stateNumber,
contractRev.formData.programIDs,
statePrograms
)}
</Link></li>
asCustom={NavLink}
to={`/submissions/${contractRev.contract.id}`}
>
{packageName(
contractRev.contract.stateCode,
contractRev.contract.stateNumber,
contractRev.formData.programIDs,
statePrograms
)}
</Link>
</li>
))}
</ul>
)
Expand All @@ -105,6 +106,8 @@ export const SingleRateSummarySection = ({
const explainMissingData =
!isSubmitted && loggedInUser?.role === 'STATE_USER'
const isCMSUser = loggedInUser?.role === 'CMS_USER'
const isSubmittedOrCMSUser =
rate.status === 'SUBMITTED' || loggedInUser?.role === 'CMS_USER'

// feature flags
const ldClient = useLDClient()
Expand Down Expand Up @@ -347,12 +350,14 @@ export const SingleRateSummarySection = ({
multipleDocumentsAllowed={false}
previousSubmissionDate={lastSubmittedDate}
caption="Rate certification"
hideDynamicFeedback={!isSubmittedOrCMSUser}
/>
<UploadedDocumentsTable
documents={formData.supportingDocuments}
packagesWithSharedRateCerts={appendDraftToSharedPackages}
previousSubmissionDate={lastSubmittedDate}
caption="Rate supporting documents"
hideDynamicFeedback={!isSubmittedOrCMSUser}
/>
</SectionCard>
</React.Fragment>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,12 @@
li:after {
content: ', ';
}
li:last-of-type::after{
li:last-of-type::after {
display: none;
}
}
}


// align state contacts
dl div[class^='grid-container'] {
padding: 0;
Expand Down Expand Up @@ -127,4 +126,3 @@
padding: 0;
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { InfoTag } from '../../InfoTag/InfoTag'
import styles from './UploadedDocumentsTable.module.scss'

type DocumentTagProps = {
isShared?: boolean // can be delted after LINK_RATES
isShared?: boolean // can be deleted after legacy submissions addressed and LINK_RATES permanently on
isNew?: boolean
}
export const DocumentTag = ({
Expand Down
Loading
Loading