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

PIMS-15: Ltsa Land Review UI #1609

Merged
merged 26 commits into from
Aug 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
8dae3dd
Completed parcel details tab
BradyMitch Jul 19, 2023
723e24e
Work in progress - product details tab complete
BradyMitch Jul 25, 2023
23112ab
Standardized some repetitive styles
dbarkowsky Aug 4, 2023
bb10595
Split ParcelDetails into separate component
dbarkowsky Aug 4, 2023
8c0d90f
Separated Usage tab into component
dbarkowsky Aug 14, 2023
d50af28
Usage & Valuation tab complete
dbarkowsky Aug 14, 2023
367a467
Styling change to FastCurrencyInput
dbarkowsky Aug 14, 2023
f6df6e8
Changing FastCurrencyInput border to match bs
dbarkowsky Aug 14, 2023
5ed10de
Merge remote-tracking branch 'bcgov/dev' into ltsa-ui
dbarkowsky Aug 14, 2023
c87a3dd
LTSA call working in frontend
dbarkowsky Aug 14, 2023
4e4bfdc
Usage and valuation style tweak
dbarkowsky Aug 18, 2023
f4aa03f
adjust ltsa order interface
dbarkowsky Aug 18, 2023
247734f
Title and Ownership start
dbarkowsky Aug 18, 2023
476722d
Add ownership table
dbarkowsky Aug 18, 2023
74ea52c
Remove grey tab section borders
dbarkowsky Aug 18, 2023
0f5ba37
Added charges info to ltsa
dbarkowsky Aug 18, 2023
fe91aa1
Associated buildings style change
dbarkowsky Aug 18, 2023
4739e3f
Consolidate tab style
dbarkowsky Aug 18, 2023
df13edf
Table formatting
dbarkowsky Aug 18, 2023
a09352e
change ownership display, ltsa get logic
dbarkowsky Aug 18, 2023
f7aa633
consolidated duplicate postal code formatting code
dbarkowsky Aug 18, 2023
30bca38
show first name of owner if exists
dbarkowsky Aug 18, 2023
f0c2b8e
include useCallback for ltsa, account for undefine
dbarkowsky Aug 18, 2023
5a214c4
Fix NaN with some weird currencies
dbarkowsky Aug 18, 2023
18b76dd
Account for N/A as value. Condit render for no LTSA data
dbarkowsky Aug 18, 2023
afa63dd
Remove console.log
dbarkowsky Aug 18, 2023
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
117 changes: 117 additions & 0 deletions frontend/src/actions/parcelsActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,4 +173,121 @@ export interface IBuildingDetail {
position?: [number, number]; // (optional) a way to override the positioning of the map popup
}

export interface ILTSAOrderModel {
order: {
productType: string;
fileReference: string;
productOrderParameters: {
titleNumber: number;
landTitleDistrictCode: string;
includeCancelledInfo: boolean;
};
orderId: string;
status: string;
billingInfo: {
billingModel: string;
productName: string;
productCode: string;
feeExempted: boolean;
productFee: number;
serviceCharge: number;
subtotalFee: number;
productFeeTax: number;
serviceChargeTax: number;
totalTax: number;
totalFee: number;
};
orderedProduct: {
fieldedData: {
titleStatus: string;
titleIdentifier: {
titleNumber: string;
landTitleDistrict: string;
};
tombstone: {
applicationReceivedDate: string;
enteredDate: string;
titleRemarks: string;
rootOfTitle: string;
marketValueAmount: number;
fromTitles: [];
natureOfTransfers: [transferReason: string];
};
ownershipGroups: [
{
jointTenancyIndication: boolean;
interestFractionNumerator: string;
interestFractionDenominator: string;
ownershipRemarks: string;
titleOwners: [
{
lastNameOrCorpName1: string;
givenName: string;
incorporationNumber: string;
occupationDescription: string;
address: {
addressLine1: string;
addressLine2: string;
city: string;
province: string;
provinceName: string;
country: string;
postalCode: string;
};
},
];
},
];
taxAuthorities: [
{
authorityName: string;
},
];
descriptionsOfLand: [
{
parcelIdentifier: string;
fullLegalDescription: string;
parcelStatus: string;
},
];
legalNotationsOnTitle: [];
chargesOnTitle: [
{
chargeNumber: string;
status: string;
enteredDate: string;
interAlia: string;
chargeRemarks: string;
charge: {
chargeNumber: string;
transactionType: string;
applicationReceivedDate: string;
chargeOwnershipGroups: [
{
jointTenancyIndication: boolean;
interestFractionNumerator: string;
interestFractionDenominator: string;
ownershipRemarks: string;
chargeOwners: [
{
lastNameOrCorpName1: string;
incorporationNumber: string;
},
];
},
];
certificatesOfCharge: [];
correctionsAltos1: [];
corrections: [];
};
chargeRelease: object;
},
];
duplicateCertificatesOfTitle: [];
titleTransfersOrDispositions: [];
};
};
};
}

