Skip to content

Commit

Permalink
fix package activity description
Browse files Browse the repository at this point in the history
  • Loading branch information
Tiffany Vu authored and Tiffany Vu committed Oct 9, 2024
1 parent 5196acb commit df567e8
Showing 1 changed file with 48 additions and 52 deletions.
100 changes: 48 additions & 52 deletions react-app/src/features/package/package-activity/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,57 +179,55 @@ export const PA_InitialSubmission: FC<opensearch.changelog.Document> = (
// );
// };

// export const PA_ResponseWithdrawn: FC<opensearch.changelog.Document> = (
// props,
// ) => {
// const hook = useAttachmentService(props);
export const PA_ResponseWithdrawn: FC<opensearch.changelog.Document> = (props) => {
const hook = useAttachmentService(props);

// return (
// <div className="flex flex-col gap-6">
// <div>
// <h2 className="font-bold text-lg mb-2">Attachments</h2>
// {!props.attachments?.length && <p>No information submitted</p>}
// {!!props.attachments?.length && (
// <Table.Table>
// <Table.TableHeader>
// <Table.TableRow>
// <Table.TableHead className="w-[300px]">
// Document Type
// </Table.TableHead>
// <Table.TableHead>Attached File</Table.TableHead>
// </Table.TableRow>
// </Table.TableHeader>
// <AttachmentDetails
// attachments={props.attachments}
// id={props.id}
// hook={hook}
// />
// </Table.Table>
// )}
// </div>
return (
<div className="flex flex-col gap-6">
<div>
<h2 className="font-bold text-lg mb-2">Attachments</h2>
{!props.attachments?.length && <p>No information submitted</p>}
{!!props.attachments?.length && (
<Table.Table>
<Table.TableHeader>
<Table.TableRow>
<Table.TableHead className="w-[300px]">
Document Type
</Table.TableHead>
<Table.TableHead>Attached File</Table.TableHead>
</Table.TableRow>
</Table.TableHeader>
<AttachmentDetails
attachments={props.attachments}
id={props.id}
hook={hook}
/>
</Table.Table>
)}
</div>

// {props.attachments && props.attachments?.length > 1 && (
// <Table.Button
// variant="outline"
// className="w-max"
// disabled={!props.attachments?.length}
// loading={hook.loading}
// onClick={() => {
// if (!props.attachments?.length) return;
// hook.onZip(props.attachments);
// }}
// >
// Download documents
// </Table.Button>
// )}
{props.attachments && props.attachments?.length > 1 && (
<Table.Button
variant="outline"
className="w-max"
disabled={!props.attachments?.length}
loading={hook.loading}
onClick={() => {
if (!props.attachments?.length) return;
hook.onZip(props.attachments);
}}
>
Download documents
</Table.Button>
)}

// <div>
// <h2 className="font-bold text-lg mb-2">Additional Information</h2>
// <p>{props.additionalInformation || "No information submitted"}</p>
// </div>
// </div>
// );
// };
<div>
<h2 className="font-bold text-lg mb-2">Additional Information</h2>
<p>{props.additionalInformation || "No information submitted"}</p>
</div>
</div>
);
};

// export const PA_RaiIssued: FC<opensearch.changelog.Document> = (props) => {
// const hook = useAttachmentService(props);
Expand Down Expand Up @@ -294,11 +292,9 @@ export const PackageActivity: FC<opensearch.changelog.Document> = (props) => {
case "new-chip-submission":
case "new-medicaid-submission":
case "temporary-extension":
case "withdraw-rai":
return ["Initial package submitted", PA_InitialSubmission];

// case "withdraw-rai":
// return ["RAI response withdrawn", PA_ResponseWithdrawn];
case "withdraw-rai":
return ["RAI response withdrawn", PA_ResponseWithdrawn];
// case "withdraw-package":
// return ["Package withdrawn", PA_ResponseWithdrawn];
// case "issue-rai":
Expand Down

0 comments on commit df567e8

Please sign in to comment.