Skip to content

Commit

Permalink
psp-7924 property operation sub-table.
Browse files Browse the repository at this point in the history
  • Loading branch information
devinleighsmith committed Mar 22, 2024
1 parent dd6722e commit 5f62080
Show file tree
Hide file tree
Showing 17 changed files with 319 additions and 363 deletions.
4 changes: 3 additions & 1 deletion source/frontend/src/components/Table/Table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@
background-color: $selected-color;
}
}
.tbody {
.collapse {
padding-left: 5rem;
}
.tbody {
.tr-wrapper {
border-bottom: none;
}
Expand Down
7 changes: 5 additions & 2 deletions source/frontend/src/components/Table/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -699,8 +699,11 @@ export const Table = <T extends IIdentifiedObject, TFilter extends object = obje
})}
</div>
{props.detailsPanel && (
<Collapse in={props.detailsPanel.checkExpanded(row.original, expandedRows)}>
<div style={{ padding: 10 }}>{props.detailsPanel.render(row.original)}</div>
<Collapse
in={props.detailsPanel.checkExpanded(row.original, expandedRows)}
mountOnEnter
>
<div>{props.detailsPanel.render(row.original)}</div>
</Collapse>
)}
</div>
Expand Down
2 changes: 1 addition & 1 deletion source/frontend/src/components/common/Section/Section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const Section: React.FC<
);
};

const StyledSectionHeader = styled.h2<{ isStyledHeader?: boolean }>`
export const StyledSectionHeader = styled.h2<{ isStyledHeader?: boolean }>`
font-size: ${props => (props.isStyledHeader === true ? '1.0em' : '')};
font-weight: ${props => (props.isStyledHeader === true ? '' : 'bold')};
color: ${props => props.theme.css.primaryColor};
Expand Down
1 change: 1 addition & 0 deletions source/frontend/src/constants/fileTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ export enum FileTypes {
Acquisition = 'acquisition',
Research = 'research',
Disposition = 'disposition',
Lease = 'lease',
}
Original file line number Diff line number Diff line change
Expand Up @@ -332,34 +332,6 @@ exports[`TermsPaymentsContainer component renders as expected 1`] = `
flex-wrap: nowrap;
}
.c5 {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
gap: 2rem;
-webkit-flex-direction: row;
-ms-flex-direction: row;
flex-direction: row;
}
.c6 {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
gap: 1rem;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
}
.c7 {
gap: 3rem;
background-color: white;
min-height: 6rem;
}
.c1 {
font-weight: bold;
border-bottom: 0.2rem solid;
Expand Down Expand Up @@ -853,58 +825,6 @@ exports[`TermsPaymentsContainer component renders as expected 1`] = `
</div>
</div>
</div>
<div
class="collapse"
style="padding: 10px;"
>
<div
class="row"
>
<div
class="c5 col-md-2"
>
<svg
class="receipt"
fill="currentColor"
height="24"
stroke="currentColor"
stroke-width="0"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M0 0h24v24H0z"
fill="none"
/>
<path
d="M18 17H6v-2h12v2zm0-4H6v-2h12v2zm0-4H6V7h12v2zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2v20z"
/>
</svg>
<div
class="c6"
>
<b>
Payments Sent
</b>
</div>
</div>
<div
class="col-md-10"
>
<div
class="c2 c7"
>
<p>
There are no recorded payments for this term.
</p>
<p>
Term must be exercised to add payments.
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
Expand Down Expand Up @@ -1066,34 +986,6 @@ exports[`TermsPaymentsContainer component renders with data as expected 1`] = `
flex-wrap: nowrap;
}
.c5 {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
gap: 2rem;
-webkit-flex-direction: row;
-ms-flex-direction: row;
flex-direction: row;
}
.c6 {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
gap: 1rem;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
}
.c7 {
gap: 3rem;
background-color: white;
min-height: 6rem;
}
.c1 {
font-weight: bold;
border-bottom: 0.2rem solid;
Expand Down Expand Up @@ -1587,58 +1479,6 @@ exports[`TermsPaymentsContainer component renders with data as expected 1`] = `
</div>
</div>
</div>
<div
class="collapse"
style="padding: 10px;"
>
<div
class="row"
>
<div
class="c5 col-md-2"
>
<svg
class="receipt"
fill="currentColor"
height="24"
stroke="currentColor"
stroke-width="0"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M0 0h24v24H0z"
fill="none"
/>
<path
d="M18 17H6v-2h12v2zm0-4H6v-2h12v2zm0-4H6V7h12v2zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2v20z"
/>
</svg>
<div
class="c6"
>
<b>
Payments Sent
</b>
</div>
</div>
<div
class="col-md-10"
>
<div
class="c2 c7"
>
<p>
There are no recorded payments for this term.
</p>
<p>
Term must be exercised to add payments.
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,6 @@ export const StyledTable = styled(Table)`
export const StyledPaymentTable = styled(Table)`
&&.table {
width: 100%;
.tbody {
padding-left: 0;
}
.thead {
.tr {
.th {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -475,34 +475,6 @@ exports[`TermsForm component renders with data as expected 1`] = `
border-radius: 0.5rem;
}
.c5 {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
gap: 2rem;
-webkit-flex-direction: row;
-ms-flex-direction: row;
flex-direction: row;
}
.c6 {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
gap: 1rem;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
}
.c7 {
gap: 3rem;
background-color: white;
min-height: 6rem;
}
.c3 {
-webkit-align-items: center;
-webkit-box-align: center;
Expand Down Expand Up @@ -982,58 +954,6 @@ exports[`TermsForm component renders with data as expected 1`] = `
</div>
</div>
</div>
<div
class="collapse"
style="padding: 10px;"
>
<div
class="row"
>
<div
class="c5 col-md-2"
>
<svg
class="receipt"
fill="currentColor"
height="24"
stroke="currentColor"
stroke-width="0"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M0 0h24v24H0z"
fill="none"
/>
<path
d="M18 17H6v-2h12v2zm0-4H6v-2h12v2zm0-4H6V7h12v2zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2v20z"
/>
</svg>
<div
class="c6"
>
<b>
Payments Sent
</b>
</div>
</div>
<div
class="col-md-10"
>
<div
class="c2 c7"
>
<p>
There are no recorded payments for this term.
</p>
<p>
Term must be exercised to add payments.
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { Claims, PropertyTenureTypes } from '@/constants/index';
import { useQuery } from '@/hooks/use-query';
import useKeycloakWrapper from '@/hooks/useKeycloakWrapper';
import useLookupCodeHelpers from '@/hooks/useLookupCodeHelpers';
import { exists, isValidId } from '@/utils';
import { exists } from '@/utils';
import { booleanToYesNoUnknownString, stringToBoolean } from '@/utils/formUtils';
import { getPrettyLatLng } from '@/utils/mapPropertyUtils';

Expand Down Expand Up @@ -234,9 +234,7 @@ export const PropertyDetailsTabView: React.FunctionComponent<IPropertyDetailsTab
<p>{property?.notes}</p>
</Section>

{isValidId(property?.id) && (
<OperationContainer propertyId={property!.id} View={OperationSectionView} />
)}
<OperationContainer propertyId={property?.id} View={OperationSectionView} />
</StyledSummarySection>
);
};
Loading

0 comments on commit 5f62080

Please sign in to comment.