export type IPropertyDetail = IParcelDetail | IBuildingDetail;
2 changes: 1 addition & 1 deletion frontend/src/components/common/form/FastCurrencyInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ const CurrencyInput = ({
data-testid={testid}
style={{
width: customInputWidth ?? '85%',
border: required ? 'solid 2px #063970' : 'solid 1px grey',
border: disabled ? 'none' : 'solid 1px var(--bs-border-color)',
}}
value={value}
mask={currencyMask}
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/common/form/FastInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ type OptionalAttributes = {
displayErrorTooltips?: boolean;
/** Determine style of input if needed */
style?: CSSProperties;
formGroupStyle?: CSSProperties;
/** Display error even if field hasn't been touched */
errorPrompt?: boolean;
};
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/components/common/form/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ type OptionalAttributes = {
errorPrompt?: boolean;
/** add inline style to the input component */
style?: CSSProperties;
customRowStyle?: CSSProperties;
};

// only "field" is required for <Input>, the rest are optional
Expand All @@ -59,6 +60,7 @@ export const Input: React.FC<InputProps> = ({
outerClassName,
pattern,
style,
customRowStyle,
required,
disabled,
custom,
Expand Down Expand Up @@ -98,7 +100,7 @@ export const Input: React.FC<InputProps> = ({
<Row
controlid={`input-${field}`}
className={classNames(!!required ? 'required' : '', outerClassName)}
style={{ alignItems: 'center' }}
style={customRowStyle || { alignItems: 'center' }}
>
{!!label && (
<Col md="auto">
Expand Down
7 changes: 6 additions & 1 deletion frontend/src/components/common/form/Typeahead.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,12 @@ export function TypeaheadField<T extends TypeaheadModel>({
<Typeahead<T>
{...rest}
options={options}
inputProps={{ ...rest.inputProps, name: name, id: `${name}-field` }}
inputProps={{
...rest.inputProps,
name: name,
id: `${name}-field`,
style: { width: '100%' },
}}
isInvalid={hasError as any}
highlightOnlyResult
isValid={!hideValidation && isValid}
Expand Down
12 changes: 12 additions & 0 deletions frontend/src/features/mapSideBar/SidebarContents/LandForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,12 @@ const FormFooter = styled.div`
display: flex;
width: 100%;
height: 70px;
padding-left: 10px;
align-items: center;
position: sticky;
background-color: ${variables.filterBackgroundColor};
bottom: -20px;
border-top: 10px solid white;
`;

const FillRemainingSpace = styled.span`
Expand Down Expand Up @@ -373,6 +375,14 @@ const LandForm: React.FC<IParentLandForm> = (props: IParentLandForm) => {
},
];

const getLTSA = async (id: string) => {
try {
return await api.getLTSA(id);
} catch (e) {
return undefined;
}
};

const initialValues = {
activeStep: props.initialValues?.id ? steps.length - 1 : 0,
activeTab: 0,
Expand All @@ -385,8 +395,10 @@ const LandForm: React.FC<IParentLandForm> = (props: IParentLandForm) => {
Object.values(EvaluationKeys),
),
fiscals: getMergedFinancials(props.initialValues?.fiscals ?? [], Object.values(FiscalKeys)),
ltsa: props.initialValues?.pid ? getLTSA(props.initialValues.pid) : undefined,
},
};

const isViewOrUpdate = !!initialValues?.data?.id;
initialValues.data.agencyId = initialValues.data.agencyId
? initialValues.data.agencyId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,7 @@
.associated-buildings,
.associated-land,
.PropertyListView.container-fluid {
margin: 10px;
width: 100%;
padding: 20px;
background-color: $filter-background-color;
border-radius: 10px;
font-size: small;
.form-control,
.GeocoderAutoComplete,
Expand Down
Loading