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

HOTFIX: psp-6425 ensure that a new property added to a lease shows up on the … #3296

Merged
merged 1 commit into from
Jun 27, 2023
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
8 changes: 5 additions & 3 deletions source/frontend/src/components/maps/hooks/useMapSearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,11 @@ export const useMapSearch = () => {
task3 = parcelsService.findByPid(filter?.PID);
}

const pidPinInventoryData = await task1;
const pinNonInventoryData = await task2;
const pidNonInventoryData = await task3;
const [pidPinInventoryData, pinNonInventoryData, pidNonInventoryData] = await Promise.all([
task1,
task2,
task3,
]);

if (pidPinInventoryData?.features === undefined) {
setModalContent({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { useMapSearch } from 'components/maps/hooks/useMapSearch';
import LoadingBackdrop from 'components/maps/leaflet/LoadingBackdrop/LoadingBackdrop';
import { LeaseStateContext } from 'features/leases/context/LeaseContext';
import { useLeaseDetail } from 'features/leases/hooks/useLeaseDetail';
Expand Down Expand Up @@ -30,6 +31,7 @@
const withUserOverride = useApiUserOverride<
(userOverrideCodes: UserOverrideCode[]) => Promise<any | void>
>('Failed to update Lease File');
const { search } = useMapSearch();

const leaseId = lease?.id;
//TODO: For now we make a duplicate request here for the lease in the newer format. In the future all lease pages will use the new format so this will no longer be necessary.
Expand Down Expand Up @@ -58,6 +60,7 @@
if (!!updatedLease?.id) {
formikRef?.current?.resetForm({ values: formikRef?.current?.values });
await refresh();
await search();

Check warning on line 63 in source/frontend/src/features/leases/detail/LeasePages/details/UpdateLeaseContainer.tsx

View check run for this annotation

Codecov / codecov/patch

source/frontend/src/features/leases/detail/LeasePages/details/UpdateLeaseContainer.tsx#L63

Added line #L63 was not covered by tests
onEdit(false);
}
};
Expand Down