Skip to content

Commit

Permalink
Merge pull request #229 from bcgov/ticdi-103
Browse files Browse the repository at this point in the history
Ticdi 103 - create document page layout
  • Loading branch information
mgtennant authored Aug 29, 2024
2 parents 0be72e2 + ba201eb commit f19d606
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 17 deletions.
3 changes: 2 additions & 1 deletion backend/src/report/report.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@ export class ReportService {
const md2 = JSON.stringify(cdogsData);
conf.data = md2;
const response2 = await ax(conf).catch((error) => {
console.log(error.response);
console.log('cdogs error');
console.log(error);
});
// response2.data is the docx file after the second insertions
// (anything nested in a variable or provision should be inserted at this point)
Expand Down
1 change: 0 additions & 1 deletion frontend/src/app/components/common/Collapsible.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ const Collapsible: FC<CollapsibleProps> = ({ title, children, isOpen }) => {
</div>
</div>

<hr />
<div style={contentStyle}>{children}</div>
</div>
);
Expand Down
24 changes: 10 additions & 14 deletions frontend/src/app/content/pages/LandingPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ const LandingPage: FC = () => {
);
if (!displayData.error) {
setData(displayData.dtr);
setIsOpen(true);
} else {
setError(displayData.error);
setShowError(true);
Expand Down Expand Up @@ -215,7 +214,6 @@ const LandingPage: FC = () => {
const displayData: { dtr: DTRDisplayObject | null; error: string | null } = await getDisplayData(dtidValue);
if (!displayData.error) {
setData(displayData.dtr);
setIsOpen(true);
} else {
setError(displayData.error);
setShowError(true);
Expand Down Expand Up @@ -448,19 +446,7 @@ const LandingPage: FC = () => {
<div className="font-weight-bold inlineDiv mr-1">Primary Contact Name:</div>
<div className="inlineDiv">{data?.primaryContactName}</div>
</div>
<Collapsible title="Disposition Transaction ID Details" isOpen={isOpen}>
{data ? <DtidDetails data={data!} /> : <Skeleton />}
</Collapsible>
<Collapsible title="Tenure Details" isOpen={isOpen}>
{data ? <TenureDetails data={data!} /> : <Skeleton />}
</Collapsible>
<Collapsible title="Interested Parties" isOpen={isOpen}>
{data ? <InterestedParties data={data!} /> : <Skeleton />}
</Collapsible>

<hr />
<h3>Create Document</h3>
<hr />
<Row className="mb-3">
<div className="ml-3 mr-3">
<b>Document Type:</b>
Expand All @@ -480,6 +466,16 @@ const LandingPage: FC = () => {
</select>
</div>
</Row>
<Collapsible title="Disposition Transaction ID Details" isOpen={isOpen}>
{data ? <DtidDetails data={data!} /> : <Skeleton />}
</Collapsible>
<Collapsible title="Tenure Details" isOpen={isOpen}>
{data ? <TenureDetails data={data!} /> : <Skeleton />}
</Collapsible>
<Collapsible title="Interested Parties" isOpen={isOpen}>
{data ? <InterestedParties data={data!} /> : <Skeleton />}
</Collapsible>

{provisionGroups && dtid && documentType ? (
<>
<Collapsible title="Provisions" isOpen={false}>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app/content/pages/ManageProvisionsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const ManageProvisionsPage: FC<ManageProvisionsPageProps> = () => {
};

const handleFilterProvisions = (searchTerm: string) => {
const searchKeys: string[] = ['provision_name', 'category'];
const searchKeys: string[] = ['id', 'provision_name', 'category'];
setFilterText(searchTerm);

const fp: Provision[] = data.allProvisions
Expand Down

0 comments on commit f19d606

Please sign in to comment.