+ {exists(errorMessage) && <>{errorMessage}>}
{cancelButtonText && (
-
+ <>
+
+
+ >
)}
makes a request when no id is provid
}
.c5.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -993,6 +994,8 @@ exports[`AccessRequestContainer component > makes a request when no id is provid
.c5.btn:disabled,
.c5.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -1000,7 +1003,6 @@ exports[`AccessRequestContainer component > makes a request when no id is provid
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c5.Button .Button__icon {
@@ -1510,7 +1512,7 @@ exports[`AccessRequestContainer component > makes a request when no id is provid
renders as expected 1`] = `
}
.c5.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`AccessRequestForm component > renders as expected 1`] = `
.c5.btn:disabled,
.c5.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`AccessRequestForm component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c5.Button .Button__icon {
@@ -708,7 +709,7 @@ exports[`AccessRequestForm component > renders as expected 1`] = `
renders correctly 1`] = `
}
.c7.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`AccessRequestPage > renders correctly 1`] = `
.c7.btn:disabled,
.c7.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`AccessRequestPage > renders correctly 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c7.Button .Button__icon {
@@ -673,7 +674,7 @@ exports[`AccessRequestPage > renders correctly 1`] = `
Snapshot matches 1`] = `
}
.c4.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`Manage access requests > Snapshot matches 1`] = `
.c4.btn:disabled,
.c4.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`Manage access requests > Snapshot matches 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c4.Button .Button__icon {
diff --git a/source/frontend/src/features/admin/edit-user/EditUserForm.tsx b/source/frontend/src/features/admin/edit-user/EditUserForm.tsx
index c0e0acf405..00be83bac7 100644
--- a/source/frontend/src/features/admin/edit-user/EditUserForm.tsx
+++ b/source/frontend/src/features/admin/edit-user/EditUserForm.tsx
@@ -127,13 +127,13 @@ const EditUserForm: React.FunctionComponent
-
+
diff --git a/source/frontend/src/features/admin/edit-user/__snapshots__/EditUserContainer.test.tsx.snap b/source/frontend/src/features/admin/edit-user/__snapshots__/EditUserContainer.test.tsx.snap
index 312957dad6..83ae2300ac 100644
--- a/source/frontend/src/features/admin/edit-user/__snapshots__/EditUserContainer.test.tsx.snap
+++ b/source/frontend/src/features/admin/edit-user/__snapshots__/EditUserContainer.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`EditUserContainer component > makes a request based on the user id 1`]
}
.c5.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`EditUserContainer component > makes a request based on the user id 1`]
.c5.btn:disabled,
.c5.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`EditUserContainer component > makes a request based on the user id 1`]
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c5.Button .Button__icon {
@@ -722,7 +723,7 @@ exports[`EditUserContainer component > makes a request based on the user id 1`]
makes a request based on the user id 1`]
>
diff --git a/source/frontend/src/features/admin/edit-user/__snapshots__/EditUserForm.test.tsx.snap b/source/frontend/src/features/admin/edit-user/__snapshots__/EditUserForm.test.tsx.snap
index 7b1b7fec49..43e17ba304 100644
--- a/source/frontend/src/features/admin/edit-user/__snapshots__/EditUserForm.test.tsx.snap
+++ b/source/frontend/src/features/admin/edit-user/__snapshots__/EditUserForm.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`EditUserForm component > renders as expected 1`] = `
}
.c6.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`EditUserForm component > renders as expected 1`] = `
.c6.btn:disabled,
.c6.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`EditUserForm component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c6.Button .Button__icon {
@@ -794,7 +795,7 @@ exports[`EditUserForm component > renders as expected 1`] = `
renders as expected 1`] = `
>
diff --git a/source/frontend/src/features/admin/edit-user/__snapshots__/EditUserPage.test.tsx.snap b/source/frontend/src/features/admin/edit-user/__snapshots__/EditUserPage.test.tsx.snap
index 508e731b15..b48827c412 100644
--- a/source/frontend/src/features/admin/edit-user/__snapshots__/EditUserPage.test.tsx.snap
+++ b/source/frontend/src/features/admin/edit-user/__snapshots__/EditUserPage.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`Edit user page > EditUserPage renders 1`] = `
}
.c7.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`Edit user page > EditUserPage renders 1`] = `
.c7.btn:disabled,
.c7.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`Edit user page > EditUserPage renders 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c7.Button .Button__icon {
@@ -701,7 +702,7 @@ exports[`Edit user page > EditUserPage renders 1`] = `
EditUserPage renders 1`] = `
>
diff --git a/source/frontend/src/features/admin/financial-codes/add/__snapshots__/AddFinancialCodeForm.test.tsx.snap b/source/frontend/src/features/admin/financial-codes/add/__snapshots__/AddFinancialCodeForm.test.tsx.snap
index 3a7a8fc9ec..09d7178566 100644
--- a/source/frontend/src/features/admin/financial-codes/add/__snapshots__/AddFinancialCodeForm.test.tsx.snap
+++ b/source/frontend/src/features/admin/financial-codes/add/__snapshots__/AddFinancialCodeForm.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`AddFinancialCode form > renders as expected 1`] = `
}
.c5.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`AddFinancialCode form > renders as expected 1`] = `
.c5.btn:disabled,
.c5.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`AddFinancialCode form > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c5.Button .Button__icon {
diff --git a/source/frontend/src/features/admin/financial-codes/list/FinancialCodeFilter/__snapshots__/FinancialCodeFilter.test.tsx.snap b/source/frontend/src/features/admin/financial-codes/list/FinancialCodeFilter/__snapshots__/FinancialCodeFilter.test.tsx.snap
index 9cd8f91e23..db47ddfd1d 100644
--- a/source/frontend/src/features/admin/financial-codes/list/FinancialCodeFilter/__snapshots__/FinancialCodeFilter.test.tsx.snap
+++ b/source/frontend/src/features/admin/financial-codes/list/FinancialCodeFilter/__snapshots__/FinancialCodeFilter.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`Financial Code Filter > matches snapshot 1`] = `
}
.c2.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`Financial Code Filter > matches snapshot 1`] = `
.c2.btn:disabled,
.c2.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`Financial Code Filter > matches snapshot 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c2.Button .Button__icon {
diff --git a/source/frontend/src/features/admin/financial-codes/update/__snapshots__/UpdateFinancialCodeForm.test.tsx.snap b/source/frontend/src/features/admin/financial-codes/update/__snapshots__/UpdateFinancialCodeForm.test.tsx.snap
index 801d1d090a..b5ebc68d81 100644
--- a/source/frontend/src/features/admin/financial-codes/update/__snapshots__/UpdateFinancialCodeForm.test.tsx.snap
+++ b/source/frontend/src/features/admin/financial-codes/update/__snapshots__/UpdateFinancialCodeForm.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`UpdateFinancialCode form > renders as expected 1`] = `
}
.c5.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`UpdateFinancialCode form > renders as expected 1`] = `
.c5.btn:disabled,
.c5.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`UpdateFinancialCode form > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c5.Button .Button__icon {
diff --git a/source/frontend/src/features/contacts/contact/create/ContactRouter.tsx b/source/frontend/src/features/contacts/contact/create/ContactRouter.tsx
index c026edf982..619fa5d485 100644
--- a/source/frontend/src/features/contacts/contact/create/ContactRouter.tsx
+++ b/source/frontend/src/features/contacts/contact/create/ContactRouter.tsx
@@ -1,50 +1,21 @@
import React from 'react';
-import { Redirect, Switch, useRouteMatch } from 'react-router-dom';
-
-import { ContactTypes } from '@/features/contacts/interfaces';
-import AppRoute from '@/utils/AppRoute';
+import { Redirect, Route, Switch, useRouteMatch } from 'react-router-dom';
+import { ContactTypes } from '../../interfaces';
import CreateOrganizationForm from './Organization/CreateOrganizationForm';
import CreatePersonForm from './Person/CreatePersonForm';
-export interface IContactPage {
- component: any;
- title: string;
-}
-
-export const pages = new Map
([
- [
- ContactTypes.INDIVIDUAL,
- {
- component: CreatePersonForm,
- title: 'Create Person',
- },
- ],
- [
- ContactTypes.ORGANIZATION,
- {
- component: CreateOrganizationForm,
- title: 'Create Organization',
- },
- ],
-]);
-
export const ContactRouter: React.FunctionComponent> = () => {
- // The `path` lets us build paths that are relative to the parent route, while
- // the `url` lets us build relative links.
const { path, url } = useRouteMatch();
return (
- {Array.from(pages.entries()).map(([pageName, page]) => (
-
- ))}
+
+
+
+
+
+
);
};
diff --git a/source/frontend/src/features/contacts/contact/create/CreateContactContainer.tsx b/source/frontend/src/features/contacts/contact/create/CreateContactContainer.tsx
index b11902934b..5c722f088a 100644
--- a/source/frontend/src/features/contacts/contact/create/CreateContactContainer.tsx
+++ b/source/frontend/src/features/contacts/contact/create/CreateContactContainer.tsx
@@ -34,14 +34,9 @@ export const CreateContactContainer: React.FunctionComponent<
title="Add Contact"
icon={}
onClose={onClose}
- >
-
+ />
-
-
+
diff --git a/source/frontend/src/features/contacts/contact/create/Organization/CreateOrganizationForm.tsx b/source/frontend/src/features/contacts/contact/create/Organization/CreateOrganizationForm.tsx
index c56225d76e..77bd669a2c 100644
--- a/source/frontend/src/features/contacts/contact/create/Organization/CreateOrganizationForm.tsx
+++ b/source/frontend/src/features/contacts/contact/create/Organization/CreateOrganizationForm.tsx
@@ -1,16 +1,15 @@
import { Formik, FormikHelpers, FormikProps, getIn } from 'formik';
-import { useMemo, useRef, useState } from 'react';
+import { useCallback, useMemo, useRef, useState } from 'react';
import { AiOutlineExclamationCircle } from 'react-icons/ai';
import { useHistory } from 'react-router-dom';
import { Button } from '@/components/common/buttons/Button';
+import ConfirmNavigation from '@/components/common/ConfirmNavigation';
import { TextArea } from '@/components/common/form';
-import { UnsavedChangesPrompt } from '@/components/common/form/UnsavedChangesPrompt';
import { Section } from '@/components/common/Section/Section';
import { FlexBox } from '@/components/common/styles';
import {
Address,
- CancelConfirmationModal,
DuplicateContactModal,
useAddressHelpers,
} from '@/features/contacts/contact/create/components';
@@ -66,15 +65,18 @@ export const CreateOrganizationForm: React.FunctionComponent = () => {
}
};
+ const checkState = useCallback(() => {
+ return formikRef?.current?.dirty && !formikRef?.current?.isSubmitting;
+ }, [formikRef]);
+
return (
<>
-
component={CreateOrganizationComponent}
initialValues={new IEditableOrganizationForm()}
validate={(values: IEditableOrganizationForm) =>
onValidateOrganization(values, otherCountryId)
}
- enableReinitialize
onSubmit={onSubmit}
innerRef={formikRef}
/>
@@ -86,7 +88,8 @@ export const CreateOrganizationForm: React.FunctionComponent = () => {
setAllowDuplicate(false);
setShowDuplicateModal(false);
}}
- >
+ />
+
>
);
};
@@ -99,20 +102,12 @@ export default CreateOrganizationForm;
const CreateOrganizationComponent: React.FC> = ({
errors,
touched,
- dirty,
- resetForm,
submitForm,
- initialValues,
}) => {
const history = useHistory();
- const [showConfirmation, setShowConfirmation] = useState(false);
const onCancel = () => {
- if (dirty) {
- setShowConfirmation(true);
- } else {
- history.push('/contact/list');
- }
+ history.push('/contact/list');
};
const isContactMethodInvalid = useMemo(() => {
@@ -128,21 +123,6 @@ const CreateOrganizationComponent: React.FC
-
-
- {/* Confirmation popup when Cancel button is clicked */}
- {
- resetForm({ values: initialValues });
- // need a timeout here to give the form time to reset before navigating away
- // or else the router guard prompt will also be shown
- setTimeout(() => history.push('/contact/list'), 100);
- }}
- />
-
diff --git a/source/frontend/src/features/contacts/contact/create/Organization/__snapshots__/CreateOrganizationForm.test.tsx.snap b/source/frontend/src/features/contacts/contact/create/Organization/__snapshots__/CreateOrganizationForm.test.tsx.snap
index 17f87485d7..fed21d1de1 100644
--- a/source/frontend/src/features/contacts/contact/create/Organization/__snapshots__/CreateOrganizationForm.test.tsx.snap
+++ b/source/frontend/src/features/contacts/contact/create/Organization/__snapshots__/CreateOrganizationForm.test.tsx.snap
@@ -6,7 +6,6 @@ exports[`CreateOrganizationForm > renders as expected 1`] = `
class="Toastify"
/>
-
.c8.btn {
display: -webkit-box;
display: -webkit-flex;
@@ -49,10 +48,10 @@ exports[`CreateOrganizationForm > renders as expected 1`] = `
}
.c8.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -192,6 +191,8 @@ exports[`CreateOrganizationForm > renders as expected 1`] = `
.c8.btn:disabled,
.c8.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -199,7 +200,6 @@ exports[`CreateOrganizationForm > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c8.Button .Button__icon {
@@ -1586,10 +1586,10 @@ exports[`CreateOrganizationForm > renders as expected 1`] = `
}
.c2.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -1729,6 +1729,8 @@ exports[`CreateOrganizationForm > renders as expected 1`] = `
.c2.btn:disabled,
.c2.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -1736,7 +1738,6 @@ exports[`CreateOrganizationForm > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c2.Button .Button__icon {
diff --git a/source/frontend/src/features/contacts/contact/create/Person/CreatePersonForm.tsx b/source/frontend/src/features/contacts/contact/create/Person/CreatePersonForm.tsx
index ad72528ab4..d5a927c500 100644
--- a/source/frontend/src/features/contacts/contact/create/Person/CreatePersonForm.tsx
+++ b/source/frontend/src/features/contacts/contact/create/Person/CreatePersonForm.tsx
@@ -1,14 +1,13 @@
import { Formik, FormikHelpers, FormikProps, getIn } from 'formik';
-import { useEffect, useMemo, useRef, useState } from 'react';
+import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { AiOutlineExclamationCircle } from 'react-icons/ai';
import { useHistory } from 'react-router-dom';
import { toast } from 'react-toastify';
import { Button } from '@/components/common/buttons/Button';
-import { UnsavedChangesPrompt } from '@/components/common/form/UnsavedChangesPrompt';
+import ConfirmNavigation from '@/components/common/ConfirmNavigation';
import { FlexBox } from '@/components/common/styles';
import {
- CancelConfirmationModal,
DuplicateContactModal,
useAddressHelpers,
} from '@/features/contacts/contact/create/components';
@@ -62,12 +61,15 @@ export const CreatePersonForm: React.FunctionComponent {
+ return formikRef?.current?.dirty && !formikRef?.current?.isSubmitting;
+ }, [formikRef]);
+
return (
<>
-
component={CreatePersonComponent}
initialValues={new IEditablePersonForm()}
- enableReinitialize
validate={(values: IEditablePersonForm) => onValidatePerson(values, otherCountryId)}
onSubmit={onSubmit}
innerRef={formikRef}
@@ -80,7 +82,8 @@ export const CreatePersonForm: React.FunctionComponent
+ />
+
>
);
};
@@ -94,15 +97,11 @@ const CreatePersonComponent: React.FC> = ({
values,
errors,
touched,
- dirty,
- resetForm,
submitForm,
setFieldValue,
- initialValues,
}) => {
const history = useHistory();
const { getOrganization } = useApiContacts();
- const [showConfirmation, setShowConfirmation] = useState(false);
const personId = getIn(values, 'id');
const organizationId = getIn(values, 'organization.id');
@@ -110,11 +109,7 @@ const CreatePersonComponent: React.FC> = ({
const previousUseOrganizationAddress = usePrevious(useOrganizationAddress);
const onCancel = () => {
- if (dirty) {
- setShowConfirmation(true);
- } else {
- history.push('/contact/list');
- }
+ history.push('/contact/list');
};
const isContactMethodInvalid = useMemo(() => {
@@ -177,21 +172,6 @@ const CreatePersonComponent: React.FC> = ({
return (
<>
-
-
- {/* Confirmation popup when Cancel button is clicked */}
- {
- resetForm({ values: initialValues });
- // need a timeout here to give the form time to reset before navigating away
- // or else the router guard prompt will also be shown
- setTimeout(() => history.push('/contact/list'), 100);
- }}
- />
-
diff --git a/source/frontend/src/features/contacts/contact/create/Person/__snapshots__/CreatePersonForm.test.tsx.snap b/source/frontend/src/features/contacts/contact/create/Person/__snapshots__/CreatePersonForm.test.tsx.snap
index 88b6d45b11..c1e64288d7 100644
--- a/source/frontend/src/features/contacts/contact/create/Person/__snapshots__/CreatePersonForm.test.tsx.snap
+++ b/source/frontend/src/features/contacts/contact/create/Person/__snapshots__/CreatePersonForm.test.tsx.snap
@@ -6,7 +6,6 @@ exports[`CreatePersonForm > renders as expected 1`] = `
class="Toastify"
/>
-
.c9.btn {
display: -webkit-box;
display: -webkit-flex;
@@ -49,10 +48,10 @@ exports[`CreatePersonForm > renders as expected 1`] = `
}
.c9.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -192,6 +191,8 @@ exports[`CreatePersonForm > renders as expected 1`] = `
.c9.btn:disabled,
.c9.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -199,7 +200,6 @@ exports[`CreatePersonForm > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c9.Button .Button__icon {
@@ -1730,10 +1730,10 @@ exports[`CreatePersonForm > renders as expected 1`] = `
}
.c2.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -1873,6 +1873,8 @@ exports[`CreatePersonForm > renders as expected 1`] = `
.c2.btn:disabled,
.c2.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -1880,7 +1882,6 @@ exports[`CreatePersonForm > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c2.Button .Button__icon {
diff --git a/source/frontend/src/features/contacts/contact/create/__snapshots__/CreateContactContainer.test.tsx.snap b/source/frontend/src/features/contacts/contact/create/__snapshots__/CreateContactContainer.test.tsx.snap
index 20f336a2cf..7d41aa684c 100644
--- a/source/frontend/src/features/contacts/contact/create/__snapshots__/CreateContactContainer.test.tsx.snap
+++ b/source/frontend/src/features/contacts/contact/create/__snapshots__/CreateContactContainer.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`CreateContactContainer component > should render as expected 1`] = `
}
.c17.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`CreateContactContainer component > should render as expected 1`] = `
.c17.btn:disabled,
.c17.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`CreateContactContainer component > should render as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c17.Button .Button__icon {
@@ -550,7 +551,6 @@ exports[`CreateContactContainer component > should render as expected 1`] = `
-
diff --git a/source/frontend/src/features/contacts/contact/edit/Organization/UpdateOrganizationForm.tsx b/source/frontend/src/features/contacts/contact/edit/Organization/UpdateOrganizationForm.tsx
index 502305af4f..771c17c1a0 100644
--- a/source/frontend/src/features/contacts/contact/edit/Organization/UpdateOrganizationForm.tsx
+++ b/source/frontend/src/features/contacts/contact/edit/Organization/UpdateOrganizationForm.tsx
@@ -1,19 +1,15 @@
import { Formik, FormikHelpers, FormikProps, getIn } from 'formik';
-import React, { useMemo, useState } from 'react';
+import React, { useCallback, useMemo } from 'react';
import { AiOutlineExclamationCircle } from 'react-icons/ai';
import { Link, useHistory } from 'react-router-dom';
import { Button } from '@/components/common/buttons/Button';
+import ConfirmNavigation from '@/components/common/ConfirmNavigation';
import { Select, TextArea } from '@/components/common/form';
-import { UnsavedChangesPrompt } from '@/components/common/form/UnsavedChangesPrompt';
import { Section } from '@/components/common/Section/Section';
import { SectionField } from '@/components/common/Section/SectionField';
import { FlexBox } from '@/components/common/styles';
-import {
- Address,
- CancelConfirmationModal,
- useAddressHelpers,
-} from '@/features/contacts/contact/create/components';
+import { Address, useAddressHelpers } from '@/features/contacts/contact/create/components';
import * as Styled from '@/features/contacts/contact/edit/styles';
import { IEditableOrganizationForm } from '@/features/contacts/formModels';
import { useOrganizationDetail } from '@/features/contacts/hooks/useOrganizationDetail';
@@ -60,7 +56,7 @@ export const UpdateOrganizationForm: React.FC<{ id: number }> = ({ id }) => {
const initialValues = formOrganization ? formOrganization : new IEditableOrganizationForm();
return (
-
component={UpdateOrganization}
initialValues={initialValues}
validate={(values: IEditableOrganizationForm) =>
@@ -80,22 +76,16 @@ const UpdateOrganization: React.FC> = ({
errors,
touched,
dirty,
- resetForm,
submitForm,
- initialValues,
+ isSubmitting,
}) => {
const history = useHistory();
- const [showConfirmation, setShowConfirmation] = useState(false);
const organizationId = getIn(values, 'id');
const persons = getIn(values, 'persons') as Partial[];
const onCancel = () => {
- if (dirty) {
- setShowConfirmation(true);
- } else {
- history.push(`/contact/O${organizationId}`);
- }
+ history.push(`/contact/O${organizationId}`);
};
const isContactMethodInvalid = useMemo(() => {
@@ -109,23 +99,12 @@ const UpdateOrganization: React.FC> = ({
);
}, [touched, errors]);
+ const checkState = useCallback(() => {
+ return dirty && !isSubmitting;
+ }, [dirty, isSubmitting]);
+
return (
<>
-
-
- {/* Confirmation popup when Cancel button is clicked */}
- {
- resetForm({ values: initialValues });
- // need a timeout here to give the form time to reset before navigating away
- // or else the router guard prompt will also be shown
- setTimeout(() => history.push(`/contact/O${organizationId}`), 100);
- }}
- />
-
@@ -202,6 +181,7 @@ const UpdateOrganization: React.FC> = ({
Save
+
>
);
};
diff --git a/source/frontend/src/features/contacts/contact/edit/Organization/__snapshots__/UpdateOrganizationForm.test.tsx.snap b/source/frontend/src/features/contacts/contact/edit/Organization/__snapshots__/UpdateOrganizationForm.test.tsx.snap
index f267b37bfb..cfec03d320 100644
--- a/source/frontend/src/features/contacts/contact/edit/Organization/__snapshots__/UpdateOrganizationForm.test.tsx.snap
+++ b/source/frontend/src/features/contacts/contact/edit/Organization/__snapshots__/UpdateOrganizationForm.test.tsx.snap
@@ -6,7 +6,6 @@ exports[`UpdateOrganizationForm > renders as expected 1`] = `
class="Toastify"
/>
-
.c8.btn {
display: -webkit-box;
display: -webkit-flex;
@@ -49,10 +48,10 @@ exports[`UpdateOrganizationForm > renders as expected 1`] = `
}
.c8.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -192,6 +191,8 @@ exports[`UpdateOrganizationForm > renders as expected 1`] = `
.c8.btn:disabled,
.c8.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -199,7 +200,6 @@ exports[`UpdateOrganizationForm > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c8.Button .Button__icon {
@@ -1704,10 +1704,10 @@ exports[`UpdateOrganizationForm > renders as expected 1`] = `
}
.c2.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -1847,6 +1847,8 @@ exports[`UpdateOrganizationForm > renders as expected 1`] = `
.c2.btn:disabled,
.c2.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -1854,7 +1856,6 @@ exports[`UpdateOrganizationForm > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c2.Button .Button__icon {
diff --git a/source/frontend/src/features/contacts/contact/edit/Person/UpdatePersonForm.tsx b/source/frontend/src/features/contacts/contact/edit/Person/UpdatePersonForm.tsx
index de52418f56..cf948ecca1 100644
--- a/source/frontend/src/features/contacts/contact/edit/Person/UpdatePersonForm.tsx
+++ b/source/frontend/src/features/contacts/contact/edit/Person/UpdatePersonForm.tsx
@@ -1,20 +1,17 @@
import { Formik, FormikHelpers, FormikProps, getIn } from 'formik';
-import { useEffect, useMemo, useState } from 'react';
+import { useCallback, useEffect, useMemo } from 'react';
import { Col } from 'react-bootstrap';
import { AiOutlineExclamationCircle } from 'react-icons/ai';
import { useHistory } from 'react-router-dom';
import { toast } from 'react-toastify';
import { Button } from '@/components/common/buttons/Button';
+import ConfirmNavigation from '@/components/common/ConfirmNavigation';
import { Select } from '@/components/common/form';
-import { UnsavedChangesPrompt } from '@/components/common/form/UnsavedChangesPrompt';
import { Section } from '@/components/common/Section/Section';
import { SectionField } from '@/components/common/Section/SectionField';
import { FlexBox } from '@/components/common/styles';
-import {
- CancelConfirmationModal,
- useAddressHelpers,
-} from '@/features/contacts/contact/create/components';
+import { useAddressHelpers } from '@/features/contacts/contact/create/components';
import * as Styled from '@/features/contacts/contact/edit/styles';
import {
IEditableOrganizationAddressForm,
@@ -61,12 +58,14 @@ export const UpdatePersonForm: React.FC<{ id: number }> = ({ id }) => {
}
};
+ const initialValues = formPerson ? formPerson : new IEditablePersonForm();
+
return (
-
component={UpdatePersonComponent}
- initialValues={formPerson ? formPerson : new IEditablePersonForm()}
- enableReinitialize
+ initialValues={initialValues}
validate={(values: IEditablePersonForm) => onValidatePerson(values, otherCountryId)}
+ enableReinitialize
onSubmit={onSubmit}
/>
);
@@ -77,10 +76,9 @@ export const UpdatePersonForm: React.FC<{ id: number }> = ({ id }) => {
*/
const UpdatePersonComponent: React.FC<
React.PropsWithChildren>
-> = ({ values, errors, touched, dirty, resetForm, submitForm, setFieldValue, initialValues }) => {
+> = ({ values, errors, touched, dirty, submitForm, setFieldValue, isSubmitting }) => {
const history = useHistory();
const { getOrganization } = useApiContacts();
- const [showConfirmation, setShowConfirmation] = useState(false);
const personId = getIn(values, 'id');
const organizationId = getIn(values, 'organization.id');
@@ -88,11 +86,7 @@ const UpdatePersonComponent: React.FC<
const previousUseOrganizationAddress = usePrevious(useOrganizationAddress);
const onCancel = () => {
- if (dirty) {
- setShowConfirmation(true);
- } else {
- history.push(`/contact/P${personId}`);
- }
+ history.push(`/contact/P${personId}`);
};
const isContactMethodInvalid = useMemo(() => {
@@ -147,23 +141,12 @@ const UpdatePersonComponent: React.FC<
}
}, [organizationId, setFieldValue]);
+ const checkState = useCallback(() => {
+ return dirty && !isSubmitting;
+ }, [dirty, isSubmitting]);
+
return (
<>
-
-
- {/* Confirmation popup when Cancel button is clicked */}
- {
- resetForm({ values: initialValues });
- // need a timeout here to give the form time to reset before navigating away
- // or else the router guard prompt will also be shown
- setTimeout(() => history.push(`/contact/P${personId}`), 100);
- }}
- />
-
@@ -209,6 +192,7 @@ const UpdatePersonComponent: React.FC<
Save
+
>
);
};
diff --git a/source/frontend/src/features/contacts/contact/edit/Person/__snapshots__/UpdatePersonForm.test.tsx.snap b/source/frontend/src/features/contacts/contact/edit/Person/__snapshots__/UpdatePersonForm.test.tsx.snap
index 1ed9be104d..10cd1e8210 100644
--- a/source/frontend/src/features/contacts/contact/edit/Person/__snapshots__/UpdatePersonForm.test.tsx.snap
+++ b/source/frontend/src/features/contacts/contact/edit/Person/__snapshots__/UpdatePersonForm.test.tsx.snap
@@ -6,7 +6,6 @@ exports[`UpdatePersonForm > renders as expected 1`] = `
class="Toastify"
/>
-
.c10.btn {
display: -webkit-box;
display: -webkit-flex;
@@ -49,10 +48,10 @@ exports[`UpdatePersonForm > renders as expected 1`] = `
}
.c10.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -192,6 +191,8 @@ exports[`UpdatePersonForm > renders as expected 1`] = `
.c10.btn:disabled,
.c10.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -199,7 +200,6 @@ exports[`UpdatePersonForm > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c10.Button .Button__icon {
@@ -1805,10 +1805,10 @@ exports[`UpdatePersonForm > renders as expected 1`] = `
}
.c2.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -1948,6 +1948,8 @@ exports[`UpdatePersonForm > renders as expected 1`] = `
.c2.btn:disabled,
.c2.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -1955,7 +1957,6 @@ exports[`UpdatePersonForm > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c2.Button .Button__icon {
diff --git a/source/frontend/src/features/contacts/contact/edit/__snapshots__/UpdateContactContainer.test.tsx.snap b/source/frontend/src/features/contacts/contact/edit/__snapshots__/UpdateContactContainer.test.tsx.snap
index 5631384dfc..b1958ad399 100644
--- a/source/frontend/src/features/contacts/contact/edit/__snapshots__/UpdateContactContainer.test.tsx.snap
+++ b/source/frontend/src/features/contacts/contact/edit/__snapshots__/UpdateContactContainer.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`UpdateContactContainer > renders as expected 1`] = `
}
.c16.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`UpdateContactContainer > renders as expected 1`] = `
.c16.btn:disabled,
.c16.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`UpdateContactContainer > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c16.Button .Button__icon {
@@ -494,7 +495,6 @@ exports[`UpdateContactContainer > renders as expected 1`] = `
-
diff --git a/source/frontend/src/features/contacts/list/ContactListView.test.tsx b/source/frontend/src/features/contacts/list/ContactListView.test.tsx
index e6c9b11917..35c8a33ff7 100644
--- a/source/frontend/src/features/contacts/list/ContactListView.test.tsx
+++ b/source/frontend/src/features/contacts/list/ContactListView.test.tsx
@@ -59,9 +59,9 @@ const defaultPersonSearchResult: IContactSearchResult = {
municipalityName: 'city',
provinceState: 'province',
isDisabled: false,
- person: null,
- middleNames: null,
- organizationName: null,
+ person: null,
+ middleNames: null,
+ organizationName: null,
};
const defaultPagedFilter = {
diff --git a/source/frontend/src/features/contacts/list/__snapshots__/ContactListView.test.tsx.snap b/source/frontend/src/features/contacts/list/__snapshots__/ContactListView.test.tsx.snap
index 43067140ae..78669bc126 100644
--- a/source/frontend/src/features/contacts/list/__snapshots__/ContactListView.test.tsx.snap
+++ b/source/frontend/src/features/contacts/list/__snapshots__/ContactListView.test.tsx.snap
@@ -56,10 +56,10 @@ exports[`Contact List View > matches snapshot 1`] = `
}
.c13.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -199,6 +199,8 @@ exports[`Contact List View > matches snapshot 1`] = `
.c13.btn:disabled,
.c13.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -206,7 +208,6 @@ exports[`Contact List View > matches snapshot 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c13.Button .Button__icon {
diff --git a/source/frontend/src/features/disposition/list/DispositionFilter/__snapshots__/DispositionFilter.test.tsx.snap b/source/frontend/src/features/disposition/list/DispositionFilter/__snapshots__/DispositionFilter.test.tsx.snap
index c3f1f6911e..3db813b0fe 100644
--- a/source/frontend/src/features/disposition/list/DispositionFilter/__snapshots__/DispositionFilter.test.tsx.snap
+++ b/source/frontend/src/features/disposition/list/DispositionFilter/__snapshots__/DispositionFilter.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`Disposition filter > matches snapshot 1`] = `
}
.c5.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`Disposition filter > matches snapshot 1`] = `
.c5.btn:disabled,
.c5.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`Disposition filter > matches snapshot 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c5.Button .Button__icon {
diff --git a/source/frontend/src/features/disposition/list/__snapshots__/DispositionListView.test.tsx.snap b/source/frontend/src/features/disposition/list/__snapshots__/DispositionListView.test.tsx.snap
index 1dd085f89f..782ed09886 100644
--- a/source/frontend/src/features/disposition/list/__snapshots__/DispositionListView.test.tsx.snap
+++ b/source/frontend/src/features/disposition/list/__snapshots__/DispositionListView.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`Disposition List View > matches snapshot 1`] = `
}
.c10.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`Disposition List View > matches snapshot 1`] = `
.c10.btn:disabled,
.c10.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`Disposition List View > matches snapshot 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c10.Button .Button__icon {
diff --git a/source/frontend/src/features/documents/documentDetail/DocumentDetailForm.test.tsx b/source/frontend/src/features/documents/documentDetail/DocumentDetailForm.test.tsx
index 596d37f4f0..204e0cad4a 100644
--- a/source/frontend/src/features/documents/documentDetail/DocumentDetailForm.test.tsx
+++ b/source/frontend/src/features/documents/documentDetail/DocumentDetailForm.test.tsx
@@ -124,7 +124,7 @@ const mockDocument: ComposedDocument = {
appLastUpdateUserGuid: '939a27d0-76cd-49b0-b474-53166adb73da',
appCreateUserGuid: '939a27d0-76cd-49b0-b474-53166adb73da',
rowVersion: 2,
- documentTypePurpose: 'Test document purpouse'
+ documentTypePurpose: 'Test document purpouse',
},
statusTypeCode: {
id: 'AMEND',
diff --git a/source/frontend/src/features/documents/documentDetail/__snapshots__/DocumentDetailForm.test.tsx.snap b/source/frontend/src/features/documents/documentDetail/__snapshots__/DocumentDetailForm.test.tsx.snap
index f9cd67158b..a8a4d9bb6e 100644
--- a/source/frontend/src/features/documents/documentDetail/__snapshots__/DocumentDetailForm.test.tsx.snap
+++ b/source/frontend/src/features/documents/documentDetail/__snapshots__/DocumentDetailForm.test.tsx.snap
@@ -43,10 +43,10 @@ exports[`DocumentDetailForm component > renders as expected 1`] = `
}
.c9.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -186,6 +186,8 @@ exports[`DocumentDetailForm component > renders as expected 1`] = `
.c9.btn:disabled,
.c9.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -193,7 +195,6 @@ exports[`DocumentDetailForm component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c9.Button .Button__icon {
diff --git a/source/frontend/src/features/documents/documentDetail/__snapshots__/DocumentDetailView.test.tsx.snap b/source/frontend/src/features/documents/documentDetail/__snapshots__/DocumentDetailView.test.tsx.snap
index 38c3794316..3553fb8ff0 100644
--- a/source/frontend/src/features/documents/documentDetail/__snapshots__/DocumentDetailView.test.tsx.snap
+++ b/source/frontend/src/features/documents/documentDetail/__snapshots__/DocumentDetailView.test.tsx.snap
@@ -43,10 +43,10 @@ exports[`DocumentDetailView component > renders as expected 1`] = `
}
.c7.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -186,6 +186,8 @@ exports[`DocumentDetailView component > renders as expected 1`] = `
.c7.btn:disabled,
.c7.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -193,7 +195,6 @@ exports[`DocumentDetailView component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c7.Button .Button__icon {
diff --git a/source/frontend/src/features/documents/documentUpload/DocumentUploadContainer.test.tsx b/source/frontend/src/features/documents/documentUpload/DocumentUploadContainer.test.tsx
new file mode 100644
index 0000000000..0e2af7bb6f
--- /dev/null
+++ b/source/frontend/src/features/documents/documentUpload/DocumentUploadContainer.test.tsx
@@ -0,0 +1,203 @@
+import { createMemoryHistory } from 'history';
+import React, { createRef } from 'react';
+
+import { useDocumentProvider } from '@/features/documents/hooks/useDocumentProvider';
+import { useDocumentRelationshipProvider } from '@/features/documents/hooks/useDocumentRelationshipProvider';
+import {
+ mockDocumentBatchUploadResponse,
+ mockDocumentTypesAcquisition,
+ mockDocumentTypesAll,
+} from '@/mocks/documents.mock';
+import { mockLookups } from '@/mocks/lookups.mock';
+import { ApiGen_CodeTypes_DocumentRelationType } from '@/models/api/generated/ApiGen_CodeTypes_DocumentRelationType';
+import { lookupCodesSlice } from '@/store/slices/lookupCodes';
+import { act, render, RenderOptions, screen } from '@/utils/test-utils';
+
+import DocumentUploadContainer, {
+ IDocumentUploadContainerProps,
+ IDocumentUploadContainerRef,
+} from './DocumentUploadContainer';
+import { IDocumentUploadFormProps } from './DocumentUploadForm';
+import { BatchUploadFormModel, DocumentUploadFormData } from '../ComposedDocument';
+
+const history = createMemoryHistory();
+const storeState = {
+ [lookupCodesSlice.name]: { lookupCodes: mockLookups },
+};
+
+const onUploadSuccess = vi.fn();
+const onCancel = vi.fn();
+const setCanUpload = vi.fn();
+
+const mockDocumentApi = {
+ retrieveDocumentMetadata: vi.fn(),
+ retrieveDocumentMetadataLoading: false,
+ downloadWrappedDocumentFile: vi.fn(),
+ downloadWrappedDocumentFileLoading: false,
+ downloadWrappedDocumentFileLatest: vi.fn(),
+ downloadWrappedDocumentFileLatestLoading: false,
+ downloadWrappedDocumentFileLatestResponse: null,
+ streamDocumentFile: vi.fn(),
+ streamDocumentFileLoading: false,
+ streamDocumentFileLatest: vi.fn(),
+ streamDocumentFileLatestLoading: false,
+ streamDocumentFileLatestResponse: null,
+ retrieveDocumentTypeMetadata: vi.fn(),
+ retrieveDocumentTypeMetadataLoading: false,
+ getDocumentTypes: vi.fn(),
+ getDocumentTypesLoading: false,
+ getDocumentRelationshipTypes: vi.fn(),
+ getDocumentRelationshipTypesLoading: false,
+ retrieveDocumentDetail: vi.fn(),
+ retrieveDocumentDetailLoading: false,
+ updateDocument: vi.fn(),
+ updateDocumentLoading: false,
+ downloadDocumentFilePageImage: vi.fn(),
+ downloadDocumentFilePageImageLoading: false,
+ getDocumentFilePageList: vi.fn(),
+ getDocumentFilePageListLoading: false,
+};
+
+vi.mock('@/features/documents/hooks/useDocumentProvider');
+vi.mocked(useDocumentProvider).mockReturnValue(mockDocumentApi);
+
+const mockDocumentRelationshipApi = {
+ deleteDocumentRelationship: vi.fn(),
+ deleteDocumentRelationshipLoading: false,
+ retrieveDocumentRelationship: vi.fn(),
+ retrieveDocumentRelationshipLoading: false,
+ uploadDocument: vi.fn(),
+ uploadDocumentLoading: false,
+};
+
+vi.mock('@/features/documents/hooks/useDocumentRelationshipProvider');
+vi.mocked(useDocumentRelationshipProvider).mockReturnValue(mockDocumentRelationshipApi);
+
+describe('DocumentUploadContainer component', () => {
+ let viewProps: IDocumentUploadFormProps | undefined;
+ const View: React.FC
= props => {
+ viewProps = props;
+ return <>Content Rendered>;
+ };
+
+ // render component under test
+ const setup = (
+ renderOptions: RenderOptions & { props?: Partial } = {},
+ ) => {
+ const uploadContainerRef = createRef();
+
+ const utils = render(
+ ,
+ {
+ ...renderOptions,
+ store: storeState,
+ history,
+ },
+ );
+
+ return {
+ ...utils,
+ uploadContainerRef,
+ };
+ };
+
+ beforeEach(() => {
+ viewProps = undefined;
+ });
+
+ afterEach(() => {
+ vi.clearAllMocks();
+ });
+
+ it('renders the underlying form', () => {
+ setup();
+ expect(screen.getByText(/content rendered/i)).toBeVisible();
+ });
+
+ it('should call the api to fetch document types', async () => {
+ mockDocumentApi.getDocumentRelationshipTypes.mockResolvedValue(mockDocumentTypesAcquisition());
+ setup();
+
+ await act(async () => {});
+ expect(mockDocumentApi.getDocumentRelationshipTypes).toHaveBeenCalled();
+ expect(viewProps?.documentTypes?.length).toBeGreaterThan(0);
+ expect(viewProps?.documentStatusOptions?.length).toBeGreaterThan(0);
+ });
+
+ it('should call the api to fetch document types for CDOGS templates', async () => {
+ mockDocumentApi.getDocumentTypes.mockResolvedValue(mockDocumentTypesAll());
+ setup({ props: { relationshipType: ApiGen_CodeTypes_DocumentRelationType.Templates } });
+
+ await act(async () => {});
+ expect(mockDocumentApi.getDocumentTypes).toHaveBeenCalled();
+ expect(viewProps?.documentTypes?.length).toBeGreaterThan(0);
+ expect(viewProps?.documentStatusOptions?.length).toBeGreaterThan(0);
+ });
+
+ it.each([
+ ['document count <= max documents', 1, 10, true],
+ ['document count > max documents', 12, 10, false],
+ ])(
+ 'should setCanUpload when documents are selected for upload - %s',
+ async (_: string, documentCount: number, maxDocuments: number, expectedValue: boolean) => {
+ setup({ props: { maxDocumentCount: maxDocuments } });
+
+ await act(async () => {
+ viewProps?.onDocumentsSelected(documentCount);
+ });
+ expect(setCanUpload).toHaveBeenCalledWith(expectedValue);
+ },
+ );
+
+ it('should call uploadDocument API and report the result of file upload operation', async () => {
+ mockDocumentRelationshipApi.uploadDocument.mockResolvedValue(mockDocumentBatchUploadResponse());
+ setup();
+
+ await act(async () => {});
+ expect(viewProps?.documentTypes?.length).toBeGreaterThan(0);
+ expect(viewProps?.documentStatusOptions?.length).toBeGreaterThan(0);
+
+ await act(async () => {
+ const formDocument = new DocumentUploadFormData(
+ viewProps?.documentStatusOptions[0]?.value?.toString(),
+ '',
+ [],
+ );
+ formDocument.file = new File(['(⌐□_□)'], 'test.png', { type: 'image/png' });
+
+ const batchRequest = new BatchUploadFormModel();
+ batchRequest.documents.push(formDocument);
+
+ // trigger mock file upload
+ viewProps?.onUploadDocument(batchRequest);
+ });
+
+ expect(onUploadSuccess).toHaveBeenCalled();
+ });
+
+ it('should call mayan metadata API', async () => {
+ setup();
+
+ await act(async () => {});
+ expect(viewProps?.documentTypes?.length).toBeGreaterThan(0);
+ expect(viewProps?.documentStatusOptions?.length).toBeGreaterThan(0);
+
+ await act(async () => {
+ viewProps?.getDocumentMetadata(viewProps?.documentTypes[0]);
+ });
+
+ expect(mockDocumentApi.retrieveDocumentTypeMetadata).toHaveBeenCalled();
+ });
+});
diff --git a/source/frontend/src/features/documents/documentUpload/DocumentUploadContainer.tsx b/source/frontend/src/features/documents/documentUpload/DocumentUploadContainer.tsx
index 6e7e9f2e9b..a4813a3814 100644
--- a/source/frontend/src/features/documents/documentUpload/DocumentUploadContainer.tsx
+++ b/source/frontend/src/features/documents/documentUpload/DocumentUploadContainer.tsx
@@ -6,7 +6,6 @@ import * as API from '@/constants/API';
import { DocumentStatusType } from '@/constants/documentStatusType';
import { DocumentTypeName } from '@/constants/documentType';
import useLookupCodeHelpers from '@/hooks/useLookupCodeHelpers';
-import { getCancelModalProps, useModalContext } from '@/hooks/useModalContext';
import useIsMounted from '@/hooks/util/useIsMounted';
import { Dictionary } from '@/interfaces/Dictionary';
import { IApiError } from '@/interfaces/IApiError';
@@ -20,48 +19,33 @@ import { exists } from '@/utils';
import { BatchUploadFormModel, BatchUploadResponseModel } from '../ComposedDocument';
import { useDocumentProvider } from '../hooks/useDocumentProvider';
import { useDocumentRelationshipProvider } from '../hooks/useDocumentRelationshipProvider';
-import DocumentUploadForm from './DocumentUploadForm';
+import { IDocumentUploadFormProps } from './DocumentUploadForm';
export interface IDocumentUploadContainerProps {
- ref: React.RefObject<
- React.FunctionComponent>
- >;
parentId: string;
relationshipType: ApiGen_CodeTypes_DocumentRelationType;
onUploadSuccess: (results: BatchUploadResponseModel[]) => void;
onCancel: () => void;
setCanUpload: (canUpload: boolean) => void;
maxDocumentCount: number;
+ View: React.FunctionComponent;
}
export interface IDocumentUploadContainerRef {
+ isDirty: () => boolean;
uploadDocument: () => void;
}
-const DocumentUploadContainer = forwardRef<
+export const DocumentUploadContainer = forwardRef<
IDocumentUploadContainerRef,
IDocumentUploadContainerProps
>((props, ref) => {
- const deleteModalProps = getCancelModalProps();
+ const { View } = props;
const { getOptionsByType } = useLookupCodeHelpers();
-
- const { setDisplayModal } = useModalContext({
- ...deleteModalProps,
- handleOk: () => {
- handleCancelConfirm();
- },
- });
-
const formikRef = useRef>(null);
-
- const handleCancelConfirm = () => {
- setDisplayModal(false);
- formikRef.current?.resetForm();
- props.onCancel();
- };
-
const isMounted = useIsMounted();
+
const { retrieveDocumentTypeMetadata, getDocumentRelationshipTypes, getDocumentTypes } =
useDocumentProvider();
@@ -150,6 +134,9 @@ const DocumentUploadContainer = forwardRef<
};
useImperativeHandle(ref, () => ({
+ isDirty() {
+ return formikRef.current?.dirty ?? false;
+ },
uploadDocument() {
formikRef.current?.submitForm();
},
@@ -164,7 +151,7 @@ const DocumentUploadContainer = forwardRef<
};
return (
- >;
initialDocumentType: string;
@@ -31,7 +31,7 @@ interface IDocumentUploadFormProps {
/**
* Component that provides functionality to upload multiple documents. Can be embedded as a widget.
*/
-const DocumentUploadForm: React.FunctionComponent = ({
+export const DocumentUploadForm: React.FunctionComponent = ({
isLoading,
formikRef,
initialDocumentType,
diff --git a/source/frontend/src/features/documents/documentUpload/DocumentUploadModal.test.tsx b/source/frontend/src/features/documents/documentUpload/DocumentUploadModal.test.tsx
new file mode 100644
index 0000000000..82da2b0551
--- /dev/null
+++ b/source/frontend/src/features/documents/documentUpload/DocumentUploadModal.test.tsx
@@ -0,0 +1,180 @@
+import {
+ mockDocumentBatchUploadResponse,
+ mockDocumentTypesAcquisition,
+} from '@/mocks/documents.mock';
+import { mockLookups } from '@/mocks/lookups.mock';
+import { ApiGen_CodeTypes_DocumentRelationType } from '@/models/api/generated/ApiGen_CodeTypes_DocumentRelationType';
+import { lookupCodesSlice } from '@/store/slices/lookupCodes';
+import { act, getByName, render, RenderOptions, screen, userEvent } from '@/utils/test-utils';
+
+import { useDocumentProvider } from '../hooks/useDocumentProvider';
+import { useDocumentRelationshipProvider } from '../hooks/useDocumentRelationshipProvider';
+import { DocumentUploadModal, IDocumentUploadModalProps } from './DocumentUploadModal';
+
+const storeState = {
+ [lookupCodesSlice.name]: { lookupCodes: mockLookups },
+};
+
+const onUploadSuccess = vi.fn();
+const onClose = vi.fn();
+
+const mockDocumentApi = {
+ retrieveDocumentMetadata: vi.fn(),
+ retrieveDocumentMetadataLoading: false,
+ downloadWrappedDocumentFile: vi.fn(),
+ downloadWrappedDocumentFileLoading: false,
+ downloadWrappedDocumentFileLatest: vi.fn(),
+ downloadWrappedDocumentFileLatestLoading: false,
+ downloadWrappedDocumentFileLatestResponse: null,
+ streamDocumentFile: vi.fn(),
+ streamDocumentFileLoading: false,
+ streamDocumentFileLatest: vi.fn(),
+ streamDocumentFileLatestLoading: false,
+ streamDocumentFileLatestResponse: null,
+ retrieveDocumentTypeMetadata: vi.fn(),
+ retrieveDocumentTypeMetadataLoading: false,
+ getDocumentTypes: vi.fn(),
+ getDocumentTypesLoading: false,
+ getDocumentRelationshipTypes: vi.fn(),
+ getDocumentRelationshipTypesLoading: false,
+ retrieveDocumentDetail: vi.fn(),
+ retrieveDocumentDetailLoading: false,
+ updateDocument: vi.fn(),
+ updateDocumentLoading: false,
+ downloadDocumentFilePageImage: vi.fn(),
+ downloadDocumentFilePageImageLoading: false,
+ getDocumentFilePageList: vi.fn(),
+ getDocumentFilePageListLoading: false,
+};
+
+vi.mock('@/features/documents/hooks/useDocumentProvider');
+vi.mocked(useDocumentProvider).mockReturnValue(mockDocumentApi);
+
+const mockDocumentRelationshipApi = {
+ deleteDocumentRelationship: vi.fn(),
+ deleteDocumentRelationshipLoading: false,
+ retrieveDocumentRelationship: vi.fn(),
+ retrieveDocumentRelationshipLoading: false,
+ uploadDocument: vi.fn(),
+ uploadDocumentLoading: false,
+};
+
+vi.mock('@/features/documents/hooks/useDocumentRelationshipProvider');
+vi.mocked(useDocumentRelationshipProvider).mockReturnValue(mockDocumentRelationshipApi);
+
+describe('DocumentUploadModal component', () => {
+ const setup = (
+ renderOptions: RenderOptions & { props?: Partial } = {},
+ ) => {
+ const utils = render(
+ ,
+ {
+ ...renderOptions,
+ store: storeState,
+ },
+ );
+
+ return { ...utils };
+ };
+
+ afterEach(() => {
+ vi.clearAllMocks();
+ });
+
+ it('renders correctly', async () => {
+ setup();
+ await act(async () => {});
+ expect(document.body).toMatchSnapshot();
+ });
+
+ it(`closes the document upload modal when there are no changes`, async () => {
+ setup();
+ await act(async () => {});
+
+ const cancelButton = screen.getByTitle('cancel-modal');
+ await act(async () => userEvent.click(cancelButton));
+
+ expect(screen.queryByText(/Unsaved updates will be lost/i)).toBeNull();
+ expect(onClose).toHaveBeenCalled();
+ });
+
+ it(`doesn't close the upload modal when there are unsaved changes, showing a warning message instead`, async () => {
+ setup();
+ await act(async () => {});
+
+ const files = [
+ new File(['hello'], 'hello.png', { type: 'image/png' }),
+ new File(['there'], 'there.png', { type: 'image/png' }),
+ ];
+
+ // get the upload button - simulate upload event and wait for it to finish
+ const uploader = screen.getByTestId('upload-input');
+ await act(async () => userEvent.upload(uploader, files));
+
+ const cancelButton = screen.getByTitle('cancel-modal');
+ await act(async () => userEvent.click(cancelButton));
+
+ expect(await screen.findByText(/Unsaved updates will be lost/i)).toBeVisible();
+ expect(onClose).not.toHaveBeenCalled();
+ });
+
+ it(`closes the upload modal after user clicks CANCEL a second time to confirm loosing unsaved changes`, async () => {
+ setup();
+ await act(async () => {});
+
+ const files = [
+ new File(['hello'], 'hello.png', { type: 'image/png' }),
+ new File(['there'], 'there.png', { type: 'image/png' }),
+ ];
+
+ // get the upload button - simulate upload event and wait for it to finish
+ const uploader = screen.getByTestId('upload-input');
+ await act(async () => userEvent.upload(uploader, files));
+
+ const cancelButton = screen.getByTitle('cancel-modal');
+ await act(async () => userEvent.click(cancelButton));
+
+ expect(await screen.findByText(/Unsaved updates will be lost/i)).toBeVisible();
+ expect(onClose).not.toHaveBeenCalled();
+
+ // click CANCEL again to confirm
+ await act(async () => userEvent.click(cancelButton));
+ expect(onClose).toHaveBeenCalled();
+ });
+
+ it('shows file upload results after successfully uploading files to mayan', async () => {
+ mockDocumentApi.getDocumentRelationshipTypes.mockResolvedValue(mockDocumentTypesAcquisition());
+ mockDocumentRelationshipApi.uploadDocument.mockResolvedValue(
+ mockDocumentBatchUploadResponse()[0],
+ );
+ setup();
+ await act(async () => {});
+
+ const files = [new File(['hello'], 'hello.png', { type: 'image/png' })];
+
+ // get the upload button - simulate upload event and wait for it to finish
+ const uploader = screen.getByTestId('upload-input');
+ await act(async () => userEvent.upload(uploader, files));
+
+ const documentTypeDropdown = getByName('documents.0.documentTypeId') as HTMLSelectElement;
+ await act(async () => userEvent.selectOptions(documentTypeDropdown, 'Correspondence'));
+
+ const okButton = screen.getByTitle('ok-modal');
+ await act(async () => userEvent.click(okButton));
+
+ expect(await screen.findByText(/1 files successfully uploaded/i)).toBeVisible();
+ expect(await screen.findByText('hello.png')).toBeVisible();
+ expect(onClose).not.toHaveBeenCalled();
+ });
+});
diff --git a/source/frontend/src/features/documents/documentUpload/DocumentUploadModal.tsx b/source/frontend/src/features/documents/documentUpload/DocumentUploadModal.tsx
index 09717ee1d6..d901b5bbcd 100644
--- a/source/frontend/src/features/documents/documentUpload/DocumentUploadModal.tsx
+++ b/source/frontend/src/features/documents/documentUpload/DocumentUploadModal.tsx
@@ -8,6 +8,7 @@ import { exists } from '@/utils';
import { BatchUploadResponseModel } from '../ComposedDocument';
import DocumentUploadContainer, { IDocumentUploadContainerRef } from './DocumentUploadContainer';
+import { DocumentUploadForm } from './DocumentUploadForm';
export interface IDocumentUploadModalProps {
parentId: string;
@@ -23,6 +24,7 @@ export const DocumentUploadModal: React.FunctionComponent(null);
const [canUpload, setCanUpload] = useState(false);
+ const [displayConfirmation, setDisplayConfirmation] = useState(false);
const uploadContainerRef = createRef();
@@ -30,14 +32,22 @@ export const DocumentUploadModal: React.FunctionComponent {
+ setDisplayConfirmation(false);
setCanUpload(false);
setUploadResult(results);
};
const onClose = () => {
- setCanUpload(false);
- setUploadResult(null);
- props.onClose();
+ // Warn user if they are about to lose data when cancelling "Add Document"
+ const dirty = uploadContainerRef.current?.isDirty() ?? false;
+ if (dirty && !displayConfirmation) {
+ setDisplayConfirmation(true);
+ } else {
+ setDisplayConfirmation(false);
+ setCanUpload(false);
+ setUploadResult(null);
+ props.onClose();
+ }
};
return (
@@ -59,9 +69,18 @@ export const DocumentUploadModal: React.FunctionComponent
)
}
+ errorMessage={
+ displayConfirmation ? (
+
+ Unsaved updates will be lost. Click "No" again to proceed
+ without saving, or "Yes" to save the changes.
+
+ ) : undefined
+ }
modalSize={ModalSize.LARGE}
okButtonText={exists(uploadResult) ? 'Close' : 'Yes'}
handleOk={() => (exists(uploadResult) ? onClose() : onSaveClick())}
@@ -133,3 +152,9 @@ const StyledFailDiv = styled.div`
color: ${props => props.theme.bcTokens.iconsColorDanger};
padding-left: 2.6rem;
`;
+
+const StyledUnsavedChanges = styled.p`
+ color: ${props => props.theme.bcTokens.iconsColorDanger};
+ margin: 0;
+ padding-right: 5rem;
+`;
diff --git a/source/frontend/src/features/documents/documentUpload/__snapshots__/DocumentUploadModal.test.tsx.snap b/source/frontend/src/features/documents/documentUpload/__snapshots__/DocumentUploadModal.test.tsx.snap
new file mode 100644
index 0000000000..25b515a4c4
--- /dev/null
+++ b/source/frontend/src/features/documents/documentUpload/__snapshots__/DocumentUploadModal.test.tsx.snap
@@ -0,0 +1,590 @@
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
+
+exports[`DocumentUploadModal component > renders correctly 1`] = `
+.c12.btn {
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-align-items: center;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
+ -webkit-box-pack: center;
+ -webkit-justify-content: center;
+ -ms-flex-pack: center;
+ justify-content: center;
+ padding: 0.4rem 1.2rem;
+ border: 0.2rem solid transparent;
+ border-radius: 0.4rem;
+ text-align: center;
+ -webkit-text-decoration: none;
+ text-decoration: none;
+ font-size: 1.8rem;
+ font-family: 'BCSans','Noto Sans',Verdana,Arial,sans-serif;
+ font-weight: 700;
+ -webkit-letter-spacing: 0.1rem;
+ -moz-letter-spacing: 0.1rem;
+ -ms-letter-spacing: 0.1rem;
+ letter-spacing: 0.1rem;
+ cursor: pointer;
+}
+
+.c12.btn .Button__value {
+ width: -webkit-max-content;
+ width: -moz-max-content;
+ width: max-content;
+}
+
+.c12.btn:hover {
+ -webkit-text-decoration: underline;
+ text-decoration: underline;
+ opacity: 0.8;
+}
+
+.c12.btn:focus {
+ outline-width: 2px;
+ outline-style: solid;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
+ box-shadow: none;
+}
+
+.c12.btn.btn-primary {
+ color: #FFFFFF;
+ background-color: #013366;
+}
+
+.c12.btn.btn-primary:hover,
+.c12.btn.btn-primary:active,
+.c12.btn.btn-primary:focus {
+ background-color: #1E5189;
+}
+
+.c12.btn.btn-secondary {
+ color: #013366;
+ background: none;
+ border-color: #013366;
+}
+
+.c12.btn.btn-secondary:hover,
+.c12.btn.btn-secondary:active,
+.c12.btn.btn-secondary:focus {
+ color: #FFFFFF;
+ background-color: #013366;
+}
+
+.c12.btn.btn-info {
+ color: #9F9D9C;
+ border: none;
+ background: none;
+ padding-left: 0.6rem;
+ padding-right: 0.6rem;
+}
+
+.c12.btn.btn-info:hover,
+.c12.btn.btn-info:active,
+.c12.btn.btn-info:focus {
+ color: var(--surface-color-primary-button-hover);
+ background: none;
+}
+
+.c12.btn.btn-light {
+ color: #FFFFFF;
+ background-color: #606060;
+ border: none;
+}
+
+.c12.btn.btn-light:hover,
+.c12.btn.btn-light:active,
+.c12.btn.btn-light:focus {
+ color: #FFFFFF;
+ background-color: #606060;
+}
+
+.c12.btn.btn-dark {
+ color: #FFFFFF;
+ background-color: #474543;
+ border: none;
+}
+
+.c12.btn.btn-dark:hover,
+.c12.btn.btn-dark:active,
+.c12.btn.btn-dark:focus {
+ color: #FFFFFF;
+ background-color: #474543;
+}
+
+.c12.btn.btn-danger {
+ color: #FFFFFF;
+ background-color: #CE3E39;
+}
+
+.c12.btn.btn-danger:hover,
+.c12.btn.btn-danger:active,
+.c12.btn.btn-danger:focus {
+ color: #FFFFFF;
+ background-color: #CE3E39;
+}
+
+.c12.btn.btn-warning {
+ color: #FFFFFF;
+ background-color: #FCBA19;
+ border-color: #FCBA19;
+}
+
+.c12.btn.btn-warning:hover,
+.c12.btn.btn-warning:active,
+.c12.btn.btn-warning:focus {
+ color: #FFFFFF;
+ border-color: #FCBA19;
+ background-color: #FCBA19;
+}
+
+.c12.btn.btn-link {
+ font-size: 1.6rem;
+ font-weight: 400;
+ color: var(--surface-color-primary-button-default);
+ background: none;
+ border: none;
+ -webkit-text-decoration: none;
+ text-decoration: none;
+ min-height: 2.5rem;
+ line-height: 3rem;
+ -webkit-box-pack: left;
+ -webkit-justify-content: left;
+ -ms-flex-pack: left;
+ justify-content: left;
+ -webkit-letter-spacing: unset;
+ -moz-letter-spacing: unset;
+ -ms-letter-spacing: unset;
+ letter-spacing: unset;
+ text-align: left;
+ padding: 0;
+ -webkit-text-decoration: underline;
+ text-decoration: underline;
+}
+
+.c12.btn.btn-link:hover,
+.c12.btn.btn-link:active,
+.c12.btn.btn-link:focus {
+ color: var(--surface-color-primary-button-hover);
+ -webkit-text-decoration: underline;
+ text-decoration: underline;
+ border: none;
+ background: none;
+ box-shadow: none;
+ outline: none;
+}
+
+.c12.btn.btn-link:disabled,
+.c12.btn.btn-link.disabled {
+ color: #9F9D9C;
+ background: none;
+ pointer-events: none;
+}
+
+.c12.btn:disabled,
+.c12.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
+ box-shadow: none;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ pointer-events: none;
+ cursor: not-allowed;
+}
+
+.c12.Button .Button__icon {
+ margin-right: 1.6rem;
+}
+
+.c12.Button--icon-only:focus {
+ outline: none;
+}
+
+.c12.Button--icon-only .Button__icon {
+ margin-right: 0;
+}
+
+.c1 {
+ width: 0.8rem;
+}
+
+.c11 {
+ min-width: 2.4rem;
+}
+
+.c10 {
+ padding: 0px;
+ margin: 0px;
+ margin-left: 1.6rem;
+ margin-right: 1.6rem;
+}
+
+.c0 .modal-header {
+ height: 4.8rem;
+ padding-left: 1.6rem;
+ padding-right: 1.6rem;
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-box-pack: start;
+ -webkit-justify-content: flex-start;
+ -ms-flex-pack: start;
+ justify-content: flex-start;
+ color: #FFFFFF;
+ background-color: #053662;
+ cursor: default;
+}
+
+.c0 .modal-header .modal-title {
+ font-family: BcSans-Bold;
+ font-size: 2.2rem;
+ -webkit-align-self: center;
+ -ms-flex-item-align: center;
+ align-self: center;
+}
+
+.c0 .modal-header .modal-close-btn {
+ margin-left: auto;
+ cursor: pointer;
+}
+
+.c0 .modal-header .close {
+ margin-left: auto;
+ color: white;
+ opacity: 1;
+ font-size: 3rem;
+ font-weight: 10;
+ text-shadow: none;
+ font-family: 'Helvetica Narrow';
+}
+
+.c0 .modal-body {
+ padding-top: 2.4rem;
+ padding-bottom: 2.4rem;
+ padding-left: 1.6rem;
+ padding-right: 1.6rem;
+}
+
+.c0 .modal-footer {
+ border: 0px;
+ padding-top: 3.6rem;
+ padding-bottom: 3.6rem;
+ padding-left: 1.6rem;
+ padding-right: 3.6rem;
+}
+
+.c0 .modal-footer .button-wrap {
+ margin: 0px;
+ padding: 0px;
+ display: -webkit-inline-box;
+ display: -webkit-inline-flex;
+ display: -ms-inline-flexbox;
+ display: inline-flex;
+ -webkit-box-pack: end;
+ -webkit-justify-content: flex-end;
+ -ms-flex-pack: end;
+ justify-content: flex-end;
+ -webkit-align-items: center;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
+}
+
+.c0 .modal-footer .button-wrap .Button {
+ min-width: 9.5rem;
+ height: 3.9rem;
+}
+
+.c0 .close {
+ color: black;
+}
+
+.c0 .modal-xl {
+ max-width: 100rem;
+}
+
+.c0 .modal-l {
+ max-width: 75rem;
+}
+
+.c0 .modal-m {
+ max-width: 60rem;
+}
+
+.c0 .modal-s {
+ max-width: 40rem;
+}
+
+.c0.info-variant .modal-header {
+ color: #053662;
+ background-color: #d9eaf7;
+}
+
+.c0.info-variant .modal-close-btn {
+ color: #474543;
+ cursor: pointer;
+}
+
+.c0.error-variant .modal-header {
+ color: #CE3E39;
+ background-color: #f2dede;
+}
+
+.c0.error-variant .modal-close-btn {
+ color: #474543;
+ cursor: pointer;
+}
+
+.c0.warning-variant .modal-header {
+ color: #6c4a00;
+ background-color: #fef1d8;
+}
+
+.c0.warning-variant .modal-close-btn {
+ color: #474543;
+ cursor: pointer;
+}
+
+.c4 {
+ border: 1px solid #606060;
+ border-style: dashed;
+ height: 10rem;
+ line-height: 10rem;
+ text-align: center;
+}
+
+.c5 {
+ width: 100%;
+ display: inline-block;
+ vertical-align: middle;
+ line-height: normal;
+}
+
+.c6 {
+ display: inline-block;
+ color: var(--surface-color-primary-button-default);
+ cursor: pointer;
+}
+
+.c6:hover {
+ color: var(--surface-color-primary-button-hover);
+ -webkit-text-decoration: underline;
+ text-decoration: underline;
+}
+
+.c7 {
+ display: none;
+}
+
+.c3.required::before {
+ content: '*';
+ position: absolute;
+ top: 0.75rem;
+ left: 0rem;
+}
+
+.c2 {
+ font-weight: bold;
+}
+
+.c8 {
+ width: 100%;
+ -webkit-box-flex: 1;
+ -webkit-flex-grow: 1;
+ -ms-flex-positive: 1;
+ flex-grow: 1;
+ overflow-y: auto;
+}
+
+.c9 {
+ overflow-x: hidden;
+ max-height: 50rem;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Drag files here to attach or
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+`;
diff --git a/source/frontend/src/features/documents/list/DocumentFilter/__snapshots__/DocumentFilterForm.test.tsx.snap b/source/frontend/src/features/documents/list/DocumentFilter/__snapshots__/DocumentFilterForm.test.tsx.snap
index bc389d26bc..fddc73042f 100644
--- a/source/frontend/src/features/documents/list/DocumentFilter/__snapshots__/DocumentFilterForm.test.tsx.snap
+++ b/source/frontend/src/features/documents/list/DocumentFilter/__snapshots__/DocumentFilterForm.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`DocumentFilterForm component > renders as expected 1`] = `
}
.c2.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`DocumentFilterForm component > renders as expected 1`] = `
.c2.btn:disabled,
.c2.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`DocumentFilterForm component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c2.Button .Button__icon {
@@ -483,10 +484,10 @@ exports[`DocumentFilterForm component > renders with data as expected 1`] = `
}
.c2.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -626,6 +627,8 @@ exports[`DocumentFilterForm component > renders with data as expected 1`] = `
.c2.btn:disabled,
.c2.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -633,7 +636,6 @@ exports[`DocumentFilterForm component > renders with data as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c2.Button .Button__icon {
diff --git a/source/frontend/src/features/documents/list/__snapshots__/DocumentListView.test.tsx.snap b/source/frontend/src/features/documents/list/__snapshots__/DocumentListView.test.tsx.snap
index 54378679e3..a74dc6b5a2 100644
--- a/source/frontend/src/features/documents/list/__snapshots__/DocumentListView.test.tsx.snap
+++ b/source/frontend/src/features/documents/list/__snapshots__/DocumentListView.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`Document List View > renders as expected 1`] = `
}
.c6.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`Document List View > renders as expected 1`] = `
.c6.btn:disabled,
.c6.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`Document List View > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c6.Button .Button__icon {
diff --git a/source/frontend/src/features/leases/add/AddLeaseYupSchema.ts b/source/frontend/src/features/leases/add/AddLeaseYupSchema.ts
index 1a96d65823..cad9b25bbc 100644
--- a/source/frontend/src/features/leases/add/AddLeaseYupSchema.ts
+++ b/source/frontend/src/features/leases/add/AddLeaseYupSchema.ts
@@ -108,7 +108,7 @@ export const AddLeaseYupSchema = Yup.object().shape({
.max(200, 'Primary arbitration city must be at most ${max} characters'),
feeDeterminationNote: Yup.string()
.nullable()
- .max(1000, 'Fee determination notes must be at most ${max} characters'),
+ .max(1000, 'Fee determination comments must be at most ${max} characters'),
renewals: Yup.array().of(
Yup.object().shape({
renewalNote: Yup.string().max(2000, 'Renewal note must be at most ${max} characters'),
diff --git a/source/frontend/src/features/leases/add/AdministrationSubForm.tsx b/source/frontend/src/features/leases/add/AdministrationSubForm.tsx
index b4aa6a6610..a66e038cd1 100644
--- a/source/frontend/src/features/leases/add/AdministrationSubForm.tsx
+++ b/source/frontend/src/features/leases/add/AdministrationSubForm.tsx
@@ -217,7 +217,7 @@ const AdministrationSubForm: React.FunctionComponent<
-
+
diff --git a/source/frontend/src/features/leases/add/FeeDeterminationSubForm.tsx b/source/frontend/src/features/leases/add/FeeDeterminationSubForm.tsx
index e305ed2575..370ca128ab 100644
--- a/source/frontend/src/features/leases/add/FeeDeterminationSubForm.tsx
+++ b/source/frontend/src/features/leases/add/FeeDeterminationSubForm.tsx
@@ -73,7 +73,7 @@ const FeeDeterminationSubForm: React.FunctionComponent
= ({
-
+
diff --git a/source/frontend/src/features/leases/add/__snapshots__/AddLeaseContainer.test.tsx.snap b/source/frontend/src/features/leases/add/__snapshots__/AddLeaseContainer.test.tsx.snap
index 9af1cc99b2..625dca5304 100644
--- a/source/frontend/src/features/leases/add/__snapshots__/AddLeaseContainer.test.tsx.snap
+++ b/source/frontend/src/features/leases/add/__snapshots__/AddLeaseContainer.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`AddLeaseContainer component > renders as expected 1`] = `
}
.c3.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`AddLeaseContainer component > renders as expected 1`] = `
.c3.btn:disabled,
.c3.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`AddLeaseContainer component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c3.Button .Button__icon {
@@ -311,6 +312,16 @@ exports[`AddLeaseContainer component > renders as expected 1`] = `
margin: auto;
}
+.c7 {
+ width: 100%;
+ border-bottom: solid 0.5rem #3470B1;
+}
+
+.c6 {
+ font-size: 2.4rem;
+ cursor: pointer;
+}
+
.c4.btn.btn-light.Button {
padding: 0;
border: 0.1rem solid #9F9D9C;
@@ -376,16 +387,6 @@ exports[`AddLeaseContainer component > renders as expected 1`] = `
display: contents;
}
-.c7 {
- width: 100%;
- border-bottom: solid 0.5rem #3470B1;
-}
-
-.c6 {
- font-size: 2.4rem;
- cursor: pointer;
-}
-
.c37 {
position: -webkit-sticky;
position: sticky;
@@ -476,21 +477,27 @@ exports[`AddLeaseContainer component > renders as expected 1`] = `
.c20 .nav-item {
color: var(--surface-color-primary-button-default);
min-width: 5rem;
- padding: 0.1rem 1.2rem;
+ padding: 0.1rem 1.3rem;
+ margin-bottom: 0.1rem;
+ margin-left: 0.1rem;
}
.c20 .nav-item:hover {
- color: var(--surface-color-primary-button-hover);
+ color: #f2f2f2;
+ background-color: #1e5189;
border-color: transparent;
-webkit-text-decoration: underline;
text-decoration: underline;
+ border-radius: 0.4rem;
+ text-shadow: 0.1rem 0 0 currentColor;
}
.c20 .nav-item.active {
- background-color: #f2f2f2;
- font-family: 'BCSans-Bold';
- color: var(--surface-color-primary-button-hover);
+ border-radius: 0.4rem;
+ color: #f2f2f2;
+ background-color: #053662;
border-color: transparent;
+ text-shadow: 0.1rem 0 0 currentColor;
}
.c19 {
@@ -2674,12 +2681,12 @@ exports[`AddLeaseContainer component > renders as expected 1`] = `
class="pb-2 row"
>
renders as expected 1`] = `
class="pb-2 row"
>
renders as expected 1`] = `
{
claims: [Claims.LEASE_EDIT],
disabled: true,
});
- const editButton = getByTestId('edit-notes');
+ const editButton = getByTestId('edit-comments');
await act(async () => userEvent.click(editButton));
expect(onEdit).toHaveBeenCalled();
});
diff --git a/source/frontend/src/features/leases/detail/LeasePages/deposits/components/DepositNotes/DepositNotes.tsx b/source/frontend/src/features/leases/detail/LeasePages/deposits/components/DepositNotes/DepositNotes.tsx
index 39c99f47e5..0ec0ed1d79 100644
--- a/source/frontend/src/features/leases/detail/LeasePages/deposits/components/DepositNotes/DepositNotes.tsx
+++ b/source/frontend/src/features/leases/detail/LeasePages/deposits/components/DepositNotes/DepositNotes.tsx
@@ -39,17 +39,17 @@ export const DepositNotes: FunctionComponent
}
- data-testId="edit-notes"
+ data-testId="edit-comments"
onAdd={() => {
onEdit();
setCollapsed(false);
}}
/>
) : (
-
Deposit Notes
+
Deposit Comments
)
}
>
diff --git a/source/frontend/src/features/leases/detail/LeasePages/deposits/components/DepositNotes/__snapshots__/DepositNotes.test.tsx.snap b/source/frontend/src/features/leases/detail/LeasePages/deposits/components/DepositNotes/__snapshots__/DepositNotes.test.tsx.snap
index 6f599fce54..4d62b76767 100644
--- a/source/frontend/src/features/leases/detail/LeasePages/deposits/components/DepositNotes/__snapshots__/DepositNotes.test.tsx.snap
+++ b/source/frontend/src/features/leases/detail/LeasePages/deposits/components/DepositNotes/__snapshots__/DepositNotes.test.tsx.snap
@@ -40,7 +40,7 @@ exports[`DepositNotes component > renders as expected 1`] = `
class="col"
>
- Deposit Notes
+ Deposit Comments
renders as expected 1`] = `
}
.c7.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`ReceivedDepositForm component > renders as expected 1`] = `
.c7.btn:disabled,
.c7.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`ReceivedDepositForm component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c7.Button .Button__icon {
@@ -601,10 +602,10 @@ exports[`ReceivedDepositForm component > renders with data as expected 1`] = `
}
.c7.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -744,6 +745,8 @@ exports[`ReceivedDepositForm component > renders with data as expected 1`] = `
.c7.btn:disabled,
.c7.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -751,7 +754,6 @@ exports[`ReceivedDepositForm component > renders with data as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c7.Button .Button__icon {
diff --git a/source/frontend/src/features/leases/detail/LeasePages/deposits/modal/returnedDepositModal/__snapshots__/ReturnDepositForm.test.tsx.snap b/source/frontend/src/features/leases/detail/LeasePages/deposits/modal/returnedDepositModal/__snapshots__/ReturnDepositForm.test.tsx.snap
index ee80685b25..7d9c5aa36e 100644
--- a/source/frontend/src/features/leases/detail/LeasePages/deposits/modal/returnedDepositModal/__snapshots__/ReturnDepositForm.test.tsx.snap
+++ b/source/frontend/src/features/leases/detail/LeasePages/deposits/modal/returnedDepositModal/__snapshots__/ReturnDepositForm.test.tsx.snap
@@ -86,10 +86,10 @@ exports[`ReturnDepositForm component > renders as expected 1`] = `
}
.c8.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -229,6 +229,8 @@ exports[`ReturnDepositForm component > renders as expected 1`] = `
.c8.btn:disabled,
.c8.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -236,7 +238,6 @@ exports[`ReturnDepositForm component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c8.Button .Button__icon {
@@ -736,10 +737,10 @@ exports[`ReturnDepositForm component > renders with data as expected 1`] = `
}
.c8.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -879,6 +880,8 @@ exports[`ReturnDepositForm component > renders with data as expected 1`] = `
.c8.btn:disabled,
.c8.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -886,7 +889,6 @@ exports[`ReturnDepositForm component > renders with data as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c8.Button .Button__icon {
diff --git a/source/frontend/src/features/leases/detail/LeasePages/details/DetailAdministration.tsx b/source/frontend/src/features/leases/detail/LeasePages/details/DetailAdministration.tsx
index 33a27dd81d..dba80c202c 100644
--- a/source/frontend/src/features/leases/detail/LeasePages/details/DetailAdministration.tsx
+++ b/source/frontend/src/features/leases/detail/LeasePages/details/DetailAdministration.tsx
@@ -121,7 +121,7 @@ export const DetailAdministration: React.FunctionComponent<
>
-
+
{note}
diff --git a/source/frontend/src/features/leases/detail/LeasePages/details/DetailFeeDetermination.tsx b/source/frontend/src/features/leases/detail/LeasePages/details/DetailFeeDetermination.tsx
index 88fe98223a..7b30d00549 100644
--- a/source/frontend/src/features/leases/detail/LeasePages/details/DetailFeeDetermination.tsx
+++ b/source/frontend/src/features/leases/detail/LeasePages/details/DetailFeeDetermination.tsx
@@ -73,7 +73,7 @@ export const DetailFeeDetermination: React.FunctionComponent<
diff --git a/source/frontend/src/features/leases/detail/LeasePages/details/LeaseRenewalsView.tsx b/source/frontend/src/features/leases/detail/LeasePages/details/LeaseRenewalsView.tsx
index 886d2c15fe..8f54eb4a99 100644
--- a/source/frontend/src/features/leases/detail/LeasePages/details/LeaseRenewalsView.tsx
+++ b/source/frontend/src/features/leases/detail/LeasePages/details/LeaseRenewalsView.tsx
@@ -32,7 +32,7 @@ export const LeaseRenewalsView: React.FunctionComponent
{prettyFormatDate(renewal.expiryDt)}
-
+
{renewal.renewalNote}
diff --git a/source/frontend/src/features/leases/detail/LeasePages/details/__snapshots__/DetailAdministration.test.tsx.snap b/source/frontend/src/features/leases/detail/LeasePages/details/__snapshots__/DetailAdministration.test.tsx.snap
index aba694faa4..de521ca74c 100644
--- a/source/frontend/src/features/leases/detail/LeasePages/details/__snapshots__/DetailAdministration.test.tsx.snap
+++ b/source/frontend/src/features/leases/detail/LeasePages/details/__snapshots__/DetailAdministration.test.tsx.snap
@@ -434,7 +434,7 @@ exports[`DetailAdministration component > renders a complete lease as expected 1
renders minimally as expected 1`] = `
renders a complete lease as expected
@@ -1179,6 +1207,64 @@ exports[`AcquisitionView component > renders as expected 1`] = `
Jul 29, 2022
+
+
+
+ Estimated date:
+
+
+
+
+
+
+
+
+ Jul 10, 2024
+
+
+
+
+
+ Possession date:
+
+
+
+ Jul 10, 2025
+
+
renders as expected 1`] = `
-
+ Each property in this file should be owned by the owner(s) in this section
+
+
);
+ addAcquisitionFile: addAcquisitionFileApi,
+ getAcquisitionFile: getAcquisitionFileApi,
+} as unknown as ReturnType
);
const mocks = vi.hoisted(() => {
return {
@@ -92,7 +100,7 @@ describe('AddAcquisitionContainer component', () => {
) => {
const defaultUserInfo = {
organizations: [1],
- client_roles: [...(renderOptions?.claims ?? []), ...(renderOptions?.roles ?? [])] ?? [],
+ client_roles: [...(renderOptions?.claims ?? []), ...(renderOptions?.roles ?? [])],
email: 'test@test.com',
name: 'Chester Tester',
idir_user_guid: '00000000000000000000000000000000',
@@ -120,6 +128,9 @@ describe('AddAcquisitionContainer component', () => {
return {
...utils,
+ rerender: () => {
+ utils.rerender();
+ },
getSaveButton: () => utils.getByText(/Save/i),
getCancelButton: () => utils.getByText(/Cancel/i),
getNameTextbox: () =>
@@ -130,6 +141,10 @@ describe('AddAcquisitionContainer component', () => {
utils.container.querySelector(`select[name="acquisitionType"]`) as HTMLSelectElement,
getFundingTypeDropdown: () =>
utils.container.querySelector(`select[name="fundingTypeCode"]`) as HTMLSelectElement,
+ getSubfileInterestTypeDropdown: () =>
+ utils.container.querySelector(
+ `select[name="subfileInterestTypeCode"]`,
+ ) as HTMLSelectElement,
getFundingOtherTextbox: () =>
utils.container.querySelector(
`input[name="fundingTypeOtherDescription"]`,
@@ -177,7 +192,9 @@ describe('AddAcquisitionContainer component', () => {
formValues.project = { id: 0, text: 'Test Project' };
formValues.fundingTypeCode = 'OTHER';
formValues.fundingTypeOtherDescription = 'A different type of funding';
- addAcquisitionFile.mockResolvedValue(mockAcquisitionFileResponse(1, formValues.fileName));
+ addAcquisitionFileApi.execute.mockResolvedValue(
+ mockAcquisitionFileResponse(1, formValues.fileName),
+ );
});
afterEach(() => {
@@ -190,7 +207,8 @@ describe('AddAcquisitionContainer component', () => {
});
it('renders the underlying form', async () => {
- const { getByText, getNameTextbox, getRegionDropdown } = await setup();
+ const { getByText, getNameTextbox, getRegionDropdown, getSubfileInterestTypeDropdown } =
+ await setup();
const formTitle = getByText(/Create Acquisition File/i);
const input = getNameTextbox();
@@ -201,6 +219,7 @@ describe('AddAcquisitionContainer component', () => {
expect(input.tagName).toBe('INPUT');
expect(select).toBeVisible();
expect(select.tagName).toBe('SELECT');
+ expect(getSubfileInterestTypeDropdown()).not.toBeInTheDocument();
});
it('should close the form when Cancel button is clicked', async () => {
@@ -209,11 +228,11 @@ describe('AddAcquisitionContainer component', () => {
expect(getByText(/Create Acquisition File/i)).toBeVisible();
await act(async () => userEvent.click(getCancelButton()));
- expect(onClose).toBeCalled();
+ expect(onClose).toHaveBeenCalled();
});
it('requires confirmation when navigating away', async () => {
- const { getCancelButton, getByText, getNameTextbox, getByTitle } = await setup();
+ const { getByText, getNameTextbox, getByTitle } = await setup();
expect(getByText(/Create Acquisition File/i)).toBeVisible();
@@ -322,7 +341,7 @@ describe('AddAcquisitionContainer component', () => {
});
const expectedValues = formValues.toApi();
- expect(addAcquisitionFile).toBeCalledWith(expectedValues, []);
+ expect(addAcquisitionFileApi.execute).toHaveBeenCalledWith(expectedValues, []);
expect(onSuccess).toHaveBeenCalledWith(1);
});
@@ -389,7 +408,100 @@ describe('AddAcquisitionContainer component', () => {
await act(async () => userEvent.click(getSaveButton()));
const expectedValues = formValues.toApi();
- expect(addAcquisitionFile).toBeCalledWith(expectedValues, []);
+ expect(addAcquisitionFileApi.execute).toHaveBeenCalledWith(expectedValues, []);
expect(onSuccess).toHaveBeenCalledWith(1);
});
+
+ describe('Sub-interest file', () => {
+ beforeEach(() => {
+ // populate URL parameters required for sub-file creation
+ const params = new URLSearchParams();
+ params.set('parentId', '99');
+ history.replace({
+ pathname: `/mapview/sidebar/acquisition/new`,
+ search: params.toString(),
+ });
+
+ // simulate API call to fetch parent acquisition file
+ getAcquisitionFileApi.execute.mockImplementation(async () => {
+ const apiResponse = mockAcquisitionFileResponse(99, 'TEST Main File');
+ const parentFile: ApiGen_Concepts_AcquisitionFile = {
+ ...apiResponse,
+ estimatedCompletionDate: '2024-11-01',
+ possessionDate: '2024-12-20',
+ project: {
+ ...apiResponse.project,
+ code: '999',
+ description: 'Hwy 14 Expansion',
+ },
+ product: {
+ ...apiResponse.product,
+ code: '00048',
+ description: 'MISCELLANEOUS CLAIMS',
+ },
+ };
+ getAcquisitionFileApi.response = parentFile;
+ return parentFile;
+ });
+ });
+
+ afterEach(() => {
+ getAcquisitionFileApi.response = undefined;
+ });
+
+ it('renders as expected', async () => {
+ const { asFragment } = await setup();
+ expect(asFragment()).toMatchSnapshot();
+ });
+
+ it('renders the underlying form', async () => {
+ const { getByText, getNameTextbox, getRegionDropdown } = await setup();
+
+ const formTitle = getByText(/Create Acquisition Sub-Interest File/i);
+ const input = getNameTextbox();
+ const select = getRegionDropdown();
+
+ expect(formTitle).toBeVisible();
+ expect(input).toBeVisible();
+ expect(input.tagName).toBe('INPUT');
+ expect(select).toBeVisible();
+ expect(select.tagName).toBe('SELECT');
+ });
+
+ it('should populate the form with information from the parent/main file', async () => {
+ expect(getAcquisitionFileApi.response).not.toBeDefined();
+
+ const { rerender } = await setup();
+ await act(async () => rerender());
+
+ expect(screen.getByText(/Create Acquisition Sub-Interest File/i)).toBeVisible();
+ expect(
+ screen.getByText(
+ 'Each property in this sub-file should be impacted by the sub-interest(s) in this section',
+ ),
+ ).toBeVisible();
+ expect(getAcquisitionFileApi.execute).toHaveBeenCalled();
+ expect(getAcquisitionFileApi.response).toBeDefined();
+ // project and product are copied from main file
+ expect(await screen.findByText('999 - Hwy 14 Expansion')).toBeVisible();
+ expect(await screen.findByText('00048 MISCELLANEOUS CLAIMS')).toBeVisible();
+ // acquisition team is copied as well
+ expect(await screen.findByText('Bob Billy Smith')).toBeVisible();
+ expect(await screen.findByText('Stinky Cheese')).toBeVisible();
+ // acquisition-related dates are copied too
+ const estimatedDatePicker = getByName('estimatedCompletionDate');
+ const possessionDatePicker = getByName('possessionDate');
+ expect(estimatedDatePicker).toHaveValue('Nov 01, 2024');
+ expect(possessionDatePicker).toHaveValue('Dec 20, 2024');
+ });
+
+ it('should go back to main file "Sub-Files" tab the when Cancel button is clicked for Sub-files', async () => {
+ const { getCancelButton, getByText } = await setup();
+
+ expect(getByText(/Create Acquisition Sub-Interest File/i)).toBeVisible();
+ await act(async () => userEvent.click(getCancelButton()));
+
+ expect(onClose).toHaveBeenCalledWith('/mapview/sidebar/acquisition/99/subFiles');
+ });
+ });
});
diff --git a/source/frontend/src/features/mapSideBar/acquisition/add/AddAcquisitionContainer.tsx b/source/frontend/src/features/mapSideBar/acquisition/add/AddAcquisitionContainer.tsx
index 9a88443414..2518e0695b 100644
--- a/source/frontend/src/features/mapSideBar/acquisition/add/AddAcquisitionContainer.tsx
+++ b/source/frontend/src/features/mapSideBar/acquisition/add/AddAcquisitionContainer.tsx
@@ -1,5 +1,4 @@
import { FormikProps } from 'formik/dist/types';
-import { Location } from 'history';
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { useHistory } from 'react-router-dom';
import { toast } from 'react-toastify';
@@ -9,7 +8,9 @@ import ConfirmNavigation from '@/components/common/ConfirmNavigation';
import LoadingBackdrop from '@/components/common/LoadingBackdrop';
import { useMapStateMachine } from '@/components/common/mapFSM/MapStateMachineContext';
import MapSideBarLayout from '@/features/mapSideBar/layout/MapSideBarLayout';
+import { useAcquisitionProvider } from '@/hooks/repositories/useAcquisitionProvider';
import { usePropertyAssociations } from '@/hooks/repositories/usePropertyAssociations';
+import { useQuery } from '@/hooks/use-query';
import { useModalContext } from '@/hooks/useModalContext';
import { ApiGen_Concepts_AcquisitionFile } from '@/models/api/generated/ApiGen_Concepts_AcquisitionFile';
import { exists, isValidId } from '@/utils';
@@ -23,7 +24,7 @@ import { AddAcquisitionForm } from './AddAcquisitionForm';
import { AcquisitionForm } from './models';
export interface IAddAcquisitionContainerProps {
- onClose: () => void;
+ onClose: (nextLocation?: string) => void;
onSuccess: (newAcquisitionId: number) => void;
}
@@ -40,24 +41,30 @@ export const AddAcquisitionContainer: React.FC =
const { execute: getPropertyAssociations } = usePropertyAssociations();
const [needsUserConfirmation, setNeedsUserConfirmation] = useState(true);
- // Warn user that property is part of an existing acquisition file
- const confirmBeforeAdd = useCallback(
- async (propertyForm: PropertyForm) => {
- if (isValidId(propertyForm.apiId)) {
- const response = await getPropertyAssociations(propertyForm.apiId);
- const acquisitionAssociations = response?.acquisitionAssociations ?? [];
- const otherAcqFiles = acquisitionAssociations.filter(a => exists(a.id));
- return otherAcqFiles.length > 0;
- } else {
- // the property is not in PIMS db -> no need to confirm
- return false;
+ const {
+ getAcquisitionFile: { execute: getAcquisitionFile, response: parentAcquisitionFile },
+ } = useAcquisitionProvider();
+
+ // Check for parent acquisition file id for sub-files
+ const params = useQuery();
+ const parentId = params.get('parentId');
+ const isSubFile = exists(parentId) && isValidId(Number(parentId));
+
+ useEffect(() => {
+ const fetchParentFile = async () => {
+ if (exists(parentId) && isValidId(Number(parentId)) && !exists(parentAcquisitionFile)) {
+ await getAcquisitionFile(Number(parentId));
}
- },
- [getPropertyAssociations],
- );
+ };
+
+ fetchParentFile();
+ }, [getAcquisitionFile, parentAcquisitionFile, parentId]);
const initialForm = useMemo(() => {
- const acquisitionForm = new AcquisitionForm();
+ const acquisitionForm = exists(parentAcquisitionFile)
+ ? AcquisitionForm.fromParentFileApi(parentAcquisitionFile)
+ : new AcquisitionForm();
+
if (selectedFeatureDataset !== null) {
const property = PropertyForm.fromMapProperty(
featuresetToMapProperty(selectedFeatureDataset),
@@ -67,7 +74,7 @@ export const AddAcquisitionContainer: React.FC =
property.regionName !== 'Cannot determine' ? property.region?.toString() : undefined;
}
return acquisitionForm;
- }, [selectedFeatureDataset]);
+ }, [parentAcquisitionFile, selectedFeatureDataset]);
const handleSave = async () => {
// Sets the formik field `isValid` to false at start
@@ -102,11 +109,33 @@ export const AddAcquisitionContainer: React.FC =
formikRef,
});
- const handleCancel = () => {
- onClose();
- };
+ const handleCancel = useCallback(() => {
+ if (isSubFile) {
+ // Go back to the main file (sub-files tab) if they cancel the action without saving
+ onClose(`/mapview/sidebar/acquisition/${parentId}/subFiles`);
+ } else {
+ onClose();
+ }
+ }, [isSubFile, onClose, parentId]);
const { initialValues } = helper;
+
+ // Warn user that property is part of an existing acquisition file
+ const confirmBeforeAdd = useCallback(
+ async (propertyForm: PropertyForm) => {
+ if (isValidId(propertyForm.apiId)) {
+ const response = await getPropertyAssociations(propertyForm.apiId);
+ const acquisitionAssociations = response?.acquisitionAssociations ?? [];
+ const otherAcqFiles = acquisitionAssociations.filter(a => exists(a.id));
+ return otherAcqFiles.length > 0;
+ } else {
+ // the property is not in PIMS db -> no need to confirm
+ return false;
+ }
+ },
+ [getPropertyAssociations],
+ );
+
// Require user confirmation before adding a property to file
// This is the flow for Map Marker -> right-click -> create Acquisition File
useEffect(() => {
@@ -160,21 +189,14 @@ export const AddAcquisitionContainer: React.FC =
setModalContent,
]);
- const checkState = useCallback(
- (location: Location) => {
- return (
- !location.pathname.startsWith('/mapview/sidebar/acquisition/') &&
- formikRef?.current?.dirty &&
- !formikRef?.current?.isSubmitting
- );
- },
- [formikRef],
- );
+ const checkState = useCallback(() => {
+ return (isSubFile || formikRef?.current?.dirty) && !formikRef?.current?.isSubmitting;
+ }, [formikRef, isSubFile]);
return (
=
parentAcquisitionFileId !== null,
+ then: yup.string().required('Subfile interest type is required').nullable(),
+ otherwise: yup.string().nullable(),
+ })
+ .nullable(),
+ otherSubfileInterestType: yup.string().when('subfileInterestTypeCode', {
+ is: (subfileInterestTypeCode: string) =>
+ subfileInterestTypeCode &&
+ subfileInterestTypeCode === ApiGen_CodeTypes_SubfileInterestTypes.OTHER,
+ then: yup
+ .string()
+ .required('Other Subfile interest type is required')
+ .nullable()
+ .max(200, 'Other Subfile interest description must be at most 200 characters'),
+ otherwise: yup.string().nullable(),
+ }),
+ region: yup.string().required('Ministry region is required'),
+ legacyFileNumber: yup.string().max(18, 'Legacy file number must be at most ${max} characters'),
+ properties: yup.array().of(
+ yup.object().shape({
+ isRetired: yup
+ .boolean()
+ .notOneOf([true], 'Selected property is retired and can not be added to the file'),
}),
),
})
diff --git a/source/frontend/src/features/mapSideBar/acquisition/add/AddAcquisitionForm.test.tsx b/source/frontend/src/features/mapSideBar/acquisition/add/AddAcquisitionForm.test.tsx
index d3557d6fe6..1528e8b887 100644
--- a/source/frontend/src/features/mapSideBar/acquisition/add/AddAcquisitionForm.test.tsx
+++ b/source/frontend/src/features/mapSideBar/acquisition/add/AddAcquisitionForm.test.tsx
@@ -1,25 +1,37 @@
import { FormikProps } from 'formik';
import { createMemoryHistory } from 'history';
import { createRef } from 'react';
+import { vi } from 'vitest';
+import { useApiUsers } from '@/hooks/pims-api/useApiUsers';
import { mockLookups } from '@/mocks/lookups.mock';
import { mockProjects } from '@/mocks/projects.mock';
+import { getMockPagedUsers, getUserMock } from '@/mocks/user.mock';
import { lookupCodesSlice } from '@/store/slices/lookupCodes';
-import { cleanup, fakeText, render, RenderOptions, userEvent, waitFor } from '@/utils/test-utils';
+import {
+ act,
+ cleanup,
+ fakeText,
+ fireEvent,
+ render,
+ RenderOptions,
+ screen,
+ userEvent,
+ waitFor,
+ waitForEffects,
+ within,
+} from '@/utils/test-utils';
import { AddAcquisitionFileYupSchema } from './AddAcquisitionFileYupSchema';
import { AddAcquisitionForm, IAddAcquisitionFormProps } from './AddAcquisitionForm';
import { AcquisitionForm } from './models';
-import { useApiUsers } from '@/hooks/pims-api/useApiUsers';
-import { getUserMock, getMockPagedUsers } from '@/mocks/user.mock';
-import { vi } from 'vitest';
const history = createMemoryHistory();
const validationSchema = vi.fn().mockReturnValue(AddAcquisitionFileYupSchema);
const onSubmit = vi.fn();
-type TestProps = Pick;
+type TestProps = Pick;
vi.mock('@/hooks/pims-api/useApiUsers');
vi.mocked(useApiUsers).mockReturnValue({
@@ -40,6 +52,7 @@ describe('AddAcquisitionForm component', () => {
ref={formikRef}
initialValues={props.initialValues ?? new AcquisitionForm()}
confirmBeforeAdd={props.confirmBeforeAdd ?? vi.fn()}
+ parentId={props.parentId ?? undefined}
validationSchema={validationSchema}
onSubmit={onSubmit}
/>,
@@ -63,6 +76,12 @@ describe('AddAcquisitionForm component', () => {
utils.container.querySelector(`select[name="region"]`) as HTMLSelectElement,
getAcquisitionTypeDropdown: () =>
utils.container.querySelector(`select[name="acquisitionType"]`) as HTMLSelectElement,
+ getSubfileInterestTypeDropdown: () =>
+ utils.container.querySelector(
+ `select[name="subfileInterestTypeCode"]`,
+ ) as HTMLSelectElement,
+ getOtherSubfileInterestTypeTextbox: () =>
+ utils.container.querySelector(`input[name="otherSubfileInterestType"]`) as HTMLInputElement,
};
};
@@ -83,7 +102,7 @@ describe('AddAcquisitionForm component', () => {
});
it('renders form fields as expected', () => {
- const { getByText, getNameTextbox, getRegionDropdown } = setup({
+ const { getByText, getNameTextbox, getRegionDropdown, getSubfileInterestTypeDropdown } = setup({
initialValues,
confirmBeforeAdd: vi.fn(),
});
@@ -97,6 +116,7 @@ describe('AddAcquisitionForm component', () => {
expect(input.tagName).toBe('INPUT');
expect(select).toBeVisible();
expect(select.tagName).toBe('SELECT');
+ expect(getSubfileInterestTypeDropdown()).not.toBeInTheDocument();
});
it('displays existing values if they exist', async () => {
@@ -141,4 +161,100 @@ describe('AddAcquisitionForm component', () => {
const { getByText } = setup({ initialValues, confirmBeforeAdd: vi.fn() });
expect(getByText(/Owner representative/i)).toBeVisible();
});
+
+ describe('Sub-interest files', () => {
+ let parentId: number;
+ beforeEach(() => {
+ parentId = 99;
+ initialValues.parentAcquisitionFileId = parentId;
+ initialValues.formattedProject = '1111 - Test Project';
+ initialValues.formattedProduct = '9999 Test Product';
+ });
+
+ it('renders as expected', () => {
+ const { asFragment } = setup({ initialValues, parentId, confirmBeforeAdd: vi.fn() });
+ expect(asFragment()).toMatchSnapshot();
+ });
+
+ it('should display interest solicitor input', async () => {
+ const { getByText } = setup({ initialValues, parentId, confirmBeforeAdd: vi.fn() });
+ expect(getByText(/Sub-interest solicitor/i)).toBeVisible();
+ });
+
+ it('should display Subfile interest type SELECT', async () => {
+ const { getSubfileInterestTypeDropdown } = setup({
+ initialValues,
+ parentId,
+ confirmBeforeAdd: vi.fn(),
+ });
+ expect(getSubfileInterestTypeDropdown()).toBeInTheDocument();
+ });
+
+ it('should display OTHER Subfile interest type', async () => {
+ const { getSubfileInterestTypeDropdown, getOtherSubfileInterestTypeTextbox } = setup({
+ initialValues,
+ parentId,
+ confirmBeforeAdd: vi.fn(),
+ });
+ const subfileInterestTypeDropdown = getSubfileInterestTypeDropdown();
+
+ expect(subfileInterestTypeDropdown).toBeInTheDocument();
+ await act(async () => {
+ userEvent.click(subfileInterestTypeDropdown);
+ userEvent.selectOptions(screen.getByTestId('subfileInterestTypeCode'), ['OTHER']);
+ });
+ await waitForEffects();
+
+ const otherSubfileInterestTextbox = getOtherSubfileInterestTypeTextbox();
+ expect(otherSubfileInterestTextbox).toBeInTheDocument();
+ });
+
+ it('should validate OTHER Subfile interest type max length', async () => {
+ const { findByText, getSubfileInterestTypeDropdown, getOtherSubfileInterestTypeTextbox } =
+ setup({ initialValues, parentId, confirmBeforeAdd: vi.fn() });
+ const subfileInterestTypeDropdown = getSubfileInterestTypeDropdown();
+
+ expect(subfileInterestTypeDropdown).toBeInTheDocument();
+ await act(async () => {
+ userEvent.click(subfileInterestTypeDropdown);
+ userEvent.selectOptions(screen.getByTestId('subfileInterestTypeCode'), ['OTHER']);
+ });
+ await waitForEffects();
+
+ const otherSubfileInterestTextbox = getOtherSubfileInterestTypeTextbox();
+ expect(otherSubfileInterestTextbox).toBeInTheDocument();
+
+ await act(async () => {
+ userEvent.paste(otherSubfileInterestTextbox, fakeText(201));
+ fireEvent.blur(otherSubfileInterestTextbox);
+ });
+ await waitForEffects();
+
+ expect(
+ await findByText(/Other Subfile interest description must be at most 200 characters/i),
+ ).toBeVisible();
+ });
+
+ it('should display interest representative input', async () => {
+ const { getByText } = setup({ initialValues, parentId, confirmBeforeAdd: vi.fn() });
+ expect(getByText(/Sub-interest representative/i)).toBeVisible();
+ });
+
+ it('should display project and product as read-only (with tooltip explaining why)', async () => {
+ setup({ initialValues, parentId, confirmBeforeAdd: vi.fn() });
+
+ expect(screen.getByText('1111 - Test Project')).toBeVisible();
+ expect(screen.getByText('9999 Test Product')).toBeVisible();
+
+ const project = screen.getByText('Ministry project:');
+ const tooltipIcon = within(project).getByTestId('tooltip-icon-section-field-tooltip');
+ await act(async () => userEvent.hover(tooltipIcon));
+
+ expect(
+ screen.getByText(
+ /Sub-file has the same project as the main file and it can only be updated from the main file/i,
+ ),
+ ).toBeInTheDocument();
+ });
+ });
});
diff --git a/source/frontend/src/features/mapSideBar/acquisition/add/AddAcquisitionForm.tsx b/source/frontend/src/features/mapSideBar/acquisition/add/AddAcquisitionForm.tsx
index 20aefd05ca..4ee03bd6f5 100644
--- a/source/frontend/src/features/mapSideBar/acquisition/add/AddAcquisitionForm.tsx
+++ b/source/frontend/src/features/mapSideBar/acquisition/add/AddAcquisitionForm.tsx
@@ -22,10 +22,11 @@ import { useOrganizationRepository } from '@/features/contacts/repositories/useO
import { useProjectProvider } from '@/hooks/repositories/useProjectProvider';
import { useLookupCodeHelpers } from '@/hooks/useLookupCodeHelpers';
import { IAutocompletePrediction } from '@/interfaces/IAutocomplete';
+import { ApiGen_CodeTypes_SubfileInterestTypes } from '@/models/api/generated/ApiGen_CodeTypes_SubfileInterestTypes';
import { ApiGen_Concepts_PersonOrganization } from '@/models/api/generated/ApiGen_Concepts_PersonOrganization';
import { ApiGen_Concepts_Product } from '@/models/api/generated/ApiGen_Concepts_Product';
import { UserOverrideCode } from '@/models/api/UserOverrideCode';
-import { isValidId, isValidString } from '@/utils';
+import { exists, isValidId, isValidString } from '@/utils';
import { formatApiPersonNames } from '@/utils/personUtils';
import { PropertyForm } from '../../shared/models';
@@ -36,6 +37,8 @@ import { AcquisitionPropertiesSubForm } from './AcquisitionPropertiesSubForm';
import { AcquisitionForm } from './models';
export interface IAddAcquisitionFormProps {
+ /** The parent acquisition file id - only applies to sub-files */
+ parentId?: number;
/** Initial values of the form */
initialValues: AcquisitionForm;
/** A Yup Schema or a function that returns a Yup schema */
@@ -53,7 +56,7 @@ export const AddAcquisitionForm = React.forwardRef<
FormikProps,
IAddAcquisitionFormProps
>((props, ref) => {
- const { initialValues, validationSchema, onSubmit, confirmBeforeAdd } = props;
+ const { parentId, initialValues, validationSchema, onSubmit, confirmBeforeAdd } = props;
const [showDiffMinistryRegionModal, setShowDiffMinistryRegionModal] =
React.useState(false);
@@ -80,11 +83,15 @@ export const AddAcquisitionForm = React.forwardRef<
innerRef={ref}
initialValues={initialValues}
validationSchema={validationSchema}
+ validateOnChange={false}
+ validateOnBlur={true}
onSubmit={handleSubmit}
+ enableReinitialize
>
{formikProps => {
return (
;
onSubmit: (
values: AcquisitionForm,
@@ -108,6 +116,7 @@ const AddAcquisitionDetailSubForm: React.FC<{
setShowDiffMinistryRegionModal: React.Dispatch>;
confirmBeforeAdd: (propertyForm: PropertyForm) => Promise;
}> = ({
+ parentId,
formikProps,
onSubmit,
showDiffMinistryRegionModal,
@@ -127,6 +136,22 @@ const AddAcquisitionDetailSubForm: React.FC<{
const acquisitionTypes = getOptionsByType(API.ACQUISITION_TYPES);
const acquisitionPhysFileTypes = getOptionsByType(API.ACQUISITION_PHYSICAL_FILE_STATUS_TYPES);
const acquisitionFundingTypes = getOptionsByType(API.ACQUISITION_FUNDING_TYPES);
+ const subfileInterestTypes = getOptionsByType(API.SUBFILE_INTEREST_TYPES);
+
+ const isSubFile = exists(parentId) && isValidId(parentId);
+
+ const {
+ getOrganizationDetail: { execute: fetchOrganization, response: organization },
+ } = useOrganizationRepository();
+
+ const orgPersons = organization?.organizationPersons;
+ const primaryContacts: SelectOption[] =
+ orgPersons?.map((orgPerson: ApiGen_Concepts_PersonOrganization) => {
+ return {
+ label: `${formatApiPersonNames(orgPerson.person)}`,
+ value: orgPerson.personId ?? ' ',
+ };
+ }) ?? [];
const onMinistryProjectSelected = async (param: IAutocompletePrediction[]) => {
if (param.length > 0) {
@@ -141,18 +166,6 @@ const AddAcquisitionDetailSubForm: React.FC<{
}
};
- const {
- getOrganizationDetail: { execute: fetchOrganization, response: organization },
- } = useOrganizationRepository();
-
- React.useEffect(() => {
- if (ownerSolicitorContact?.organizationId) {
- fetchOrganization(ownerSolicitorContact?.organizationId);
- }
- }, [ownerSolicitorContact?.organizationId, fetchOrganization]);
-
- const orgPersons = organization?.organizationPersons;
-
React.useEffect(() => {
if (orgPersons?.length === 0) {
setFieldValue('ownerSolicitor.primaryContactId', null);
@@ -162,39 +175,56 @@ const AddAcquisitionDetailSubForm: React.FC<{
}
}, [orgPersons, setFieldValue]);
- const primaryContacts: SelectOption[] =
- orgPersons?.map((orgPerson: ApiGen_Concepts_PersonOrganization) => {
- return {
- label: `${formatApiPersonNames(orgPerson.person)}`,
- value: orgPerson.personId ?? ' ',
- };
- }) ?? [];
+ React.useEffect(() => {
+ if (ownerSolicitorContact?.organizationId) {
+ fetchOrganization(ownerSolicitorContact?.organizationId);
+ }
+ }, [ownerSolicitorContact?.organizationId, fetchOrganization]);
return (
<>
-
- {
- onMinistryProjectSelected(vals);
- if (vals.length === 0) {
- formikProps.setFieldValue('product', 0);
- }
- }}
- />
-
- {projectProducts !== undefined && (
-
-
+ {isSubFile ? (
+ <>
+
+ {values?.formattedProject ?? ''}
+
+
+ {values?.formattedProduct ?? ''}
+
+ >
+ ) : (
+ <>
+
+ {
+ onMinistryProjectSelected(vals);
+ if (vals.length === 0) {
+ formikProps.setFieldValue('product', 0);
+ }
+ }}
+ />
+
+ {projectProducts !== undefined && (
+
+
+ )}
+ >
)}
- {formikProps.values?.fundingTypeCode === 'OTHER' && (
+ {values?.fundingTypeCode === 'OTHER' && (
@@ -222,11 +252,30 @@ const AddAcquisitionDetailSubForm: React.FC<{
-
+
+
+
+
+
+
+
-
+
+
+
+ {isSubFile && (
+
+
+ )}
+ {isSubFile &&
+ values?.subfileInterestTypeCode === ApiGen_CodeTypes_SubfileInterestTypes.OTHER && (
+
+
+
+ )}
+
@@ -271,12 +356,23 @@ const AddAcquisitionDetailSubForm: React.FC<{
)}
-
-
- Each property in this file should be owned by the owner(s) in this section
-
-
-
+
+
+ {isSubFile ? (
+
+ Each property in this sub-file should be impacted by the sub-interest(s) in this
+ section
+
+ ) : (
+
+ Each property in this file should be owned by the owner(s) in this section
+
+ )}
+
+
)}
-
+
renders as expected 1`] = `
}
.c13.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -196,6 +196,8 @@ exports[`AcquisitionProperties component > renders as expected 1`] = `
.c13.btn:disabled,
.c13.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -203,7 +205,6 @@ exports[`AcquisitionProperties component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c13.Button .Button__icon {
@@ -325,21 +326,27 @@ exports[`AcquisitionProperties component > renders as expected 1`] = `
.c2 .nav-item {
color: var(--surface-color-primary-button-default);
min-width: 5rem;
- padding: 0.1rem 1.2rem;
+ padding: 0.1rem 1.3rem;
+ margin-bottom: 0.1rem;
+ margin-left: 0.1rem;
}
.c2 .nav-item:hover {
- color: var(--surface-color-primary-button-hover);
+ color: #f2f2f2;
+ background-color: #1e5189;
border-color: transparent;
-webkit-text-decoration: underline;
text-decoration: underline;
+ border-radius: 0.4rem;
+ text-shadow: 0.1rem 0 0 currentColor;
}
.c2 .nav-item.active {
- background-color: #f2f2f2;
- font-family: 'BCSans-Bold';
- color: var(--surface-color-primary-button-hover);
+ border-radius: 0.4rem;
+ color: #f2f2f2;
+ background-color: #053662;
border-color: transparent;
+ text-shadow: 0.1rem 0 0 currentColor;
}
.c1 {
@@ -922,10 +929,10 @@ exports[`AcquisitionProperties component > renders as expected 1`] = `
}
.c7.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -1065,6 +1072,8 @@ exports[`AcquisitionProperties component > renders as expected 1`] = `
.c7.btn:disabled,
.c7.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -1072,7 +1081,6 @@ exports[`AcquisitionProperties component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c7.Button .Button__icon {
diff --git a/source/frontend/src/features/mapSideBar/acquisition/add/__snapshots__/AddAcquisitionContainer.test.tsx.snap b/source/frontend/src/features/mapSideBar/acquisition/add/__snapshots__/AddAcquisitionContainer.test.tsx.snap
index 38bae0b09a..e51440dc2e 100644
--- a/source/frontend/src/features/mapSideBar/acquisition/add/__snapshots__/AddAcquisitionContainer.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/acquisition/add/__snapshots__/AddAcquisitionContainer.test.tsx.snap
@@ -1,5 +1,2399 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
+exports[`AddAcquisitionContainer component > Sub-interest file > renders as expected 1`] = `
+
+
+
+ .c3.btn {
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-align-items: center;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
+ -webkit-box-pack: center;
+ -webkit-justify-content: center;
+ -ms-flex-pack: center;
+ justify-content: center;
+ padding: 0.4rem 1.2rem;
+ border: 0.2rem solid transparent;
+ border-radius: 0.4rem;
+ text-align: center;
+ -webkit-text-decoration: none;
+ text-decoration: none;
+ font-size: 1.8rem;
+ font-family: 'BCSans','Noto Sans',Verdana,Arial,sans-serif;
+ font-weight: 700;
+ -webkit-letter-spacing: 0.1rem;
+ -moz-letter-spacing: 0.1rem;
+ -ms-letter-spacing: 0.1rem;
+ letter-spacing: 0.1rem;
+ cursor: pointer;
+}
+
+.c3.btn .Button__value {
+ width: -webkit-max-content;
+ width: -moz-max-content;
+ width: max-content;
+}
+
+.c3.btn:hover {
+ -webkit-text-decoration: underline;
+ text-decoration: underline;
+ opacity: 0.8;
+}
+
+.c3.btn:focus {
+ outline-width: 2px;
+ outline-style: solid;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
+ box-shadow: none;
+}
+
+.c3.btn.btn-primary {
+ color: #FFFFFF;
+ background-color: #013366;
+}
+
+.c3.btn.btn-primary:hover,
+.c3.btn.btn-primary:active,
+.c3.btn.btn-primary:focus {
+ background-color: #1E5189;
+}
+
+.c3.btn.btn-secondary {
+ color: #013366;
+ background: none;
+ border-color: #013366;
+}
+
+.c3.btn.btn-secondary:hover,
+.c3.btn.btn-secondary:active,
+.c3.btn.btn-secondary:focus {
+ color: #FFFFFF;
+ background-color: #013366;
+}
+
+.c3.btn.btn-info {
+ color: #9F9D9C;
+ border: none;
+ background: none;
+ padding-left: 0.6rem;
+ padding-right: 0.6rem;
+}
+
+.c3.btn.btn-info:hover,
+.c3.btn.btn-info:active,
+.c3.btn.btn-info:focus {
+ color: var(--surface-color-primary-button-hover);
+ background: none;
+}
+
+.c3.btn.btn-light {
+ color: #FFFFFF;
+ background-color: #606060;
+ border: none;
+}
+
+.c3.btn.btn-light:hover,
+.c3.btn.btn-light:active,
+.c3.btn.btn-light:focus {
+ color: #FFFFFF;
+ background-color: #606060;
+}
+
+.c3.btn.btn-dark {
+ color: #FFFFFF;
+ background-color: #474543;
+ border: none;
+}
+
+.c3.btn.btn-dark:hover,
+.c3.btn.btn-dark:active,
+.c3.btn.btn-dark:focus {
+ color: #FFFFFF;
+ background-color: #474543;
+}
+
+.c3.btn.btn-danger {
+ color: #FFFFFF;
+ background-color: #CE3E39;
+}
+
+.c3.btn.btn-danger:hover,
+.c3.btn.btn-danger:active,
+.c3.btn.btn-danger:focus {
+ color: #FFFFFF;
+ background-color: #CE3E39;
+}
+
+.c3.btn.btn-warning {
+ color: #FFFFFF;
+ background-color: #FCBA19;
+ border-color: #FCBA19;
+}
+
+.c3.btn.btn-warning:hover,
+.c3.btn.btn-warning:active,
+.c3.btn.btn-warning:focus {
+ color: #FFFFFF;
+ border-color: #FCBA19;
+ background-color: #FCBA19;
+}
+
+.c3.btn.btn-link {
+ font-size: 1.6rem;
+ font-weight: 400;
+ color: var(--surface-color-primary-button-default);
+ background: none;
+ border: none;
+ -webkit-text-decoration: none;
+ text-decoration: none;
+ min-height: 2.5rem;
+ line-height: 3rem;
+ -webkit-box-pack: left;
+ -webkit-justify-content: left;
+ -ms-flex-pack: left;
+ justify-content: left;
+ -webkit-letter-spacing: unset;
+ -moz-letter-spacing: unset;
+ -ms-letter-spacing: unset;
+ letter-spacing: unset;
+ text-align: left;
+ padding: 0;
+ -webkit-text-decoration: underline;
+ text-decoration: underline;
+}
+
+.c3.btn.btn-link:hover,
+.c3.btn.btn-link:active,
+.c3.btn.btn-link:focus {
+ color: var(--surface-color-primary-button-hover);
+ -webkit-text-decoration: underline;
+ text-decoration: underline;
+ border: none;
+ background: none;
+ box-shadow: none;
+ outline: none;
+}
+
+.c3.btn.btn-link:disabled,
+.c3.btn.btn-link.disabled {
+ color: #9F9D9C;
+ background: none;
+ pointer-events: none;
+}
+
+.c3.btn:disabled,
+.c3.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
+ box-shadow: none;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ pointer-events: none;
+ cursor: not-allowed;
+}
+
+.c3.Button .Button__icon {
+ margin-right: 1.6rem;
+}
+
+.c3.Button--icon-only:focus {
+ outline: none;
+}
+
+.c3.Button--icon-only .Button__icon {
+ margin-right: 0;
+}
+
+.c16 .react-datepicker__calendar-icon {
+ width: 2.4rem;
+ height: 3rem;
+ margin-top: 0.5rem;
+ margin-right: 1.2rem;
+ right: 0;
+ fill: var(--surface-color-primary-button-default);
+ pointer-events: none;
+}
+
+.c16 .react-datepicker__view-calendar-icon input {
+ padding: 0.8rem 1.2rem 0.8rem 1.2rem;
+}
+
+.c16 .react-datepicker-wrapper {
+ max-width: 17rem;
+}
+
+.c17.c17.form-control.is-valid {
+ background-image: none;
+}
+
+.c17.c17.form-control.is-invalid {
+ border-color: #d8292f !important;
+}
+
+.c26 {
+ padding-right: 0;
+}
+
+.c26 .form-control {
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+}
+
+.c27:not(:first-child) {
+ padding-left: 0;
+}
+
+.c27:not(:first-child) .form-control {
+ border-top-left-radius: 0;
+ border-bottom-left-radius: 0;
+}
+
+.c28 {
+ font-size: 1.4rem;
+ color: #42814A;
+}
+
+.c1 {
+ color: #474543;
+ font-family: 'BCSans-Bold';
+ font-size: 3.2rem;
+ border-bottom: solid 0.5rem var(--theme-blue-90);
+ width: 100%;
+ text-align: left;
+ margin-bottom: 2.4rem;
+}
+
+.c21 {
+ color: var(--theme-blue-100);
+ font-family: 'BCSans-Bold';
+ font-size: 2.2rem;
+ border-bottom: solid 0.2rem;
+ width: 100%;
+ text-align: left;
+ margin-bottom: 2.4rem;
+}
+
+.c31 {
+ color: #474543;
+ font-size: 1.6rem;
+ -webkit-text-decoration: none;
+ text-decoration: none;
+}
+
+.c5 {
+ border-left: 0.1rem solid #ECEAE8;
+ width: 0.1rem;
+ height: 80%;
+ margin: auto;
+}
+
+.c7 {
+ width: 100%;
+ border-bottom: solid 0.5rem #3470B1;
+}
+
+.c6 {
+ font-size: 2.4rem;
+ cursor: pointer;
+}
+
+.c4.btn.btn-light.Button {
+ padding: 0;
+ border: 0.1rem solid #9F9D9C;
+ background-color: white;
+ color: #474543;
+}
+
+.c4.btn.btn-light.Button:focus,
+.c4.btn.btn-light.Button:active {
+ background-color: white;
+ color: #474543;
+}
+
+.c4.btn,
+.c4 .Button__icon,
+.c4 svg {
+ max-width: 2.4rem;
+ min-width: 2.4rem;
+ max-height: 2.4rem;
+ min-height: 2.4rem;
+ font-size: 1.4rem;
+}
+
+.c0 {
+ padding: 1.6rem;
+ color: #474543;
+}
+
+.c0.expanded {
+ min-width: 90rem;
+ height: 100%;
+ position: relative;
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-flex-direction: column;
+ -ms-flex-direction: column;
+ flex-direction: column;
+ overflow: hidden;
+}
+
+.c2 {
+ gap: 1.5rem;
+ -webkit-align-items: center;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
+}
+
+.c9 {
+ width: 100%;
+ position: relative;
+ overflow: auto;
+ -webkit-flex: 1;
+ -ms-flex: 1;
+ flex: 1;
+}
+
+.c8 {
+ width: 100%;
+ height: 100%;
+ display: contents;
+}
+
+.c33 {
+ position: -webkit-sticky;
+ position: sticky;
+ padding-top: 2rem;
+ bottom: 0;
+ background: white;
+ z-index: 10;
+}
+
+.c10 {
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-flex-direction: column;
+ -ms-flex-direction: column;
+ flex-direction: column;
+ -webkit-box-flex: 1;
+ -webkit-flex-grow: 1;
+ -ms-flex-positive: 1;
+ flex-grow: 1;
+ text-align: left;
+ height: 100%;
+ overflow-y: auto;
+}
+
+.c32 {
+ position: relative;
+ border-radius: 0.4rem;
+ padding-top: 0.8rem;
+ padding-bottom: 0.8rem;
+ padding-left: 1.2rem;
+ padding-right: 2.8rem;
+ background-image: none;
+ color: #9F9D9C;
+ border: #606060 solid 0.1rem;
+ cursor: pointer;
+}
+
+.c32.is-invalid {
+ border: #CE3E39 solid 0.1rem;
+}
+
+.c13 {
+ font-weight: bold;
+ color: var(--theme-blue-100);
+ border-bottom: 0.2rem var(--theme-blue-90) solid;
+ margin-bottom: 2rem;
+}
+
+.c12 {
+ margin: 1.6rem;
+ padding: 1.6rem;
+ background-color: white;
+ text-align: left;
+ border-radius: 0.5rem;
+}
+
+.c15.required::before {
+ content: '*';
+ position: absolute;
+ top: 0.75rem;
+ left: 0rem;
+}
+
+.c14 {
+ font-weight: bold;
+}
+
+.c23:hover {
+ cursor: pointer;
+}
+
+.c22.c22.c22 input,
+.c22.c22.c22 select,
+.c22.c22.c22 textarea {
+ background: none;
+ border: none;
+ resize: none;
+ height: -webkit-fit-content;
+ height: -moz-fit-content;
+ height: fit-content;
+ padding: 0;
+}
+
+.c22.c22.c22 .form-label {
+ font-weight: bold;
+ color: #474543;
+}
+
+.c24 {
+ color: var(--theme-blue-100);
+ font-family: 'BcSans-Bold';
+ margin-bottom: 1rem;
+}
+
+.c18 {
+ height: 100%;
+}
+
+.c18 .tab-content {
+ border-radius: 0 0.4rem 0.4rem 0.4rem;
+ overflow-y: auto;
+ background-color: #f2f2f2;
+}
+
+.c18 .tab-content .tab-pane {
+ position: relative;
+}
+
+.c20 {
+ background-color: white;
+ color: var(--surface-color-primary-button-default);
+ font-size: 1.4rem;
+ border-color: transparent;
+}
+
+.c20 .nav-tabs {
+ height: auto;
+}
+
+.c20 .nav-item {
+ color: var(--surface-color-primary-button-default);
+ min-width: 5rem;
+ padding: 0.1rem 1.3rem;
+ margin-bottom: 0.1rem;
+ margin-left: 0.1rem;
+}
+
+.c20 .nav-item:hover {
+ color: #f2f2f2;
+ background-color: #1e5189;
+ border-color: transparent;
+ -webkit-text-decoration: underline;
+ text-decoration: underline;
+ border-radius: 0.4rem;
+ text-shadow: 0.1rem 0 0 currentColor;
+}
+
+.c20 .nav-item.active {
+ border-radius: 0.4rem;
+ color: #f2f2f2;
+ background-color: #053662;
+ border-color: transparent;
+ text-shadow: 0.1rem 0 0 currentColor;
+}
+
+.c19 {
+ height: auto;
+}
+
+.c19.tab-content {
+ height: auto;
+}
+
+.c25 {
+ background-color: #d9eaf7;
+ border-radius: 0.5rem;
+}
+
+.c25 .idir-input-group .input-group-prepend select {
+ width: 16rem;
+}
+
+.c25 .idir-input-group input {
+ width: 18rem;
+ max-width: 100%;
+}
+
+.c29 {
+ font-size: 1.6rem;
+ color: #9F9D9C;
+ border-bottom: 0.2rem solid #606060;
+ margin-bottom: 0.9rem;
+ padding-bottom: 0.25rem;
+ font-family: 'BcSans-Bold';
+}
+
+.c30 input.form-control {
+ min-width: 50rem;
+ max-width: 100%;
+}
+
+.c11 .form-section {
+ margin: 0;
+ padding-left: 0;
+}
+
+.c11 .tab-pane .form-section {
+ margin: 1.5rem;
+ padding-left: 1.5rem;
+}
+
+.c11 [name='region'] {
+ max-width: 25rem;
+}
+
+
+
+
+
+
+
+
+ Create Acquisition Sub-Interest File
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+`;
+
exports[`AddAcquisitionContainer component > renders as expected 1`] = `
renders as expected 1`] = `
}
.c3.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +2585,8 @@ exports[`AddAcquisitionContainer component > renders as expected 1`] = `
.c3.btn:disabled,
.c3.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +2594,6 @@ exports[`AddAcquisitionContainer component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c3.Button .Button__icon {
@@ -300,6 +2695,16 @@ exports[`AddAcquisitionContainer component > renders as expected 1`] = `
margin: auto;
}
+.c7 {
+ width: 100%;
+ border-bottom: solid 0.5rem #3470B1;
+}
+
+.c6 {
+ font-size: 2.4rem;
+ cursor: pointer;
+}
+
.c4.btn.btn-light.Button {
padding: 0;
border: 0.1rem solid #9F9D9C;
@@ -365,16 +2770,6 @@ exports[`AddAcquisitionContainer component > renders as expected 1`] = `
display: contents;
}
-.c7 {
- width: 100%;
- border-bottom: solid 0.5rem #3470B1;
-}
-
-.c6 {
- font-size: 2.4rem;
- cursor: pointer;
-}
-
.c34 {
position: -webkit-sticky;
position: sticky;
@@ -499,21 +2894,27 @@ exports[`AddAcquisitionContainer component > renders as expected 1`] = `
.c21 .nav-item {
color: var(--surface-color-primary-button-default);
min-width: 5rem;
- padding: 0.1rem 1.2rem;
+ padding: 0.1rem 1.3rem;
+ margin-bottom: 0.1rem;
+ margin-left: 0.1rem;
}
.c21 .nav-item:hover {
- color: var(--surface-color-primary-button-hover);
+ color: #f2f2f2;
+ background-color: #1e5189;
border-color: transparent;
-webkit-text-decoration: underline;
text-decoration: underline;
+ border-radius: 0.4rem;
+ text-shadow: 0.1rem 0 0 currentColor;
}
.c21 .nav-item.active {
- background-color: #f2f2f2;
- font-family: 'BCSans-Bold';
- color: var(--surface-color-primary-button-hover);
+ border-radius: 0.4rem;
+ color: #f2f2f2;
+ background-color: #053662;
border-color: transparent;
+ text-shadow: 0.1rem 0 0 currentColor;
}
.c20 {
@@ -732,7 +3133,7 @@ exports[`AddAcquisitionContainer component > renders as expected 1`] = `
aria-hidden="true"
class="rbt-input-hint"
readonly=""
- style="background-color: transparent; border-color: transparent; box-shadow: none; color: rgba(0, 0, 0, 0.54); left: 0px; pointer-events: none; position: absolute; top: 0px; width: 100%;"
+ style="background-color: transparent; border-color: transparent; box-shadow: none; color: rgba(0, 0, 0, 0.54); left: 0px; pointer-events: none; position: absolute; top: 0px; width: 100%; border-style: inset inset inset inset; border-width: 2px 2px 2px 2px; line-height: normal; padding: 1px 1px 1px 1px;"
tabindex="-1"
value=""
/>
@@ -947,6 +3348,28 @@ exports[`AddAcquisitionContainer component > renders as expected 1`] = `
class="c14"
>
Delivery date:
+
+
+
+
+
renders as expected 1`] = `
+
+
+
+ Estimated date:
+
+
+
+
+
+
+
+
+
+
+
+
+ Possession date:
+
+
+
+
Sub-interest files > renders as expected 1`] = `
+
+
+
+ .c17.btn {
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-align-items: center;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
+ -webkit-box-pack: center;
+ -webkit-justify-content: center;
+ -ms-flex-pack: center;
+ justify-content: center;
+ padding: 0.4rem 1.2rem;
+ border: 0.2rem solid transparent;
+ border-radius: 0.4rem;
+ text-align: center;
+ -webkit-text-decoration: none;
+ text-decoration: none;
+ font-size: 1.8rem;
+ font-family: 'BCSans','Noto Sans',Verdana,Arial,sans-serif;
+ font-weight: 700;
+ -webkit-letter-spacing: 0.1rem;
+ -moz-letter-spacing: 0.1rem;
+ -ms-letter-spacing: 0.1rem;
+ letter-spacing: 0.1rem;
+ cursor: pointer;
+}
+
+.c17.btn .Button__value {
+ width: -webkit-max-content;
+ width: -moz-max-content;
+ width: max-content;
+}
+
+.c17.btn:hover {
+ -webkit-text-decoration: underline;
+ text-decoration: underline;
+ opacity: 0.8;
+}
+
+.c17.btn:focus {
+ outline-width: 2px;
+ outline-style: solid;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
+ box-shadow: none;
+}
+
+.c17.btn.btn-primary {
+ color: #FFFFFF;
+ background-color: #013366;
+}
+
+.c17.btn.btn-primary:hover,
+.c17.btn.btn-primary:active,
+.c17.btn.btn-primary:focus {
+ background-color: #1E5189;
+}
+
+.c17.btn.btn-secondary {
+ color: #013366;
+ background: none;
+ border-color: #013366;
+}
+
+.c17.btn.btn-secondary:hover,
+.c17.btn.btn-secondary:active,
+.c17.btn.btn-secondary:focus {
+ color: #FFFFFF;
+ background-color: #013366;
+}
+
+.c17.btn.btn-info {
+ color: #9F9D9C;
+ border: none;
+ background: none;
+ padding-left: 0.6rem;
+ padding-right: 0.6rem;
+}
+
+.c17.btn.btn-info:hover,
+.c17.btn.btn-info:active,
+.c17.btn.btn-info:focus {
+ color: var(--surface-color-primary-button-hover);
+ background: none;
+}
+
+.c17.btn.btn-light {
+ color: #FFFFFF;
+ background-color: #606060;
+ border: none;
+}
+
+.c17.btn.btn-light:hover,
+.c17.btn.btn-light:active,
+.c17.btn.btn-light:focus {
+ color: #FFFFFF;
+ background-color: #606060;
+}
+
+.c17.btn.btn-dark {
+ color: #FFFFFF;
+ background-color: #474543;
+ border: none;
+}
+
+.c17.btn.btn-dark:hover,
+.c17.btn.btn-dark:active,
+.c17.btn.btn-dark:focus {
+ color: #FFFFFF;
+ background-color: #474543;
+}
+
+.c17.btn.btn-danger {
+ color: #FFFFFF;
+ background-color: #CE3E39;
+}
+
+.c17.btn.btn-danger:hover,
+.c17.btn.btn-danger:active,
+.c17.btn.btn-danger:focus {
+ color: #FFFFFF;
+ background-color: #CE3E39;
+}
+
+.c17.btn.btn-warning {
+ color: #FFFFFF;
+ background-color: #FCBA19;
+ border-color: #FCBA19;
+}
+
+.c17.btn.btn-warning:hover,
+.c17.btn.btn-warning:active,
+.c17.btn.btn-warning:focus {
+ color: #FFFFFF;
+ border-color: #FCBA19;
+ background-color: #FCBA19;
+}
+
+.c17.btn.btn-link {
+ font-size: 1.6rem;
+ font-weight: 400;
+ color: var(--surface-color-primary-button-default);
+ background: none;
+ border: none;
+ -webkit-text-decoration: none;
+ text-decoration: none;
+ min-height: 2.5rem;
+ line-height: 3rem;
+ -webkit-box-pack: left;
+ -webkit-justify-content: left;
+ -ms-flex-pack: left;
+ justify-content: left;
+ -webkit-letter-spacing: unset;
+ -moz-letter-spacing: unset;
+ -ms-letter-spacing: unset;
+ letter-spacing: unset;
+ text-align: left;
+ padding: 0;
+ -webkit-text-decoration: underline;
+ text-decoration: underline;
+}
+
+.c17.btn.btn-link:hover,
+.c17.btn.btn-link:active,
+.c17.btn.btn-link:focus {
+ color: var(--surface-color-primary-button-hover);
+ -webkit-text-decoration: underline;
+ text-decoration: underline;
+ border: none;
+ background: none;
+ box-shadow: none;
+ outline: none;
+}
+
+.c17.btn.btn-link:disabled,
+.c17.btn.btn-link.disabled {
+ color: #9F9D9C;
+ background: none;
+ pointer-events: none;
+}
+
+.c17.btn:disabled,
+.c17.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
+ box-shadow: none;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ pointer-events: none;
+ cursor: not-allowed;
+}
+
+.c17.Button .Button__icon {
+ margin-right: 1.6rem;
+}
+
+.c17.Button--icon-only:focus {
+ outline: none;
+}
+
+.c17.Button--icon-only .Button__icon {
+ margin-right: 0;
+}
+
+.c5 .react-datepicker__calendar-icon {
+ width: 2.4rem;
+ height: 3rem;
+ margin-top: 0.5rem;
+ margin-right: 1.2rem;
+ right: 0;
+ fill: var(--surface-color-primary-button-default);
+ pointer-events: none;
+}
+
+.c5 .react-datepicker__view-calendar-icon input {
+ padding: 0.8rem 1.2rem 0.8rem 1.2rem;
+}
+
+.c5 .react-datepicker-wrapper {
+ max-width: 17rem;
+}
+
+.c6.c6.form-control.is-valid {
+ background-image: none;
+}
+
+.c6.c6.form-control.is-invalid {
+ border-color: #d8292f !important;
+}
+
+.c15 {
+ padding-right: 0;
+}
+
+.c15 .form-control {
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+}
+
+.c16:not(:first-child) {
+ padding-left: 0;
+}
+
+.c16:not(:first-child) .form-control {
+ border-top-left-radius: 0;
+ border-bottom-left-radius: 0;
+}
+
+.c18 {
+ font-size: 1.4rem;
+ color: #42814A;
+}
+
+.c10 {
+ color: var(--theme-blue-100);
+ font-family: 'BCSans-Bold';
+ font-size: 2.2rem;
+ border-bottom: solid 0.2rem;
+ width: 100%;
+ text-align: left;
+ margin-bottom: 2.4rem;
+}
+
+.c21 {
+ color: #474543;
+ font-size: 1.6rem;
+ -webkit-text-decoration: none;
+ text-decoration: none;
+}
+
+.c22 {
+ position: relative;
+ border-radius: 0.4rem;
+ padding-top: 0.8rem;
+ padding-bottom: 0.8rem;
+ padding-left: 1.2rem;
+ padding-right: 2.8rem;
+ background-image: none;
+ color: #9F9D9C;
+ border: #606060 solid 0.1rem;
+ cursor: pointer;
+}
+
+.c22.is-invalid {
+ border: #CE3E39 solid 0.1rem;
+}
+
+.c2 {
+ font-weight: bold;
+ color: var(--theme-blue-100);
+ border-bottom: 0.2rem var(--theme-blue-90) solid;
+ margin-bottom: 2rem;
+}
+
+.c1 {
+ margin: 1.6rem;
+ padding: 1.6rem;
+ background-color: white;
+ text-align: left;
+ border-radius: 0.5rem;
+}
+
+.c4.required::before {
+ content: '*';
+ position: absolute;
+ top: 0.75rem;
+ left: 0rem;
+}
+
+.c3 {
+ font-weight: bold;
+}
+
+.c12:hover {
+ cursor: pointer;
+}
+
+.c11.c11.c11 input,
+.c11.c11.c11 select,
+.c11.c11.c11 textarea {
+ background: none;
+ border: none;
+ resize: none;
+ height: -webkit-fit-content;
+ height: -moz-fit-content;
+ height: fit-content;
+ padding: 0;
+}
+
+.c11.c11.c11 .form-label {
+ font-weight: bold;
+ color: #474543;
+}
+
+.c13 {
+ color: var(--theme-blue-100);
+ font-family: 'BcSans-Bold';
+ margin-bottom: 1rem;
+}
+
+.c7 {
+ height: 100%;
+}
+
+.c7 .tab-content {
+ border-radius: 0 0.4rem 0.4rem 0.4rem;
+ overflow-y: auto;
+ background-color: #f2f2f2;
+}
+
+.c7 .tab-content .tab-pane {
+ position: relative;
+}
+
+.c9 {
+ background-color: white;
+ color: var(--surface-color-primary-button-default);
+ font-size: 1.4rem;
+ border-color: transparent;
+}
+
+.c9 .nav-tabs {
+ height: auto;
+}
+
+.c9 .nav-item {
+ color: var(--surface-color-primary-button-default);
+ min-width: 5rem;
+ padding: 0.1rem 1.3rem;
+ margin-bottom: 0.1rem;
+ margin-left: 0.1rem;
+}
+
+.c9 .nav-item:hover {
+ color: #f2f2f2;
+ background-color: #1e5189;
+ border-color: transparent;
+ -webkit-text-decoration: underline;
+ text-decoration: underline;
+ border-radius: 0.4rem;
+ text-shadow: 0.1rem 0 0 currentColor;
+}
+
+.c9 .nav-item.active {
+ border-radius: 0.4rem;
+ color: #f2f2f2;
+ background-color: #053662;
+ border-color: transparent;
+ text-shadow: 0.1rem 0 0 currentColor;
+}
+
+.c8 {
+ height: auto;
+}
+
+.c8.tab-content {
+ height: auto;
+}
+
+.c14 {
+ background-color: #d9eaf7;
+ border-radius: 0.5rem;
+}
+
+.c14 .idir-input-group .input-group-prepend select {
+ width: 16rem;
+}
+
+.c14 .idir-input-group input {
+ width: 18rem;
+ max-width: 100%;
+}
+
+.c19 {
+ font-size: 1.6rem;
+ color: #9F9D9C;
+ border-bottom: 0.2rem solid #606060;
+ margin-bottom: 0.9rem;
+ padding-bottom: 0.25rem;
+ font-family: 'BcSans-Bold';
+}
+
+.c20 input.form-control {
+ min-width: 50rem;
+ max-width: 100%;
+}
+
+.c0 .form-section {
+ margin: 0;
+ padding-left: 0;
+}
+
+.c0 .tab-pane .form-section {
+ margin: 1.5rem;
+ padding-left: 1.5rem;
+}
+
+.c0 [name='region'] {
+ max-width: 25rem;
+}
+
+
+
+
+`;
+
exports[`AddAcquisitionForm component > renders as expected 1`] = `
renders as expected 1`] = `
}
.c18.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +2334,8 @@ exports[`AddAcquisitionForm component > renders as expected 1`] = `
.c18.btn:disabled,
.c18.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +2343,6 @@ exports[`AddAcquisitionForm component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c18.Button .Button__icon {
@@ -381,21 +2525,27 @@ exports[`AddAcquisitionForm component > renders as expected 1`] = `
.c10 .nav-item {
color: var(--surface-color-primary-button-default);
min-width: 5rem;
- padding: 0.1rem 1.2rem;
+ padding: 0.1rem 1.3rem;
+ margin-bottom: 0.1rem;
+ margin-left: 0.1rem;
}
.c10 .nav-item:hover {
- color: var(--surface-color-primary-button-hover);
+ color: #f2f2f2;
+ background-color: #1e5189;
border-color: transparent;
-webkit-text-decoration: underline;
text-decoration: underline;
+ border-radius: 0.4rem;
+ text-shadow: 0.1rem 0 0 currentColor;
}
.c10 .nav-item.active {
- background-color: #f2f2f2;
- font-family: 'BCSans-Bold';
- color: var(--surface-color-primary-button-hover);
+ border-radius: 0.4rem;
+ color: #f2f2f2;
+ background-color: #053662;
border-color: transparent;
+ text-shadow: 0.1rem 0 0 currentColor;
}
.c9 {
@@ -514,7 +2664,7 @@ exports[`AddAcquisitionForm component > renders as expected 1`] = `
aria-hidden="true"
class="rbt-input-hint"
readonly=""
- style="background-color: transparent; border-color: transparent; box-shadow: none; color: rgba(0, 0, 0, 0.54); left: 0px; pointer-events: none; position: absolute; top: 0px; width: 100%;"
+ style="background-color: transparent; border-color: transparent; box-shadow: none; color: rgba(0, 0, 0, 0.54); left: 0px; pointer-events: none; position: absolute; top: 0px; width: 100%; border-style: inset inset inset inset; border-width: 2px 2px 2px 2px; line-height: normal; padding: 1px 1px 1px 1px;"
tabindex="-1"
value=""
/>
@@ -729,6 +2879,28 @@ exports[`AddAcquisitionForm component > renders as expected 1`] = `
class="c3"
>
Delivery date:
+
+
+
+
+
renders as expected 1`] = `
+
+
+
+ Estimated date:
+
+
+
+
+
+
+
+
+
+
+
+
+ Possession date:
+
+
+
+
{
+ describe('fromParentFileApi', () => {
+ let parentFile: ApiGen_Concepts_AcquisitionFile;
+ beforeEach(() => {
+ parentFile = {
+ id: 1,
+ parentAcquisitionFileId: null,
+ assignedDate: '2023-07-01',
+ deliveryDate: '2023-07-31',
+ estimatedCompletionDate: '2025-01-01',
+ possessionDate: '2025-03-15',
+ acquisitionTypeCode: {
+ id: EnumAcquisitionFileType.SECTN6,
+ description: 'Section 6 Expropriation',
+ isDisabled: false,
+ displayOrder: null,
+ },
+ productId: 16592,
+ product: {
+ id: 16592,
+ code: '35478RC',
+ description: 'RECOVERY COSTS',
+ rowVersion: 1,
+ },
+ projectId: 1834,
+ project: {
+ id: 1834,
+ projectStatusTypeCode: null,
+ businessFunctionCode: null,
+ costTypeCode: null,
+ workActivityCode: null,
+ regionCode: null,
+ code: '5535478',
+ description: 'PPS COMMOTION CR (BIG HOLE)',
+ rowVersion: 2,
+ },
+ regionCode: {
+ id: 1,
+ description: 'South Coast Region',
+ isDisabled: false,
+ displayOrder: null,
+ },
+ acquisitionTeam: [
+ {
+ id: 6,
+ acquisitionFileId: 116106,
+ personId: null,
+ person: null,
+ organizationId: 57404,
+ organization: {
+ id: 57404,
+ parentOrganizationId: null,
+ regionCode: null,
+ districtCode: null,
+ organizationTypeCode: 'OTHER',
+ identifierTypeCode: 'OTHINCORPNO',
+ organizationIdentifier: null,
+ name: '? ATTORNEY',
+ alias: null,
+ incorporationNumber: null,
+ website: null,
+ comment: null,
+ isDisabled: false,
+ contactMethods: [],
+ organizationAddresses: [],
+ organizationPersons: [],
+ parentOrganization: null,
+ rowVersion: 1,
+ },
+ primaryContactId: null,
+ primaryContact: null,
+ teamProfileTypeCode: 'MOTILAWYER',
+ teamProfileType: {
+ id: 'MOTILAWYER',
+ description: 'MoTI Solicitor',
+ isDisabled: false,
+ displayOrder: null,
+ },
+ rowVersion: 12,
+ },
+ ],
+ } as ApiGen_Concepts_AcquisitionFile;
+ });
+
+ it('handles a minimal object', () => {
+ let model = AcquisitionForm.fromParentFileApi({
+ id: 1,
+ parentAcquisitionFileId: null,
+ } as ApiGen_Concepts_AcquisitionFile);
+
+ expect(model).toBeDefined();
+ expect(model?.parentAcquisitionFileId).toBe(1);
+ });
+
+ it('copies information from parent file', () => {
+ let model = AcquisitionForm.fromParentFileApi(parentFile);
+
+ expect(model).toBeDefined();
+ expect(model?.parentAcquisitionFileId).toBe(1);
+ expect(model?.formattedProject).toBe('5535478 - PPS COMMOTION CR (BIG HOLE)');
+ expect(model?.formattedProduct).toBe('35478RC RECOVERY COSTS');
+ expect(model.project?.id).toBe(1834);
+ expect(model.product).toBe('16592');
+ expect(model.assignedDate).toBe('2023-07-01');
+ expect(model.deliveryDate).toBe('2023-07-31');
+ expect(model.estimatedCompletionDate).toBe('2025-01-01');
+ expect(model.possessionDate).toBe('2025-03-15');
+ expect(model.acquisitionType).toBe(EnumAcquisitionFileType.SECTN6);
+ expect(model.region).toBe('1');
+ expect(model.team).toHaveLength(1);
+ });
+ });
+
+ describe('toApi', () => {
+ it('converts form values to the api format', () => {
+ const teamPerson = new AcquisitionTeamFormModel('testType', 0, {
+ id: 'P1',
+ personId: 1,
+ person: null,
+ summary: null,
+ surname: null,
+ firstName: null,
+ middleNames: null,
+ organizationName: null,
+ email: null,
+ mailingAddress: null,
+ municipalityName: null,
+ provinceState: null,
+ isDisabled: false,
+ });
+ const teamOrg = new AcquisitionTeamFormModel('testType', 0, {
+ id: 'O99',
+ organizationId: 99,
+ organization: null,
+ summary: null,
+ organizationName: null,
+ email: null,
+ mailingAddress: null,
+ municipalityName: null,
+ provinceState: null,
+ isDisabled: false,
+ });
+ teamOrg.primaryContactId = '1';
+
+ const model = new AcquisitionForm();
+ model.parentAcquisitionFileId = 100;
+ model.fileName = 'Test sub-file';
+ model.assignedDate = '2023-07-01';
+ model.deliveryDate = '2024-03-01';
+ model.estimatedCompletionDate = '2028-12-15';
+ model.possessionDate = '2030-08-01';
+ model.region = '1';
+ model.product = '1234';
+ model.project = { id: 789, text: 'test project' };
+ model.team = [teamPerson, teamOrg];
+
+ const apiAcquisitionFile = model.toApi();
+ // file details
+ expect(apiAcquisitionFile.id).toBe(0);
+ expect(apiAcquisitionFile.parentAcquisitionFileId).toBe(100);
+ expect(apiAcquisitionFile.fileName).toBe('Test sub-file');
+ expect(apiAcquisitionFile.assignedDate).toBe('2023-07-01');
+ expect(apiAcquisitionFile.deliveryDate).toBe('2024-03-01');
+ expect(apiAcquisitionFile.estimatedCompletionDate).toBe('2028-12-15');
+ expect(apiAcquisitionFile.possessionDate).toBe('2030-08-01');
+ expect(apiAcquisitionFile.regionCode).toEqual(expect.objectContaining({ id: 1 }));
+ // project + product
+ expect(apiAcquisitionFile.projectId).toBe(789);
+ expect(apiAcquisitionFile.productId).toBe(1234);
+ expect(apiAcquisitionFile.project).toBeNull();
+ expect(apiAcquisitionFile.product).toBeNull();
+ // acquisition team
+ expect(apiAcquisitionFile.acquisitionTeam).toHaveLength(2);
+ expect(apiAcquisitionFile.acquisitionTeam[0]).toEqual(
+ expect.objectContaining({
+ id: 0,
+ personId: 1,
+ organizationId: null,
+ primaryContactId: null,
+ person: null,
+ organization: null,
+ primaryContact: null,
+ } as ApiGen_Concepts_AcquisitionFileTeam),
+ );
+ expect(apiAcquisitionFile.acquisitionTeam[1]).toEqual(
+ expect.objectContaining({
+ id: 0,
+ personId: null,
+ organizationId: 99,
+ primaryContactId: 1,
+ person: null,
+ organization: null,
+ primaryContact: null,
+ } as ApiGen_Concepts_AcquisitionFileTeam),
+ );
+ });
+ });
+});
diff --git a/source/frontend/src/features/mapSideBar/acquisition/add/models.ts b/source/frontend/src/features/mapSideBar/acquisition/add/models.ts
index 04d225c8b5..d5d918da2a 100644
--- a/source/frontend/src/features/mapSideBar/acquisition/add/models.ts
+++ b/source/frontend/src/features/mapSideBar/acquisition/add/models.ts
@@ -19,11 +19,13 @@ import { InterestHolderForm } from '../tabs/stakeholders/update/models';
export class AcquisitionForm implements WithAcquisitionTeam, WithAcquisitionOwners {
id?: number;
- parentAcquisitionFileId?: number;
+ parentAcquisitionFileId: number | null = null;
fileName?: string = '';
legacyFileNumber?: string = '';
assignedDate?: string = '';
deliveryDate?: string = '';
+ estimatedCompletionDate?: string = '';
+ possessionDate?: string = '';
rowVersion?: number;
// Code Tables
acquisitionFileStatusType?: string = '';
@@ -36,8 +38,15 @@ export class AcquisitionForm implements WithAcquisitionTeam, WithAcquisitionOwne
owners: AcquisitionOwnerFormModel[] = [];
fileCheckList: ChecklistItemFormModel[] = [];
+ subfileInterestTypeCode: string | null = null;
+ otherSubfileInterestType: string | null = null;
+
project?: IAutocompletePrediction;
product = '';
+ // read-only project and product descriptions (for sub-files)
+ formattedProject = '';
+ formattedProduct = '';
+
fundingTypeCode?: string = '';
fundingTypeOtherDescription = '';
ownerSolicitor: InterestHolderForm = new InterestHolderForm(InterestHolderType.OWNER_SOLICITOR);
@@ -55,6 +64,10 @@ export class AcquisitionForm implements WithAcquisitionTeam, WithAcquisitionOwne
fileName: this.fileName ?? null,
assignedDate: isValidIsoDateTime(this.assignedDate) ? this.assignedDate : null,
deliveryDate: isValidIsoDateTime(this.deliveryDate) ? this.deliveryDate : null,
+ estimatedCompletionDate: isValidIsoDateTime(this.estimatedCompletionDate)
+ ? this.estimatedCompletionDate
+ : null,
+ possessionDate: isValidIsoDateTime(this.possessionDate) ? this.possessionDate : null,
totalAllowableCompensation: stringToNumberOrNull(this.totalAllowableCompensation),
legacyFileNumber: this.legacyFileNumber ?? null,
fileStatusTypeCode: toTypeCodeNullable(this.acquisitionFileStatusType),
@@ -65,6 +78,8 @@ export class AcquisitionForm implements WithAcquisitionTeam, WithAcquisitionOwne
productId: this.product !== '' ? Number(this.product) : null,
fundingTypeCode: toTypeCodeNullable(this.fundingTypeCode),
fundingOther: this.fundingTypeOtherDescription,
+ subfileInterestTypeCode: toTypeCodeNullable(this.subfileInterestTypeCode),
+ otherSubfileInterestType: this.otherSubfileInterestType,
// ACQ file properties
fileProperties: this.properties.map(x => this.toPropertyApi(x)),
acquisitionFileOwners: this.owners
@@ -98,6 +113,55 @@ export class AcquisitionForm implements WithAcquisitionTeam, WithAcquisitionOwne
};
}
+ // Creates a form model that follows the rules for creating sub-files from a parent (main) file
+ // Copy the following from Parent File:
+ // - Project and Product
+ // - Schedule
+ // - Acquisition details (except file name)
+ // - Acquisition team
+ // - Owner information is NOT copied over
+ static fromParentFileApi(parentFile: ApiGen_Concepts_AcquisitionFile): AcquisitionForm {
+ const newForm = new AcquisitionForm();
+ newForm.id = undefined;
+ newForm.parentAcquisitionFileId = parentFile.id;
+ newForm.rowVersion = undefined;
+ // project + product (read-only in sub-files)
+ newForm.formattedProject = exists(parentFile.project)
+ ? parentFile.project.code + ' - ' + parentFile.project.description
+ : '';
+ newForm.formattedProduct = exists(parentFile.product)
+ ? parentFile.product.code + ' ' + parentFile.product.description
+ : '';
+ newForm.project = exists(parentFile.project)
+ ? { id: parentFile.project?.id || 0, text: parentFile.project?.description || '' }
+ : undefined;
+ newForm.product = parentFile.product?.id?.toString() ?? '';
+
+ newForm.fundingTypeCode = fromTypeCode(parentFile.fundingTypeCode) ?? undefined;
+ newForm.fundingTypeOtherDescription = parentFile.fundingOther || '';
+ // schedule
+ newForm.assignedDate = parentFile.assignedDate ?? undefined;
+ newForm.deliveryDate = parentFile.deliveryDate ?? undefined;
+ newForm.estimatedCompletionDate = parentFile.estimatedCompletionDate ?? undefined;
+ newForm.possessionDate = parentFile.possessionDate ?? undefined;
+ // acquisition details
+ newForm.fileName = '';
+ newForm.legacyFileNumber = parentFile.legacyFileNumber ?? undefined;
+ newForm.acquisitionPhysFileStatusType =
+ fromTypeCode(parentFile.acquisitionPhysFileStatusTypeCode) ?? undefined;
+ newForm.acquisitionType = fromTypeCode(parentFile.acquisitionTypeCode) ?? undefined;
+ newForm.region = fromTypeCode(parentFile.regionCode)?.toString() ?? undefined;
+ // acquisition team
+ newForm.team =
+ parentFile.acquisitionTeam?.map(x => {
+ const teamForm = AcquisitionTeamFormModel.fromApi(x);
+ teamForm.id = null;
+ return teamForm;
+ }) || [];
+
+ return newForm;
+ }
+
static fromApi(model: ApiGen_Concepts_AcquisitionFile): AcquisitionForm {
const newForm = new AcquisitionForm();
newForm.id = model.id;
@@ -106,6 +170,8 @@ export class AcquisitionForm implements WithAcquisitionTeam, WithAcquisitionOwne
newForm.rowVersion = model.rowVersion ?? undefined;
newForm.assignedDate = model.assignedDate ?? undefined;
newForm.deliveryDate = model.deliveryDate ?? undefined;
+ newForm.estimatedCompletionDate = model.estimatedCompletionDate ?? undefined;
+ newForm.possessionDate = model.possessionDate ?? undefined;
newForm.totalAllowableCompensation = model.totalAllowableCompensation || '';
newForm.legacyFileNumber = model.legacyFileNumber ?? undefined;
newForm.acquisitionFileStatusType = fromTypeCode(model.fileStatusTypeCode) ?? undefined;
@@ -121,6 +187,8 @@ export class AcquisitionForm implements WithAcquisitionTeam, WithAcquisitionOwne
newForm.project = exists(model.project)
? { id: model.project.id || 0, text: model.project.description || '' }
: undefined;
+ newForm.subfileInterestTypeCode = fromTypeCode(model.subfileInterestTypeCode);
+ newForm.otherSubfileInterestType = model.otherSubfileInterestType;
const interestHolders = model.acquisitionFileInterestHolders?.map(x =>
InterestHolderForm.fromApi(x, x.interestHolderType?.id as InterestHolderType),
diff --git a/source/frontend/src/features/mapSideBar/acquisition/common/AcquisitionMenu.tsx b/source/frontend/src/features/mapSideBar/acquisition/common/AcquisitionMenu.tsx
index 506072cb8c..8e57d207c9 100644
--- a/source/frontend/src/features/mapSideBar/acquisition/common/AcquisitionMenu.tsx
+++ b/source/frontend/src/features/mapSideBar/acquisition/common/AcquisitionMenu.tsx
@@ -4,6 +4,7 @@ import { FaCaretRight } from 'react-icons/fa';
import styled from 'styled-components';
import { EditPropertiesIcon } from '@/components/common/buttons/EditPropertiesButton';
+import { LinkButton } from '@/components/common/buttons/LinkButton';
import EditButton from '@/components/common/EditButton';
import TooltipIcon from '@/components/common/TooltipIcon';
import { Claims, Roles } from '@/constants/index';
@@ -43,6 +44,7 @@ const AcquisitionMenu: React.FunctionComponent<
<>
{props.items.map((label: string, index: number) => {
+ const activeIndex = props.selectedIndex === index;
if (index === 0) {
return (
- {props.selectedIndex === index && }
- (props.selectedIndex !== index ? handleClick(index) : '')}>
- {label}
-
+ {activeIndex ? (
+
+ {label}
+
+ ) : (
+
+ handleClick(index)}>
+ {label}
+
+
+ )}
Properties
{hasClaim(Claims.ACQUISITION_EDIT) && canEditDetails() && (
@@ -86,7 +95,15 @@ const AcquisitionMenu: React.FunctionComponent<
{index}
- {label}
+ {activeIndex ? (
+
+ {label}
+
+ ) : (
+
+ {label}
+
+ )}
);
}
@@ -118,9 +135,14 @@ const StyledRow = styled(Row)`
cursor: default;
}
+ font-size: 1.4rem;
font-weight: normal;
cursor: pointer;
padding-bottom: 0.5rem;
+
+ div.Button__value {
+ font-size: 1.4rem;
+ }
`;
const StyledIconWrapper = styled.div`
@@ -149,7 +171,8 @@ const StyledMenuHeaderWrapper = styled.div`
`;
const StyledMenuHeader = styled.span`
- font-size: 1.4rem;
- color: ${props => props.theme.css.themeGray70};
+ font-weight: bold;
+ font-size: 1.6rem;
+ color: ${props => props.theme.bcTokens.iconsColorSecondary};
line-height: 2.2rem;
`;
diff --git a/source/frontend/src/features/mapSideBar/acquisition/common/GenerateForm/GenerateFormView.tsx b/source/frontend/src/features/mapSideBar/acquisition/common/GenerateForm/GenerateFormView.tsx
index 9ab4183c37..fc9248f849 100644
--- a/source/frontend/src/features/mapSideBar/acquisition/common/GenerateForm/GenerateFormView.tsx
+++ b/source/frontend/src/features/mapSideBar/acquisition/common/GenerateForm/GenerateFormView.tsx
@@ -50,6 +50,7 @@ const GenerateFormView: React.FunctionComponent<
onGenerateClick(entry.formType)}
+ title="Generate"
>
{entry.text}
diff --git a/source/frontend/src/features/mapSideBar/acquisition/common/GenerateForm/modals/__snapshots__/GenerateLetterRecipientsModal.test.tsx.snap b/source/frontend/src/features/mapSideBar/acquisition/common/GenerateForm/modals/__snapshots__/GenerateLetterRecipientsModal.test.tsx.snap
index 9cbe644f02..319af70ba3 100644
--- a/source/frontend/src/features/mapSideBar/acquisition/common/GenerateForm/modals/__snapshots__/GenerateLetterRecipientsModal.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/acquisition/common/GenerateForm/modals/__snapshots__/GenerateLetterRecipientsModal.test.tsx.snap
@@ -1,7 +1,7 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`GenerateLetterRecipients modal > renders as expected 1`] = `
-.c5.btn {
+.c6.btn {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
@@ -30,51 +30,51 @@ exports[`GenerateLetterRecipients modal > renders as expected 1`] = `
cursor: pointer;
}
-.c5.btn .Button__value {
+.c6.btn .Button__value {
width: -webkit-max-content;
width: -moz-max-content;
width: max-content;
}
-.c5.btn:hover {
+.c6.btn:hover {
-webkit-text-decoration: underline;
text-decoration: underline;
opacity: 0.8;
}
-.c5.btn:focus {
- outline-width: 0.4rem;
+.c6.btn:focus {
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
-.c5.btn.btn-primary {
+.c6.btn.btn-primary {
color: #FFFFFF;
background-color: #013366;
}
-.c5.btn.btn-primary:hover,
-.c5.btn.btn-primary:active,
-.c5.btn.btn-primary:focus {
+.c6.btn.btn-primary:hover,
+.c6.btn.btn-primary:active,
+.c6.btn.btn-primary:focus {
background-color: #1E5189;
}
-.c5.btn.btn-secondary {
+.c6.btn.btn-secondary {
color: #013366;
background: none;
border-color: #013366;
}
-.c5.btn.btn-secondary:hover,
-.c5.btn.btn-secondary:active,
-.c5.btn.btn-secondary:focus {
+.c6.btn.btn-secondary:hover,
+.c6.btn.btn-secondary:active,
+.c6.btn.btn-secondary:focus {
color: #FFFFFF;
background-color: #013366;
}
-.c5.btn.btn-info {
+.c6.btn.btn-info {
color: #9F9D9C;
border: none;
background: none;
@@ -82,66 +82,66 @@ exports[`GenerateLetterRecipients modal > renders as expected 1`] = `
padding-right: 0.6rem;
}
-.c5.btn.btn-info:hover,
-.c5.btn.btn-info:active,
-.c5.btn.btn-info:focus {
+.c6.btn.btn-info:hover,
+.c6.btn.btn-info:active,
+.c6.btn.btn-info:focus {
color: var(--surface-color-primary-button-hover);
background: none;
}
-.c5.btn.btn-light {
+.c6.btn.btn-light {
color: #FFFFFF;
background-color: #606060;
border: none;
}
-.c5.btn.btn-light:hover,
-.c5.btn.btn-light:active,
-.c5.btn.btn-light:focus {
+.c6.btn.btn-light:hover,
+.c6.btn.btn-light:active,
+.c6.btn.btn-light:focus {
color: #FFFFFF;
background-color: #606060;
}
-.c5.btn.btn-dark {
+.c6.btn.btn-dark {
color: #FFFFFF;
background-color: #474543;
border: none;
}
-.c5.btn.btn-dark:hover,
-.c5.btn.btn-dark:active,
-.c5.btn.btn-dark:focus {
+.c6.btn.btn-dark:hover,
+.c6.btn.btn-dark:active,
+.c6.btn.btn-dark:focus {
color: #FFFFFF;
background-color: #474543;
}
-.c5.btn.btn-danger {
+.c6.btn.btn-danger {
color: #FFFFFF;
background-color: #CE3E39;
}
-.c5.btn.btn-danger:hover,
-.c5.btn.btn-danger:active,
-.c5.btn.btn-danger:focus {
+.c6.btn.btn-danger:hover,
+.c6.btn.btn-danger:active,
+.c6.btn.btn-danger:focus {
color: #FFFFFF;
background-color: #CE3E39;
}
-.c5.btn.btn-warning {
+.c6.btn.btn-warning {
color: #FFFFFF;
background-color: #FCBA19;
border-color: #FCBA19;
}
-.c5.btn.btn-warning:hover,
-.c5.btn.btn-warning:active,
-.c5.btn.btn-warning:focus {
+.c6.btn.btn-warning:hover,
+.c6.btn.btn-warning:active,
+.c6.btn.btn-warning:focus {
color: #FFFFFF;
border-color: #FCBA19;
background-color: #FCBA19;
}
-.c5.btn.btn-link {
+.c6.btn.btn-link {
font-size: 1.6rem;
font-weight: 400;
color: var(--surface-color-primary-button-default);
@@ -165,9 +165,9 @@ exports[`GenerateLetterRecipients modal > renders as expected 1`] = `
text-decoration: underline;
}
-.c5.btn.btn-link:hover,
-.c5.btn.btn-link:active,
-.c5.btn.btn-link:focus {
+.c6.btn.btn-link:hover,
+.c6.btn.btn-link:active,
+.c6.btn.btn-link:focus {
color: var(--surface-color-primary-button-hover);
-webkit-text-decoration: underline;
text-decoration: underline;
@@ -177,15 +177,17 @@ exports[`GenerateLetterRecipients modal > renders as expected 1`] = `
outline: none;
}
-.c5.btn.btn-link:disabled,
-.c5.btn.btn-link.disabled {
+.c6.btn.btn-link:disabled,
+.c6.btn.btn-link.disabled {
color: #9F9D9C;
background: none;
pointer-events: none;
}
-.c5.btn:disabled,
-.c5.btn:disabled:hover {
+.c6.btn:disabled,
+.c6.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -193,18 +195,17 @@ exports[`GenerateLetterRecipients modal > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
-.c5.Button .Button__icon {
+.c6.Button .Button__icon {
margin-right: 1.6rem;
}
-.c5.Button--icon-only:focus {
+.c6.Button--icon-only:focus {
outline: none;
}
-.c5.Button--icon-only .Button__icon {
+.c6.Button--icon-only .Button__icon {
margin-right: 0;
}
@@ -212,8 +213,8 @@ exports[`GenerateLetterRecipients modal > renders as expected 1`] = `
width: 0.8rem;
}
-.c6 {
- width: 2.4rem;
+.c5 {
+ min-width: 2.4rem;
}
.c4 {
@@ -285,6 +286,14 @@ exports[`GenerateLetterRecipients modal > renders as expected 1`] = `
display: -webkit-inline-flex;
display: -ms-inline-flexbox;
display: inline-flex;
+ -webkit-box-pack: end;
+ -webkit-justify-content: flex-end;
+ -ms-flex-pack: end;
+ justify-content: flex-end;
+ -webkit-align-items: center;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
}
.c0 .modal-footer .button-wrap .Button {
@@ -488,8 +497,11 @@ exports[`GenerateLetterRecipients modal > renders as expected 1`] = `
+
renders as expected 1`] = `
matches snapshot 1`] = `
class="Toastify"
/>
- .c0 {
+ .c6.btn {
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-align-items: center;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
+ -webkit-box-pack: center;
+ -webkit-justify-content: center;
+ -ms-flex-pack: center;
+ justify-content: center;
+ padding: 0.4rem 1.2rem;
+ border: 0.2rem solid transparent;
+ border-radius: 0.4rem;
+ text-align: center;
+ -webkit-text-decoration: none;
+ text-decoration: none;
+ font-size: 1.8rem;
+ font-family: 'BCSans','Noto Sans',Verdana,Arial,sans-serif;
+ font-weight: 700;
+ -webkit-letter-spacing: 0.1rem;
+ -moz-letter-spacing: 0.1rem;
+ -ms-letter-spacing: 0.1rem;
+ letter-spacing: 0.1rem;
+ cursor: pointer;
+}
+
+.c6.btn .Button__value {
+ width: -webkit-max-content;
+ width: -moz-max-content;
+ width: max-content;
+}
+
+.c6.btn:hover {
+ -webkit-text-decoration: underline;
+ text-decoration: underline;
+ opacity: 0.8;
+}
+
+.c6.btn:focus {
+ outline-width: 2px;
+ outline-style: solid;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
+ box-shadow: none;
+}
+
+.c6.btn.btn-primary {
+ color: #FFFFFF;
+ background-color: #013366;
+}
+
+.c6.btn.btn-primary:hover,
+.c6.btn.btn-primary:active,
+.c6.btn.btn-primary:focus {
+ background-color: #1E5189;
+}
+
+.c6.btn.btn-secondary {
+ color: #013366;
+ background: none;
+ border-color: #013366;
+}
+
+.c6.btn.btn-secondary:hover,
+.c6.btn.btn-secondary:active,
+.c6.btn.btn-secondary:focus {
+ color: #FFFFFF;
+ background-color: #013366;
+}
+
+.c6.btn.btn-info {
+ color: #9F9D9C;
+ border: none;
+ background: none;
+ padding-left: 0.6rem;
+ padding-right: 0.6rem;
+}
+
+.c6.btn.btn-info:hover,
+.c6.btn.btn-info:active,
+.c6.btn.btn-info:focus {
+ color: var(--surface-color-primary-button-hover);
+ background: none;
+}
+
+.c6.btn.btn-light {
+ color: #FFFFFF;
+ background-color: #606060;
+ border: none;
+}
+
+.c6.btn.btn-light:hover,
+.c6.btn.btn-light:active,
+.c6.btn.btn-light:focus {
+ color: #FFFFFF;
+ background-color: #606060;
+}
+
+.c6.btn.btn-dark {
+ color: #FFFFFF;
+ background-color: #474543;
+ border: none;
+}
+
+.c6.btn.btn-dark:hover,
+.c6.btn.btn-dark:active,
+.c6.btn.btn-dark:focus {
+ color: #FFFFFF;
+ background-color: #474543;
+}
+
+.c6.btn.btn-danger {
+ color: #FFFFFF;
+ background-color: #CE3E39;
+}
+
+.c6.btn.btn-danger:hover,
+.c6.btn.btn-danger:active,
+.c6.btn.btn-danger:focus {
+ color: #FFFFFF;
+ background-color: #CE3E39;
+}
+
+.c6.btn.btn-warning {
+ color: #FFFFFF;
+ background-color: #FCBA19;
+ border-color: #FCBA19;
+}
+
+.c6.btn.btn-warning:hover,
+.c6.btn.btn-warning:active,
+.c6.btn.btn-warning:focus {
+ color: #FFFFFF;
+ border-color: #FCBA19;
+ background-color: #FCBA19;
+}
+
+.c6.btn.btn-link {
+ font-size: 1.6rem;
+ font-weight: 400;
+ color: var(--surface-color-primary-button-default);
+ background: none;
+ border: none;
+ -webkit-text-decoration: none;
+ text-decoration: none;
+ min-height: 2.5rem;
+ line-height: 3rem;
+ -webkit-box-pack: left;
+ -webkit-justify-content: left;
+ -ms-flex-pack: left;
+ justify-content: left;
+ -webkit-letter-spacing: unset;
+ -moz-letter-spacing: unset;
+ -ms-letter-spacing: unset;
+ letter-spacing: unset;
+ text-align: left;
+ padding: 0;
+ -webkit-text-decoration: underline;
+ text-decoration: underline;
+}
+
+.c6.btn.btn-link:hover,
+.c6.btn.btn-link:active,
+.c6.btn.btn-link:focus {
+ color: var(--surface-color-primary-button-hover);
+ -webkit-text-decoration: underline;
+ text-decoration: underline;
+ border: none;
+ background: none;
+ box-shadow: none;
+ outline: none;
+}
+
+.c6.btn.btn-link:disabled,
+.c6.btn.btn-link.disabled {
+ color: #9F9D9C;
+ background: none;
+ pointer-events: none;
+}
+
+.c6.btn:disabled,
+.c6.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
+ box-shadow: none;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ pointer-events: none;
+ cursor: not-allowed;
+}
+
+.c6.Button .Button__icon {
+ margin-right: 1.6rem;
+}
+
+.c6.Button--icon-only:focus {
+ outline: none;
+}
+
+.c6.Button--icon-only .Button__icon {
+ margin-right: 0;
+}
+
+.c4 {
+ fill: #007bff;
+}
+
+.c4:hover {
+ fill: #0056b3;
+}
+
+.c0 {
text-align: left;
padding: 0px;
margin: 0px;
@@ -15,6 +231,7 @@ exports[`AcquisitionMenu component > matches snapshot 1`] = `
}
.c1 {
+ font-size: 1.4rem;
font-weight: normal;
cursor: pointer;
padding-bottom: 0.5rem;
@@ -25,7 +242,11 @@ exports[`AcquisitionMenu component > matches snapshot 1`] = `
cursor: default;
}
-.c4 {
+.c1 div.Button__value {
+ font-size: 1.4rem;
+}
+
+.c5 {
background-color: #fcba19;
font-size: 1.5rem;
border-radius: 50%;
@@ -47,7 +268,7 @@ exports[`AcquisitionMenu component > matches snapshot 1`] = `
align-items: center;
}
-.c4.selected {
+.c5.selected {
background-color: #FCBA19;
}
@@ -69,7 +290,9 @@ exports[`AcquisitionMenu component > matches snapshot 1`] = `
}
.c3 {
- font-size: 1.4rem;
+ font-weight: bold;
+ font-size: 1.6rem;
+ color: #474543;
line-height: 2.2rem;
}
@@ -80,27 +303,14 @@ exports[`AcquisitionMenu component > matches snapshot 1`] = `
class="c1 no-gutters selected row"
data-testid="menu-item-row-0"
>
-
- one
+
+ one
+
matches snapshot 1`] = `
type="button"
>
matches snapshot 1`] = `
class="pr-2 col-auto"
>
2
@@ -180,7 +400,17 @@ exports[`AcquisitionMenu component > matches snapshot 1`] = `
diff --git a/source/frontend/src/features/mapSideBar/acquisition/common/models.ts b/source/frontend/src/features/mapSideBar/acquisition/common/models.ts
index 9cfba7153e..a74c3616d3 100644
--- a/source/frontend/src/features/mapSideBar/acquisition/common/models.ts
+++ b/source/frontend/src/features/mapSideBar/acquisition/common/models.ts
@@ -62,11 +62,11 @@ export class AcquisitionTeamFormModel {
}
static fromApi(model: ApiGen_Concepts_AcquisitionFileTeam | null): AcquisitionTeamFormModel {
- // todo:the method 'exists' here should allow the compiler to validate the child property. this works correctly in typescropt 5.3 +
+ // The method 'exists' below allows the compiler to validate the child property. This works correctly in typescript 5.3+
const contact: IContactSearchResult | undefined = exists(model?.person)
- ? fromApiPerson(model!.person)
+ ? fromApiPerson(model.person)
: exists(model?.organization)
- ? fromApiOrganization(model!.organization)
+ ? fromApiOrganization(model.organization)
: undefined;
const newForm = new AcquisitionTeamFormModel(
diff --git a/source/frontend/src/features/mapSideBar/acquisition/common/update/acquisitionOwners/UpdateAcquisitionOwnersSubForm.tsx b/source/frontend/src/features/mapSideBar/acquisition/common/update/acquisitionOwners/UpdateAcquisitionOwnersSubForm.tsx
index aeca1bce90..dfc64c4f92 100644
--- a/source/frontend/src/features/mapSideBar/acquisition/common/update/acquisitionOwners/UpdateAcquisitionOwnersSubForm.tsx
+++ b/source/frontend/src/features/mapSideBar/acquisition/common/update/acquisitionOwners/UpdateAcquisitionOwnersSubForm.tsx
@@ -16,7 +16,9 @@ import {
WithAcquisitionOwners,
} from '../../models';
-const UpdateAcquisitionOwnersSubForm: React.FC = () => {
+const UpdateAcquisitionOwnersSubForm: React.FC<{ isSubFile?: boolean }> = ({
+ isSubFile = false,
+}) => {
const { values, setFieldValue, handleChange } = useFormikContext();
const [removeIndex, setRemoveIndex] = useState(-1);
const [showRemoveModal, setShowRemoveModal] = useState(false);
@@ -62,7 +64,7 @@ const UpdateAcquisitionOwnersSubForm: React.FC = () => {
{
setRemoveIndex(index);
@@ -72,7 +74,13 @@ const UpdateAcquisitionOwnersSubForm: React.FC = () => {
Remove Owner
-
+
{
arrayHelpers.push(owner);
}}
>
- + Add owner
+ {isSubFile ? '+ Add Sub-interest' : '+ Add owner'}
{
onRemovedPrimaryContact(removeIndex);
diff --git a/source/frontend/src/features/mapSideBar/acquisition/common/update/acquisitionOwners/__snapshots__/UpdateAcquisitionOwnersSubForm.test.tsx.snap b/source/frontend/src/features/mapSideBar/acquisition/common/update/acquisitionOwners/__snapshots__/UpdateAcquisitionOwnersSubForm.test.tsx.snap
index 0b9c42af51..094d26e7df 100644
--- a/source/frontend/src/features/mapSideBar/acquisition/common/update/acquisitionOwners/__snapshots__/UpdateAcquisitionOwnersSubForm.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/acquisition/common/update/acquisitionOwners/__snapshots__/UpdateAcquisitionOwnersSubForm.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`UpdateAcquisitionOwnersSubForm component > renders as expected 1`] = `
}
.c0.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`UpdateAcquisitionOwnersSubForm component > renders as expected 1`] = `
.c0.btn:disabled,
.c0.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`UpdateAcquisitionOwnersSubForm component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c0.Button .Button__icon {
diff --git a/source/frontend/src/features/mapSideBar/acquisition/common/update/acquisitionTeam/__snapshots__/UpdateAcquisitionTeamSubForm.test.tsx.snap b/source/frontend/src/features/mapSideBar/acquisition/common/update/acquisitionTeam/__snapshots__/UpdateAcquisitionTeamSubForm.test.tsx.snap
index ed51243ad1..e223763d55 100644
--- a/source/frontend/src/features/mapSideBar/acquisition/common/update/acquisitionTeam/__snapshots__/UpdateAcquisitionTeamSubForm.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/acquisition/common/update/acquisitionTeam/__snapshots__/UpdateAcquisitionTeamSubForm.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`AcquisitionTeamSubForm component > renders as expected 1`] = `
}
.c0.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`AcquisitionTeamSubForm component > renders as expected 1`] = `
.c0.btn:disabled,
.c0.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`AcquisitionTeamSubForm component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c0.Button .Button__icon {
diff --git a/source/frontend/src/features/mapSideBar/acquisition/tabs/AcquisitionFileTabs.test.tsx b/source/frontend/src/features/mapSideBar/acquisition/tabs/AcquisitionFileTabs.test.tsx
index cdfc240d72..d601859e81 100644
--- a/source/frontend/src/features/mapSideBar/acquisition/tabs/AcquisitionFileTabs.test.tsx
+++ b/source/frontend/src/features/mapSideBar/acquisition/tabs/AcquisitionFileTabs.test.tsx
@@ -1,18 +1,14 @@
import { createMemoryHistory } from 'history';
import { Route } from 'react-router-dom';
-import { act } from 'react-test-renderer';
import Claims from '@/constants/claims';
import { FileTabType } from '@/features/mapSideBar/shared/detail/FileTabs';
-import { mockAcquisitionFileResponse } from '@/mocks/acquisitionFiles.mock';
-import { render, RenderOptions, userEvent } from '@/utils/test-utils';
-
-import AcquisitionFileTabs, { IAcquisitionFileTabsProps } from './AcquisitionFileTabs';
-import { useApiAcquisitionFile } from '@/hooks/pims-api/useApiAcquisitionFile';
import { useApiContacts } from '@/hooks/pims-api/useApiContacts';
import { useAcquisitionProvider } from '@/hooks/repositories/useAcquisitionProvider';
+import { mockAcquisitionFileResponse } from '@/mocks/acquisitionFiles.mock';
+import { act, render, RenderOptions, userEvent } from '@/utils/test-utils';
-// mock auth library
+import AcquisitionFileTabs, { IAcquisitionFileTabsProps } from './AcquisitionFileTabs';
const history = createMemoryHistory();
const setIsEditing = vi.fn();
@@ -35,6 +31,18 @@ vi.mocked(useAcquisitionProvider).mockReturnValue({
loading: false,
response: undefined,
},
+ getAcquisitionSubFiles: {
+ execute: vi.fn() as any,
+ error: undefined,
+ loading: false,
+ response: undefined,
+ },
+ getAcquisitionFile: {
+ execute: vi.fn() as any,
+ error: undefined,
+ loading: false,
+ response: undefined,
+ },
} as ReturnType);
vi.mock('@/features/documents/hooks/useDocumentRelationshipProvider', () => ({
@@ -179,4 +187,34 @@ describe('AcquisitionFileTabs component', () => {
const editButton = queryByText('Expropriation');
expect(editButton).toBeInTheDocument();
});
+
+ it('has a sub-files tab', async () => {
+ const { getByText } = setup(
+ {
+ acquisitionFile: mockAcquisitionFileResponse(),
+ defaultTab: FileTabType.FILE_DETAILS,
+ },
+ { claims: [Claims.DOCUMENT_VIEW, Claims.ACQUISITION_ADD] },
+ );
+ await act(async () => {});
+
+ const tab = getByText('Sub-Files');
+ expect(tab).toBeVisible();
+ });
+
+ it('sub-files tab can be changed to', async () => {
+ const { getByText } = setup(
+ {
+ acquisitionFile: mockAcquisitionFileResponse(),
+ defaultTab: FileTabType.FILE_DETAILS,
+ },
+ { claims: [Claims.DOCUMENT_VIEW, Claims.ACQUISITION_ADD] },
+ );
+
+ const tab = getByText('Sub-Files');
+ await act(async () => userEvent.click(tab));
+
+ expect(getByText('Sub-Files')).toHaveClass('active');
+ expect(history.location.pathname).toBe(`/blah/${FileTabType.SUB_FILES}`);
+ });
});
diff --git a/source/frontend/src/features/mapSideBar/acquisition/tabs/AcquisitionFileTabs.tsx b/source/frontend/src/features/mapSideBar/acquisition/tabs/AcquisitionFileTabs.tsx
index cea3cd00ff..2dc71639a1 100644
--- a/source/frontend/src/features/mapSideBar/acquisition/tabs/AcquisitionFileTabs.tsx
+++ b/source/frontend/src/features/mapSideBar/acquisition/tabs/AcquisitionFileTabs.tsx
@@ -84,34 +84,6 @@ export const AcquisitionFileTabs: React.FC = ({
name: 'Checklist',
});
- if (acquisitionFile?.id && hasClaim(Claims.DOCUMENT_VIEW)) {
- tabViews.push({
- content: (
-
- ),
- key: FileTabType.DOCUMENTS,
- name: 'Documents',
- });
- }
-
- if (acquisitionFile?.id && hasClaim(Claims.NOTE_VIEW)) {
- tabViews.push({
- content: (
-
- ),
- key: FileTabType.NOTES,
- name: 'Notes',
- });
- }
-
if (acquisitionFile?.id && hasClaim(Claims.AGREEMENT_VIEW)) {
tabViews.push({
content: ,
@@ -134,20 +106,6 @@ export const AcquisitionFileTabs: React.FC = ({
});
}
- if (acquisitionFile?.id && hasClaim(Claims.COMPENSATION_REQUISITION_VIEW)) {
- tabViews.push({
- content: (
-
- ),
- key: FileTabType.COMPENSATIONS,
- name: 'Compensation',
- });
- }
-
if (
acquisitionFile?.id &&
(acquisitionFile.acquisitionTypeCode?.id === EnumAcquisitionFileType.SECTN3 ||
@@ -165,6 +123,20 @@ export const AcquisitionFileTabs: React.FC = ({
});
}
+ if (acquisitionFile?.id && hasClaim(Claims.COMPENSATION_REQUISITION_VIEW)) {
+ tabViews.push({
+ content: (
+
+ ),
+ key: FileTabType.COMPENSATIONS,
+ name: 'Compensation',
+ });
+ }
+
if (exists(acquisitionFile?.id)) {
tabViews.push({
content: ,
@@ -173,6 +145,34 @@ export const AcquisitionFileTabs: React.FC = ({
});
}
+ if (acquisitionFile?.id && hasClaim(Claims.DOCUMENT_VIEW)) {
+ tabViews.push({
+ content: (
+
+ ),
+ key: FileTabType.DOCUMENTS,
+ name: 'Documents',
+ });
+ }
+
+ if (acquisitionFile?.id && hasClaim(Claims.NOTE_VIEW)) {
+ tabViews.push({
+ content: (
+
+ ),
+ key: FileTabType.NOTES,
+ name: 'Notes',
+ });
+ }
+
const onSetActiveTab = (tab: FileTabType) => {
const previousTab = activeTab;
if (previousTab === FileTabType.COMPENSATIONS) {
diff --git a/source/frontend/src/features/mapSideBar/acquisition/tabs/__snapshots__/AcquisitionFileTabs.test.tsx.snap b/source/frontend/src/features/mapSideBar/acquisition/tabs/__snapshots__/AcquisitionFileTabs.test.tsx.snap
index fabd30d940..e90ecd106a 100644
--- a/source/frontend/src/features/mapSideBar/acquisition/tabs/__snapshots__/AcquisitionFileTabs.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/acquisition/tabs/__snapshots__/AcquisitionFileTabs.test.tsx.snap
@@ -34,21 +34,27 @@ exports[`AcquisitionFileTabs component > matches snapshot 1`] = `
.c1 .nav-item {
color: var(--surface-color-primary-button-default);
min-width: 5rem;
- padding: 0.1rem 1.2rem;
+ padding: 0.1rem 1.3rem;
+ margin-bottom: 0.1rem;
+ margin-left: 0.1rem;
}
.c1 .nav-item:hover {
- color: var(--surface-color-primary-button-hover);
+ color: #f2f2f2;
+ background-color: #1e5189;
border-color: transparent;
-webkit-text-decoration: underline;
text-decoration: underline;
+ border-radius: 0.4rem;
+ text-shadow: 0.1rem 0 0 currentColor;
}
.c1 .nav-item.active {
- background-color: #f2f2f2;
- font-family: 'BCSans-Bold';
- color: var(--surface-color-primary-button-hover);
+ border-radius: 0.4rem;
+ color: #f2f2f2;
+ background-color: #053662;
border-color: transparent;
+ text-shadow: 0.1rem 0 0 currentColor;
}
.c2 {
@@ -132,29 +138,29 @@ exports[`AcquisitionFileTabs component > matches snapshot 1`] = `
- Documents
+ Stakeholders
- Stakeholders
+ Sub-Files
- Sub-Files
+ Documents
matches snapshot 1`] = `
Jul 29, 2022
+
+
+
+ Estimated date:
+
+
+
+
+
+
+
+
+ Jul 10, 2024
+
+
+
+
+
+ Possession date:
+
+
+
+ Jul 10, 2025
+
+
renders as expected 1`] = `
}
.c12.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`UpdateAcquisitionAgreementView component > renders as expected 1`] = `
.c12.btn:disabled,
.c12.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`UpdateAcquisitionAgreementView component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c12.Button .Button__icon {
diff --git a/source/frontend/src/features/mapSideBar/acquisition/tabs/agreement/detail/__snapshots__/AgreementView.test.tsx.snap b/source/frontend/src/features/mapSideBar/acquisition/tabs/agreement/detail/__snapshots__/AgreementView.test.tsx.snap
index cf0a69cf4f..631ccb72f1 100644
--- a/source/frontend/src/features/mapSideBar/acquisition/tabs/agreement/detail/__snapshots__/AgreementView.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/acquisition/tabs/agreement/detail/__snapshots__/AgreementView.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`AgreementView component > renders as expected 1`] = `
}
.c7.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`AgreementView component > renders as expected 1`] = `
.c7.btn:disabled,
.c7.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`AgreementView component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c7.Button .Button__icon {
diff --git a/source/frontend/src/features/mapSideBar/acquisition/tabs/expropriation/form1/__snapshots__/ExpropriationForm1.test.tsx.snap b/source/frontend/src/features/mapSideBar/acquisition/tabs/expropriation/form1/__snapshots__/ExpropriationForm1.test.tsx.snap
index 40faf51b62..70dd8872eb 100644
--- a/source/frontend/src/features/mapSideBar/acquisition/tabs/expropriation/form1/__snapshots__/ExpropriationForm1.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/acquisition/tabs/expropriation/form1/__snapshots__/ExpropriationForm1.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`Expropriation Form 1 > matches snapshot 1`] = `
}
.c3.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`Expropriation Form 1 > matches snapshot 1`] = `
.c3.btn:disabled,
.c3.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`Expropriation Form 1 > matches snapshot 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c3.Button .Button__icon {
@@ -631,10 +632,10 @@ exports[`Expropriation Form 1 > matches snapshot 1`] = `
}
.c1.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -774,6 +775,8 @@ exports[`Expropriation Form 1 > matches snapshot 1`] = `
.c1.btn:disabled,
.c1.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -781,7 +784,6 @@ exports[`Expropriation Form 1 > matches snapshot 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c1.Button .Button__icon {
diff --git a/source/frontend/src/features/mapSideBar/acquisition/tabs/expropriation/form5/__snapshots__/ExpropriationForm5.test.tsx.snap b/source/frontend/src/features/mapSideBar/acquisition/tabs/expropriation/form5/__snapshots__/ExpropriationForm5.test.tsx.snap
index 7269f12a55..de73a2f81c 100644
--- a/source/frontend/src/features/mapSideBar/acquisition/tabs/expropriation/form5/__snapshots__/ExpropriationForm5.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/acquisition/tabs/expropriation/form5/__snapshots__/ExpropriationForm5.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`Expropriation Form 1 > matches snapshot 1`] = `
}
.c3.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`Expropriation Form 1 > matches snapshot 1`] = `
.c3.btn:disabled,
.c3.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`Expropriation Form 1 > matches snapshot 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c3.Button .Button__icon {
@@ -553,10 +554,10 @@ exports[`Expropriation Form 1 > matches snapshot 1`] = `
}
.c1.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -696,6 +697,8 @@ exports[`Expropriation Form 1 > matches snapshot 1`] = `
.c1.btn:disabled,
.c1.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -703,7 +706,6 @@ exports[`Expropriation Form 1 > matches snapshot 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c1.Button .Button__icon {
diff --git a/source/frontend/src/features/mapSideBar/acquisition/tabs/expropriation/form8/__snapshots__/Form8PaymentItemsSubForm.test.tsx.snap b/source/frontend/src/features/mapSideBar/acquisition/tabs/expropriation/form8/__snapshots__/Form8PaymentItemsSubForm.test.tsx.snap
index def64e1bb4..9d17ff354e 100644
--- a/source/frontend/src/features/mapSideBar/acquisition/tabs/expropriation/form8/__snapshots__/Form8PaymentItemsSubForm.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/acquisition/tabs/expropriation/form8/__snapshots__/Form8PaymentItemsSubForm.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`FinancialActivitiesSubForm component > renders as expected 1`] = `
}
.c0.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`FinancialActivitiesSubForm component > renders as expected 1`] = `
.c0.btn:disabled,
.c0.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`FinancialActivitiesSubForm component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c0.Button .Button__icon {
diff --git a/source/frontend/src/features/mapSideBar/acquisition/tabs/expropriation/form8/details/__snapshots__/ExpropriationForm8Details.test.tsx.snap b/source/frontend/src/features/mapSideBar/acquisition/tabs/expropriation/form8/details/__snapshots__/ExpropriationForm8Details.test.tsx.snap
index 0e27f34fa8..a2b4d33637 100644
--- a/source/frontend/src/features/mapSideBar/acquisition/tabs/expropriation/form8/details/__snapshots__/ExpropriationForm8Details.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/acquisition/tabs/expropriation/form8/details/__snapshots__/ExpropriationForm8Details.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`Form 8 Detail View component > renders as expected 1`] = `
}
.c3.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`Form 8 Detail View component > renders as expected 1`] = `
.c3.btn:disabled,
.c3.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`Form 8 Detail View component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c3.Button .Button__icon {
diff --git a/source/frontend/src/features/mapSideBar/acquisition/tabs/expropriation/form9/__snapshots__/ExpropriationForm9.test.tsx.snap b/source/frontend/src/features/mapSideBar/acquisition/tabs/expropriation/form9/__snapshots__/ExpropriationForm9.test.tsx.snap
index c2ae7b38d3..64a2690433 100644
--- a/source/frontend/src/features/mapSideBar/acquisition/tabs/expropriation/form9/__snapshots__/ExpropriationForm9.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/acquisition/tabs/expropriation/form9/__snapshots__/ExpropriationForm9.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`Expropriation Form 1 > matches snapshot 1`] = `
}
.c3.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`Expropriation Form 1 > matches snapshot 1`] = `
.c3.btn:disabled,
.c3.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`Expropriation Form 1 > matches snapshot 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c3.Button .Button__icon {
@@ -592,10 +593,10 @@ exports[`Expropriation Form 1 > matches snapshot 1`] = `
}
.c1.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -735,6 +736,8 @@ exports[`Expropriation Form 1 > matches snapshot 1`] = `
.c1.btn:disabled,
.c1.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -742,7 +745,6 @@ exports[`Expropriation Form 1 > matches snapshot 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c1.Button .Button__icon {
diff --git a/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/detail/AcquisitionOwnersSummaryView.test.tsx b/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/detail/AcquisitionOwnersSummaryView.test.tsx
index 079f82abba..a5dc1e1164 100644
--- a/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/detail/AcquisitionOwnersSummaryView.test.tsx
+++ b/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/detail/AcquisitionOwnersSummaryView.test.tsx
@@ -50,12 +50,19 @@ describe('Acquisition File Owners View component', () => {
vi.resetAllMocks();
});
- it('Renders Component as expected', () => {
+ it('renders as expected', () => {
const { asFragment } = setup({});
expect(asFragment()).toMatchSnapshot();
});
- it('Display the Person Owner data', () => {
+ it('renders a spinner while loading', async () => {
+ const { getByTestId } = setup({ props: { isLoading: true } });
+
+ const spinner = getByTestId('filter-backdrop-loading');
+ expect(spinner).toBeVisible();
+ });
+
+ it('displays the Person Owner data', () => {
const { getByText, getIsPrymaryContactRadioButton, findAllByDisplayValue } = setup({
props: { ownersList: [ownerIndividual], isLoading: false },
});
@@ -68,7 +75,7 @@ describe('Acquisition File Owners View component', () => {
expect(findAllByDisplayValue('North Podunk, British Columbia, IH8 B0B')).not.toBeNull();
});
- it('Display the Organization Owner data with Incorporation and Registration Number', () => {
+ it('displays the Organization Owner data with Incorporation and Registration Number', () => {
const { getByText, getIsPrymaryContactRadioButton } = setup({
props: { ownersList: [ownerCorporate], isLoading: false },
});
@@ -83,7 +90,7 @@ describe('Acquisition File Owners View component', () => {
).toBeVisible();
});
- it('Display the Organization Owner data with Incorporation and NO Registration Number', () => {
+ it('displays the Organization Owner data with Incorporation and NO Registration Number', () => {
const ownerTest = {
...ownerCorporate,
registrationNumber: null,
@@ -103,7 +110,7 @@ describe('Acquisition File Owners View component', () => {
expect(getByText('775-111-1111')).toBeVisible();
});
- it('Display the Organization Owner data with NO Incorporation and Registration Number', () => {
+ it('displays the Organization Owner data with NO Incorporation and Registration Number', () => {
const ownerTest = {
...ownerCorporate,
incorporationNumber: null,
diff --git a/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/detail/AcquisitionOwnersSummaryView.tsx b/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/detail/AcquisitionOwnersSummaryView.tsx
index 4c4e0f6303..ec3ea51814 100644
--- a/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/detail/AcquisitionOwnersSummaryView.tsx
+++ b/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/detail/AcquisitionOwnersSummaryView.tsx
@@ -3,7 +3,6 @@ import styled from 'styled-components';
import LoadingBackdrop from '@/components/common/LoadingBackdrop';
import { SectionField } from '@/components/common/Section/SectionField';
-import { StyledSectionParagraph } from '@/components/common/styles';
import { DetailAcquisitionFileOwner } from '../../../models/DetailAcquisitionFileOwner';
import { IAcquisitionOwnersSummaryViewProps } from './AcquisitionOwnersSummaryContainer';
@@ -20,9 +19,6 @@ const AcquisitionOwnersSummaryView: React.FC
return (
<>
-
- Each property in this file should be owned by the owner(s) in this section
-
{ownerDetailList?.map((owner, index) => {
return (
diff --git a/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/detail/AcquisitionSummaryView.test.tsx b/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/detail/AcquisitionSummaryView.test.tsx
index 03b84f5aca..1eff856b28 100644
--- a/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/detail/AcquisitionSummaryView.test.tsx
+++ b/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/detail/AcquisitionSummaryView.test.tsx
@@ -12,7 +12,6 @@ import { toTypeCodeNullable } from '@/utils/formUtils';
import { act, cleanup, render, RenderOptions, userEvent, waitForEffects } from '@/utils/test-utils';
import AcquisitionSummaryView, { IAcquisitionSummaryViewProps } from './AcquisitionSummaryView';
-import { vi } from 'vitest';
// mock auth library
@@ -92,11 +91,7 @@ describe('AcquisitionSummaryView component', () => {
it('does not render the edit button for users that do not have acquisition edit permissions', async () => {
const { queryByTitle } = setup(
- {
- acquisitionFile: {
- ...mockAcquisitionFileResponse(),
- },
- },
+ { acquisitionFile: mockAcquisitionFileResponse() },
{ claims: [] },
);
await waitForEffects();
@@ -122,12 +117,27 @@ describe('AcquisitionSummaryView component', () => {
});
it('renders historical file number', async () => {
- const mockResponse = mockAcquisitionFileResponse();
- const { getByText } = setup({ acquisitionFile: mockResponse }, { claims: [] });
+ const { getByText } = setup({ acquisitionFile: mockAcquisitionFileResponse() }, { claims: [] });
await waitForEffects();
expect(getByText('legacy file number')).toBeVisible();
});
+ it('renders acquisition-related dates', async () => {
+ const { getByText } = setup(
+ {
+ acquisitionFile: {
+ ...mockAcquisitionFileResponse(),
+ estimatedCompletionDate: '2030-01-10T00:00:00',
+ possessionDate: '2035-03-10T00:00:00',
+ },
+ },
+ { claims: [] },
+ );
+ await waitForEffects();
+ expect(getByText('Jan 10, 2030')).toBeVisible();
+ expect(getByText('Mar 10, 2035')).toBeVisible();
+ });
+
it('renders owner solicitor information with primary contact', async () => {
const { findByText } = setup(
{ acquisitionFile: mockAcquisitionFileResponse() },
@@ -146,11 +156,10 @@ describe('AcquisitionSummaryView component', () => {
});
it('renders acquisition team member person', async () => {
- const apiMock = mockAcquisitionFileResponse();
const { findByText } = setup(
{
acquisitionFile: {
- ...apiMock,
+ ...mockAcquisitionFileResponse(),
acquisitionTeam: [
{
id: 1,
@@ -191,11 +200,10 @@ describe('AcquisitionSummaryView component', () => {
});
it('renders acquisition team member organization', async () => {
- const apiMock = mockAcquisitionFileResponse();
const { findByText } = setup(
{
acquisitionFile: {
- ...apiMock,
+ ...mockAcquisitionFileResponse(),
acquisitionTeam: [
{
id: 1,
@@ -235,11 +243,10 @@ describe('AcquisitionSummaryView component', () => {
});
it('renders acquisition team member organization and primary contact', async () => {
- const apiMock = mockAcquisitionFileResponse();
const { findByText } = setup(
{
acquisitionFile: {
- ...apiMock,
+ ...mockAcquisitionFileResponse(),
acquisitionFileInterestHolders: [],
acquisitionTeam: [
{
@@ -291,4 +298,79 @@ describe('AcquisitionSummaryView component', () => {
expect(await findByText(/Primary contact/)).toBeVisible();
expect(await findByText(/Bob Billy Smith/)).toBeVisible();
});
+
+ describe('Sub-interest files', () => {
+ it('renders sub file interest type', async () => {
+ const { getByTestId } = setup(
+ {
+ acquisitionFile: {
+ ...mockAcquisitionFileResponse(),
+ parentAcquisitionFileId: 100,
+ subfileInterestTypeCode: {
+ id: 'SUBTENANT',
+ description: 'Sub-Tenant / Lease',
+ isDisabled: false,
+ displayOrder: 8,
+ },
+ otherSubfileInterestType: null,
+ },
+ },
+ { claims: [] },
+ );
+ await waitForEffects();
+
+ expect(getByTestId('subFile-interest-type')).toHaveTextContent('Sub-Tenant / Lease');
+ });
+
+ it('renders OTHER sub file interest type', async () => {
+ const { getByTestId } = setup(
+ {
+ acquisitionFile: {
+ ...mockAcquisitionFileResponse(),
+ parentAcquisitionFileId: 100,
+ subfileInterestTypeCode: {
+ id: 'OTHER',
+ description: 'Other',
+ isDisabled: false,
+ displayOrder: 8,
+ },
+ otherSubfileInterestType: 'SOME OTHER VALUE',
+ },
+ },
+ { claims: [] },
+ );
+ await waitForEffects();
+
+ expect(getByTestId('subFile-interest-type')).toHaveTextContent('Other-SOME OTHER VALUE');
+ });
+
+ it('renders sub-interest information section', async () => {
+ const { getByText } = setup(
+ {
+ acquisitionFile: {
+ ...mockAcquisitionFileResponse(),
+ parentAcquisitionFileId: 100,
+ subfileInterestTypeCode: {
+ id: 'SUBTENANT',
+ description: 'Sub-Tenant / Lease',
+ isDisabled: false,
+ displayOrder: 8,
+ },
+ otherSubfileInterestType: null,
+ },
+ },
+ { claims: [] },
+ );
+ await waitForEffects();
+
+ expect(getByText('Sub-Interest Information')).toBeVisible();
+ expect(
+ getByText(
+ 'Each property in this sub-file should be impacted by the sub-interest(s) in this section',
+ ),
+ ).toBeVisible();
+ expect(getByText(/Sub-interest solicitor/i)).toBeVisible();
+ expect(getByText(/Sub-interest representative/i)).toBeVisible();
+ });
+ });
});
diff --git a/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/detail/AcquisitionSummaryView.tsx b/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/detail/AcquisitionSummaryView.tsx
index a849e2131d..d99db2373d 100644
--- a/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/detail/AcquisitionSummaryView.tsx
+++ b/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/detail/AcquisitionSummaryView.tsx
@@ -7,6 +7,7 @@ import EditButton from '@/components/common/EditButton';
import { Section } from '@/components/common/Section/Section';
import { SectionField } from '@/components/common/Section/SectionField';
import { StyledEditWrapper, StyledSummarySection } from '@/components/common/Section/SectionStyles';
+import { StyledSectionParagraph } from '@/components/common/styles';
import TooltipIcon from '@/components/common/TooltipIcon';
import { Claims, Roles } from '@/constants';
import { InterestHolderType } from '@/constants/interestHolderTypes';
@@ -32,7 +33,6 @@ const AcquisitionSummaryView: React.FC = ({
onEdit,
}) => {
const detail: DetailAcquisitionFile = DetailAcquisitionFile.fromApi(acquisitionFile);
-
const { hasRole, hasClaim } = useKeycloakWrapper();
const projectName = exists(acquisitionFile?.project)
@@ -100,6 +100,15 @@ const AcquisitionSummaryView: React.FC = ({
>
{prettyFormatDate(detail.deliveryDate)}
+
+ {prettyFormatDate(detail.estimatedCompletionDate)}
+
+
+ {prettyFormatDate(detail.possessionDate)}
+
{detail.fileName}
@@ -113,6 +122,11 @@ const AcquisitionSummaryView: React.FC = ({
{detail.acquisitionPhysFileStatusTypeDescription}
{detail.acquisitionTypeDescription}
+ {detail.isSubFile && (
+
+ {detail.subfileInterestTypeDescription}
+
+ )}
{detail.regionDescription}
@@ -151,7 +165,16 @@ const AcquisitionSummaryView: React.FC = ({
))}
-
+
+ {detail.isSubFile ? (
+
+ Each property in this sub-file should be impacted by the sub-interest(s) in this section
+
+ ) : (
+
+ Each property in this file should be owned by the owner(s) in this section
+
+ )}
{acquisitionFile?.id !== undefined && (
= ({
>
)}
{!!ownerSolicitor && (
-
+
= ({
)}
{!!ownerRepresentative && (
<>
-
+
Renders Component as expected 1`] = `
+exports[`Acquisition File Owners View component > renders as expected 1`] = `
- .c0 {
- color: #474543;
- font-size: 1.6rem;
- -webkit-text-decoration: none;
- text-decoration: none;
-}
-
-
- Each property in this file should be owned by the owner(s) in this section
-
.c0.required::before {
content: '*';
position: absolute;
diff --git a/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/detail/__snapshots__/AcquisitionSummaryView.test.tsx.snap b/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/detail/__snapshots__/AcquisitionSummaryView.test.tsx.snap
index ba707424b7..526378ef54 100644
--- a/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/detail/__snapshots__/AcquisitionSummaryView.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/detail/__snapshots__/AcquisitionSummaryView.test.tsx.snap
@@ -219,6 +219,64 @@ exports[`AcquisitionSummaryView component > matches snapshot 1`] = `
Jul 29, 2022
+
+
+
+ Estimated date:
+
+
+
+
+
+
+
+
+ Jul 10, 2024
+
+
+
+
+
+ Possession date:
+
+
+
+ Jul 10, 2025
+
+
DetailAcquisitionFileTeam.fromApi(x)) || [];
diff --git a/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/update/UpdateAcquisitionContainer.tsx b/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/update/UpdateAcquisitionContainer.tsx
index 34ffbf8938..9251bf68ce 100644
--- a/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/update/UpdateAcquisitionContainer.tsx
+++ b/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/update/UpdateAcquisitionContainer.tsx
@@ -48,6 +48,10 @@ export const UpdateAcquisitionContainer = React.forwardRef<
// Customize the look and feel of the user-override modal. For region change confirmation, the modal should be of type "info" (blue)
const customModalOptions = new Map
([
[UserOverrideCode.UPDATE_REGION, { variant: 'info', title: 'Different Ministry region' }],
+ [
+ UserOverrideCode.UPDATE_SUBFILES_PROJECT_PRODUCT,
+ { variant: 'info', title: 'Different Project or Product' },
+ ],
]);
const withUserOverride = useApiUserOverride<
diff --git a/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/update/UpdateAcquisitionFileYupSchema.ts b/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/update/UpdateAcquisitionFileYupSchema.ts
index 82b10d840c..6db91d05a5 100644
--- a/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/update/UpdateAcquisitionFileYupSchema.ts
+++ b/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/update/UpdateAcquisitionFileYupSchema.ts
@@ -1,18 +1,42 @@
/* eslint-disable no-template-curly-in-string */
-import * as Yup from 'yup';
+import * as yup from 'yup';
+
+import { ApiGen_CodeTypes_SubfileInterestTypes } from '@/models/api/generated/ApiGen_CodeTypes_SubfileInterestTypes';
import { UpdateAcquisitionOwnersYupSchema } from '../../../common/update/acquisitionOwners/UpdateAcquisitionOwnersYupSchema';
import { UpdateAcquisitionTeamYupSchema } from '../../../common/update/acquisitionTeam/UpdateAcquisitionTeamYupSchema';
-export const UpdateAcquisitionFileYupSchema = Yup.object()
+export const UpdateAcquisitionFileYupSchema = yup
+ .object()
.shape({
- fileStatusTypeCode: Yup.string().required('Status is required'),
- fileName: Yup.string()
+ fileStatusTypeCode: yup.string().required('Status is required'),
+ fileName: yup
+ .string()
.required('Acquisition file name is required')
.max(500, 'Acquisition file name must be at most ${max} characters'),
- acquisitionType: Yup.string().required('Acquisition type is required'),
- region: Yup.string().required('Ministry region is required'),
- legacyFileNumber: Yup.string().max(18, 'Legacy file number must be at most ${max} characters'),
+ parentAcquisitionFileId: yup.number().nullable(),
+ subfileInterestTypeCode: yup
+ .string()
+ .when('parentAcquisitionFileId', {
+ is: (parentAcquisitionFileId: number) => parentAcquisitionFileId !== null,
+ then: yup.string().required('Subfile interest type is required').nullable(),
+ otherwise: yup.string().nullable(),
+ })
+ .nullable(),
+ otherSubfileInterestType: yup.string().when('subfileInterestTypeCode', {
+ is: (subfileInterestTypeCode: string) =>
+ subfileInterestTypeCode &&
+ subfileInterestTypeCode === ApiGen_CodeTypes_SubfileInterestTypes.OTHER,
+ then: yup
+ .string()
+ .required('Other Subfile interest type is required')
+ .nullable()
+ .max(200, 'Other Subfile interest description must be at most 200 characters'),
+ otherwise: yup.string().nullable(),
+ }),
+ acquisitionType: yup.string().required('Acquisition type is required'),
+ region: yup.string().required('Ministry region is required'),
+ legacyFileNumber: yup.string().max(18, 'Legacy file number must be at most ${max} characters'),
})
.concat(UpdateAcquisitionTeamYupSchema)
.concat(UpdateAcquisitionOwnersYupSchema);
diff --git a/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/update/UpdateAcquisitionForm.test.tsx b/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/update/UpdateAcquisitionForm.test.tsx
index af651f4f33..ba56715d2d 100644
--- a/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/update/UpdateAcquisitionForm.test.tsx
+++ b/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/update/UpdateAcquisitionForm.test.tsx
@@ -8,7 +8,17 @@ import { mockAcquisitionFileResponse } from '@/mocks/acquisitionFiles.mock';
import { mockLookups } from '@/mocks/lookups.mock';
import { mockNotesResponse } from '@/mocks/noteResponses.mock';
import { lookupCodesSlice } from '@/store/slices/lookupCodes';
-import { act, render, RenderOptions, userEvent, waitFor } from '@/utils/test-utils';
+import {
+ act,
+ fakeText,
+ fireEvent,
+ render,
+ RenderOptions,
+ screen,
+ userEvent,
+ waitFor,
+ waitForEffects,
+} from '@/utils/test-utils';
import { UpdateAcquisitionSummaryFormModel } from './models';
import { UpdateAcquisitionFileYupSchema } from './UpdateAcquisitionFileYupSchema';
@@ -95,8 +105,10 @@ describe('UpdateAcquisitionForm component', () => {
getCloseButton: () => utils.getByTitle('close'),
getFileStatusDropdown: () =>
utils.container.querySelector(`select[name="fileStatusTypeCode"]`) as HTMLSelectElement,
- getFileCompletionDatePicker: () =>
- utils.container.querySelector(`input[name="completionDate"]`) as HTMLInputElement,
+ getEstimatedCompletionDatePicker: () =>
+ utils.container.querySelector(`input[name="estimatedCompletionDate"]`) as HTMLInputElement,
+ getPossessionDatePicker: () =>
+ utils.container.querySelector(`input[name="possessionDate"]`) as HTMLInputElement,
getTeamMemberProfileDropDownList: (index = 0) =>
utils.container.querySelector(
`select[name="team.${index}.contactTypeCode"]`,
@@ -105,6 +117,12 @@ describe('UpdateAcquisitionForm component', () => {
utils.container.querySelector(
`div[data-testid="typeahead-project"] button`,
) as HTMLSelectElement,
+ getSubfileInterestTypeDropdown: () =>
+ utils.container.querySelector(
+ `select[name="subfileInterestTypeCode"]`,
+ ) as HTMLSelectElement,
+ getOtherSubfileInterestTypeTextbox: () =>
+ utils.container.querySelector(`input[name="otherSubfileInterestType"]`) as HTMLInputElement,
};
};
@@ -127,23 +145,30 @@ describe('UpdateAcquisitionForm component', () => {
});
it('renders as expected', async () => {
- const { asFragment, findByDisplayValue } = setup({ initialValues });
- expect(asFragment()).toMatchSnapshot();
+ const { asFragment } = setup({ initialValues });
await act(async () => {});
+ expect(asFragment()).toMatchSnapshot();
});
it('displays legacy file number', async () => {
const { getByDisplayValue } = setup({ initialValues });
- expect(getByDisplayValue('legacy file number')).toBeVisible();
await act(async () => {});
+ expect(getByDisplayValue('legacy file number')).toBeVisible();
});
it('displays owner solicitor and owner representative', async () => {
const { getByText } = setup({ initialValues });
+ await act(async () => {});
expect(getByText('Millennium Inc')).toBeVisible();
expect(getByText('Han Solo')).toBeVisible();
expect(getByText('test representative comment')).toBeVisible();
+ });
+
+ it('displays estimated completion and possession dates', async () => {
+ const { getEstimatedCompletionDatePicker, getPossessionDatePicker } = setup({ initialValues });
await act(async () => {});
+ expect(getEstimatedCompletionDatePicker()).toHaveValue('Jul 10, 2024');
+ expect(getPossessionDatePicker()).toHaveValue('Jul 10, 2025');
});
it('displays Individual type Owner with data', async () => {
@@ -157,6 +182,7 @@ describe('UpdateAcquisitionForm component', () => {
getEmailTextbox,
getPhoneTextbox,
} = setup({ initialValues });
+ await act(async () => {});
expect(getIsOrganizationRadioButtonValue()).toEqual('false');
@@ -169,7 +195,6 @@ describe('UpdateAcquisitionForm component', () => {
expect(getEmailTextbox(0).value).toEqual('jonh.doe@gmail.com');
expect(getPhoneTextbox(0).value).toEqual('775-111-1111');
- await act(async () => {});
});
it('displays Corporation type Owner with data', async () => {
@@ -183,6 +208,7 @@ describe('UpdateAcquisitionForm component', () => {
getEmailTextbox,
getPhoneTextbox,
} = setup({ initialValues });
+ await act(async () => {});
expect(getIsOrganizationRadioButtonValue(1)).toEqual('true');
@@ -196,7 +222,6 @@ describe('UpdateAcquisitionForm component', () => {
expect(getEmailTextbox(1).value).toEqual('fake@email.ca');
expect(getPhoneTextbox(1).value).toEqual('775-111-1111');
- await act(async () => {});
});
it('it validates that only profile is not repeated on another team member', async () => {
@@ -235,4 +260,83 @@ describe('UpdateAcquisitionForm component', () => {
expect(validationSchema).toBeCalled();
expect(onSubmit).toHaveBeenLastCalledWith(initialValues, expect.anything());
});
+
+ describe('Sub-interest files', () => {
+ let parentId: number;
+ beforeEach(() => {
+ parentId = 99;
+ initialValues.parentAcquisitionFileId = parentId;
+ initialValues.formattedProject = '1111 - Test Project';
+ });
+
+ it('renders as expected', () => {
+ const { asFragment } = setup({ initialValues });
+ expect(asFragment()).toMatchSnapshot();
+ });
+
+ it('should display sub file interest type SELECT', async () => {
+ const { getSubfileInterestTypeDropdown } = setup({
+ initialValues,
+ });
+ expect(getSubfileInterestTypeDropdown()).toBeInTheDocument();
+ });
+
+ it('should display OTHER sub file interest type', async () => {
+ const { getSubfileInterestTypeDropdown, getOtherSubfileInterestTypeTextbox, getByTestId } =
+ setup({
+ initialValues,
+ });
+ const subfileInterestTypeDropdown = getSubfileInterestTypeDropdown();
+
+ expect(subfileInterestTypeDropdown).toBeInTheDocument();
+ await act(async () => {
+ userEvent.click(subfileInterestTypeDropdown);
+ userEvent.selectOptions(screen.getByTestId('subfileInterestTypeCode'), ['OTHER']);
+ });
+ await waitForEffects();
+
+ const otherSubfileInterestTextbox = getOtherSubfileInterestTypeTextbox();
+ expect(otherSubfileInterestTextbox).toBeInTheDocument();
+ });
+
+ it('should validate OTHER sub file interest type max length', async () => {
+ const { findByText, getSubfileInterestTypeDropdown, getOtherSubfileInterestTypeTextbox } =
+ setup({ initialValues });
+ const subfileInterestTypeDropdown = getSubfileInterestTypeDropdown();
+
+ expect(subfileInterestTypeDropdown).toBeInTheDocument();
+ await act(async () => {
+ userEvent.click(subfileInterestTypeDropdown);
+ userEvent.selectOptions(screen.getByTestId('subfileInterestTypeCode'), ['OTHER']);
+ });
+ await waitForEffects();
+
+ const otherSubfileInterestTextbox = getOtherSubfileInterestTypeTextbox();
+ expect(otherSubfileInterestTextbox).toBeInTheDocument();
+
+ await act(async () => {
+ userEvent.paste(otherSubfileInterestTextbox, fakeText(201));
+ fireEvent.blur(otherSubfileInterestTextbox);
+ });
+ await waitForEffects();
+
+ expect(
+ await findByText(/Other Subfile interest description must be at most 200 characters/i),
+ ).toBeVisible();
+ });
+
+ it('renders sub-interest information section', async () => {
+ const { getByText } = setup({ initialValues });
+ await waitForEffects();
+
+ expect(
+ getByText(
+ 'Each property in this sub-file should be impacted by the sub-interest(s) in this section',
+ ),
+ ).toBeVisible();
+ expect(getByText('+ Add Sub-interest')).toBeVisible();
+ expect(getByText(/Sub-interest solicitor/i)).toBeVisible();
+ expect(getByText(/Sub-interest representative/i)).toBeVisible();
+ });
+ });
});
diff --git a/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/update/UpdateAcquisitionForm.tsx b/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/update/UpdateAcquisitionForm.tsx
index 1cab015bf3..d8c155dc3c 100644
--- a/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/update/UpdateAcquisitionForm.tsx
+++ b/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/update/UpdateAcquisitionForm.tsx
@@ -23,9 +23,10 @@ import { useOrganizationRepository } from '@/features/contacts/repositories/useO
import { useProjectProvider } from '@/hooks/repositories/useProjectProvider';
import { useLookupCodeHelpers } from '@/hooks/useLookupCodeHelpers';
import { IAutocompletePrediction } from '@/interfaces';
+import { ApiGen_CodeTypes_SubfileInterestTypes } from '@/models/api/generated/ApiGen_CodeTypes_SubfileInterestTypes';
import { ApiGen_Concepts_PersonOrganization } from '@/models/api/generated/ApiGen_Concepts_PersonOrganization';
import { ApiGen_Concepts_Product } from '@/models/api/generated/ApiGen_Concepts_Product';
-import { isValidId, isValidString } from '@/utils';
+import { exists, isValidId, isValidString } from '@/utils';
import { formatApiPersonNames } from '@/utils/personUtils';
import UpdateAcquisitionOwnersSubForm from '../../../common/update/acquisitionOwners/UpdateAcquisitionOwnersSubForm';
@@ -69,7 +70,7 @@ export default UpdateAcquisitionForm;
const AcquisitionDetailSubForm: React.FC<{
formikProps: FormikProps;
}> = ({ formikProps }) => {
- const { setFieldValue, initialValues } = formikProps;
+ const { setFieldValue, initialValues, values } = formikProps;
const [projectProducts, setProjectProducts] = React.useState<
ApiGen_Concepts_Product[] | undefined
@@ -81,7 +82,8 @@ const AcquisitionDetailSubForm: React.FC<{
const acquisitionPhysFileTypes = getOptionsByType(API.ACQUISITION_PHYSICAL_FILE_STATUS_TYPES);
const fileStatusTypeCodes = getOptionsByType(API.ACQUISITION_FILE_STATUS_TYPES);
const acquisitionFundingTypes = getOptionsByType(API.ACQUISITION_FUNDING_TYPES);
- const ownerSolicitorContact = formikProps.values.ownerSolicitor.contact;
+ const ownerSolicitorContact = values.ownerSolicitor.contact;
+ const subfileInterestTypes = getOptionsByType(API.SUBFILE_INTEREST_TYPES);
const onMinistryProjectSelected = React.useCallback(
async (param: IAutocompletePrediction[]) => {
@@ -134,6 +136,10 @@ const AcquisitionDetailSubForm: React.FC<{
};
}) ?? [];
+ const isSubFile =
+ exists(initialValues.parentAcquisitionFileId) &&
+ isValidId(initialValues.parentAcquisitionFileId);
+
return (
@@ -158,30 +164,49 @@ const AcquisitionDetailSubForm: React.FC<{
@@ -242,6 +276,38 @@ const AcquisitionDetailSubForm: React.FC<{
required
/>
+
+ {isSubFile && (
+
+
+ )}
+ {isSubFile &&
+ values?.subfileInterestTypeCode === ApiGen_CodeTypes_SubfileInterestTypes.OTHER && (
+
+
+
+ )}
+
-
-
- Each property in this file should be owned by the owner(s) in this section
-
-
-
+
+ {isSubFile ? (
+
+ Each property in this sub-file should be impacted by the sub-interest(s) in this section
+
+ ) : (
+
+ Each property in this file should be owned by the owner(s) in this section
+
+ )}
+
+
)}
-
+
Sub-interest files > renders as expected 1`] = `
+
+
+
+ .c8.btn {
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-align-items: center;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
+ -webkit-box-pack: center;
+ -webkit-justify-content: center;
+ -ms-flex-pack: center;
+ justify-content: center;
+ padding: 0.4rem 1.2rem;
+ border: 0.2rem solid transparent;
+ border-radius: 0.4rem;
+ text-align: center;
+ -webkit-text-decoration: none;
+ text-decoration: none;
+ font-size: 1.8rem;
+ font-family: 'BCSans','Noto Sans',Verdana,Arial,sans-serif;
+ font-weight: 700;
+ -webkit-letter-spacing: 0.1rem;
+ -moz-letter-spacing: 0.1rem;
+ -ms-letter-spacing: 0.1rem;
+ letter-spacing: 0.1rem;
+ cursor: pointer;
+}
+
+.c8.btn .Button__value {
+ width: -webkit-max-content;
+ width: -moz-max-content;
+ width: max-content;
+}
+
+.c8.btn:hover {
+ -webkit-text-decoration: underline;
+ text-decoration: underline;
+ opacity: 0.8;
+}
+
+.c8.btn:focus {
+ outline-width: 2px;
+ outline-style: solid;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
+ box-shadow: none;
+}
+
+.c8.btn.btn-primary {
+ color: #FFFFFF;
+ background-color: #013366;
+}
+
+.c8.btn.btn-primary:hover,
+.c8.btn.btn-primary:active,
+.c8.btn.btn-primary:focus {
+ background-color: #1E5189;
+}
+
+.c8.btn.btn-secondary {
+ color: #013366;
+ background: none;
+ border-color: #013366;
+}
+
+.c8.btn.btn-secondary:hover,
+.c8.btn.btn-secondary:active,
+.c8.btn.btn-secondary:focus {
+ color: #FFFFFF;
+ background-color: #013366;
+}
+
+.c8.btn.btn-info {
+ color: #9F9D9C;
+ border: none;
+ background: none;
+ padding-left: 0.6rem;
+ padding-right: 0.6rem;
+}
+
+.c8.btn.btn-info:hover,
+.c8.btn.btn-info:active,
+.c8.btn.btn-info:focus {
+ color: var(--surface-color-primary-button-hover);
+ background: none;
+}
+
+.c8.btn.btn-light {
+ color: #FFFFFF;
+ background-color: #606060;
+ border: none;
+}
+
+.c8.btn.btn-light:hover,
+.c8.btn.btn-light:active,
+.c8.btn.btn-light:focus {
+ color: #FFFFFF;
+ background-color: #606060;
+}
+
+.c8.btn.btn-dark {
+ color: #FFFFFF;
+ background-color: #474543;
+ border: none;
+}
+
+.c8.btn.btn-dark:hover,
+.c8.btn.btn-dark:active,
+.c8.btn.btn-dark:focus {
+ color: #FFFFFF;
+ background-color: #474543;
+}
+
+.c8.btn.btn-danger {
+ color: #FFFFFF;
+ background-color: #CE3E39;
+}
+
+.c8.btn.btn-danger:hover,
+.c8.btn.btn-danger:active,
+.c8.btn.btn-danger:focus {
+ color: #FFFFFF;
+ background-color: #CE3E39;
+}
+
+.c8.btn.btn-warning {
+ color: #FFFFFF;
+ background-color: #FCBA19;
+ border-color: #FCBA19;
+}
+
+.c8.btn.btn-warning:hover,
+.c8.btn.btn-warning:active,
+.c8.btn.btn-warning:focus {
+ color: #FFFFFF;
+ border-color: #FCBA19;
+ background-color: #FCBA19;
+}
+
+.c8.btn.btn-link {
+ font-size: 1.6rem;
+ font-weight: 400;
+ color: var(--surface-color-primary-button-default);
+ background: none;
+ border: none;
+ -webkit-text-decoration: none;
+ text-decoration: none;
+ min-height: 2.5rem;
+ line-height: 3rem;
+ -webkit-box-pack: left;
+ -webkit-justify-content: left;
+ -ms-flex-pack: left;
+ justify-content: left;
+ -webkit-letter-spacing: unset;
+ -moz-letter-spacing: unset;
+ -ms-letter-spacing: unset;
+ letter-spacing: unset;
+ text-align: left;
+ padding: 0;
+ -webkit-text-decoration: underline;
+ text-decoration: underline;
+}
+
+.c8.btn.btn-link:hover,
+.c8.btn.btn-link:active,
+.c8.btn.btn-link:focus {
+ color: var(--surface-color-primary-button-hover);
+ -webkit-text-decoration: underline;
+ text-decoration: underline;
+ border: none;
+ background: none;
+ box-shadow: none;
+ outline: none;
+}
+
+.c8.btn.btn-link:disabled,
+.c8.btn.btn-link.disabled {
+ color: #9F9D9C;
+ background: none;
+ pointer-events: none;
+}
+
+.c8.btn:disabled,
+.c8.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
+ box-shadow: none;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ pointer-events: none;
+ cursor: not-allowed;
+}
+
+.c8.Button .Button__icon {
+ margin-right: 1.6rem;
+}
+
+.c8.Button--icon-only:focus {
+ outline: none;
+}
+
+.c8.Button--icon-only .Button__icon {
+ margin-right: 0;
+}
+
+.c10.c10.btn {
+ color: #aaaaaa;
+ -webkit-text-decoration: none;
+ text-decoration: none;
+ line-height: unset;
+}
+
+.c10.c10.btn .text {
+ display: none;
+}
+
+.c10.c10.btn:hover,
+.c10.c10.btn:active,
+.c10.c10.btn:focus {
+ color: #d8292f;
+ -webkit-text-decoration: none;
+ text-decoration: none;
+ opacity: unset;
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-flex-direction: row;
+ -ms-flex-direction: row;
+ flex-direction: row;
+}
+
+.c10.c10.btn:hover .text,
+.c10.c10.btn:active .text,
+.c10.c10.btn:focus .text {
+ display: inline;
+ line-height: 2rem;
+}
+
+.c18.c18.btn {
+ font-size: 1.3rem;
+ color: #aaaaaa;
+ -webkit-text-decoration: none;
+ text-decoration: none;
+ line-height: unset;
+}
+
+.c18.c18.btn .text {
+ display: none;
+}
+
+.c18.c18.btn:hover,
+.c18.c18.btn:active,
+.c18.c18.btn:focus {
+ color: #d8292f;
+ -webkit-text-decoration: none;
+ text-decoration: none;
+ opacity: unset;
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-flex-direction: row;
+ -ms-flex-direction: row;
+ flex-direction: row;
+}
+
+.c18.c18.btn:hover .text,
+.c18.c18.btn:active .text,
+.c18.c18.btn:focus .text {
+ display: inline;
+ line-height: 2rem;
+}
+
+.c5 .react-datepicker__calendar-icon {
+ width: 2.4rem;
+ height: 3rem;
+ margin-top: 0.5rem;
+ margin-right: 1.2rem;
+ right: 0;
+ fill: var(--surface-color-primary-button-default);
+ pointer-events: none;
+}
+
+.c5 .react-datepicker__view-calendar-icon input {
+ padding: 0.8rem 1.2rem 0.8rem 1.2rem;
+}
+
+.c5 .react-datepicker-wrapper {
+ max-width: 17rem;
+}
+
+.c6.c6.form-control.is-valid {
+ background-image: none;
+}
+
+.c6.c6.form-control.is-invalid {
+ border-color: #d8292f !important;
+}
+
+.c14 {
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-flex-wrap: nowrap;
+ -ms-flex-wrap: nowrap;
+ flex-wrap: nowrap;
+}
+
+.c11 {
+ color: #474543;
+ font-size: 1.6rem;
+ -webkit-text-decoration: none;
+ text-decoration: none;
+}
+
+.c13.form-group {
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: -ms-flexbox;
+ display: flex;
+ margin-bottom: 0;
+}
+
+.c13.form-group .radio-group {
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-flex-direction: row;
+ -ms-flex-direction: row;
+ flex-direction: row;
+ row-gap: unset;
+ -webkit-column-gap: 0.4rem;
+ column-gap: 0.4rem;
+}
+
+.c13.form-group .radio-group .form-check {
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-align-items: center;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
+ -webkit-box-pack: center;
+ -webkit-justify-content: center;
+ -ms-flex-pack: center;
+ justify-content: center;
+}
+
+.c13.form-group .radio-group .form-check .form-check-input {
+ margin-left: 0;
+}
+
+.c13.form-group .radio-group .form-check-label {
+ margin-left: 1rem;
+}
+
+.c13 .form-label {
+ margin-bottom: unset;
+}
+
+.c7 {
+ position: relative;
+ border-radius: 0.4rem;
+ padding-top: 0.8rem;
+ padding-bottom: 0.8rem;
+ padding-left: 1.2rem;
+ padding-right: 2.8rem;
+ background-image: none;
+ color: #474543;
+ border: #606060 solid 0.1rem;
+ cursor: default;
+}
+
+.c7.is-invalid {
+ border: #CE3E39 solid 0.1rem;
+}
+
+.c9.c9.btn {
+ position: absolute;
+ top: calc(50% - 1.4rem);
+ padding-top: 0.8rem;
+ padding-bottom: 0.8rem;
+ padding-right: 1.2rem;
+ height: 1.6rem;
+ right: 0rem;
+ color: #9F9D9C;
+ -webkit-text-decoration: none;
+ text-decoration: none;
+ line-height: unset;
+}
+
+.c9.c9.btn .text {
+ display: none;
+}
+
+.c9.c9.btn:hover,
+.c9.c9.btn:active,
+.c9.c9.btn:focus {
+ color: #CE3E39;
+ -webkit-text-decoration: none;
+ text-decoration: none;
+ opacity: unset;
+}
+
+.c4 {
+ font-weight: bold;
+ color: var(--theme-blue-100);
+ border-bottom: 0.2rem var(--theme-blue-90) solid;
+ margin-bottom: 2rem;
+}
+
+.c1 {
+ margin: 1.6rem;
+ padding: 1.6rem;
+ background-color: white;
+ text-align: left;
+ border-radius: 0.5rem;
+}
+
+.c3.required::before {
+ content: '*';
+ position: absolute;
+ top: 0.75rem;
+ left: 0rem;
+}
+
+.c2 {
+ font-weight: bold;
+}
+
+.c17 {
+ background-color: none;
+}
+
+.c16 {
+ margin: 1.5rem;
+}
+
+.c12 {
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-flex-direction: row;
+ -ms-flex-direction: row;
+ flex-direction: row;
+ -webkit-box-pack: end;
+ -webkit-justify-content: end;
+ -ms-flex-pack: end;
+ justify-content: end;
+}
+
+.c15 {
+ font-size: 2rem;
+ font-weight: 700;
+ -webkit-text-decoration: none solid rgb(33,37,41);
+ text-decoration: none solid rgb(33,37,41);
+ line-height: 2rem;
+ margin-bottom: 1rem;
+}
+
+.c0 {
+ background-color: #f2f2f2;
+}
+
+.c0 [name='region'] {
+ max-width: 25rem;
+}
+
+
+
+`;
+
exports[`UpdateAcquisitionForm component > renders as expected 1`] = `
renders as expected 1`] = `
}
.c9.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +3866,8 @@ exports[`UpdateAcquisitionForm component > renders as expected 1`] = `
.c9.btn:disabled,
.c9.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +3875,6 @@ exports[`UpdateAcquisitionForm component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c9.Button .Button__icon {
@@ -954,6 +4630,122 @@ exports[`UpdateAcquisitionForm component > renders as expected 1`] = `
+
+
+
+ Estimated date:
+
+
+
+
+
+
+
+
+
+
+
+
+ Possession date:
+
+
+
+
!x.isEmpty())
.map
(x => x.toApi()),
@@ -105,6 +120,8 @@ export class UpdateAcquisitionSummaryFormModel
newForm.rowVersion = model.rowVersion ?? undefined;
newForm.assignedDate = model.assignedDate ?? undefined;
newForm.deliveryDate = model.deliveryDate ?? undefined;
+ newForm.estimatedCompletionDate = model.estimatedCompletionDate ?? undefined;
+ newForm.possessionDate = model.possessionDate ?? undefined;
newForm.fileStatusTypeCode = fromTypeCode(model.fileStatusTypeCode) ?? undefined;
newForm.acquisitionPhysFileStatusType =
fromTypeCode(model.acquisitionPhysFileStatusTypeCode) ?? undefined;
@@ -119,7 +136,15 @@ export class UpdateAcquisitionSummaryFormModel
? { id: model.project?.id || 0, text: model.project?.description || '' }
: undefined;
newForm.product = model.product?.id?.toString() ?? '';
-
+ // project and product read-only values for display on sub-files
+ newForm.formattedProject = exists(model.project)
+ ? model.project.code + ' - ' + model.project.description
+ : '';
+ newForm.formatterProduct = exists(model.product)
+ ? model.product.code + ' ' + model.product.description
+ : '';
+ newForm.subfileInterestTypeCode = fromTypeCode(model.subfileInterestTypeCode);
+ newForm.otherSubfileInterestType = model.otherSubfileInterestType;
const interestHolders = model.acquisitionFileInterestHolders?.map(x =>
InterestHolderForm.fromApi(x, x.interestHolderType?.id as InterestHolderType),
);
diff --git a/source/frontend/src/features/mapSideBar/acquisition/tabs/stakeholders/update/UpdateStakeHolderContainer.tsx b/source/frontend/src/features/mapSideBar/acquisition/tabs/stakeholders/update/UpdateStakeHolderContainer.tsx
index 0f2de791c9..59b711b035 100644
--- a/source/frontend/src/features/mapSideBar/acquisition/tabs/stakeholders/update/UpdateStakeHolderContainer.tsx
+++ b/source/frontend/src/features/mapSideBar/acquisition/tabs/stakeholders/update/UpdateStakeHolderContainer.tsx
@@ -46,7 +46,7 @@ export const UpdateStakeHolderContainer: React.FunctionComponent<
try {
if (acquisitionFile?.id) {
const stakeholders = StakeHolderForm.toApi(interestHolders);
- // Add the other non interest holder concats
+ // Add the other non interest holder contacts
const otherInterestHolders =
apiInterestHolders?.filter(
x => x.interestHolderType?.id !== InterestHolderType.INTEREST_HOLDER,
diff --git a/source/frontend/src/features/mapSideBar/acquisition/tabs/stakeholders/update/__snapshots__/UpdateStakeHolderForm.test.tsx.snap b/source/frontend/src/features/mapSideBar/acquisition/tabs/stakeholders/update/__snapshots__/UpdateStakeHolderForm.test.tsx.snap
index c6d9596f5c..737d6f49d9 100644
--- a/source/frontend/src/features/mapSideBar/acquisition/tabs/stakeholders/update/__snapshots__/UpdateStakeHolderForm.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/acquisition/tabs/stakeholders/update/__snapshots__/UpdateStakeHolderForm.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`UpdateStakeHolderForm component > renders as expected 1`] = `
}
.c7.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`UpdateStakeHolderForm component > renders as expected 1`] = `
.c7.btn:disabled,
.c7.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`UpdateStakeHolderForm component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c7.Button .Button__icon {
diff --git a/source/frontend/src/features/mapSideBar/acquisition/tabs/subFiles/SubFileListContainer.test.tsx b/source/frontend/src/features/mapSideBar/acquisition/tabs/subFiles/SubFileListContainer.test.tsx
index e66799ac6f..2537d79ffb 100644
--- a/source/frontend/src/features/mapSideBar/acquisition/tabs/subFiles/SubFileListContainer.test.tsx
+++ b/source/frontend/src/features/mapSideBar/acquisition/tabs/subFiles/SubFileListContainer.test.tsx
@@ -1,12 +1,17 @@
+import { createMemoryHistory } from 'history';
+
import Claims from '@/constants/claims';
-import SubFileListContainer, { ISubFileListContainerProps } from './SubFileListContainer';
-import { ISubFileListViewProps } from './SubFileListView';
-import { act, render, RenderOptions, waitFor, waitForEffects } from '@/utils/test-utils';
import {
mockAcquisitionFileResponse,
mockAcquisitionFileSubFilesResponse,
} from '@/mocks/acquisitionFiles.mock';
import { ApiGen_Concepts_AcquisitionFile } from '@/models/api/generated/ApiGen_Concepts_AcquisitionFile';
+import { act, render, RenderOptions, waitFor, waitForEffects } from '@/utils/test-utils';
+
+import SubFileListContainer, { ISubFileListContainerProps } from './SubFileListContainer';
+import { ISubFileListViewProps } from './SubFileListView';
+
+const history = createMemoryHistory();
const mockGetAcquisitionSubFilesApi = {
error: undefined,
@@ -30,12 +35,14 @@ vi.mock('@/hooks/repositories/useAcquisitionProvider', () => ({
}));
let viewProps: ISubFileListViewProps | null;
+
const TestView: React.FC = props => {
viewProps = props;
return Content Rendered;
};
+
describe('SubFileListContainer component', () => {
- const setup = async (
+ const setup = (
renderOptions: RenderOptions & {
props?: Partial;
} = {},
@@ -47,6 +54,7 @@ describe('SubFileListContainer component', () => {
/>,
{
useMockAuthentication: true,
+ history,
claims: renderOptions?.claims ?? [Claims.ACQUISITION_VIEW],
...renderOptions,
},
@@ -62,7 +70,7 @@ describe('SubFileListContainer component', () => {
});
it('renders the underlying view', async () => {
- const { getByText } = await setup();
+ const { getByText } = setup();
await act(async () => {});
expect(getByText(/Content Rendered/)).toBeVisible();
});
@@ -70,9 +78,7 @@ describe('SubFileListContainer component', () => {
it('makes the request to get the Acquisition Sub-Files', async () => {
mockGetAcquisitionSubFilesApi.execute.mockResolvedValue(mockAcquisitionFileSubFilesResponse());
- await act(async () => {
- setup({});
- });
+ setup();
await waitForEffects();
expect(mockGetAcquisitionSubFilesApi.execute).toHaveBeenCalledWith(1);
@@ -86,16 +92,24 @@ describe('SubFileListContainer component', () => {
mockGetAcquisitionFileApi.execute.mockResolvedValue(mockCurrentAcquisitionFile);
mockGetAcquisitionSubFilesApi.execute.mockResolvedValue(mockAcquisitionFileSubFilesResponse());
- await act(async () => {
- setup({
- props: {
- acquisitionFile: mockCurrentAcquisitionFile,
- },
- });
+ setup({
+ props: {
+ acquisitionFile: mockCurrentAcquisitionFile,
+ },
});
await waitForEffects();
expect(mockGetAcquisitionFileApi.execute).toHaveBeenCalledWith(1);
expect(mockGetAcquisitionSubFilesApi.execute).toHaveBeenCalledWith(1);
});
+
+ it('redirects to create acquisition form for sub-files', async () => {
+ setup({ props: { acquisitionFile: mockAcquisitionFileResponse(100) } });
+ await act(async () => {
+ viewProps.onAdd();
+ });
+
+ expect(history.location.pathname).toBe('/mapview/sidebar/acquisition/new');
+ expect(history.location.search).toBe('?parentId=100'); // parentId should be appended to the route
+ });
});
diff --git a/source/frontend/src/features/mapSideBar/acquisition/tabs/subFiles/SubFileListContainer.tsx b/source/frontend/src/features/mapSideBar/acquisition/tabs/subFiles/SubFileListContainer.tsx
index 9799bcde23..5f01f544a7 100644
--- a/source/frontend/src/features/mapSideBar/acquisition/tabs/subFiles/SubFileListContainer.tsx
+++ b/source/frontend/src/features/mapSideBar/acquisition/tabs/subFiles/SubFileListContainer.tsx
@@ -1,4 +1,5 @@
import { useCallback, useEffect, useState } from 'react';
+import { useHistory } from 'react-router-dom';
import { useAcquisitionProvider } from '@/hooks/repositories/useAcquisitionProvider';
import { ApiGen_Concepts_AcquisitionFile } from '@/models/api/generated/ApiGen_Concepts_AcquisitionFile';
@@ -15,6 +16,8 @@ export const SubFileListContainer: React.FunctionComponent {
+ const history = useHistory();
+
const [acquisitionSubFiles, setAcquisitionSubFiles] = useState<
ApiGen_Concepts_AcquisitionFile[] | null
>(null);
@@ -52,14 +55,14 @@ export const SubFileListContainer: React.FunctionComponent {
- // TODO: Here we will copy some data from main file into sub-file and redirect to "Create Acquisition File" for sub-file
- // This will be done in another pull-request.
- throw new Error('Function not implemented yet.');
+ const params = new URLSearchParams();
+ params.set('parentId', acquisitionFile.id.toString());
+ history.replace({
+ pathname: `/mapview/sidebar/acquisition/new`,
+ search: params.toString(),
+ });
};
useEffect(() => {
@@ -70,7 +73,7 @@ export const SubFileListContainer: React.FunctionComponent {
+describe('SubFileListView component', () => {
// render component under test
- const setup = async (
- renderOptions: RenderOptions & { props?: Partial },
+ const setup = (
+ renderOptions: RenderOptions & { props?: Partial } = {},
) => {
const mockCurrentAcquisitionFile = mockAcquisitionFileResponse(1, 'ACQ-200-01');
const utils = render(
@@ -29,46 +30,90 @@ describe('DocumentDetailForm component', () => {
/>,
{
...renderOptions,
+ useMockAuthentication: true,
+ claims: renderOptions.claims ?? [Claims.ACQUISITION_VIEW],
},
);
return {
...utils,
- useMockAuthentication: true,
};
};
- beforeEach(() => {
- mockKeycloak({ claims: [Claims.ACQUISITION_VIEW] });
- });
-
afterEach(() => {
vi.clearAllMocks();
});
- it('renders as expected', async () => {
- await setup({});
- expect(document.body).toMatchSnapshot();
+ it('renders as expected', () => {
+ const { asFragment } = setup();
+ expect(asFragment()).toMatchSnapshot();
});
- it('renders the parent file name in the header', async () => {
- const { getByTestId } = await setup({});
+ it('renders the parent file name in the header', () => {
+ const { getByTestId } = setup();
const linkedHeader = getByTestId('linked-files-header');
expect(linkedHeader).toHaveTextContent('1');
});
- it('renders the correct amount of rows', async () => {
- const { container } = await setup({});
+ it('renders the correct amount of rows', () => {
+ const { container } = setup();
const tableRows = container.querySelectorAll('.table .tbody .tr-wrapper');
expect(tableRows.length).toEqual(3);
});
it('displays the link for the relatives', async () => {
- const { getByTestId } = await setup({});
+ const { getByTestId } = setup();
const link = getByTestId('sub-file-link-65');
expect(link).toBeInTheDocument();
});
+
+ it('displays the "Add Sub-file" button only for main files', () => {
+ const { getByText } = setup({
+ props: {
+ acquisitionFile: {
+ ...mockAcquisitionFileResponse(1, 'ACQ-200-01'),
+ parentAcquisitionFileId: null,
+ },
+ },
+ claims: [Claims.ACQUISITION_ADD, Claims.ACQUISITION_VIEW],
+ });
+
+ const addButton = getByText(/Add Sub-interest File/i);
+ expect(addButton).toBeInTheDocument();
+ });
+
+ it('calls onAdd when "Add Sub-file" button is clicked', async () => {
+ const { getByText } = setup({
+ props: {
+ acquisitionFile: {
+ ...mockAcquisitionFileResponse(1, 'ACQ-200-01'),
+ parentAcquisitionFileId: null,
+ },
+ },
+ claims: [Claims.ACQUISITION_ADD, Claims.ACQUISITION_VIEW],
+ });
+
+ const addButton = getByText(/Add Sub-interest File/i);
+ expect(addButton).toBeInTheDocument();
+ await act(() => userEvent.click(addButton));
+ expect(onAdd).toHaveBeenCalled();
+ });
+
+ it('hides the "Add Sub-file" button when looking at a sub-file', () => {
+ const { queryByText } = setup({
+ props: {
+ acquisitionFile: {
+ ...mockAcquisitionFileResponse(1, 'ACQ-200-01'),
+ parentAcquisitionFileId: 100,
+ },
+ },
+ claims: [Claims.ACQUISITION_ADD, Claims.ACQUISITION_VIEW],
+ });
+
+ const addButton = queryByText(/Add Sub-interest File/i);
+ expect(addButton).toBeNull();
+ });
});
diff --git a/source/frontend/src/features/mapSideBar/acquisition/tabs/subFiles/SubFileListView.tsx b/source/frontend/src/features/mapSideBar/acquisition/tabs/subFiles/SubFileListView.tsx
index a38f7ee123..351685b1e1 100644
--- a/source/frontend/src/features/mapSideBar/acquisition/tabs/subFiles/SubFileListView.tsx
+++ b/source/frontend/src/features/mapSideBar/acquisition/tabs/subFiles/SubFileListView.tsx
@@ -40,12 +40,14 @@ export const SubFileListView: React.FunctionComponent = (
- {hasClaim(Claims.ACQUISITION_ADD) && exists(onAdd) && (
-
-
- Add Sub-interest File
-
- )}
+ {!exists(acquisitionFile.parentAcquisitionFileId) &&
+ hasClaim(Claims.ACQUISITION_ADD) &&
+ exists(onAdd) && (
+
+
+ Add Sub-interest File
+
+ )}
}
>
diff --git a/source/frontend/src/features/mapSideBar/acquisition/tabs/subFiles/__snapshots__/SubFileListView.test.tsx.snap b/source/frontend/src/features/mapSideBar/acquisition/tabs/subFiles/__snapshots__/SubFileListView.test.tsx.snap
index 580b2b20a3..9c6f2ac3b5 100644
--- a/source/frontend/src/features/mapSideBar/acquisition/tabs/subFiles/__snapshots__/SubFileListView.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/acquisition/tabs/subFiles/__snapshots__/SubFileListView.test.tsx.snap
@@ -1,7 +1,12 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
-exports[`DocumentDetailForm component > renders as expected 1`] = `
-.c0 {
+exports[`SubFileListView component > renders as expected 1`] = `
+
+
+
+ .c0 {
background-color: #f2f2f2;
padding-top: 1rem;
}
@@ -59,72 +64,115 @@ exports[`DocumentDetailForm component > renders as expected 1`] = `
align-items: center;
}
-
-
+
-
-
-
+
+
-
-
- Linked files
- :
-
-
+ Linked files:
+
+
+
+ 1
+
+
+
+
renders as expected 1`] = `
style="display: flex; flex: 1 0 auto; min-width: 65px;"
>
-
- 01
-
-
- ACQ-200-01
-
-
- Active
-
+
+ 01
+
+
+
-
-
-
-
- ACQ-200-01
-
-
- Active
-
+ ACQ-200-01
+
+
+ Active
+
+
-
-
- ACQ-200-02
-
-
- Active
-
+
+
+
+
+
+ ACQ-200-02
+
+
+ Active
+
+
-
-
- 1 - 3 of 3
-
-
-
-
+
+ 1 - 3 of 3
+
+
+
-
+
`;
diff --git a/source/frontend/src/features/mapSideBar/compensation/detail/__snapshots__/CompensationRequisitionDetailView.test.tsx.snap b/source/frontend/src/features/mapSideBar/compensation/detail/__snapshots__/CompensationRequisitionDetailView.test.tsx.snap
index d364da956a..660b7f0316 100644
--- a/source/frontend/src/features/mapSideBar/compensation/detail/__snapshots__/CompensationRequisitionDetailView.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/compensation/detail/__snapshots__/CompensationRequisitionDetailView.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`Compensation Detail View Component > renders as expected 1`] = `
}
.c7.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`Compensation Detail View Component > renders as expected 1`] = `
.c7.btn:disabled,
.c7.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`Compensation Detail View Component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c7.Button .Button__icon {
diff --git a/source/frontend/src/features/mapSideBar/compensation/update/__snapshots__/UpdateCompensationRequisitionForm.test.tsx.snap b/source/frontend/src/features/mapSideBar/compensation/update/__snapshots__/UpdateCompensationRequisitionForm.test.tsx.snap
index dffa7e52e7..5dd9499897 100644
--- a/source/frontend/src/features/mapSideBar/compensation/update/__snapshots__/UpdateCompensationRequisitionForm.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/compensation/update/__snapshots__/UpdateCompensationRequisitionForm.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`Compensation Requisition UpdateForm component > renders as expected 1`]
}
.c13.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`Compensation Requisition UpdateForm component > renders as expected 1`]
.c13.btn:disabled,
.c13.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`Compensation Requisition UpdateForm component > renders as expected 1`]
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c13.Button .Button__icon {
diff --git a/source/frontend/src/features/mapSideBar/compensation/update/financials/__snapshots__/FinancialActivitiesSubForm.test.tsx.snap b/source/frontend/src/features/mapSideBar/compensation/update/financials/__snapshots__/FinancialActivitiesSubForm.test.tsx.snap
index 32dba776e6..3299032942 100644
--- a/source/frontend/src/features/mapSideBar/compensation/update/financials/__snapshots__/FinancialActivitiesSubForm.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/compensation/update/financials/__snapshots__/FinancialActivitiesSubForm.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`FinancialActivitiesSubForm component > renders as expected 1`] = `
}
.c0.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`FinancialActivitiesSubForm component > renders as expected 1`] = `
.c0.btn:disabled,
.c0.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`FinancialActivitiesSubForm component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c0.Button .Button__icon {
diff --git a/source/frontend/src/features/mapSideBar/consolidation/__snapshots__/AddConsolidationView.test.tsx.snap b/source/frontend/src/features/mapSideBar/consolidation/__snapshots__/AddConsolidationView.test.tsx.snap
index 3f22569e5e..5cd900f462 100644
--- a/source/frontend/src/features/mapSideBar/consolidation/__snapshots__/AddConsolidationView.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/consolidation/__snapshots__/AddConsolidationView.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`Add Consolidation View > matches snapshot 1`] = `
}
.c4.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`Add Consolidation View > matches snapshot 1`] = `
.c4.btn:disabled,
.c4.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`Add Consolidation View > matches snapshot 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c4.Button .Button__icon {
@@ -240,6 +241,16 @@ exports[`Add Consolidation View > matches snapshot 1`] = `
margin: auto;
}
+.c8 {
+ width: 100%;
+ border-bottom: solid 0.5rem #3470B1;
+}
+
+.c7 {
+ font-size: 2.4rem;
+ cursor: pointer;
+}
+
.c18 {
font-weight: bold;
color: var(--theme-blue-100);
@@ -289,21 +300,27 @@ exports[`Add Consolidation View > matches snapshot 1`] = `
.c16 .nav-item {
color: var(--surface-color-primary-button-default);
min-width: 5rem;
- padding: 0.1rem 1.2rem;
+ padding: 0.1rem 1.3rem;
+ margin-bottom: 0.1rem;
+ margin-left: 0.1rem;
}
.c16 .nav-item:hover {
- color: var(--surface-color-primary-button-hover);
+ color: #f2f2f2;
+ background-color: #1e5189;
border-color: transparent;
-webkit-text-decoration: underline;
text-decoration: underline;
+ border-radius: 0.4rem;
+ text-shadow: 0.1rem 0 0 currentColor;
}
.c16 .nav-item.active {
- background-color: #f2f2f2;
- font-family: 'BCSans-Bold';
- color: var(--surface-color-primary-button-hover);
+ border-radius: 0.4rem;
+ color: #f2f2f2;
+ background-color: #053662;
border-color: transparent;
+ text-shadow: 0.1rem 0 0 currentColor;
}
.c15 {
@@ -379,16 +396,6 @@ exports[`Add Consolidation View > matches snapshot 1`] = `
display: contents;
}
-.c8 {
- width: 100%;
- border-bottom: solid 0.5rem #3470B1;
-}
-
-.c7 {
- font-size: 2.4rem;
- cursor: pointer;
-}
-
.c19 {
font-size: 1.6rem;
color: #9F9D9C;
diff --git a/source/frontend/src/features/mapSideBar/disposition/__snapshots__/DispositionView.test.tsx.snap b/source/frontend/src/features/mapSideBar/disposition/__snapshots__/DispositionView.test.tsx.snap
index 0f724d76e0..fe1a78c1ef 100644
--- a/source/frontend/src/features/mapSideBar/disposition/__snapshots__/DispositionView.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/disposition/__snapshots__/DispositionView.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`DispositionView component > renders as expected 1`] = `
}
.c3.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`DispositionView component > renders as expected 1`] = `
.c3.btn:disabled,
.c3.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`DispositionView component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c3.Button .Button__icon {
@@ -256,6 +257,16 @@ exports[`DispositionView component > renders as expected 1`] = `
margin: auto;
}
+.c7 {
+ width: 100%;
+ border-bottom: solid 0.5rem #3470B1;
+}
+
+.c6 {
+ font-size: 2.4rem;
+ cursor: pointer;
+}
+
.c4.btn.btn-light.Button {
padding: 0;
border: 0.1rem solid #9F9D9C;
@@ -325,16 +336,6 @@ exports[`DispositionView component > renders as expected 1`] = `
position: relative;
}
-.c7 {
- width: 100%;
- border-bottom: solid 0.5rem #3470B1;
-}
-
-.c6 {
- font-size: 2.4rem;
- cursor: pointer;
-}
-
.c27 {
height: 100%;
}
@@ -363,21 +364,27 @@ exports[`DispositionView component > renders as expected 1`] = `
.c28 .nav-item {
color: var(--surface-color-primary-button-default);
min-width: 5rem;
- padding: 0.1rem 1.2rem;
+ padding: 0.1rem 1.3rem;
+ margin-bottom: 0.1rem;
+ margin-left: 0.1rem;
}
.c28 .nav-item:hover {
- color: var(--surface-color-primary-button-hover);
+ color: #f2f2f2;
+ background-color: #1e5189;
border-color: transparent;
-webkit-text-decoration: underline;
text-decoration: underline;
+ border-radius: 0.4rem;
+ text-shadow: 0.1rem 0 0 currentColor;
}
.c28 .nav-item.active {
- background-color: #f2f2f2;
- font-family: 'BCSans-Bold';
- color: var(--surface-color-primary-button-hover);
+ border-radius: 0.4rem;
+ color: #f2f2f2;
+ background-color: #053662;
border-color: transparent;
+ text-shadow: 0.1rem 0 0 currentColor;
}
.c26 {
@@ -500,6 +507,7 @@ exports[`DispositionView component > renders as expected 1`] = `
}
.c21 {
+ font-size: 1.4rem;
font-weight: normal;
cursor: pointer;
padding-bottom: 0.5rem;
@@ -510,6 +518,10 @@ exports[`DispositionView component > renders as expected 1`] = `
cursor: default;
}
+.c21 div.Button__value {
+ font-size: 1.4rem;
+}
+
.c24 {
background-color: #fcba19;
font-size: 1.5rem;
@@ -554,7 +566,9 @@ exports[`DispositionView component > renders as expected 1`] = `
}
.c23 {
- font-size: 1.4rem;
+ font-weight: bold;
+ font-size: 1.6rem;
+ color: #474543;
line-height: 2.2rem;
}
@@ -830,27 +844,14 @@ exports[`DispositionView component > renders as expected 1`] = `
class="c21 no-gutters selected row"
data-testid="menu-item-row-0"
>
-
- File Summary
+
+ File Summary
+
renders as expected 1`] = `
- 013-852-752
+
+
+ 013-852-752
+
+
diff --git a/source/frontend/src/features/mapSideBar/disposition/add/__snapshots__/AddDispositionContainerView.test.tsx.snap b/source/frontend/src/features/mapSideBar/disposition/add/__snapshots__/AddDispositionContainerView.test.tsx.snap
index 84738c3498..cd410bbe9d 100644
--- a/source/frontend/src/features/mapSideBar/disposition/add/__snapshots__/AddDispositionContainerView.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/disposition/add/__snapshots__/AddDispositionContainerView.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`Add Disposition Container View > matches snapshot 1`] = `
}
.c3.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`Add Disposition Container View > matches snapshot 1`] = `
.c3.btn:disabled,
.c3.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`Add Disposition Container View > matches snapshot 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c3.Button .Button__icon {
@@ -293,6 +294,16 @@ exports[`Add Disposition Container View > matches snapshot 1`] = `
margin: auto;
}
+.c7 {
+ width: 100%;
+ border-bottom: solid 0.5rem #3470B1;
+}
+
+.c6 {
+ font-size: 2.4rem;
+ cursor: pointer;
+}
+
.c4.btn.btn-light.Button {
padding: 0;
border: 0.1rem solid #9F9D9C;
@@ -358,16 +369,6 @@ exports[`Add Disposition Container View > matches snapshot 1`] = `
display: contents;
}
-.c7 {
- width: 100%;
- border-bottom: solid 0.5rem #3470B1;
-}
-
-.c6 {
- font-size: 2.4rem;
- cursor: pointer;
-}
-
.c31 {
position: -webkit-sticky;
position: sticky;
@@ -475,21 +476,27 @@ exports[`Add Disposition Container View > matches snapshot 1`] = `
.c21 .nav-item {
color: var(--surface-color-primary-button-default);
min-width: 5rem;
- padding: 0.1rem 1.2rem;
+ padding: 0.1rem 1.3rem;
+ margin-bottom: 0.1rem;
+ margin-left: 0.1rem;
}
.c21 .nav-item:hover {
- color: var(--surface-color-primary-button-hover);
+ color: #f2f2f2;
+ background-color: #1e5189;
border-color: transparent;
-webkit-text-decoration: underline;
text-decoration: underline;
+ border-radius: 0.4rem;
+ text-shadow: 0.1rem 0 0 currentColor;
}
.c21 .nav-item.active {
- background-color: #f2f2f2;
- font-family: 'BCSans-Bold';
- color: var(--surface-color-primary-button-hover);
+ border-radius: 0.4rem;
+ color: #f2f2f2;
+ background-color: #053662;
border-color: transparent;
+ text-shadow: 0.1rem 0 0 currentColor;
}
.c20 {
diff --git a/source/frontend/src/features/mapSideBar/disposition/common/DispositionMenu.tsx b/source/frontend/src/features/mapSideBar/disposition/common/DispositionMenu.tsx
index 5e08467fe8..4df637f9e5 100644
--- a/source/frontend/src/features/mapSideBar/disposition/common/DispositionMenu.tsx
+++ b/source/frontend/src/features/mapSideBar/disposition/common/DispositionMenu.tsx
@@ -4,6 +4,7 @@ import { FaCaretRight } from 'react-icons/fa';
import styled from 'styled-components';
import { EditPropertiesIcon } from '@/components/common/buttons/EditPropertiesButton';
+import { LinkButton } from '@/components/common/buttons/LinkButton';
import EditButton from '@/components/common/EditButton';
import TooltipIcon from '@/components/common/TooltipIcon';
import { Claims, Roles } from '@/constants/index';
@@ -40,6 +41,7 @@ const DispositionMenu: React.FunctionComponent<
<>
{props.items.map((label: string, index: number) => {
+ const activeIndex = props.selectedIndex === index;
if (index === 0) {
return (
- {props.selectedIndex === index && }
- (props.selectedIndex !== index ? handleClick(index) : '')}>
- {label}
-
+ {activeIndex ? (
+
+ {label}
+
+ ) : (
+
+ handleClick(index)}>
+ {label}
+
+
+ )}
Properties
{hasClaim(Claims.DISPOSITION_EDIT) && canEditDetails() && (
@@ -83,7 +92,15 @@ const DispositionMenu: React.FunctionComponent<
{index}
- {label}
+ {activeIndex ? (
+
+ {label}
+
+ ) : (
+
+ {label}
+
+ )}
);
}
@@ -109,9 +126,14 @@ const StyledRow = styled(Row)`
cursor: default;
}
+ font-size: 1.4rem;
font-weight: normal;
cursor: pointer;
padding-bottom: 0.5rem;
+
+ div.Button__value {
+ font-size: 1.4rem;
+ }
`;
const StyledIconWrapper = styled.div`
@@ -140,7 +162,8 @@ const StyledMenuHeaderWrapper = styled.div`
`;
const StyledMenuHeader = styled.span`
- font-size: 1.4rem;
- color: ${props => props.theme.css.themeGray70};
+ font-weight: bold;
+ font-size: 1.6rem;
+ color: ${props => props.theme.bcTokens.iconsColorSecondary};
line-height: 2.2rem;
`;
diff --git a/source/frontend/src/features/mapSideBar/disposition/common/__snapshots__/DispositionMenu.test.tsx.snap b/source/frontend/src/features/mapSideBar/disposition/common/__snapshots__/DispositionMenu.test.tsx.snap
index 7b52fc3547..9401f7a652 100644
--- a/source/frontend/src/features/mapSideBar/disposition/common/__snapshots__/DispositionMenu.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/disposition/common/__snapshots__/DispositionMenu.test.tsx.snap
@@ -6,7 +6,215 @@ exports[`DispositionMenu component > matches snapshot 1`] = `
class="Toastify"
/>
- .c0 {
+ .c5.btn {
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-align-items: center;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
+ -webkit-box-pack: center;
+ -webkit-justify-content: center;
+ -ms-flex-pack: center;
+ justify-content: center;
+ padding: 0.4rem 1.2rem;
+ border: 0.2rem solid transparent;
+ border-radius: 0.4rem;
+ text-align: center;
+ -webkit-text-decoration: none;
+ text-decoration: none;
+ font-size: 1.8rem;
+ font-family: 'BCSans','Noto Sans',Verdana,Arial,sans-serif;
+ font-weight: 700;
+ -webkit-letter-spacing: 0.1rem;
+ -moz-letter-spacing: 0.1rem;
+ -ms-letter-spacing: 0.1rem;
+ letter-spacing: 0.1rem;
+ cursor: pointer;
+}
+
+.c5.btn .Button__value {
+ width: -webkit-max-content;
+ width: -moz-max-content;
+ width: max-content;
+}
+
+.c5.btn:hover {
+ -webkit-text-decoration: underline;
+ text-decoration: underline;
+ opacity: 0.8;
+}
+
+.c5.btn:focus {
+ outline-width: 2px;
+ outline-style: solid;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
+ box-shadow: none;
+}
+
+.c5.btn.btn-primary {
+ color: #FFFFFF;
+ background-color: #013366;
+}
+
+.c5.btn.btn-primary:hover,
+.c5.btn.btn-primary:active,
+.c5.btn.btn-primary:focus {
+ background-color: #1E5189;
+}
+
+.c5.btn.btn-secondary {
+ color: #013366;
+ background: none;
+ border-color: #013366;
+}
+
+.c5.btn.btn-secondary:hover,
+.c5.btn.btn-secondary:active,
+.c5.btn.btn-secondary:focus {
+ color: #FFFFFF;
+ background-color: #013366;
+}
+
+.c5.btn.btn-info {
+ color: #9F9D9C;
+ border: none;
+ background: none;
+ padding-left: 0.6rem;
+ padding-right: 0.6rem;
+}
+
+.c5.btn.btn-info:hover,
+.c5.btn.btn-info:active,
+.c5.btn.btn-info:focus {
+ color: var(--surface-color-primary-button-hover);
+ background: none;
+}
+
+.c5.btn.btn-light {
+ color: #FFFFFF;
+ background-color: #606060;
+ border: none;
+}
+
+.c5.btn.btn-light:hover,
+.c5.btn.btn-light:active,
+.c5.btn.btn-light:focus {
+ color: #FFFFFF;
+ background-color: #606060;
+}
+
+.c5.btn.btn-dark {
+ color: #FFFFFF;
+ background-color: #474543;
+ border: none;
+}
+
+.c5.btn.btn-dark:hover,
+.c5.btn.btn-dark:active,
+.c5.btn.btn-dark:focus {
+ color: #FFFFFF;
+ background-color: #474543;
+}
+
+.c5.btn.btn-danger {
+ color: #FFFFFF;
+ background-color: #CE3E39;
+}
+
+.c5.btn.btn-danger:hover,
+.c5.btn.btn-danger:active,
+.c5.btn.btn-danger:focus {
+ color: #FFFFFF;
+ background-color: #CE3E39;
+}
+
+.c5.btn.btn-warning {
+ color: #FFFFFF;
+ background-color: #FCBA19;
+ border-color: #FCBA19;
+}
+
+.c5.btn.btn-warning:hover,
+.c5.btn.btn-warning:active,
+.c5.btn.btn-warning:focus {
+ color: #FFFFFF;
+ border-color: #FCBA19;
+ background-color: #FCBA19;
+}
+
+.c5.btn.btn-link {
+ font-size: 1.6rem;
+ font-weight: 400;
+ color: var(--surface-color-primary-button-default);
+ background: none;
+ border: none;
+ -webkit-text-decoration: none;
+ text-decoration: none;
+ min-height: 2.5rem;
+ line-height: 3rem;
+ -webkit-box-pack: left;
+ -webkit-justify-content: left;
+ -ms-flex-pack: left;
+ justify-content: left;
+ -webkit-letter-spacing: unset;
+ -moz-letter-spacing: unset;
+ -ms-letter-spacing: unset;
+ letter-spacing: unset;
+ text-align: left;
+ padding: 0;
+ -webkit-text-decoration: underline;
+ text-decoration: underline;
+}
+
+.c5.btn.btn-link:hover,
+.c5.btn.btn-link:active,
+.c5.btn.btn-link:focus {
+ color: var(--surface-color-primary-button-hover);
+ -webkit-text-decoration: underline;
+ text-decoration: underline;
+ border: none;
+ background: none;
+ box-shadow: none;
+ outline: none;
+}
+
+.c5.btn.btn-link:disabled,
+.c5.btn.btn-link.disabled {
+ color: #9F9D9C;
+ background: none;
+ pointer-events: none;
+}
+
+.c5.btn:disabled,
+.c5.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
+ box-shadow: none;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ pointer-events: none;
+ cursor: not-allowed;
+}
+
+.c5.Button .Button__icon {
+ margin-right: 1.6rem;
+}
+
+.c5.Button--icon-only:focus {
+ outline: none;
+}
+
+.c5.Button--icon-only .Button__icon {
+ margin-right: 0;
+}
+
+.c0 {
text-align: left;
padding: 0px;
margin: 0px;
@@ -15,6 +223,7 @@ exports[`DispositionMenu component > matches snapshot 1`] = `
}
.c1 {
+ font-size: 1.4rem;
font-weight: normal;
cursor: pointer;
padding-bottom: 0.5rem;
@@ -25,6 +234,10 @@ exports[`DispositionMenu component > matches snapshot 1`] = `
cursor: default;
}
+.c1 div.Button__value {
+ font-size: 1.4rem;
+}
+
.c4 {
background-color: #fcba19;
font-size: 1.5rem;
@@ -69,7 +282,9 @@ exports[`DispositionMenu component > matches snapshot 1`] = `
}
.c3 {
- font-size: 1.4rem;
+ font-weight: bold;
+ font-size: 1.6rem;
+ color: #474543;
line-height: 2.2rem;
}
@@ -80,27 +295,14 @@ exports[`DispositionMenu component > matches snapshot 1`] = `
class="c1 no-gutters selected row"
data-testid="menu-item-row-0"
>
-
- one
+
+ one
+
diff --git a/source/frontend/src/features/mapSideBar/disposition/form/__snapshots__/DispositionPropertiesSubForm.test.tsx.snap b/source/frontend/src/features/mapSideBar/disposition/form/__snapshots__/DispositionPropertiesSubForm.test.tsx.snap
index d7db23e5bc..8b51008bc2 100644
--- a/source/frontend/src/features/mapSideBar/disposition/form/__snapshots__/DispositionPropertiesSubForm.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/disposition/form/__snapshots__/DispositionPropertiesSubForm.test.tsx.snap
@@ -53,10 +53,10 @@ exports[`DispositionPropertiesSubForm component > renders as expected 1`] = `
}
.c13.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -196,6 +196,8 @@ exports[`DispositionPropertiesSubForm component > renders as expected 1`] = `
.c13.btn:disabled,
.c13.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -203,7 +205,6 @@ exports[`DispositionPropertiesSubForm component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c13.Button .Button__icon {
@@ -325,21 +326,27 @@ exports[`DispositionPropertiesSubForm component > renders as expected 1`] = `
.c2 .nav-item {
color: var(--surface-color-primary-button-default);
min-width: 5rem;
- padding: 0.1rem 1.2rem;
+ padding: 0.1rem 1.3rem;
+ margin-bottom: 0.1rem;
+ margin-left: 0.1rem;
}
.c2 .nav-item:hover {
- color: var(--surface-color-primary-button-hover);
+ color: #f2f2f2;
+ background-color: #1e5189;
border-color: transparent;
-webkit-text-decoration: underline;
text-decoration: underline;
+ border-radius: 0.4rem;
+ text-shadow: 0.1rem 0 0 currentColor;
}
.c2 .nav-item.active {
- background-color: #f2f2f2;
- font-family: 'BCSans-Bold';
- color: var(--surface-color-primary-button-hover);
+ border-radius: 0.4rem;
+ color: #f2f2f2;
+ background-color: #053662;
border-color: transparent;
+ text-shadow: 0.1rem 0 0 currentColor;
}
.c1 {
@@ -922,10 +929,10 @@ exports[`DispositionPropertiesSubForm component > renders as expected 1`] = `
}
.c7.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -1065,6 +1072,8 @@ exports[`DispositionPropertiesSubForm component > renders as expected 1`] = `
.c7.btn:disabled,
.c7.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -1072,7 +1081,6 @@ exports[`DispositionPropertiesSubForm component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c7.Button .Button__icon {
diff --git a/source/frontend/src/features/mapSideBar/disposition/form/__snapshots__/DispositionTeamSubForm.test.tsx.snap b/source/frontend/src/features/mapSideBar/disposition/form/__snapshots__/DispositionTeamSubForm.test.tsx.snap
index fe0080d17a..4598e92e67 100644
--- a/source/frontend/src/features/mapSideBar/disposition/form/__snapshots__/DispositionTeamSubForm.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/disposition/form/__snapshots__/DispositionTeamSubForm.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`DispositionTeamSubForm component > renders as expected 1`] = `
}
.c0.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`DispositionTeamSubForm component > renders as expected 1`] = `
.c0.btn:disabled,
.c0.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`DispositionTeamSubForm component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c0.Button .Button__icon {
diff --git a/source/frontend/src/features/mapSideBar/disposition/tabs/__snapshots__/DispositionFileTabs.test.tsx.snap b/source/frontend/src/features/mapSideBar/disposition/tabs/__snapshots__/DispositionFileTabs.test.tsx.snap
index c4ee92c250..4c4b3fa4cc 100644
--- a/source/frontend/src/features/mapSideBar/disposition/tabs/__snapshots__/DispositionFileTabs.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/disposition/tabs/__snapshots__/DispositionFileTabs.test.tsx.snap
@@ -34,21 +34,27 @@ exports[`DispositionFileTabs component > matches snapshot 1`] = `
.c1 .nav-item {
color: var(--surface-color-primary-button-default);
min-width: 5rem;
- padding: 0.1rem 1.2rem;
+ padding: 0.1rem 1.3rem;
+ margin-bottom: 0.1rem;
+ margin-left: 0.1rem;
}
.c1 .nav-item:hover {
- color: var(--surface-color-primary-button-hover);
+ color: #f2f2f2;
+ background-color: #1e5189;
border-color: transparent;
-webkit-text-decoration: underline;
text-decoration: underline;
+ border-radius: 0.4rem;
+ text-shadow: 0.1rem 0 0 currentColor;
}
.c1 .nav-item.active {
- background-color: #f2f2f2;
- font-family: 'BCSans-Bold';
- color: var(--surface-color-primary-button-hover);
+ border-radius: 0.4rem;
+ color: #f2f2f2;
+ background-color: #053662;
border-color: transparent;
+ text-shadow: 0.1rem 0 0 currentColor;
}
.c2 {
diff --git a/source/frontend/src/features/mapSideBar/disposition/tabs/fileDetails/detail/update/__snapshots__/UpdateDispositionForm.test.tsx.snap b/source/frontend/src/features/mapSideBar/disposition/tabs/fileDetails/detail/update/__snapshots__/UpdateDispositionForm.test.tsx.snap
index e55267d74d..f0afac26cd 100644
--- a/source/frontend/src/features/mapSideBar/disposition/tabs/fileDetails/detail/update/__snapshots__/UpdateDispositionForm.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/disposition/tabs/fileDetails/detail/update/__snapshots__/UpdateDispositionForm.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`UpdateDispositionForm component > renders as expected 1`] = `
}
.c9.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`UpdateDispositionForm component > renders as expected 1`] = `
.c9.btn:disabled,
.c9.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`UpdateDispositionForm component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c9.Button .Button__icon {
diff --git a/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/dispositionOffer/dispositionOfferDetails/DispositionOfferDetails.tsx b/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/dispositionOffer/dispositionOfferDetails/DispositionOfferDetails.tsx
index ae466437c9..d5e97a9261 100644
--- a/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/dispositionOffer/dispositionOfferDetails/DispositionOfferDetails.tsx
+++ b/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/dispositionOffer/dispositionOfferDetails/DispositionOfferDetails.tsx
@@ -123,7 +123,7 @@ const DispositionOfferDetails: React.FunctionComponent
renders as expected 1`] = `
- Notes:
+ Comments:
= ({
diff --git a/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/dispositionOffer/models/DispositionOfferFormYupSchema.ts b/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/dispositionOffer/models/DispositionOfferFormYupSchema.ts
index 45b74ff8fa..81d7d96677 100644
--- a/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/dispositionOffer/models/DispositionOfferFormYupSchema.ts
+++ b/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/dispositionOffer/models/DispositionOfferFormYupSchema.ts
@@ -11,5 +11,8 @@ export const DispositionOfferFormYupSchema = yup.object().shape({
offerDate: yup.string().nullable().required('Offer Date is required'),
offerExpiryDate: yup.string().nullable(),
offerAmount: yup.string().nullable().required('Offer Price is required'),
- offerNote: yup.string().nullable().max(2000, 'Offer Price must be at most ${max} characters'),
+ offerNote: yup
+ .string()
+ .nullable()
+ .max(2000, 'Offer Price comments must be at most ${max} characters'),
});
diff --git a/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/dispositionSale/form/__snapshots__/DispositionSaleForm.test.tsx.snap b/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/dispositionSale/form/__snapshots__/DispositionSaleForm.test.tsx.snap
index 717a014aba..99ca504c50 100644
--- a/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/dispositionSale/form/__snapshots__/DispositionSaleForm.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/dispositionSale/form/__snapshots__/DispositionSaleForm.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`DispositionSaleForm component > renders as expected 1`] = `
}
.c4.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`DispositionSaleForm component > renders as expected 1`] = `
.c4.btn:disabled,
.c4.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`DispositionSaleForm component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c4.Button .Button__icon {
diff --git a/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/dispositionSale/update/__snapshots__/UpdateDispositionSaleView.test.tsx.snap b/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/dispositionSale/update/__snapshots__/UpdateDispositionSaleView.test.tsx.snap
index c4cdd8b368..a00a912865 100644
--- a/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/dispositionSale/update/__snapshots__/UpdateDispositionSaleView.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/dispositionSale/update/__snapshots__/UpdateDispositionSaleView.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`Update Disposition Sale View > renders as expected 1`] = `
}
.c6.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`Update Disposition Sale View > renders as expected 1`] = `
.c6.btn:disabled,
.c6.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`Update Disposition Sale View > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c6.Button .Button__icon {
diff --git a/source/frontend/src/features/mapSideBar/layout/MapSideBarLayout.tsx b/source/frontend/src/features/mapSideBar/layout/MapSideBarLayout.tsx
index 5432b529d0..792c8858c6 100644
--- a/source/frontend/src/features/mapSideBar/layout/MapSideBarLayout.tsx
+++ b/source/frontend/src/features/mapSideBar/layout/MapSideBarLayout.tsx
@@ -1,6 +1,5 @@
-import React from 'react';
+import React, { useCallback } from 'react';
import { Col, Row } from 'react-bootstrap';
-import { FaWindowClose } from 'react-icons/fa';
import styled from 'styled-components';
import { ExpandCollapseButton } from '@/components/common/buttons/ExpandCollapseButton';
@@ -23,8 +22,15 @@ export interface IMapSideBarLayoutProps {
*/
const MapSideBarLayout: React.FunctionComponent<
React.PropsWithChildren
-> = ({ title, header, icon, showCloseButton, ...props }) => {
+> = ({ title, header, icon, showCloseButton, onClose, ...props }) => {
const { mapSideBarViewState, toggleSidebarDisplay } = useMapStateMachine();
+
+ const close = useCallback(() => {
+ if (typeof onClose === 'function') {
+ onClose();
+ }
+ }, [onClose]);
+
return (
{mapSideBarViewState.isCollapsed ? (
@@ -34,7 +40,7 @@ const MapSideBarLayout: React.FunctionComponent<
{icon}
-
+
@@ -47,7 +53,7 @@ const MapSideBarLayout: React.FunctionComponent<
{showCloseButton && (
-
+
)}
@@ -80,12 +86,12 @@ const MapSideBarLayout: React.FunctionComponent<
{showCloseButton && (
-
+
)}
-
+
>
)}
@@ -135,15 +141,4 @@ const Header = styled.div`
const Footer = styled.div``;
-const Underline = styled.div`
- width: 100%;
- border-bottom: solid 0.5rem ${props => props.theme.bcTokens.themeBlue80};
-`;
-
-const CloseIcon = styled(FaWindowClose)`
- color: ${props => props.theme.css.textColor};
- font-size: 2.4rem;
- cursor: pointer;
-`;
-
export default MapSideBarLayout;
diff --git a/source/frontend/src/features/mapSideBar/layout/__snapshots__/MapSideBarLayout.test.tsx.snap b/source/frontend/src/features/mapSideBar/layout/__snapshots__/MapSideBarLayout.test.tsx.snap
index b0f3bd573c..945f73dd16 100644
--- a/source/frontend/src/features/mapSideBar/layout/__snapshots__/MapSideBarLayout.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/layout/__snapshots__/MapSideBarLayout.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`MapSideBarLayout component > matches snapshot 1`] = `
}
.c3.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`MapSideBarLayout component > matches snapshot 1`] = `
.c3.btn:disabled,
.c3.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`MapSideBarLayout component > matches snapshot 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c3.Button .Button__icon {
@@ -230,6 +231,11 @@ exports[`MapSideBarLayout component > matches snapshot 1`] = `
margin: auto;
}
+.c6 {
+ width: 100%;
+ border-bottom: solid 0.5rem #3470B1;
+}
+
.c4.btn.btn-light.Button {
padding: 0;
border: 0.1rem solid #9F9D9C;
@@ -295,11 +301,6 @@ exports[`MapSideBarLayout component > matches snapshot 1`] = `
display: contents;
}
-.c6 {
- width: 100%;
- border-bottom: solid 0.5rem #3470B1;
-}
-
diff --git a/source/frontend/src/features/mapSideBar/lease/LeaseContainer.tsx b/source/frontend/src/features/mapSideBar/lease/LeaseContainer.tsx
index e71ffb5784..72fd9d0a18 100644
--- a/source/frontend/src/features/mapSideBar/lease/LeaseContainer.tsx
+++ b/source/frontend/src/features/mapSideBar/lease/LeaseContainer.tsx
@@ -59,6 +59,7 @@ export interface LeasePageProps
{
onEdit?: (isEditing: boolean) => void;
formikRef: React.RefObject>;
onSuccess: () => void;
+ refreshLease?: () => void;
componentView: React.FunctionComponent>;
}
diff --git a/source/frontend/src/features/mapSideBar/lease/ViewSelector.tsx b/source/frontend/src/features/mapSideBar/lease/ViewSelector.tsx
index d06c7e0b6e..d153f62e96 100644
--- a/source/frontend/src/features/mapSideBar/lease/ViewSelector.tsx
+++ b/source/frontend/src/features/mapSideBar/lease/ViewSelector.tsx
@@ -32,6 +32,7 @@ export const ViewSelector: React.FunctionComponent = props =
onEdit={(isEditing: boolean) => props.setContainerState({ isEditing: isEditing })}
formikRef={props.formikRef}
onSuccess={props.onSuccess}
+ refreshLease={props.refreshLease}
componentView={activeLeasePage.componentView}
/>
);
diff --git a/source/frontend/src/features/mapSideBar/lease/common/LeaseHeader.test.tsx b/source/frontend/src/features/mapSideBar/lease/common/LeaseHeader.test.tsx
index 37f1c4e7e9..aa1076b48c 100644
--- a/source/frontend/src/features/mapSideBar/lease/common/LeaseHeader.test.tsx
+++ b/source/frontend/src/features/mapSideBar/lease/common/LeaseHeader.test.tsx
@@ -114,6 +114,44 @@ describe('LeaseHeader component', () => {
expect(getByText('Receivable')).toBeVisible();
});
+ it('renders whether the lease stakeholders label as "Tenant"', async () => {
+ const testLease = getMockApiLease();
+ const { getByText } = setup({
+ lease: {
+ ...testLease,
+ paymentReceivableType: {
+ id: ApiGen_CodeTypes_LeaseAccountTypes.RCVBL,
+ description: 'Receivable',
+ displayOrder: null,
+ isDisabled: false,
+ },
+ },
+ lastUpdatedBy: null,
+ });
+ await act(async () => {});
+
+ expect(getByText('Tenant:')).toBeInTheDocument();
+ });
+
+ it('renders whether the lease stakeholders label as "Payee"', async () => {
+ const testLease = getMockApiLease();
+ const { getByText } = setup({
+ lease: {
+ ...testLease,
+ paymentReceivableType: {
+ id: ApiGen_CodeTypes_LeaseAccountTypes.PYBLBCTFA,
+ description: 'Payable (BCTFA as tenant)',
+ displayOrder: null,
+ isDisabled: false,
+ },
+ },
+ lastUpdatedBy: null,
+ });
+ await act(async () => {});
+
+ expect(getByText('Payee:')).toBeInTheDocument();
+ });
+
it('renders indicator for EXPIRED leases', async () => {
const testLease = getMockApiLease();
const { getByText } = setup({
diff --git a/source/frontend/src/features/mapSideBar/lease/common/LeaseHeader.tsx b/source/frontend/src/features/mapSideBar/lease/common/LeaseHeader.tsx
index 4e58dcc96b..614f63f8f1 100644
--- a/source/frontend/src/features/mapSideBar/lease/common/LeaseHeader.tsx
+++ b/source/frontend/src/features/mapSideBar/lease/common/LeaseHeader.tsx
@@ -16,6 +16,7 @@ import { InlineFlexDiv } from '@/components/common/styles';
import { LeaseHeaderAddresses } from '@/features/leases/detail/LeaseHeaderAddresses';
import { getCalculatedExpiry } from '@/features/leases/leaseUtils';
import { Api_LastUpdatedBy } from '@/models/api/File';
+import { ApiGen_CodeTypes_LeasePaymentReceivableTypes } from '@/models/api/generated/ApiGen_CodeTypes_LeasePaymentReceivableTypes';
import { ApiGen_CodeTypes_LeaseStatusTypes } from '@/models/api/generated/ApiGen_CodeTypes_LeaseStatusTypes';
import { ApiGen_Concepts_Lease } from '@/models/api/generated/ApiGen_Concepts_Lease';
import { exists, prettyFormatDate } from '@/utils';
@@ -31,10 +32,12 @@ export interface ILeaseHeaderProps {
export const LeaseHeader: React.FC = ({ lease, lastUpdatedBy }) => {
const propertyIds = lease?.fileProperties?.map(fp => fp.propertyId) ?? [];
-
const calculatedExpiry = exists(lease) ? getCalculatedExpiry(lease, lease.renewals || []) : '';
-
const isExpired = moment().isAfter(moment(calculatedExpiry, 'YYYY-MM-DD'), 'day');
+ const stakeholdersLabel =
+ lease?.paymentReceivableType.id === ApiGen_CodeTypes_LeasePaymentReceivableTypes.RCVBL
+ ? 'Tenant:'
+ : 'Payee:';
return (
@@ -51,7 +54,7 @@ export const LeaseHeader: React.FC = ({ lease, lastUpdatedBy
delimiter={
}
/>
-
+
renders as expected when no data is provided 1`
}
.c3.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`LeaseHeader component > renders as expected when no data is provided 1`
.c3.btn:disabled,
.c3.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`LeaseHeader component > renders as expected when no data is provided 1`
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c3.Button .Button__icon {
diff --git a/source/frontend/src/features/mapSideBar/lease/detail/LeaseTab.tsx b/source/frontend/src/features/mapSideBar/lease/detail/LeaseTab.tsx
index a720d4d26b..dd3b4b438c 100644
--- a/source/frontend/src/features/mapSideBar/lease/detail/LeaseTab.tsx
+++ b/source/frontend/src/features/mapSideBar/lease/detail/LeaseTab.tsx
@@ -12,6 +12,7 @@ export interface ILeaseTabProps {
isEditing: boolean;
formikRef: React.RefObject>;
onSuccess: () => void;
+ refreshLease?: () => void;
}
export const LeaseTab: React.FC = ({
diff --git a/source/frontend/src/features/mapSideBar/lease/detail/LeaseTabsContainer.tsx b/source/frontend/src/features/mapSideBar/lease/detail/LeaseTabsContainer.tsx
index 1116d9138b..dc38be3e5f 100644
--- a/source/frontend/src/features/mapSideBar/lease/detail/LeaseTabsContainer.tsx
+++ b/source/frontend/src/features/mapSideBar/lease/detail/LeaseTabsContainer.tsx
@@ -68,38 +68,38 @@ export const LeaseTabsContainer: React.FC = ({
tabViews.push({
content: (
setContainerState({ isEditing: true })}
isEditing={isEditing}
formikRef={formikRef}
- onSuccess={onSuccess}
+ onSuccess={() => {
+ setContainerState({ isEditing: false });
+ refreshLease();
+ }}
/>
),
- key: LeaseFileTabNames.consultations,
- name: 'Approval/Consultations',
+ key: LeaseFileTabNames.checklist,
+ name: 'Checklist',
});
tabViews.push({
content: (
setContainerState({ isEditing: true })}
+ leasePage={leasePages.get(LeasePageNames.CONSULTATIONS)}
isEditing={isEditing}
formikRef={formikRef}
- onSuccess={() => {
- setContainerState({ isEditing: false });
- refreshLease();
- }}
+ onSuccess={onSuccess}
/>
),
- key: LeaseFileTabNames.checklist,
- name: 'Checklist',
+ key: LeaseFileTabNames.consultations,
+ name: 'Approval/Consultations',
});
tabViews.push({
content: (
= ({
isEditing={isEditing}
formikRef={formikRef}
onSuccess={onSuccess}
+ refreshLease={refreshLease}
/>
),
key: stakeholderPageName,
@@ -184,6 +185,25 @@ export const LeaseTabsContainer: React.FC = ({
name: 'Surplus Declaration',
});
+ if (
+ lease?.id &&
+ (lease.paymentReceivableType.id === ApiGen_CodeTypes_LeasePaymentReceivableTypes.PYBLBCTFA ||
+ lease.paymentReceivableType.id === ApiGen_CodeTypes_LeasePaymentReceivableTypes.PYBLMOTI) &&
+ hasClaim(Claims.COMPENSATION_REQUISITION_VIEW)
+ ) {
+ tabViews.push({
+ content: (
+
+ ),
+ key: LeaseFileTabNames.compensation,
+ name: 'Compensation',
+ });
+ }
+
if (lease?.id && hasClaim(Claims.DOCUMENT_VIEW)) {
tabViews.push({
content: (
@@ -209,25 +229,6 @@ export const LeaseTabsContainer: React.FC = ({
});
}
- if (
- lease?.id &&
- (lease.paymentReceivableType.id === ApiGen_CodeTypes_LeasePaymentReceivableTypes.PYBLBCTFA ||
- lease.paymentReceivableType.id === ApiGen_CodeTypes_LeasePaymentReceivableTypes.PYBLMOTI) &&
- hasClaim(Claims.COMPENSATION_REQUISITION_VIEW)
- ) {
- tabViews.push({
- content: (
-
- ),
- key: LeaseFileTabNames.compensation,
- name: 'Compensation',
- });
- }
-
const defaultTab = LeaseFileTabNames.fileDetails;
const onSetActiveTab = (tab: LeaseFileTabNames) => {
diff --git a/source/frontend/src/features/mapSideBar/lease/tabs/consultations/detail/__snapshots__/ConsultationListView.test.tsx.snap b/source/frontend/src/features/mapSideBar/lease/tabs/consultations/detail/__snapshots__/ConsultationListView.test.tsx.snap
index b34f1282a6..d4c38eb73c 100644
--- a/source/frontend/src/features/mapSideBar/lease/tabs/consultations/detail/__snapshots__/ConsultationListView.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/lease/tabs/consultations/detail/__snapshots__/ConsultationListView.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`ConsultationListView component > renders as expected 1`] = `
}
.c4.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`ConsultationListView component > renders as expected 1`] = `
.c4.btn:disabled,
.c4.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`ConsultationListView component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c4.Button .Button__icon {
diff --git a/source/frontend/src/features/mapSideBar/lease/tabs/consultations/edit/__snapshots__/ConsultationEditForm.test.tsx.snap b/source/frontend/src/features/mapSideBar/lease/tabs/consultations/edit/__snapshots__/ConsultationEditForm.test.tsx.snap
index 66dad1bb90..71fc342de4 100644
--- a/source/frontend/src/features/mapSideBar/lease/tabs/consultations/edit/__snapshots__/ConsultationEditForm.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/lease/tabs/consultations/edit/__snapshots__/ConsultationEditForm.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`ConsultationEditForm component > renders as expected 1`] = `
}
.c9.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`ConsultationEditForm component > renders as expected 1`] = `
.c9.btn:disabled,
.c9.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`ConsultationEditForm component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c9.Button .Button__icon {
diff --git a/source/frontend/src/features/mapSideBar/lease/tabs/consultations/edit/models.ts b/source/frontend/src/features/mapSideBar/lease/tabs/consultations/edit/models.ts
index 8c38b59d57..7215d981e5 100644
--- a/source/frontend/src/features/mapSideBar/lease/tabs/consultations/edit/models.ts
+++ b/source/frontend/src/features/mapSideBar/lease/tabs/consultations/edit/models.ts
@@ -29,7 +29,7 @@ export class ConsultationFormModel {
this.consultationTypeCode = '';
this.consultationTypeDescription = '';
this.consultationStatusTypeDescription = '';
- this.consultationOutcomeTypeCode = '';
+ this.consultationOutcomeTypeCode = 'INPROGRESS';
this.consultationOutcomeTypeCodeDescription = '';
this.otherDescription = '';
this.requestedOn = '';
diff --git a/source/frontend/src/features/mapSideBar/project/__snapshots__/ProjectContainerView.test.tsx.snap b/source/frontend/src/features/mapSideBar/project/__snapshots__/ProjectContainerView.test.tsx.snap
index 5a5d481a2f..f8b65e048c 100644
--- a/source/frontend/src/features/mapSideBar/project/__snapshots__/ProjectContainerView.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/project/__snapshots__/ProjectContainerView.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`ProjectSummaryView component > matches snapshot 1`] = `
}
.c3.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`ProjectSummaryView component > matches snapshot 1`] = `
.c3.btn:disabled,
.c3.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`ProjectSummaryView component > matches snapshot 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c3.Button .Button__icon {
@@ -240,6 +241,16 @@ exports[`ProjectSummaryView component > matches snapshot 1`] = `
margin: auto;
}
+.c7 {
+ width: 100%;
+ border-bottom: solid 0.5rem #3470B1;
+}
+
+.c6 {
+ font-size: 2.4rem;
+ cursor: pointer;
+}
+
.c4.btn.btn-light.Button {
padding: 0;
border: 0.1rem solid #9F9D9C;
@@ -309,16 +320,6 @@ exports[`ProjectSummaryView component > matches snapshot 1`] = `
position: relative;
}
-.c7 {
- width: 100%;
- border-bottom: solid 0.5rem #3470B1;
-}
-
-.c6 {
- font-size: 2.4rem;
- cursor: pointer;
-}
-
.c18 {
display: -webkit-box;
display: -webkit-flex;
@@ -418,21 +419,27 @@ exports[`ProjectSummaryView component > matches snapshot 1`] = `
.c20 .nav-item {
color: var(--surface-color-primary-button-default);
min-width: 5rem;
- padding: 0.1rem 1.2rem;
+ padding: 0.1rem 1.3rem;
+ margin-bottom: 0.1rem;
+ margin-left: 0.1rem;
}
.c20 .nav-item:hover {
- color: var(--surface-color-primary-button-hover);
+ color: #f2f2f2;
+ background-color: #1e5189;
border-color: transparent;
-webkit-text-decoration: underline;
text-decoration: underline;
+ border-radius: 0.4rem;
+ text-shadow: 0.1rem 0 0 currentColor;
}
.c20 .nav-item.active {
- background-color: #f2f2f2;
- font-family: 'BCSans-Bold';
- color: var(--surface-color-primary-button-hover);
+ border-radius: 0.4rem;
+ color: #f2f2f2;
+ background-color: #053662;
border-color: transparent;
+ text-shadow: 0.1rem 0 0 currentColor;
}
renders as expected 1`] = `
}
.c3.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`AddProjectContainer component > renders as expected 1`] = `
.c3.btn:disabled,
.c3.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`AddProjectContainer component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c3.Button .Button__icon {
@@ -234,6 +235,16 @@ exports[`AddProjectContainer component > renders as expected 1`] = `
margin: auto;
}
+.c7 {
+ width: 100%;
+ border-bottom: solid 0.5rem #3470B1;
+}
+
+.c6 {
+ font-size: 2.4rem;
+ cursor: pointer;
+}
+
.c4.btn.btn-light.Button {
padding: 0;
border: 0.1rem solid #9F9D9C;
@@ -299,16 +310,6 @@ exports[`AddProjectContainer component > renders as expected 1`] = `
display: contents;
}
-.c7 {
- width: 100%;
- border-bottom: solid 0.5rem #3470B1;
-}
-
-.c6 {
- font-size: 2.4rem;
- cursor: pointer;
-}
-
.c18 {
position: -webkit-sticky;
position: sticky;
diff --git a/source/frontend/src/features/mapSideBar/project/add/__snapshots__/AddProjectForm.test.tsx.snap b/source/frontend/src/features/mapSideBar/project/add/__snapshots__/AddProjectForm.test.tsx.snap
index 1ce12cd6f4..3018261e56 100644
--- a/source/frontend/src/features/mapSideBar/project/add/__snapshots__/AddProjectForm.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/project/add/__snapshots__/AddProjectForm.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`AddProjectForm component > renders as expected 1`] = `
}
.c7.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`AddProjectForm component > renders as expected 1`] = `
.c7.btn:disabled,
.c7.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`AddProjectForm component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c7.Button .Button__icon {
@@ -753,10 +754,10 @@ exports[`AddProjectForm component > renders as expected with existing data 1`] =
}
.c7.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -896,6 +897,8 @@ exports[`AddProjectForm component > renders as expected with existing data 1`] =
.c7.btn:disabled,
.c7.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -903,7 +906,6 @@ exports[`AddProjectForm component > renders as expected with existing data 1`] =
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c7.Button .Button__icon {
diff --git a/source/frontend/src/features/mapSideBar/project/tabs/__snapshots__/ProjectTabsContainer.test.tsx.snap b/source/frontend/src/features/mapSideBar/project/tabs/__snapshots__/ProjectTabsContainer.test.tsx.snap
index 8efcb2c386..5334cdd33d 100644
--- a/source/frontend/src/features/mapSideBar/project/tabs/__snapshots__/ProjectTabsContainer.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/project/tabs/__snapshots__/ProjectTabsContainer.test.tsx.snap
@@ -34,21 +34,27 @@ exports[`Project Tabs component > matches snapshot 1`] = `
.c1 .nav-item {
color: var(--surface-color-primary-button-default);
min-width: 5rem;
- padding: 0.1rem 1.2rem;
+ padding: 0.1rem 1.3rem;
+ margin-bottom: 0.1rem;
+ margin-left: 0.1rem;
}
.c1 .nav-item:hover {
- color: var(--surface-color-primary-button-hover);
+ color: #f2f2f2;
+ background-color: #1e5189;
border-color: transparent;
-webkit-text-decoration: underline;
text-decoration: underline;
+ border-radius: 0.4rem;
+ text-shadow: 0.1rem 0 0 currentColor;
}
.c1 .nav-item.active {
- background-color: #f2f2f2;
- font-family: 'BCSans-Bold';
- color: var(--surface-color-primary-button-hover);
+ border-radius: 0.4rem;
+ color: #f2f2f2;
+ background-color: #053662;
border-color: transparent;
+ text-shadow: 0.1rem 0 0 currentColor;
}
-
+
{getIn(ltsaData, 'parcelInfo.orderedProduct.fieldedData.miscellaneousNotes') ||
'None'}
diff --git a/source/frontend/src/features/mapSideBar/property/tabs/propertyDetails/detail/PropertyDetailsTabView.tsx b/source/frontend/src/features/mapSideBar/property/tabs/propertyDetails/detail/PropertyDetailsTabView.tsx
index bc0b199bb2..f2d743ff2f 100644
--- a/source/frontend/src/features/mapSideBar/property/tabs/propertyDetails/detail/PropertyDetailsTabView.tsx
+++ b/source/frontend/src/features/mapSideBar/property/tabs/propertyDetails/detail/PropertyDetailsTabView.tsx
@@ -229,7 +229,7 @@ export const PropertyDetailsTabView: React.FunctionComponent
-
+
diff --git a/source/frontend/src/features/mapSideBar/property/tabs/propertyDetails/update/UpdatePropertyDetailsContainer.test.tsx b/source/frontend/src/features/mapSideBar/property/tabs/propertyDetails/update/UpdatePropertyDetailsContainer.test.tsx
index 5497dde36e..ae2d4b32c3 100644
--- a/source/frontend/src/features/mapSideBar/property/tabs/propertyDetails/update/UpdatePropertyDetailsContainer.test.tsx
+++ b/source/frontend/src/features/mapSideBar/property/tabs/propertyDetails/update/UpdatePropertyDetailsContainer.test.tsx
@@ -153,7 +153,6 @@ const fakeProperty: ApiGen_Concepts_Property = {
pphStatusUpdateUserid: 'USER',
isRwyBeltDomPatent: false,
pphStatusTypeCode: 'Non-PPH',
-
address: {
...getEmptyAddress(),
id: 1,
@@ -161,12 +160,14 @@ const fakeProperty: ApiGen_Concepts_Property = {
streetAddress2: 'Living in a van',
streetAddress3: 'Down by the River',
municipality: 'Hollywood North',
+ provinceStateId: 1,
province: {
id: 1,
code: 'BC',
description: 'British Columbia',
displayOrder: 10,
},
+ countryId: 1,
country: {
id: 1,
code: 'CA',
@@ -292,9 +293,11 @@ describe('UpdatePropertyDetailsContainer component', () => {
streetAddress3: fakeProperty.address?.streetAddress3,
municipality: fakeProperty.address?.municipality,
postal: fakeProperty.address?.postal,
+ countryId: fakeProperty.address!.country!.id,
country: expect.objectContaining>({
id: fakeProperty.address!.country!.id,
}),
+ provinceStateId: fakeProperty.address!.province!.id,
province: expect.objectContaining>({
id: fakeProperty.address!.province!.id,
}),
@@ -324,9 +327,11 @@ describe('UpdatePropertyDetailsContainer component', () => {
streetAddress3: fakeProperty.address?.streetAddress3,
municipality: fakeProperty.address?.municipality,
postal: fakeProperty.address?.postal,
+ countryId: fakeProperty.address!.country!.id,
country: expect.objectContaining>({
id: fakeProperty.address!.country!.id,
}),
+ provinceStateId: fakeProperty.address!.province!.id,
province: expect.objectContaining>({
id: fakeProperty.address!.province!.id,
}),
diff --git a/source/frontend/src/features/mapSideBar/property/tabs/propertyDetails/update/UpdatePropertyDetailsContainer.tsx b/source/frontend/src/features/mapSideBar/property/tabs/propertyDetails/update/UpdatePropertyDetailsContainer.tsx
index 66f42f6464..7a71085dbc 100644
--- a/source/frontend/src/features/mapSideBar/property/tabs/propertyDetails/update/UpdatePropertyDetailsContainer.tsx
+++ b/source/frontend/src/features/mapSideBar/property/tabs/propertyDetails/update/UpdatePropertyDetailsContainer.tsx
@@ -106,14 +106,14 @@ export const UpdatePropertyDetailsContainer = React.forwardRef<
if (values.address !== undefined) {
values.address.province = {
id: Number(provinceBC?.id),
- code: null,
- description: null,
+ code: 'BC',
+ description: 'British Columbia',
displayOrder: null,
};
values.address.country = {
id: Number(countryCA?.id),
- code: null,
- description: null,
+ code: 'CA',
+ description: 'Canada',
displayOrder: null,
};
}
diff --git a/source/frontend/src/features/mapSideBar/property/tabs/propertyDetails/update/UpdatePropertyDetailsForm.test.tsx b/source/frontend/src/features/mapSideBar/property/tabs/propertyDetails/update/UpdatePropertyDetailsForm.test.tsx
index d557aaefff..cc18b55369 100644
--- a/source/frontend/src/features/mapSideBar/property/tabs/propertyDetails/update/UpdatePropertyDetailsForm.test.tsx
+++ b/source/frontend/src/features/mapSideBar/property/tabs/propertyDetails/update/UpdatePropertyDetailsForm.test.tsx
@@ -8,7 +8,7 @@ import { mockLookups } from '@/mocks/lookups.mock';
import { ApiGen_Concepts_Property } from '@/models/api/generated/ApiGen_Concepts_Property';
import { getEmptyBaseAudit, getEmptyProperty } from '@/models/defaultInitializers';
import { lookupCodesSlice } from '@/store/slices/lookupCodes';
-import { render, RenderOptions } from '@/utils/test-utils';
+import { render, RenderOptions, waitForEffects } from '@/utils/test-utils';
import { UpdatePropertyDetailsFormModel } from './models';
import { UpdatePropertyDetailsForm } from './UpdatePropertyDetailsForm';
@@ -134,7 +134,6 @@ const fakeProperty: ApiGen_Concepts_Property = {
pphStatusUpdateUserid: 'USER',
isRwyBeltDomPatent: false,
pphStatusTypeCode: 'Non-PPH',
-
address: {
...getEmptyAddress(),
id: 1,
@@ -142,12 +141,14 @@ const fakeProperty: ApiGen_Concepts_Property = {
streetAddress2: 'Living in a van',
streetAddress3: 'Down by the River',
municipality: 'Hollywood North',
+ provinceStateId: 1,
province: {
id: 1,
code: 'BC',
description: 'British Columbia',
displayOrder: 10,
},
+ countryId: 1,
country: {
id: 1,
code: 'CA',
@@ -231,6 +232,18 @@ describe('UpdatePropertyDetailsForm component', () => {
it('shows property address if available', () => {
const { container } = setup({ initialValues });
const addressLine1 = container.querySelector(`input[name='address.streetAddress1']`);
+ const province = container.querySelector(`select[name='address.provinceStateId']`);
+
expect(addressLine1).toHaveValue('45 - 904 Hollywood Crescent');
+ expect(province).toHaveValue('1');
+ });
+
+ it('province defaults to BC when null', () => {
+ initialValues.address.provinceStateId = null;
+ const { container } = setup({ initialValues });
+ waitForEffects();
+
+ const province = container.querySelector(`select[name='address.provinceStateId']`);
+ expect(province).toHaveValue('1');
});
});
diff --git a/source/frontend/src/features/mapSideBar/property/tabs/propertyDetails/update/UpdatePropertyDetailsForm.tsx b/source/frontend/src/features/mapSideBar/property/tabs/propertyDetails/update/UpdatePropertyDetailsForm.tsx
index 33ce1f1e3d..fe6f2e5b1f 100644
--- a/source/frontend/src/features/mapSideBar/property/tabs/propertyDetails/update/UpdatePropertyDetailsForm.tsx
+++ b/source/frontend/src/features/mapSideBar/property/tabs/propertyDetails/update/UpdatePropertyDetailsForm.tsx
@@ -42,13 +42,6 @@ export const UpdatePropertyDetailsForm: React.FunctionComponent<
const [showAddressLine3, setShowAddressLine3] = useState(false);
const address = values.address;
- useDeepCompareEffect(() => {
- if (address !== undefined) {
- setShowAddressLine2(!isEmpty(address.streetAddress2));
- setShowAddressLine3(!isEmpty(address.streetAddress3));
- }
- }, [address]);
-
// Lookup codes
const { getByType, getOptionsByType } = useLookupCodeHelpers();
const volumetricTypeOptions = getOptionsByType(API.PROPERTY_VOLUMETRIC_TYPES);
@@ -63,6 +56,7 @@ export const UpdatePropertyDetailsForm: React.FunctionComponent<
const roadTypeOptions = getByType(API.PROPERTY_ROAD_TYPES).map(x =>
PropertyRoadFormModel.fromLookup(x),
);
+ const provinceOptions = getOptionsByType(API.PROVINCE_TYPES);
const regionOptions = getOptionsByType(API.REGION_TYPES);
const districtOptions = getOptionsByType(API.DISTRICT_TYPES);
@@ -82,9 +76,17 @@ export const UpdatePropertyDetailsForm: React.FunctionComponent<
// volume measurements table inputs
const volumetricMeasurement = getIn(values, 'volumetricMeasurement') as number;
const volumetricUnit = getIn(values, 'volumetricUnitTypeCode') as string;
+ const provinceState = getIn(values, 'address.provinceStateId') as string | null;
const setFieldValue = formikProps.setFieldValue;
+ useDeepCompareEffect(() => {
+ if (address !== undefined) {
+ setShowAddressLine2(!isEmpty(address.streetAddress2));
+ setShowAddressLine3(!isEmpty(address.streetAddress3));
+ }
+ }, [address]);
+
// clear related fields when volumetric parcel radio changes
useEffect(() => {
if (!isVolumetricParcel) {
@@ -101,6 +103,12 @@ export const UpdatePropertyDetailsForm: React.FunctionComponent<
}
}, [isHighwayRoad, setFieldValue]);
+ useEffect(() => {
+ if (!provinceState) {
+ setFieldValue('address.provinceStateId', 1);
+ }
+ }, [provinceState, setFieldValue]);
+
const cannotDetermineInfoText =
'This means the property is out of bounds or there was an error at the time of determining this value. If needed, edit property details and pick the appropriate value to update it.';
@@ -169,6 +177,13 @@ export const UpdatePropertyDetailsForm: React.FunctionComponent<
+
+
+
@@ -177,10 +192,10 @@ export const UpdatePropertyDetailsForm: React.FunctionComponent<
-
+
-
+
@@ -208,7 +223,7 @@ export const UpdatePropertyDetailsForm: React.FunctionComponent<
-
+
{values.isALR ? 'Yes' : 'No'}
@@ -245,7 +260,7 @@ export const UpdatePropertyDetailsForm: React.FunctionComponent<
options={tenureOptions}
/>
-
+
{values?.pphStatusUpdateTimestamp && (
@@ -339,7 +354,7 @@ export const UpdatePropertyDetailsForm: React.FunctionComponent<
)}
-
+
diff --git a/source/frontend/src/features/mapSideBar/property/tabs/propertyDetails/update/__snapshots__/UpdatePropertyDetailsContainer.test.tsx.snap b/source/frontend/src/features/mapSideBar/property/tabs/propertyDetails/update/__snapshots__/UpdatePropertyDetailsContainer.test.tsx.snap
index ec487bc0b1..9bf2c14ce3 100644
--- a/source/frontend/src/features/mapSideBar/property/tabs/propertyDetails/update/__snapshots__/UpdatePropertyDetailsContainer.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/property/tabs/propertyDetails/update/__snapshots__/UpdatePropertyDetailsContainer.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`UpdatePropertyDetailsContainer component > renders as expected 1`] = `
}
.c7.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`UpdatePropertyDetailsContainer component > renders as expected 1`] = `
.c7.btn:disabled,
.c7.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`UpdatePropertyDetailsContainer component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c7.Button .Button__icon {
@@ -608,6 +609,507 @@ exports[`UpdatePropertyDetailsContainer component > renders as expected 1`] = `
+
+
+
+ Province:
+
+
+
+
+
+
+
+
@@ -693,7 +1195,7 @@ exports[`UpdatePropertyDetailsContainer component > renders as expected 1`] = `
- Historical File #:
+ Historical file #:
renders as expected 1`] = `
- Legal Description:
+ Legal description:
renders as expected 1`] = `
- Agricultural Land Reserve:
+ Agricultural land reserve:
renders as expected 1`] = `
- Provincial Public Hwy:
+ Provincial public hwy:
renders as expected 1`] = `
- Notes
+ Comments
diff --git a/source/frontend/src/features/mapSideBar/property/tabs/propertyDetails/update/__snapshots__/UpdatePropertyDetailsForm.test.tsx.snap b/source/frontend/src/features/mapSideBar/property/tabs/propertyDetails/update/__snapshots__/UpdatePropertyDetailsForm.test.tsx.snap
index aedd318f4d..70165f7fe2 100644
--- a/source/frontend/src/features/mapSideBar/property/tabs/propertyDetails/update/__snapshots__/UpdatePropertyDetailsForm.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/property/tabs/propertyDetails/update/__snapshots__/UpdatePropertyDetailsForm.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`UpdatePropertyDetailsForm component > renders as expected 1`] = `
}
.c6.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`UpdatePropertyDetailsForm component > renders as expected 1`] = `
.c6.btn:disabled,
.c6.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`UpdatePropertyDetailsForm component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c6.Button .Button__icon {
@@ -588,6 +589,507 @@ exports[`UpdatePropertyDetailsForm component > renders as expected 1`] = `
+
+
+
+ Province:
+
+
+
+
+
+
+
+
@@ -673,7 +1175,7 @@ exports[`UpdatePropertyDetailsForm component > renders as expected 1`] = `
- Historical File #:
+ Historical file #:
renders as expected 1`] = `
- Legal Description:
+ Legal description:
renders as expected 1`] = `
- Agricultural Land Reserve:
+ Agricultural land reserve:
renders as expected 1`] = `
- Provincial Public Hwy:
+ Provincial public hwy:
renders as expected 1`] = `
- Notes
+ Comments
diff --git a/source/frontend/src/features/mapSideBar/property/tabs/propertyDetails/update/models/UpdatePropertyDetailsFormModel.ts b/source/frontend/src/features/mapSideBar/property/tabs/propertyDetails/update/models/UpdatePropertyDetailsFormModel.ts
index b216ad5419..5ccbdb832c 100644
--- a/source/frontend/src/features/mapSideBar/property/tabs/propertyDetails/update/models/UpdatePropertyDetailsFormModel.ts
+++ b/source/frontend/src/features/mapSideBar/property/tabs/propertyDetails/update/models/UpdatePropertyDetailsFormModel.ts
@@ -29,7 +29,9 @@ export class AddressFormModel {
streetAddress3?: string;
municipality?: string;
postal?: string;
+ provinceStateId: number | null;
province?: ApiGen_Concepts_CodeType;
+ countryId: number | null;
country?: ApiGen_Concepts_CodeType;
static fromApi(apiAddress: ApiGen_Concepts_Address): AddressFormModel {
@@ -41,7 +43,9 @@ export class AddressFormModel {
model.streetAddress3 = apiAddress.streetAddress3 ?? undefined;
model.municipality = apiAddress.municipality ?? undefined;
model.postal = apiAddress.postal ?? undefined;
+ model.provinceStateId = apiAddress.provinceStateId;
model.province = apiAddress.province ?? undefined;
+ model.countryId = apiAddress.countryId;
model.country = apiAddress.country ?? undefined;
return model;
@@ -61,15 +65,15 @@ export class AddressFormModel {
streetAddress3: this.streetAddress3 ?? null,
municipality: this.municipality ?? null,
postal: this.postal ?? null,
+ provinceStateId: this.provinceStateId,
province: this.province ?? null,
+ countryId: this.countryId,
country: this.country ?? null,
comment: null,
- countryId: null,
countryOther: null,
district: null,
latitude: null,
longitude: null,
- provinceStateId: null,
region: null,
regionCode: null,
districtCode: null,
diff --git a/source/frontend/src/features/mapSideBar/property/tabs/propertyDetails/update/validation.ts b/source/frontend/src/features/mapSideBar/property/tabs/propertyDetails/update/validation.ts
index 515eb3f7a1..398d001dbb 100644
--- a/source/frontend/src/features/mapSideBar/property/tabs/propertyDetails/update/validation.ts
+++ b/source/frontend/src/features/mapSideBar/property/tabs/propertyDetails/update/validation.ts
@@ -28,7 +28,7 @@ export const UpdatePropertyDetailsYupSchema = Yup.object().shape({
then: Yup.string().required('Volumetric Type is required'),
otherwise: Yup.string().nullable(),
}),
- notes: Yup.string().max(4000, 'Notes must be less than 4000 characters'),
+ notes: Yup.string().max(4000, 'Comments must be less than 4000 characters'),
address: Yup.object().shape({
streetAddress1: Yup.string().max(200, 'Address (line 1) must be at most 200 characters'),
streetAddress2: Yup.string().max(200, 'Address (line 2) must be at most 200 characters'),
diff --git a/source/frontend/src/features/mapSideBar/property/tabs/propertyDetailsManagement/activity/edit/__snapshots__/InvoiceTotalsForm.test.tsx.snap b/source/frontend/src/features/mapSideBar/property/tabs/propertyDetailsManagement/activity/edit/__snapshots__/InvoiceTotalsForm.test.tsx.snap
index af7bab893c..1cca1678f6 100644
--- a/source/frontend/src/features/mapSideBar/property/tabs/propertyDetailsManagement/activity/edit/__snapshots__/InvoiceTotalsForm.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/property/tabs/propertyDetailsManagement/activity/edit/__snapshots__/InvoiceTotalsForm.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`EditPropertyActivity - InvoiceTotalsForm > renders as expected 1`] = `
}
.c3.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`EditPropertyActivity - InvoiceTotalsForm > renders as expected 1`] = `
.c3.btn:disabled,
.c3.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`EditPropertyActivity - InvoiceTotalsForm > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c3.Button .Button__icon {
diff --git a/source/frontend/src/features/mapSideBar/property/tabs/propertyDetailsManagement/activity/list/__snapshots__/ManagementActivitiesListView.test.tsx.snap b/source/frontend/src/features/mapSideBar/property/tabs/propertyDetailsManagement/activity/list/__snapshots__/ManagementActivitiesListView.test.tsx.snap
index bff8aebac4..a41945745b 100644
--- a/source/frontend/src/features/mapSideBar/property/tabs/propertyDetailsManagement/activity/list/__snapshots__/ManagementActivitiesListView.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/property/tabs/propertyDetailsManagement/activity/list/__snapshots__/ManagementActivitiesListView.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`Activities list view > renders as expected 1`] = `
}
.c8.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`Activities list view > renders as expected 1`] = `
.c8.btn:disabled,
.c8.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`Activities list view > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c8.Button .Button__icon {
diff --git a/source/frontend/src/features/mapSideBar/property/tabs/propertyDetailsManagement/detail/__snapshots__/PropertyContactListView.test.tsx.snap b/source/frontend/src/features/mapSideBar/property/tabs/propertyDetailsManagement/detail/__snapshots__/PropertyContactListView.test.tsx.snap
index 55b616a9ab..706536f8fa 100644
--- a/source/frontend/src/features/mapSideBar/property/tabs/propertyDetailsManagement/detail/__snapshots__/PropertyContactListView.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/property/tabs/propertyDetailsManagement/detail/__snapshots__/PropertyContactListView.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`PropertyContactListView component > renders as expected when provided v
}
.c3.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`PropertyContactListView component > renders as expected when provided v
.c3.btn:disabled,
.c3.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`PropertyContactListView component > renders as expected when provided v
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c3.Button .Button__icon {
diff --git a/source/frontend/src/features/mapSideBar/property/tabs/propertyResearch/detail/PropertyResearchTabView.tsx b/source/frontend/src/features/mapSideBar/property/tabs/propertyResearch/detail/PropertyResearchTabView.tsx
index 05aac501ae..e560c319a0 100644
--- a/source/frontend/src/features/mapSideBar/property/tabs/propertyResearch/detail/PropertyResearchTabView.tsx
+++ b/source/frontend/src/features/mapSideBar/property/tabs/propertyResearch/detail/PropertyResearchTabView.tsx
@@ -72,7 +72,7 @@ export const PropertyResearchTabView: React.FunctionComponent<
{detail.documentReference}
-
+
{detail.summaryNotes}
diff --git a/source/frontend/src/features/mapSideBar/property/tabs/propertyResearch/detail/__snapshots__/PropertyResearchTabView.test.tsx.snap b/source/frontend/src/features/mapSideBar/property/tabs/propertyResearch/detail/__snapshots__/PropertyResearchTabView.test.tsx.snap
index c58bed622f..8e892dc9ee 100644
--- a/source/frontend/src/features/mapSideBar/property/tabs/propertyResearch/detail/__snapshots__/PropertyResearchTabView.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/property/tabs/propertyResearch/detail/__snapshots__/PropertyResearchTabView.test.tsx.snap
@@ -204,7 +204,7 @@ exports[`PropertyResearchTabView component > renders as expected when provided v
- Summary notes:
+ Summary comments:
diff --git a/source/frontend/src/features/mapSideBar/property/tabs/propertyResearch/update/UpdatePropertyYupSchema.ts b/source/frontend/src/features/mapSideBar/property/tabs/propertyResearch/update/UpdatePropertyYupSchema.ts
index 1b538911f8..1f2553e3fd 100644
--- a/source/frontend/src/features/mapSideBar/property/tabs/propertyResearch/update/UpdatePropertyYupSchema.ts
+++ b/source/frontend/src/features/mapSideBar/property/tabs/propertyResearch/update/UpdatePropertyYupSchema.ts
@@ -3,5 +3,5 @@ import * as Yup from 'yup';
export const UpdatePropertyYupSchema = Yup.object().shape({
propertyName: Yup.string().max(500, 'Property name must be less than 500 characters'),
documentReference: Yup.string().max(2000, 'Document reference must be less than 2000 characters'),
- researchSummary: Yup.string().max(4000, 'Summary notes must be less than 4000 characters'),
+ researchSummary: Yup.string().max(4000, 'Summary comments must be less than 4000 characters'),
});
diff --git a/source/frontend/src/features/mapSideBar/property/tabs/propertyResearch/update/__snapshots__/UpdatePropertyForm.test.tsx.snap b/source/frontend/src/features/mapSideBar/property/tabs/propertyResearch/update/__snapshots__/UpdatePropertyForm.test.tsx.snap
index 3b738d33d3..576c6e7b1c 100644
--- a/source/frontend/src/features/mapSideBar/property/tabs/propertyResearch/update/__snapshots__/UpdatePropertyForm.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/property/tabs/propertyResearch/update/__snapshots__/UpdatePropertyForm.test.tsx.snap
@@ -435,7 +435,7 @@ exports[`UpdatePropertyForm component > renders as expected when provided no res
- Summary notes:
+ Summary comments:
renders as expected 1`] = `
}
.c3.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -186,6 +186,8 @@ exports[`ResearchContainer component > renders as expected 1`] = `
.c3.btn:disabled,
.c3.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -193,7 +195,6 @@ exports[`ResearchContainer component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c3.Button .Button__icon {
@@ -235,6 +236,16 @@ exports[`ResearchContainer component > renders as expected 1`] = `
margin: auto;
}
+.c7 {
+ width: 100%;
+ border-bottom: solid 0.5rem #3470B1;
+}
+
+.c6 {
+ font-size: 2.4rem;
+ cursor: pointer;
+}
+
.c26 {
display: -webkit-box;
display: -webkit-flex;
@@ -337,16 +348,6 @@ exports[`ResearchContainer component > renders as expected 1`] = `
position: relative;
}
-.c7 {
- width: 100%;
- border-bottom: solid 0.5rem #3470B1;
-}
-
-.c6 {
- font-size: 2.4rem;
- cursor: pointer;
-}
-
.c27 {
height: 100%;
}
@@ -375,21 +376,27 @@ exports[`ResearchContainer component > renders as expected 1`] = `
.c28 .nav-item {
color: var(--surface-color-primary-button-default);
min-width: 5rem;
- padding: 0.1rem 1.2rem;
+ padding: 0.1rem 1.3rem;
+ margin-bottom: 0.1rem;
+ margin-left: 0.1rem;
}
.c28 .nav-item:hover {
- color: var(--surface-color-primary-button-hover);
+ color: #f2f2f2;
+ background-color: #1e5189;
border-color: transparent;
-webkit-text-decoration: underline;
text-decoration: underline;
+ border-radius: 0.4rem;
+ text-shadow: 0.1rem 0 0 currentColor;
}
.c28 .nav-item.active {
- background-color: #f2f2f2;
- font-family: 'BCSans-Bold';
- color: var(--surface-color-primary-button-hover);
+ border-radius: 0.4rem;
+ color: #f2f2f2;
+ background-color: #053662;
border-color: transparent;
+ text-shadow: 0.1rem 0 0 currentColor;
}
.c29 {
@@ -490,6 +497,7 @@ exports[`ResearchContainer component > renders as expected 1`] = `
}
.c21 {
+ font-size: 1.4rem;
font-weight: normal;
cursor: pointer;
padding-bottom: 0.5rem;
@@ -500,6 +508,10 @@ exports[`ResearchContainer component > renders as expected 1`] = `
cursor: default;
}
+.c21 div.Button__value {
+ font-size: 1.4rem;
+}
+
.c24 {
background-color: #fcba19;
font-size: 1.5rem;
@@ -544,7 +556,9 @@ exports[`ResearchContainer component > renders as expected 1`] = `
}
.c23 {
- font-size: 1.4rem;
+ font-weight: bold;
+ font-size: 1.6rem;
+ color: #474543;
line-height: 2.2rem;
}
@@ -877,27 +891,14 @@ exports[`ResearchContainer component > renders as expected 1`] = `
class="c21 no-gutters selected row"
data-testid="menu-item-row-0"
>
-
- File Summary
+
+ File Summary
+
renders as expected 1`] = `
- 123-456-789
+
+
+ 123-456-789
+
+
@@ -1290,7 +1301,7 @@ exports[`ResearchContainer component > renders as expected 1`] = `
- Expropriation notes
+ Expropriation comments
:
diff --git a/source/frontend/src/features/mapSideBar/research/add/__snapshots__/AddResearchContainer.test.tsx.snap b/source/frontend/src/features/mapSideBar/research/add/__snapshots__/AddResearchContainer.test.tsx.snap
index 5cc629476d..b9d9148dc9 100644
--- a/source/frontend/src/features/mapSideBar/research/add/__snapshots__/AddResearchContainer.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/research/add/__snapshots__/AddResearchContainer.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`AddResearchContainer component > renders as expected 1`] = `
}
.c3.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`AddResearchContainer component > renders as expected 1`] = `
.c3.btn:disabled,
.c3.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`AddResearchContainer component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c3.Button .Button__icon {
@@ -263,6 +264,16 @@ exports[`AddResearchContainer component > renders as expected 1`] = `
margin: auto;
}
+.c7 {
+ width: 100%;
+ border-bottom: solid 0.5rem #3470B1;
+}
+
+.c6 {
+ font-size: 2.4rem;
+ cursor: pointer;
+}
+
.c4.btn.btn-light.Button {
padding: 0;
border: 0.1rem solid #9F9D9C;
@@ -328,16 +339,6 @@ exports[`AddResearchContainer component > renders as expected 1`] = `
display: contents;
}
-.c7 {
- width: 100%;
- border-bottom: solid 0.5rem #3470B1;
-}
-
-.c6 {
- font-size: 2.4rem;
- cursor: pointer;
-}
-
.c10 {
display: -webkit-box;
display: -webkit-flex;
@@ -484,21 +485,27 @@ exports[`AddResearchContainer component > renders as expected 1`] = `
.c22 .nav-item {
color: var(--surface-color-primary-button-default);
min-width: 5rem;
- padding: 0.1rem 1.2rem;
+ padding: 0.1rem 1.3rem;
+ margin-bottom: 0.1rem;
+ margin-left: 0.1rem;
}
.c22 .nav-item:hover {
- color: var(--surface-color-primary-button-hover);
+ color: #f2f2f2;
+ background-color: #1e5189;
border-color: transparent;
-webkit-text-decoration: underline;
text-decoration: underline;
+ border-radius: 0.4rem;
+ text-shadow: 0.1rem 0 0 currentColor;
}
.c22 .nav-item.active {
- background-color: #f2f2f2;
- font-family: 'BCSans-Bold';
- color: var(--surface-color-primary-button-hover);
+ border-radius: 0.4rem;
+ color: #f2f2f2;
+ background-color: #053662;
border-color: transparent;
+ text-shadow: 0.1rem 0 0 currentColor;
}
.c21 {
diff --git a/source/frontend/src/features/mapSideBar/research/add/__snapshots__/AddResearchForm.test.tsx.snap b/source/frontend/src/features/mapSideBar/research/add/__snapshots__/AddResearchForm.test.tsx.snap
index 94aef3b83f..225d3b7d71 100644
--- a/source/frontend/src/features/mapSideBar/research/add/__snapshots__/AddResearchForm.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/research/add/__snapshots__/AddResearchForm.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`AddResearchForm component > renders as expected 1`] = `
}
.c9.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`AddResearchForm component > renders as expected 1`] = `
.c9.btn:disabled,
.c9.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`AddResearchForm component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c9.Button .Button__icon {
@@ -366,21 +367,27 @@ exports[`AddResearchForm component > renders as expected 1`] = `
.c12 .nav-item {
color: var(--surface-color-primary-button-default);
min-width: 5rem;
- padding: 0.1rem 1.2rem;
+ padding: 0.1rem 1.3rem;
+ margin-bottom: 0.1rem;
+ margin-left: 0.1rem;
}
.c12 .nav-item:hover {
- color: var(--surface-color-primary-button-hover);
+ color: #f2f2f2;
+ background-color: #1e5189;
border-color: transparent;
-webkit-text-decoration: underline;
text-decoration: underline;
+ border-radius: 0.4rem;
+ text-shadow: 0.1rem 0 0 currentColor;
}
.c12 .nav-item.active {
- background-color: #f2f2f2;
- font-family: 'BCSans-Bold';
- color: var(--surface-color-primary-button-hover);
+ border-radius: 0.4rem;
+ color: #f2f2f2;
+ background-color: #053662;
border-color: transparent;
+ text-shadow: 0.1rem 0 0 currentColor;
}
.c11 {
diff --git a/source/frontend/src/features/mapSideBar/research/add/__snapshots__/ResearchProperties.test.tsx.snap b/source/frontend/src/features/mapSideBar/research/add/__snapshots__/ResearchProperties.test.tsx.snap
index f6b05dae06..18a0b00239 100644
--- a/source/frontend/src/features/mapSideBar/research/add/__snapshots__/ResearchProperties.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/research/add/__snapshots__/ResearchProperties.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`ResearchProperties component > renders as expected when provided no pro
}
.c14.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`ResearchProperties component > renders as expected when provided no pro
.c14.btn:disabled,
.c14.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`ResearchProperties component > renders as expected when provided no pro
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c14.Button .Button__icon {
@@ -427,21 +428,27 @@ exports[`ResearchProperties component > renders as expected when provided no pro
.c4 .nav-item {
color: var(--surface-color-primary-button-default);
min-width: 5rem;
- padding: 0.1rem 1.2rem;
+ padding: 0.1rem 1.3rem;
+ margin-bottom: 0.1rem;
+ margin-left: 0.1rem;
}
.c4 .nav-item:hover {
- color: var(--surface-color-primary-button-hover);
+ color: #f2f2f2;
+ background-color: #1e5189;
border-color: transparent;
-webkit-text-decoration: underline;
text-decoration: underline;
+ border-radius: 0.4rem;
+ text-shadow: 0.1rem 0 0 currentColor;
}
.c4 .nav-item.active {
- background-color: #f2f2f2;
- font-family: 'BCSans-Bold';
- color: var(--surface-color-primary-button-hover);
+ border-radius: 0.4rem;
+ color: #f2f2f2;
+ background-color: #053662;
border-color: transparent;
+ text-shadow: 0.1rem 0 0 currentColor;
}
.c3 {
diff --git a/source/frontend/src/features/mapSideBar/research/common/ResearchMenu.tsx b/source/frontend/src/features/mapSideBar/research/common/ResearchMenu.tsx
index 44a0ae82d7..d8acf4ae1d 100644
--- a/source/frontend/src/features/mapSideBar/research/common/ResearchMenu.tsx
+++ b/source/frontend/src/features/mapSideBar/research/common/ResearchMenu.tsx
@@ -2,6 +2,7 @@ import { Col, Row } from 'react-bootstrap';
import { FaCaretRight } from 'react-icons/fa';
import styled from 'styled-components';
+import { LinkButton } from '@/components/common/buttons';
import { EditPropertiesIcon } from '@/components/common/buttons/EditPropertiesButton';
import { EditButton } from '@/components/common/EditButton';
import { Claims } from '@/constants/index';
@@ -30,28 +31,54 @@ const ResearchMenu: React.FunctionComponent<
className={`no-gutters ${props.selectedIndex === index ? 'selected' : ''}`}
onClick={() => (props.selectedIndex !== index ? handleClick(index) : '')}
>
- {props.selectedIndex === index && }
{index !== 0 && (
-
-
- {index}
-
-
+ <>
+ {props.selectedIndex === index && }
+
+
+ {index}
+
+
+ {props.selectedIndex === index ? (
+
+ {label}
+
+ ) : (
+
+ handleClick(index)}>
+ {label}
+
+
+ )}
+ >
)}
- {label}
+
{index === 0 && (
-
- Properties
- {hasClaim(Claims.RESEARCH_EDIT) && (
- }
- onClick={() => {
- props.onEdit();
- }}
- />
+ <>
+ {props.selectedIndex === index ? (
+
+ {label}
+
+ ) : (
+
+ handleClick(index)}>
+ {label}
+
+
)}
-
+
+ Properties
+ {hasClaim(Claims.RESEARCH_EDIT) && (
+ }
+ onClick={() => {
+ props.onEdit();
+ }}
+ />
+ )}
+
+ >
)}
))}
@@ -74,10 +101,15 @@ const StyledRow = styled(Row)`
font-weight: bold;
cursor: default;
}
+
+ font-size: 1.4rem;
font-weight: normal;
cursor: pointer;
-
padding-bottom: 0.5rem;
+
+ div.Button__value {
+ font-size: 1.4rem;
+ }
`;
const StyledIconWrapper = styled.div`
@@ -109,7 +141,8 @@ const StyledMenuHeaderWrapper = styled.div`
`;
const StyledMenuHeader = styled.span`
- font-size: 1.4rem;
- color: ${props => props.theme.css.themeGray70};
+ font-weight: bold;
+ font-size: 1.6rem;
+ color: ${props => props.theme.bcTokens.iconsColorSecondary};
line-height: 2.2rem;
`;
diff --git a/source/frontend/src/features/mapSideBar/research/common/__snapshots__/ResearchMenu.test.tsx.snap b/source/frontend/src/features/mapSideBar/research/common/__snapshots__/ResearchMenu.test.tsx.snap
index fcf8a796ed..58b0128579 100644
--- a/source/frontend/src/features/mapSideBar/research/common/__snapshots__/ResearchMenu.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/research/common/__snapshots__/ResearchMenu.test.tsx.snap
@@ -6,7 +6,223 @@ exports[`ResearchMenu component > renders as expected when provided no research
class="Toastify"
/>
- .c0 {
+ .c6.btn {
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-align-items: center;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
+ -webkit-box-pack: center;
+ -webkit-justify-content: center;
+ -ms-flex-pack: center;
+ justify-content: center;
+ padding: 0.4rem 1.2rem;
+ border: 0.2rem solid transparent;
+ border-radius: 0.4rem;
+ text-align: center;
+ -webkit-text-decoration: none;
+ text-decoration: none;
+ font-size: 1.8rem;
+ font-family: 'BCSans','Noto Sans',Verdana,Arial,sans-serif;
+ font-weight: 700;
+ -webkit-letter-spacing: 0.1rem;
+ -moz-letter-spacing: 0.1rem;
+ -ms-letter-spacing: 0.1rem;
+ letter-spacing: 0.1rem;
+ cursor: pointer;
+}
+
+.c6.btn .Button__value {
+ width: -webkit-max-content;
+ width: -moz-max-content;
+ width: max-content;
+}
+
+.c6.btn:hover {
+ -webkit-text-decoration: underline;
+ text-decoration: underline;
+ opacity: 0.8;
+}
+
+.c6.btn:focus {
+ outline-width: 2px;
+ outline-style: solid;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
+ box-shadow: none;
+}
+
+.c6.btn.btn-primary {
+ color: #FFFFFF;
+ background-color: #013366;
+}
+
+.c6.btn.btn-primary:hover,
+.c6.btn.btn-primary:active,
+.c6.btn.btn-primary:focus {
+ background-color: #1E5189;
+}
+
+.c6.btn.btn-secondary {
+ color: #013366;
+ background: none;
+ border-color: #013366;
+}
+
+.c6.btn.btn-secondary:hover,
+.c6.btn.btn-secondary:active,
+.c6.btn.btn-secondary:focus {
+ color: #FFFFFF;
+ background-color: #013366;
+}
+
+.c6.btn.btn-info {
+ color: #9F9D9C;
+ border: none;
+ background: none;
+ padding-left: 0.6rem;
+ padding-right: 0.6rem;
+}
+
+.c6.btn.btn-info:hover,
+.c6.btn.btn-info:active,
+.c6.btn.btn-info:focus {
+ color: var(--surface-color-primary-button-hover);
+ background: none;
+}
+
+.c6.btn.btn-light {
+ color: #FFFFFF;
+ background-color: #606060;
+ border: none;
+}
+
+.c6.btn.btn-light:hover,
+.c6.btn.btn-light:active,
+.c6.btn.btn-light:focus {
+ color: #FFFFFF;
+ background-color: #606060;
+}
+
+.c6.btn.btn-dark {
+ color: #FFFFFF;
+ background-color: #474543;
+ border: none;
+}
+
+.c6.btn.btn-dark:hover,
+.c6.btn.btn-dark:active,
+.c6.btn.btn-dark:focus {
+ color: #FFFFFF;
+ background-color: #474543;
+}
+
+.c6.btn.btn-danger {
+ color: #FFFFFF;
+ background-color: #CE3E39;
+}
+
+.c6.btn.btn-danger:hover,
+.c6.btn.btn-danger:active,
+.c6.btn.btn-danger:focus {
+ color: #FFFFFF;
+ background-color: #CE3E39;
+}
+
+.c6.btn.btn-warning {
+ color: #FFFFFF;
+ background-color: #FCBA19;
+ border-color: #FCBA19;
+}
+
+.c6.btn.btn-warning:hover,
+.c6.btn.btn-warning:active,
+.c6.btn.btn-warning:focus {
+ color: #FFFFFF;
+ border-color: #FCBA19;
+ background-color: #FCBA19;
+}
+
+.c6.btn.btn-link {
+ font-size: 1.6rem;
+ font-weight: 400;
+ color: var(--surface-color-primary-button-default);
+ background: none;
+ border: none;
+ -webkit-text-decoration: none;
+ text-decoration: none;
+ min-height: 2.5rem;
+ line-height: 3rem;
+ -webkit-box-pack: left;
+ -webkit-justify-content: left;
+ -ms-flex-pack: left;
+ justify-content: left;
+ -webkit-letter-spacing: unset;
+ -moz-letter-spacing: unset;
+ -ms-letter-spacing: unset;
+ letter-spacing: unset;
+ text-align: left;
+ padding: 0;
+ -webkit-text-decoration: underline;
+ text-decoration: underline;
+}
+
+.c6.btn.btn-link:hover,
+.c6.btn.btn-link:active,
+.c6.btn.btn-link:focus {
+ color: var(--surface-color-primary-button-hover);
+ -webkit-text-decoration: underline;
+ text-decoration: underline;
+ border: none;
+ background: none;
+ box-shadow: none;
+ outline: none;
+}
+
+.c6.btn.btn-link:disabled,
+.c6.btn.btn-link.disabled {
+ color: #9F9D9C;
+ background: none;
+ pointer-events: none;
+}
+
+.c6.btn:disabled,
+.c6.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
+ box-shadow: none;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ pointer-events: none;
+ cursor: not-allowed;
+}
+
+.c6.Button .Button__icon {
+ margin-right: 1.6rem;
+}
+
+.c6.Button--icon-only:focus {
+ outline: none;
+}
+
+.c6.Button--icon-only .Button__icon {
+ margin-right: 0;
+}
+
+.c4 {
+ fill: #007bff;
+}
+
+.c4:hover {
+ fill: #0056b3;
+}
+
+.c0 {
text-align: left;
padding: 0px;
margin: 0px;
@@ -15,6 +231,7 @@ exports[`ResearchMenu component > renders as expected when provided no research
}
.c1 {
+ font-size: 1.4rem;
font-weight: normal;
cursor: pointer;
padding-bottom: 0.5rem;
@@ -25,7 +242,11 @@ exports[`ResearchMenu component > renders as expected when provided no research
cursor: default;
}
-.c4 {
+.c1 div.Button__value {
+ font-size: 1.4rem;
+}
+
+.c5 {
background-color: #fcba19;
font-size: 1.5rem;
border-radius: 50%;
@@ -47,7 +268,7 @@ exports[`ResearchMenu component > renders as expected when provided no research
align-items: center;
}
-.c4.selected {
+.c5.selected {
background-color: #FCBA19;
}
@@ -69,7 +290,9 @@ exports[`ResearchMenu component > renders as expected when provided no research
}
.c3 {
- font-size: 1.4rem;
+ font-weight: bold;
+ font-size: 1.6rem;
+ color: #474543;
line-height: 2.2rem;
}
@@ -80,27 +303,14 @@ exports[`ResearchMenu component > renders as expected when provided no research
class="c1 no-gutters selected row"
data-testid="menu-item-row-0"
>
-
- First label
+
+ First label
+
renders as expected when provided no research
type="button"
>
renders as expected when provided no research
class="pr-2 col-auto"
>
2
@@ -180,7 +400,17 @@ exports[`ResearchMenu component > renders as expected when provided no research
diff --git a/source/frontend/src/features/mapSideBar/research/common/updateProjects/__snapshots__/UpdateProjectsSubForm.test.tsx.snap b/source/frontend/src/features/mapSideBar/research/common/updateProjects/__snapshots__/UpdateProjectsSubForm.test.tsx.snap
index b4ac602261..e9858069f6 100644
--- a/source/frontend/src/features/mapSideBar/research/common/updateProjects/__snapshots__/UpdateProjectsSubForm.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/research/common/updateProjects/__snapshots__/UpdateProjectsSubForm.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`UpdateProjectsSubForm > renders as expected with minimal form data 1`]
}
.c0.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`UpdateProjectsSubForm > renders as expected with minimal form data 1`]
.c0.btn:disabled,
.c0.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`UpdateProjectsSubForm > renders as expected with minimal form data 1`]
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c0.Button .Button__icon {
@@ -275,10 +276,10 @@ exports[`UpdateProjectsSubForm > renders as expected with pre-existing form data
}
.c3.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -418,6 +419,8 @@ exports[`UpdateProjectsSubForm > renders as expected with pre-existing form data
.c3.btn:disabled,
.c3.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -425,7 +428,6 @@ exports[`UpdateProjectsSubForm > renders as expected with pre-existing form data
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c3.Button .Button__icon {
@@ -652,10 +654,10 @@ exports[`UpdateProjectsSubForm > renders as expected with pre-existing form data
}
.c0.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -795,6 +797,8 @@ exports[`UpdateProjectsSubForm > renders as expected with pre-existing form data
.c0.btn:disabled,
.c0.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -802,7 +806,6 @@ exports[`UpdateProjectsSubForm > renders as expected with pre-existing form data
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c0.Button .Button__icon {
diff --git a/source/frontend/src/features/mapSideBar/research/tabs/__snapshots__/ResearchTabsContainer.test.tsx.snap b/source/frontend/src/features/mapSideBar/research/tabs/__snapshots__/ResearchTabsContainer.test.tsx.snap
index e4a88361d7..080d30247d 100644
--- a/source/frontend/src/features/mapSideBar/research/tabs/__snapshots__/ResearchTabsContainer.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/research/tabs/__snapshots__/ResearchTabsContainer.test.tsx.snap
@@ -58,21 +58,27 @@ exports[`ResearchFileTabs component > matches snapshot 1`] = `
.c1 .nav-item {
color: var(--surface-color-primary-button-default);
min-width: 5rem;
- padding: 0.1rem 1.2rem;
+ padding: 0.1rem 1.3rem;
+ margin-bottom: 0.1rem;
+ margin-left: 0.1rem;
}
.c1 .nav-item:hover {
- color: var(--surface-color-primary-button-hover);
+ color: #f2f2f2;
+ background-color: #1e5189;
border-color: transparent;
-webkit-text-decoration: underline;
text-decoration: underline;
+ border-radius: 0.4rem;
+ text-shadow: 0.1rem 0 0 currentColor;
}
.c1 .nav-item.active {
- background-color: #f2f2f2;
- font-family: 'BCSans-Bold';
- color: var(--surface-color-primary-button-hover);
+ border-radius: 0.4rem;
+ color: #f2f2f2;
+ background-color: #053662;
border-color: transparent;
+ text-shadow: 0.1rem 0 0 currentColor;
}
.c7.required::before {
@@ -434,7 +440,7 @@ exports[`ResearchFileTabs component > matches snapshot 1`] = `
- Expropriation notes:
+ Expropriation comments:
=
{detail.isExpropriation ? 'Yes' : 'No'}
-
+
{detail.expropriationNotes}
diff --git a/source/frontend/src/features/mapSideBar/research/tabs/fileDetails/details/__snapshots__/ResearchSummaryView.test.tsx.snap b/source/frontend/src/features/mapSideBar/research/tabs/fileDetails/details/__snapshots__/ResearchSummaryView.test.tsx.snap
index f950fc2b23..a6392f5521 100644
--- a/source/frontend/src/features/mapSideBar/research/tabs/fileDetails/details/__snapshots__/ResearchSummaryView.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/research/tabs/fileDetails/details/__snapshots__/ResearchSummaryView.test.tsx.snap
@@ -355,7 +355,7 @@ exports[`ResearchSummaryView component > renders as expected when research file
- Expropriation notes:
+ Expropriation comments:
= prop
]}
/>
-
+
renders as expected when provided no res
}
.c10.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`UpdateResearchForm component > renders as expected when provided no res
.c10.btn:disabled,
.c10.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`UpdateResearchForm component > renders as expected when provided no res
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c10.Button .Button__icon {
@@ -1294,7 +1295,7 @@ exports[`UpdateResearchForm component > renders as expected when provided no res
- Expropriation notes:
+ Expropriation comments:
{
isConsolidation,
]);
- const onClose = () => {
- history.push('/mapview');
- setFile(undefined); // clean up file context when sidebar is closed
- };
+ const onClose = useCallback(
+ (nextLocation = '/mapview') => {
+ history.push(nextLocation);
+ setFile(undefined); // clean up file context when sidebar is closed
+ },
+ [history, setFile],
+ );
const pidQueryString = queryString.parse(location.search).pid?.toString() ?? '';
return (
@@ -209,7 +212,7 @@ export const MapRouter: React.FunctionComponent = memo(() => {
{
- history.replace(`/mapview/sidebar/acquisition/${newAcquisitionId}`);
+ history.push(`/mapview/sidebar/acquisition/${newAcquisitionId}`);
}}
/>
)}
diff --git a/source/frontend/src/features/mapSideBar/shared/update/properties/__snapshots__/UpdateProperties.test.tsx.snap b/source/frontend/src/features/mapSideBar/shared/update/properties/__snapshots__/UpdateProperties.test.tsx.snap
index 01ca787268..d410557f80 100644
--- a/source/frontend/src/features/mapSideBar/shared/update/properties/__snapshots__/UpdateProperties.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/shared/update/properties/__snapshots__/UpdateProperties.test.tsx.snap
@@ -43,10 +43,10 @@ exports[`UpdateProperties component > renders as expected 1`] = `
}
.c3.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -186,6 +186,8 @@ exports[`UpdateProperties component > renders as expected 1`] = `
.c3.btn:disabled,
.c3.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -193,7 +195,6 @@ exports[`UpdateProperties component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c3.Button .Button__icon {
@@ -358,6 +359,11 @@ exports[`UpdateProperties component > renders as expected 1`] = `
margin: auto;
}
+.c6 {
+ width: 100%;
+ border-bottom: solid 0.5rem #3470B1;
+}
+
.c23 {
font-weight: bold;
color: var(--theme-blue-100);
@@ -439,21 +445,27 @@ exports[`UpdateProperties component > renders as expected 1`] = `
.c11 .nav-item {
color: var(--surface-color-primary-button-default);
min-width: 5rem;
- padding: 0.1rem 1.2rem;
+ padding: 0.1rem 1.3rem;
+ margin-bottom: 0.1rem;
+ margin-left: 0.1rem;
}
.c11 .nav-item:hover {
- color: var(--surface-color-primary-button-hover);
+ color: #f2f2f2;
+ background-color: #1e5189;
border-color: transparent;
-webkit-text-decoration: underline;
text-decoration: underline;
+ border-radius: 0.4rem;
+ text-shadow: 0.1rem 0 0 currentColor;
}
.c11 .nav-item.active {
- background-color: #f2f2f2;
- font-family: 'BCSans-Bold';
- color: var(--surface-color-primary-button-hover);
+ border-radius: 0.4rem;
+ color: #f2f2f2;
+ background-color: #053662;
border-color: transparent;
+ text-shadow: 0.1rem 0 0 currentColor;
}
.c10 {
@@ -567,11 +579,6 @@ exports[`UpdateProperties component > renders as expected 1`] = `
display: contents;
}
-.c6 {
- width: 100%;
- border-bottom: solid 0.5rem #3470B1;
-}
-
.c31 {
position: -webkit-sticky;
position: sticky;
diff --git a/source/frontend/src/features/mapSideBar/subdivision/__snapshots__/AddSubdivisionView.test.tsx.snap b/source/frontend/src/features/mapSideBar/subdivision/__snapshots__/AddSubdivisionView.test.tsx.snap
index 7cf016fdff..d431da7d48 100644
--- a/source/frontend/src/features/mapSideBar/subdivision/__snapshots__/AddSubdivisionView.test.tsx.snap
+++ b/source/frontend/src/features/mapSideBar/subdivision/__snapshots__/AddSubdivisionView.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`Add Subdivision View > matches snapshot 1`] = `
}
.c4.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`Add Subdivision View > matches snapshot 1`] = `
.c4.btn:disabled,
.c4.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`Add Subdivision View > matches snapshot 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c4.Button .Button__icon {
@@ -240,6 +241,16 @@ exports[`Add Subdivision View > matches snapshot 1`] = `
margin: auto;
}
+.c8 {
+ width: 100%;
+ border-bottom: solid 0.5rem #3470B1;
+}
+
+.c7 {
+ font-size: 2.4rem;
+ cursor: pointer;
+}
+
.c18 {
font-weight: bold;
color: var(--theme-blue-100);
@@ -289,21 +300,27 @@ exports[`Add Subdivision View > matches snapshot 1`] = `
.c16 .nav-item {
color: var(--surface-color-primary-button-default);
min-width: 5rem;
- padding: 0.1rem 1.2rem;
+ padding: 0.1rem 1.3rem;
+ margin-bottom: 0.1rem;
+ margin-left: 0.1rem;
}
.c16 .nav-item:hover {
- color: var(--surface-color-primary-button-hover);
+ color: #f2f2f2;
+ background-color: #1e5189;
border-color: transparent;
-webkit-text-decoration: underline;
text-decoration: underline;
+ border-radius: 0.4rem;
+ text-shadow: 0.1rem 0 0 currentColor;
}
.c16 .nav-item.active {
- background-color: #f2f2f2;
- font-family: 'BCSans-Bold';
- color: var(--surface-color-primary-button-hover);
+ border-radius: 0.4rem;
+ color: #f2f2f2;
+ background-color: #053662;
border-color: transparent;
+ text-shadow: 0.1rem 0 0 currentColor;
}
.c15 {
@@ -379,16 +396,6 @@ exports[`Add Subdivision View > matches snapshot 1`] = `
display: contents;
}
-.c8 {
- width: 100%;
- border-bottom: solid 0.5rem #3470B1;
-}
-
-.c7 {
- font-size: 2.4rem;
- cursor: pointer;
-}
-
.c19 {
font-size: 1.6rem;
color: #9F9D9C;
diff --git a/source/frontend/src/features/notes/__snapshots__/NoteContainer.test.tsx.snap b/source/frontend/src/features/notes/__snapshots__/NoteContainer.test.tsx.snap
index 6924cb55f6..82a4152713 100644
--- a/source/frontend/src/features/notes/__snapshots__/NoteContainer.test.tsx.snap
+++ b/source/frontend/src/features/notes/__snapshots__/NoteContainer.test.tsx.snap
@@ -43,10 +43,10 @@ exports[`NoteContainer component > renders as expected 1`] = `
}
.c3.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -186,6 +186,8 @@ exports[`NoteContainer component > renders as expected 1`] = `
.c3.btn:disabled,
.c3.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -193,7 +195,6 @@ exports[`NoteContainer component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c3.Button .Button__icon {
@@ -209,7 +210,7 @@ exports[`NoteContainer component > renders as expected 1`] = `
}
.c5 {
- width: 2.4rem;
+ min-width: 2.4rem;
}
.c4 {
@@ -281,6 +282,14 @@ exports[`NoteContainer component > renders as expected 1`] = `
display: -webkit-inline-flex;
display: -ms-inline-flexbox;
display: inline-flex;
+ -webkit-box-pack: end;
+ -webkit-justify-content: flex-end;
+ -ms-flex-pack: end;
+ justify-content: flex-end;
+ -webkit-align-items: center;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
}
.c0 .modal-footer .button-wrap .Button {
diff --git a/source/frontend/src/features/notes/add/__snapshots__/AddNotesContainer.test.tsx.snap b/source/frontend/src/features/notes/add/__snapshots__/AddNotesContainer.test.tsx.snap
index b891c880ec..518b64f7c6 100644
--- a/source/frontend/src/features/notes/add/__snapshots__/AddNotesContainer.test.tsx.snap
+++ b/source/frontend/src/features/notes/add/__snapshots__/AddNotesContainer.test.tsx.snap
@@ -1,7 +1,7 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`AddNotesContainer component > renders as expected 1`] = `
-.c3.btn {
+.c4.btn {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
@@ -30,51 +30,51 @@ exports[`AddNotesContainer component > renders as expected 1`] = `
cursor: pointer;
}
-.c3.btn .Button__value {
+.c4.btn .Button__value {
width: -webkit-max-content;
width: -moz-max-content;
width: max-content;
}
-.c3.btn:hover {
+.c4.btn:hover {
-webkit-text-decoration: underline;
text-decoration: underline;
opacity: 0.8;
}
-.c3.btn:focus {
- outline-width: 0.4rem;
+.c4.btn:focus {
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
-.c3.btn.btn-primary {
+.c4.btn.btn-primary {
color: #FFFFFF;
background-color: #013366;
}
-.c3.btn.btn-primary:hover,
-.c3.btn.btn-primary:active,
-.c3.btn.btn-primary:focus {
+.c4.btn.btn-primary:hover,
+.c4.btn.btn-primary:active,
+.c4.btn.btn-primary:focus {
background-color: #1E5189;
}
-.c3.btn.btn-secondary {
+.c4.btn.btn-secondary {
color: #013366;
background: none;
border-color: #013366;
}
-.c3.btn.btn-secondary:hover,
-.c3.btn.btn-secondary:active,
-.c3.btn.btn-secondary:focus {
+.c4.btn.btn-secondary:hover,
+.c4.btn.btn-secondary:active,
+.c4.btn.btn-secondary:focus {
color: #FFFFFF;
background-color: #013366;
}
-.c3.btn.btn-info {
+.c4.btn.btn-info {
color: #9F9D9C;
border: none;
background: none;
@@ -82,66 +82,66 @@ exports[`AddNotesContainer component > renders as expected 1`] = `
padding-right: 0.6rem;
}
-.c3.btn.btn-info:hover,
-.c3.btn.btn-info:active,
-.c3.btn.btn-info:focus {
+.c4.btn.btn-info:hover,
+.c4.btn.btn-info:active,
+.c4.btn.btn-info:focus {
color: var(--surface-color-primary-button-hover);
background: none;
}
-.c3.btn.btn-light {
+.c4.btn.btn-light {
color: #FFFFFF;
background-color: #606060;
border: none;
}
-.c3.btn.btn-light:hover,
-.c3.btn.btn-light:active,
-.c3.btn.btn-light:focus {
+.c4.btn.btn-light:hover,
+.c4.btn.btn-light:active,
+.c4.btn.btn-light:focus {
color: #FFFFFF;
background-color: #606060;
}
-.c3.btn.btn-dark {
+.c4.btn.btn-dark {
color: #FFFFFF;
background-color: #474543;
border: none;
}
-.c3.btn.btn-dark:hover,
-.c3.btn.btn-dark:active,
-.c3.btn.btn-dark:focus {
+.c4.btn.btn-dark:hover,
+.c4.btn.btn-dark:active,
+.c4.btn.btn-dark:focus {
color: #FFFFFF;
background-color: #474543;
}
-.c3.btn.btn-danger {
+.c4.btn.btn-danger {
color: #FFFFFF;
background-color: #CE3E39;
}
-.c3.btn.btn-danger:hover,
-.c3.btn.btn-danger:active,
-.c3.btn.btn-danger:focus {
+.c4.btn.btn-danger:hover,
+.c4.btn.btn-danger:active,
+.c4.btn.btn-danger:focus {
color: #FFFFFF;
background-color: #CE3E39;
}
-.c3.btn.btn-warning {
+.c4.btn.btn-warning {
color: #FFFFFF;
background-color: #FCBA19;
border-color: #FCBA19;
}
-.c3.btn.btn-warning:hover,
-.c3.btn.btn-warning:active,
-.c3.btn.btn-warning:focus {
+.c4.btn.btn-warning:hover,
+.c4.btn.btn-warning:active,
+.c4.btn.btn-warning:focus {
color: #FFFFFF;
border-color: #FCBA19;
background-color: #FCBA19;
}
-.c3.btn.btn-link {
+.c4.btn.btn-link {
font-size: 1.6rem;
font-weight: 400;
color: var(--surface-color-primary-button-default);
@@ -165,9 +165,9 @@ exports[`AddNotesContainer component > renders as expected 1`] = `
text-decoration: underline;
}
-.c3.btn.btn-link:hover,
-.c3.btn.btn-link:active,
-.c3.btn.btn-link:focus {
+.c4.btn.btn-link:hover,
+.c4.btn.btn-link:active,
+.c4.btn.btn-link:focus {
color: var(--surface-color-primary-button-hover);
-webkit-text-decoration: underline;
text-decoration: underline;
@@ -177,15 +177,17 @@ exports[`AddNotesContainer component > renders as expected 1`] = `
outline: none;
}
-.c3.btn.btn-link:disabled,
-.c3.btn.btn-link.disabled {
+.c4.btn.btn-link:disabled,
+.c4.btn.btn-link.disabled {
color: #9F9D9C;
background: none;
pointer-events: none;
}
-.c3.btn:disabled,
-.c3.btn:disabled:hover {
+.c4.btn:disabled,
+.c4.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -193,23 +195,22 @@ exports[`AddNotesContainer component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
-.c3.Button .Button__icon {
+.c4.Button .Button__icon {
margin-right: 1.6rem;
}
-.c3.Button--icon-only:focus {
+.c4.Button--icon-only:focus {
outline: none;
}
-.c3.Button--icon-only .Button__icon {
+.c4.Button--icon-only .Button__icon {
margin-right: 0;
}
-.c4 {
- width: 2.4rem;
+.c3 {
+ min-width: 2.4rem;
}
.c2 {
@@ -281,6 +282,14 @@ exports[`AddNotesContainer component > renders as expected 1`] = `
display: -webkit-inline-flex;
display: -ms-inline-flexbox;
display: inline-flex;
+ -webkit-box-pack: end;
+ -webkit-justify-content: flex-end;
+ -ms-flex-pack: end;
+ justify-content: flex-end;
+ -webkit-align-items: center;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
}
.c0 .modal-footer .button-wrap .Button {
@@ -447,8 +456,11 @@ exports[`AddNotesContainer component > renders as expected 1`] = `
+
renders as expected 1`] = `
renders as expected 1`] = `
-.c3.btn {
+.c4.btn {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
@@ -30,51 +30,51 @@ exports[`AddNotesFormModal component > renders as expected 1`] = `
cursor: pointer;
}
-.c3.btn .Button__value {
+.c4.btn .Button__value {
width: -webkit-max-content;
width: -moz-max-content;
width: max-content;
}
-.c3.btn:hover {
+.c4.btn:hover {
-webkit-text-decoration: underline;
text-decoration: underline;
opacity: 0.8;
}
-.c3.btn:focus {
- outline-width: 0.4rem;
+.c4.btn:focus {
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
-.c3.btn.btn-primary {
+.c4.btn.btn-primary {
color: #FFFFFF;
background-color: #013366;
}
-.c3.btn.btn-primary:hover,
-.c3.btn.btn-primary:active,
-.c3.btn.btn-primary:focus {
+.c4.btn.btn-primary:hover,
+.c4.btn.btn-primary:active,
+.c4.btn.btn-primary:focus {
background-color: #1E5189;
}
-.c3.btn.btn-secondary {
+.c4.btn.btn-secondary {
color: #013366;
background: none;
border-color: #013366;
}
-.c3.btn.btn-secondary:hover,
-.c3.btn.btn-secondary:active,
-.c3.btn.btn-secondary:focus {
+.c4.btn.btn-secondary:hover,
+.c4.btn.btn-secondary:active,
+.c4.btn.btn-secondary:focus {
color: #FFFFFF;
background-color: #013366;
}
-.c3.btn.btn-info {
+.c4.btn.btn-info {
color: #9F9D9C;
border: none;
background: none;
@@ -82,66 +82,66 @@ exports[`AddNotesFormModal component > renders as expected 1`] = `
padding-right: 0.6rem;
}
-.c3.btn.btn-info:hover,
-.c3.btn.btn-info:active,
-.c3.btn.btn-info:focus {
+.c4.btn.btn-info:hover,
+.c4.btn.btn-info:active,
+.c4.btn.btn-info:focus {
color: var(--surface-color-primary-button-hover);
background: none;
}
-.c3.btn.btn-light {
+.c4.btn.btn-light {
color: #FFFFFF;
background-color: #606060;
border: none;
}
-.c3.btn.btn-light:hover,
-.c3.btn.btn-light:active,
-.c3.btn.btn-light:focus {
+.c4.btn.btn-light:hover,
+.c4.btn.btn-light:active,
+.c4.btn.btn-light:focus {
color: #FFFFFF;
background-color: #606060;
}
-.c3.btn.btn-dark {
+.c4.btn.btn-dark {
color: #FFFFFF;
background-color: #474543;
border: none;
}
-.c3.btn.btn-dark:hover,
-.c3.btn.btn-dark:active,
-.c3.btn.btn-dark:focus {
+.c4.btn.btn-dark:hover,
+.c4.btn.btn-dark:active,
+.c4.btn.btn-dark:focus {
color: #FFFFFF;
background-color: #474543;
}
-.c3.btn.btn-danger {
+.c4.btn.btn-danger {
color: #FFFFFF;
background-color: #CE3E39;
}
-.c3.btn.btn-danger:hover,
-.c3.btn.btn-danger:active,
-.c3.btn.btn-danger:focus {
+.c4.btn.btn-danger:hover,
+.c4.btn.btn-danger:active,
+.c4.btn.btn-danger:focus {
color: #FFFFFF;
background-color: #CE3E39;
}
-.c3.btn.btn-warning {
+.c4.btn.btn-warning {
color: #FFFFFF;
background-color: #FCBA19;
border-color: #FCBA19;
}
-.c3.btn.btn-warning:hover,
-.c3.btn.btn-warning:active,
-.c3.btn.btn-warning:focus {
+.c4.btn.btn-warning:hover,
+.c4.btn.btn-warning:active,
+.c4.btn.btn-warning:focus {
color: #FFFFFF;
border-color: #FCBA19;
background-color: #FCBA19;
}
-.c3.btn.btn-link {
+.c4.btn.btn-link {
font-size: 1.6rem;
font-weight: 400;
color: var(--surface-color-primary-button-default);
@@ -165,9 +165,9 @@ exports[`AddNotesFormModal component > renders as expected 1`] = `
text-decoration: underline;
}
-.c3.btn.btn-link:hover,
-.c3.btn.btn-link:active,
-.c3.btn.btn-link:focus {
+.c4.btn.btn-link:hover,
+.c4.btn.btn-link:active,
+.c4.btn.btn-link:focus {
color: var(--surface-color-primary-button-hover);
-webkit-text-decoration: underline;
text-decoration: underline;
@@ -177,15 +177,17 @@ exports[`AddNotesFormModal component > renders as expected 1`] = `
outline: none;
}
-.c3.btn.btn-link:disabled,
-.c3.btn.btn-link.disabled {
+.c4.btn.btn-link:disabled,
+.c4.btn.btn-link.disabled {
color: #9F9D9C;
background: none;
pointer-events: none;
}
-.c3.btn:disabled,
-.c3.btn:disabled:hover {
+.c4.btn:disabled,
+.c4.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -193,23 +195,22 @@ exports[`AddNotesFormModal component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
-.c3.Button .Button__icon {
+.c4.Button .Button__icon {
margin-right: 1.6rem;
}
-.c3.Button--icon-only:focus {
+.c4.Button--icon-only:focus {
outline: none;
}
-.c3.Button--icon-only .Button__icon {
+.c4.Button--icon-only .Button__icon {
margin-right: 0;
}
-.c4 {
- width: 2.4rem;
+.c3 {
+ min-width: 2.4rem;
}
.c2 {
@@ -281,6 +282,14 @@ exports[`AddNotesFormModal component > renders as expected 1`] = `
display: -webkit-inline-flex;
display: -ms-inline-flexbox;
display: inline-flex;
+ -webkit-box-pack: end;
+ -webkit-justify-content: flex-end;
+ -ms-flex-pack: end;
+ justify-content: flex-end;
+ -webkit-align-items: center;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
}
.c0 .modal-footer .button-wrap .Button {
@@ -446,8 +455,11 @@ exports[`AddNotesFormModal component > renders as expected 1`] = `
+
renders as expected 1`] = `
renders as expected 1`] = `
}
.c5.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -186,6 +186,8 @@ exports[`NoteDetailsFormModal component > renders as expected 1`] = `
.c5.btn:disabled,
.c5.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -193,7 +195,6 @@ exports[`NoteDetailsFormModal component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c5.Button .Button__icon {
@@ -209,7 +210,7 @@ exports[`NoteDetailsFormModal component > renders as expected 1`] = `
}
.c4 {
- width: 2.4rem;
+ min-width: 2.4rem;
}
.c3 {
@@ -281,6 +282,14 @@ exports[`NoteDetailsFormModal component > renders as expected 1`] = `
display: -webkit-inline-flex;
display: -ms-inline-flexbox;
display: inline-flex;
+ -webkit-box-pack: end;
+ -webkit-justify-content: flex-end;
+ -ms-flex-pack: end;
+ justify-content: flex-end;
+ -webkit-align-items: center;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
}
.c0 .modal-footer .button-wrap .Button {
diff --git a/source/frontend/src/features/notes/list/NoteResults/__snapshots__/NoteResults.test.tsx.snap b/source/frontend/src/features/notes/list/NoteResults/__snapshots__/NoteResults.test.tsx.snap
index fb004519fc..00fc875fc5 100644
--- a/source/frontend/src/features/notes/list/NoteResults/__snapshots__/NoteResults.test.tsx.snap
+++ b/source/frontend/src/features/notes/list/NoteResults/__snapshots__/NoteResults.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`Note Results Table > matches snapshot 1`] = `
}
.c5.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`Note Results Table > matches snapshot 1`] = `
.c5.btn:disabled,
.c5.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`Note Results Table > matches snapshot 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c5.Button .Button__icon {
diff --git a/source/frontend/src/features/notes/update/__snapshots__/UpdateNoteContainer.test.tsx.snap b/source/frontend/src/features/notes/update/__snapshots__/UpdateNoteContainer.test.tsx.snap
index 12f33ab33b..14502e1c20 100644
--- a/source/frontend/src/features/notes/update/__snapshots__/UpdateNoteContainer.test.tsx.snap
+++ b/source/frontend/src/features/notes/update/__snapshots__/UpdateNoteContainer.test.tsx.snap
@@ -1,7 +1,7 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`UpdateNoteContainer component > renders as expected 1`] = `
-.c3.btn {
+.c4.btn {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
@@ -30,51 +30,51 @@ exports[`UpdateNoteContainer component > renders as expected 1`] = `
cursor: pointer;
}
-.c3.btn .Button__value {
+.c4.btn .Button__value {
width: -webkit-max-content;
width: -moz-max-content;
width: max-content;
}
-.c3.btn:hover {
+.c4.btn:hover {
-webkit-text-decoration: underline;
text-decoration: underline;
opacity: 0.8;
}
-.c3.btn:focus {
- outline-width: 0.4rem;
+.c4.btn:focus {
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
-.c3.btn.btn-primary {
+.c4.btn.btn-primary {
color: #FFFFFF;
background-color: #013366;
}
-.c3.btn.btn-primary:hover,
-.c3.btn.btn-primary:active,
-.c3.btn.btn-primary:focus {
+.c4.btn.btn-primary:hover,
+.c4.btn.btn-primary:active,
+.c4.btn.btn-primary:focus {
background-color: #1E5189;
}
-.c3.btn.btn-secondary {
+.c4.btn.btn-secondary {
color: #013366;
background: none;
border-color: #013366;
}
-.c3.btn.btn-secondary:hover,
-.c3.btn.btn-secondary:active,
-.c3.btn.btn-secondary:focus {
+.c4.btn.btn-secondary:hover,
+.c4.btn.btn-secondary:active,
+.c4.btn.btn-secondary:focus {
color: #FFFFFF;
background-color: #013366;
}
-.c3.btn.btn-info {
+.c4.btn.btn-info {
color: #9F9D9C;
border: none;
background: none;
@@ -82,66 +82,66 @@ exports[`UpdateNoteContainer component > renders as expected 1`] = `
padding-right: 0.6rem;
}
-.c3.btn.btn-info:hover,
-.c3.btn.btn-info:active,
-.c3.btn.btn-info:focus {
+.c4.btn.btn-info:hover,
+.c4.btn.btn-info:active,
+.c4.btn.btn-info:focus {
color: var(--surface-color-primary-button-hover);
background: none;
}
-.c3.btn.btn-light {
+.c4.btn.btn-light {
color: #FFFFFF;
background-color: #606060;
border: none;
}
-.c3.btn.btn-light:hover,
-.c3.btn.btn-light:active,
-.c3.btn.btn-light:focus {
+.c4.btn.btn-light:hover,
+.c4.btn.btn-light:active,
+.c4.btn.btn-light:focus {
color: #FFFFFF;
background-color: #606060;
}
-.c3.btn.btn-dark {
+.c4.btn.btn-dark {
color: #FFFFFF;
background-color: #474543;
border: none;
}
-.c3.btn.btn-dark:hover,
-.c3.btn.btn-dark:active,
-.c3.btn.btn-dark:focus {
+.c4.btn.btn-dark:hover,
+.c4.btn.btn-dark:active,
+.c4.btn.btn-dark:focus {
color: #FFFFFF;
background-color: #474543;
}
-.c3.btn.btn-danger {
+.c4.btn.btn-danger {
color: #FFFFFF;
background-color: #CE3E39;
}
-.c3.btn.btn-danger:hover,
-.c3.btn.btn-danger:active,
-.c3.btn.btn-danger:focus {
+.c4.btn.btn-danger:hover,
+.c4.btn.btn-danger:active,
+.c4.btn.btn-danger:focus {
color: #FFFFFF;
background-color: #CE3E39;
}
-.c3.btn.btn-warning {
+.c4.btn.btn-warning {
color: #FFFFFF;
background-color: #FCBA19;
border-color: #FCBA19;
}
-.c3.btn.btn-warning:hover,
-.c3.btn.btn-warning:active,
-.c3.btn.btn-warning:focus {
+.c4.btn.btn-warning:hover,
+.c4.btn.btn-warning:active,
+.c4.btn.btn-warning:focus {
color: #FFFFFF;
border-color: #FCBA19;
background-color: #FCBA19;
}
-.c3.btn.btn-link {
+.c4.btn.btn-link {
font-size: 1.6rem;
font-weight: 400;
color: var(--surface-color-primary-button-default);
@@ -165,9 +165,9 @@ exports[`UpdateNoteContainer component > renders as expected 1`] = `
text-decoration: underline;
}
-.c3.btn.btn-link:hover,
-.c3.btn.btn-link:active,
-.c3.btn.btn-link:focus {
+.c4.btn.btn-link:hover,
+.c4.btn.btn-link:active,
+.c4.btn.btn-link:focus {
color: var(--surface-color-primary-button-hover);
-webkit-text-decoration: underline;
text-decoration: underline;
@@ -177,15 +177,17 @@ exports[`UpdateNoteContainer component > renders as expected 1`] = `
outline: none;
}
-.c3.btn.btn-link:disabled,
-.c3.btn.btn-link.disabled {
+.c4.btn.btn-link:disabled,
+.c4.btn.btn-link.disabled {
color: #9F9D9C;
background: none;
pointer-events: none;
}
-.c3.btn:disabled,
-.c3.btn:disabled:hover {
+.c4.btn:disabled,
+.c4.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -193,23 +195,22 @@ exports[`UpdateNoteContainer component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
-.c3.Button .Button__icon {
+.c4.Button .Button__icon {
margin-right: 1.6rem;
}
-.c3.Button--icon-only:focus {
+.c4.Button--icon-only:focus {
outline: none;
}
-.c3.Button--icon-only .Button__icon {
+.c4.Button--icon-only .Button__icon {
margin-right: 0;
}
-.c4 {
- width: 2.4rem;
+.c3 {
+ min-width: 2.4rem;
}
.c2 {
@@ -281,6 +282,14 @@ exports[`UpdateNoteContainer component > renders as expected 1`] = `
display: -webkit-inline-flex;
display: -ms-inline-flexbox;
display: inline-flex;
+ -webkit-box-pack: end;
+ -webkit-justify-content: flex-end;
+ -ms-flex-pack: end;
+ justify-content: flex-end;
+ -webkit-align-items: center;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
}
.c0 .modal-footer .button-wrap .Button {
@@ -519,8 +528,11 @@ exports[`UpdateNoteContainer component > renders as expected 1`] = `
+
renders as expected 1`] = `
renders as expected 1`] = `
-.c3.btn {
+.c4.btn {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
@@ -30,51 +30,51 @@ exports[`UpdateNoteFormModal component > renders as expected 1`] = `
cursor: pointer;
}
-.c3.btn .Button__value {
+.c4.btn .Button__value {
width: -webkit-max-content;
width: -moz-max-content;
width: max-content;
}
-.c3.btn:hover {
+.c4.btn:hover {
-webkit-text-decoration: underline;
text-decoration: underline;
opacity: 0.8;
}
-.c3.btn:focus {
- outline-width: 0.4rem;
+.c4.btn:focus {
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
-.c3.btn.btn-primary {
+.c4.btn.btn-primary {
color: #FFFFFF;
background-color: #013366;
}
-.c3.btn.btn-primary:hover,
-.c3.btn.btn-primary:active,
-.c3.btn.btn-primary:focus {
+.c4.btn.btn-primary:hover,
+.c4.btn.btn-primary:active,
+.c4.btn.btn-primary:focus {
background-color: #1E5189;
}
-.c3.btn.btn-secondary {
+.c4.btn.btn-secondary {
color: #013366;
background: none;
border-color: #013366;
}
-.c3.btn.btn-secondary:hover,
-.c3.btn.btn-secondary:active,
-.c3.btn.btn-secondary:focus {
+.c4.btn.btn-secondary:hover,
+.c4.btn.btn-secondary:active,
+.c4.btn.btn-secondary:focus {
color: #FFFFFF;
background-color: #013366;
}
-.c3.btn.btn-info {
+.c4.btn.btn-info {
color: #9F9D9C;
border: none;
background: none;
@@ -82,66 +82,66 @@ exports[`UpdateNoteFormModal component > renders as expected 1`] = `
padding-right: 0.6rem;
}
-.c3.btn.btn-info:hover,
-.c3.btn.btn-info:active,
-.c3.btn.btn-info:focus {
+.c4.btn.btn-info:hover,
+.c4.btn.btn-info:active,
+.c4.btn.btn-info:focus {
color: var(--surface-color-primary-button-hover);
background: none;
}
-.c3.btn.btn-light {
+.c4.btn.btn-light {
color: #FFFFFF;
background-color: #606060;
border: none;
}
-.c3.btn.btn-light:hover,
-.c3.btn.btn-light:active,
-.c3.btn.btn-light:focus {
+.c4.btn.btn-light:hover,
+.c4.btn.btn-light:active,
+.c4.btn.btn-light:focus {
color: #FFFFFF;
background-color: #606060;
}
-.c3.btn.btn-dark {
+.c4.btn.btn-dark {
color: #FFFFFF;
background-color: #474543;
border: none;
}
-.c3.btn.btn-dark:hover,
-.c3.btn.btn-dark:active,
-.c3.btn.btn-dark:focus {
+.c4.btn.btn-dark:hover,
+.c4.btn.btn-dark:active,
+.c4.btn.btn-dark:focus {
color: #FFFFFF;
background-color: #474543;
}
-.c3.btn.btn-danger {
+.c4.btn.btn-danger {
color: #FFFFFF;
background-color: #CE3E39;
}
-.c3.btn.btn-danger:hover,
-.c3.btn.btn-danger:active,
-.c3.btn.btn-danger:focus {
+.c4.btn.btn-danger:hover,
+.c4.btn.btn-danger:active,
+.c4.btn.btn-danger:focus {
color: #FFFFFF;
background-color: #CE3E39;
}
-.c3.btn.btn-warning {
+.c4.btn.btn-warning {
color: #FFFFFF;
background-color: #FCBA19;
border-color: #FCBA19;
}
-.c3.btn.btn-warning:hover,
-.c3.btn.btn-warning:active,
-.c3.btn.btn-warning:focus {
+.c4.btn.btn-warning:hover,
+.c4.btn.btn-warning:active,
+.c4.btn.btn-warning:focus {
color: #FFFFFF;
border-color: #FCBA19;
background-color: #FCBA19;
}
-.c3.btn.btn-link {
+.c4.btn.btn-link {
font-size: 1.6rem;
font-weight: 400;
color: var(--surface-color-primary-button-default);
@@ -165,9 +165,9 @@ exports[`UpdateNoteFormModal component > renders as expected 1`] = `
text-decoration: underline;
}
-.c3.btn.btn-link:hover,
-.c3.btn.btn-link:active,
-.c3.btn.btn-link:focus {
+.c4.btn.btn-link:hover,
+.c4.btn.btn-link:active,
+.c4.btn.btn-link:focus {
color: var(--surface-color-primary-button-hover);
-webkit-text-decoration: underline;
text-decoration: underline;
@@ -177,15 +177,17 @@ exports[`UpdateNoteFormModal component > renders as expected 1`] = `
outline: none;
}
-.c3.btn.btn-link:disabled,
-.c3.btn.btn-link.disabled {
+.c4.btn.btn-link:disabled,
+.c4.btn.btn-link.disabled {
color: #9F9D9C;
background: none;
pointer-events: none;
}
-.c3.btn:disabled,
-.c3.btn:disabled:hover {
+.c4.btn:disabled,
+.c4.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -193,23 +195,22 @@ exports[`UpdateNoteFormModal component > renders as expected 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
-.c3.Button .Button__icon {
+.c4.Button .Button__icon {
margin-right: 1.6rem;
}
-.c3.Button--icon-only:focus {
+.c4.Button--icon-only:focus {
outline: none;
}
-.c3.Button--icon-only .Button__icon {
+.c4.Button--icon-only .Button__icon {
margin-right: 0;
}
-.c4 {
- width: 2.4rem;
+.c3 {
+ min-width: 2.4rem;
}
.c2 {
@@ -281,6 +282,14 @@ exports[`UpdateNoteFormModal component > renders as expected 1`] = `
display: -webkit-inline-flex;
display: -ms-inline-flexbox;
display: inline-flex;
+ -webkit-box-pack: end;
+ -webkit-justify-content: flex-end;
+ -ms-flex-pack: end;
+ justify-content: flex-end;
+ -webkit-align-items: center;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
}
.c0 .modal-footer .button-wrap .Button {
@@ -518,8 +527,11 @@ exports[`UpdateNoteFormModal component > renders as expected 1`] = `
+
renders as expected 1`] = `
matches snapshot 1`] = `
}
.c2.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`Project Filter > matches snapshot 1`] = `
.c2.btn:disabled,
.c2.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`Project Filter > matches snapshot 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c2.Button .Button__icon {
diff --git a/source/frontend/src/features/projects/list/__snapshots__/ProjectListView.test.tsx.snap b/source/frontend/src/features/projects/list/__snapshots__/ProjectListView.test.tsx.snap
index 8561891242..b402766ec5 100644
--- a/source/frontend/src/features/projects/list/__snapshots__/ProjectListView.test.tsx.snap
+++ b/source/frontend/src/features/projects/list/__snapshots__/ProjectListView.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`Project List View > matches snapshot 1`] = `
}
.c7.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`Project List View > matches snapshot 1`] = `
.c7.btn:disabled,
.c7.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`Project List View > matches snapshot 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c7.Button .Button__icon {
diff --git a/source/frontend/src/features/properties/list/__snapshots__/PropertyListView.test.tsx.snap b/source/frontend/src/features/properties/list/__snapshots__/PropertyListView.test.tsx.snap
index c5ce83bf9c..4cbe486929 100644
--- a/source/frontend/src/features/properties/list/__snapshots__/PropertyListView.test.tsx.snap
+++ b/source/frontend/src/features/properties/list/__snapshots__/PropertyListView.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`Property list view > matches snapshot 1`] = `
}
.c4.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`Property list view > matches snapshot 1`] = `
.c4.btn:disabled,
.c4.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`Property list view > matches snapshot 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c4.Button .Button__icon {
diff --git a/source/frontend/src/features/properties/map/MapContainer.test.tsx b/source/frontend/src/features/properties/map/MapContainer.test.tsx
index 601c90e4c0..10f1388f13 100644
--- a/source/frontend/src/features/properties/map/MapContainer.test.tsx
+++ b/source/frontend/src/features/properties/map/MapContainer.test.tsx
@@ -35,6 +35,7 @@ import { useApiProperties } from '@/hooks/pims-api/useApiProperties';
import { ApiGen_Base_Page } from '@/models/api/generated/ApiGen_Base_Page';
import { ApiGen_Concepts_Property } from '@/models/api/generated/ApiGen_Concepts_Property';
import MapContainer from './MapContainer';
+import { PropertyFilterFormModel } from '@/components/maps/leaflet/Control/AdvancedFilter/models';
const mockAxios = new MockAdapter(axios);
@@ -87,17 +88,17 @@ interface ParcelSeed {
}
export const largeMockParcels: ParcelSeed[] = [
- { id: 1, latitude: 53.917061, longitude: -122.749672 },
- { id: 2, latitude: 53.917062, longitude: -122.749692 },
- { id: 3, latitude: 53.917063, longitude: -122.749682 },
- { id: 4, latitude: 53.917064, longitude: -122.749672 },
- { id: 5, latitude: 53.917065, longitude: -122.749662 },
- { id: 6, latitude: 53.917066, longitude: -122.749652 },
- { id: 7, latitude: 53.917067, longitude: -122.749642 },
- { id: 8, latitude: 53.917068, longitude: -122.749632 },
- { id: 9, latitude: 53.917069, longitude: -122.749622 },
- { id: 10, latitude: 53.917071, longitude: -122.749612 },
- { id: 11, latitude: 53.918172, longitude: -122.749772 },
+ { id: 1, latitude: 53.917061, longitude: -122.749672, propertyId: 1 },
+ { id: 2, latitude: 53.917062, longitude: -122.749692, propertyId: 2 },
+ { id: 3, latitude: 53.917063, longitude: -122.749682, propertyId: 3 },
+ { id: 4, latitude: 53.917064, longitude: -122.749672, propertyId: 4 },
+ { id: 5, latitude: 53.917065, longitude: -122.749662, propertyId: 5 },
+ { id: 6, latitude: 53.917066, longitude: -122.749652, propertyId: 6 },
+ { id: 7, latitude: 53.917067, longitude: -122.749642, propertyId: 7 },
+ { id: 8, latitude: 53.917068, longitude: -122.749632, propertyId: 8 },
+ { id: 9, latitude: 53.917069, longitude: -122.749622, propertyId: 9 },
+ { id: 10, latitude: 53.917071, longitude: -122.749612, propertyId: 10 },
+ { id: 11, latitude: 53.918172, longitude: -122.749772, propertyId: 11 },
];
export const distantMockParcels: ParcelSeed[] = [
@@ -122,23 +123,38 @@ export const createPimsFeatures = (
PROPERTY_ID: x.propertyId ?? null,
PID: x.pid ?? null,
IS_OWNED: true,
+ IS_OTHER_INTEREST: true,
},
};
}),
};
};
+const mockGetApi = {
+ error: undefined,
+ response: [1] as number[] | undefined,
+ execute: vi.fn().mockResolvedValue([1]),
+ loading: false,
+};
+vi.mock('@/hooks/repositories/usePimsPropertyRepository', () => ({
+ usePimsPropertyRepository: () => {
+ return {
+ getMatchingProperties: mockGetApi,
+ };
+ },
+}));
+
// This mocks the parcels of land a user can see - render a cluster and a marker
const smallMockParcels: ParcelSeed[] = [
- { id: 1, latitude: 54.917061, longitude: -122.749672 },
- { id: 3, latitude: 54.918162, longitude: -122.749772 },
+ { id: 1, latitude: 54.917061, longitude: -122.749672, propertyId: 1 },
+ { id: 3, latitude: 54.918162, longitude: -122.749772, propertyId: 2 },
];
// This mocks the parcels of land a user can see - render a cluster and a marker
const mockParcels: ParcelSeed[] = [
- { id: 1, latitude: 55.917161, longitude: -122.749612, pid: 7771 },
- { id: 2, latitude: 55.917262, longitude: -122.749622, pid: 7772 },
- { id: 3, latitude: 55.917363, longitude: -122.749732, pid: 7773 },
+ { id: 1, latitude: 55.917161, longitude: -122.749612, pid: 7771, propertyId: 1 },
+ { id: 2, latitude: 55.917262, longitude: -122.749622, pid: 7772, propertyId: 2 },
+ { id: 3, latitude: 55.917363, longitude: -122.749732, pid: 7773, propertyId: 3 },
];
// This will spoof the active parcel (the one that will populate the popup details)
@@ -155,6 +171,25 @@ let history = createMemoryHistory();
describe('MapContainer', () => {
const setup = async (renderOptions: RenderOptions = {}) => {
+ const activePimsPropertyIds = mockParcels.map(mp => mp.propertyId);
+ const defaultMapMachine = {
+ ...mapMachineBaseMock,
+ activePimsPropertyIds: activePimsPropertyIds,
+ mapFeatureData: {
+ pimsLocationFeatures: createPimsFeatures(mockParcels),
+ pimsBoundaryFeatures: emptyPimsBoundaryFeatureCollection,
+ fullyAttributedFeatures: emptyPmbcFeatureCollection,
+ },
+ };
+ if (
+ renderOptions?.mockMapMachine?.mapFeatureData?.pimsLocationFeatures &&
+ !renderOptions?.mockMapMachine?.activePimsPropertyIds?.length
+ ) {
+ renderOptions.mockMapMachine.activePimsPropertyIds =
+ renderOptions.mockMapMachine.mapFeatureData.pimsLocationFeatures?.features.map(
+ mp => mp.properties.PROPERTY_ID,
+ );
+ }
const utils = render(
<>
@@ -162,14 +197,7 @@ describe('MapContainer', () => {
{
store,
history,
- mockMapMachine: {
- ...mapMachineBaseMock,
- mapFeatureData: {
- pimsLocationFeatures: createPimsFeatures(mockParcels),
- pimsBoundaryFeatures: emptyPimsBoundaryFeatureCollection,
- fullyAttributedFeatures: emptyPmbcFeatureCollection,
- },
- },
+ mockMapMachine: defaultMapMachine,
...renderOptions,
useMockAuthentication: true,
},
@@ -485,4 +513,24 @@ describe('MapContainer', () => {
// verify the correct feature got clicked
expect(testMapMock.mapMarkerClick).toHaveBeenCalledWith(expectedFeature);
});
+
+ it('calls matchproperties with advanced search criteria', async () => {
+ mockKeycloak({ claims: [Claims.ADMIN_PROPERTIES] });
+ const testMapMock: IMapStateMachineContext = {
+ ...mapMachineBaseMock,
+ isMapVisible: false,
+ };
+ await setup({ mockMapMachine: testMapMock });
+
+ expect(mockGetApi.execute).not.toHaveBeenCalled();
+ expect(mapMachineBaseMock.setVisiblePimsProperties).not.toHaveBeenCalled();
+ });
+
+ it('Does not call matchproperties with advanced search criteria if map not visible', async () => {
+ mockKeycloak({ claims: [Claims.ADMIN_PROPERTIES] });
+ await setup();
+
+ expect(mockGetApi.execute).toHaveBeenCalledWith(new PropertyFilterFormModel().toApi());
+ expect(mapMachineBaseMock.setVisiblePimsProperties).toHaveBeenCalled();
+ });
});
diff --git a/source/frontend/src/features/properties/map/MapContainer.tsx b/source/frontend/src/features/properties/map/MapContainer.tsx
index 81a8f04052..9c5aec82e5 100644
--- a/source/frontend/src/features/properties/map/MapContainer.tsx
+++ b/source/frontend/src/features/properties/map/MapContainer.tsx
@@ -1,5 +1,5 @@
import clsx from 'classnames';
-import React, { useState } from 'react';
+import React, { useCallback, useEffect, useState } from 'react';
import { MapContainerProps } from 'react-leaflet';
import styled from 'styled-components';
@@ -16,6 +16,8 @@ import MapSideBar from '@/features/mapSideBar/MapSideBar';
import CompensationRequisitionRouter from '@/features/mapSideBar/router/CompensationRequisitionRouter';
import PropertyActivityRouter from '@/features/mapSideBar/router/PropertyActivityRouter';
import RightSideLayout from '@/features/rightSideLayout/RightSideLayout';
+import { usePimsPropertyRepository } from '@/hooks/repositories/usePimsPropertyRepository';
+import { Api_PropertyFilterCriteria } from '@/models/api/ProjectFilterCriteria';
enum MapCursors {
DRAFT = 'draft-cursor',
@@ -32,8 +34,32 @@ const MapContainer: React.FC> = () =>
isRepositioning,
toggleMapFilterDisplay,
toggleMapLayerControl,
+ setVisiblePimsProperties,
+ advancedSearchCriteria,
+ isMapVisible,
} = useMapStateMachine();
+ const { getMatchingProperties } = usePimsPropertyRepository();
+
+ const matchProperties = getMatchingProperties.execute;
+
+ const filterProperties = useCallback(
+ async (filter: Api_PropertyFilterCriteria) => {
+ if (isMapVisible) {
+ const retrievedProperties = await matchProperties(filter);
+
+ if (retrievedProperties !== undefined) {
+ setVisiblePimsProperties(retrievedProperties);
+ }
+ }
+ },
+ [matchProperties, setVisiblePimsProperties, isMapVisible],
+ );
+
+ useEffect(() => {
+ filterProperties(advancedSearchCriteria?.toApi());
+ }, [filterProperties, advancedSearchCriteria]);
+
const cursorClass = isSelecting
? MapCursors.DRAFT
: isRepositioning
diff --git a/source/frontend/src/features/properties/map/__snapshots__/MapContainer.test.tsx.snap b/source/frontend/src/features/properties/map/__snapshots__/MapContainer.test.tsx.snap
index 538377e20d..18490d4065 100644
--- a/source/frontend/src/features/properties/map/__snapshots__/MapContainer.test.tsx.snap
+++ b/source/frontend/src/features/properties/map/__snapshots__/MapContainer.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`MapContainer > Renders the map 1`] = `
}
.c4.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`MapContainer > Renders the map 1`] = `
.c4.btn:disabled,
.c4.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`MapContainer > Renders the map 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c4.Button .Button__icon {
@@ -403,6 +404,10 @@ exports[`MapContainer > Renders the map 1`] = `
align-items: center;
}
+.c5.c5.btn:hover {
+ color: white;
+}
+
.c6.c6.btn {
background-color: #ffffff;
color: #474543;
@@ -410,6 +415,10 @@ exports[`MapContainer > Renders the map 1`] = `
height: 4rem;
}
+.c6.c6.btn:hover {
+ color: white;
+}
+
.c1 {
display: -webkit-box;
display: -webkit-flex;
diff --git a/source/frontend/src/features/research/list/ResearchFilter/__snapshots__/ResearchFilter.test.tsx.snap b/source/frontend/src/features/research/list/ResearchFilter/__snapshots__/ResearchFilter.test.tsx.snap
index cf17092395..c0a2a5b16b 100644
--- a/source/frontend/src/features/research/list/ResearchFilter/__snapshots__/ResearchFilter.test.tsx.snap
+++ b/source/frontend/src/features/research/list/ResearchFilter/__snapshots__/ResearchFilter.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`Research Filter > matches snapshot 1`] = `
}
.c8.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`Research Filter > matches snapshot 1`] = `
.c8.btn:disabled,
.c8.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`Research Filter > matches snapshot 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c8.Button .Button__icon {
diff --git a/source/frontend/src/features/research/list/__snapshots__/ResearchListView.test.tsx.snap b/source/frontend/src/features/research/list/__snapshots__/ResearchListView.test.tsx.snap
index 2dfe5ebfd6..981da56f7d 100644
--- a/source/frontend/src/features/research/list/__snapshots__/ResearchListView.test.tsx.snap
+++ b/source/frontend/src/features/research/list/__snapshots__/ResearchListView.test.tsx.snap
@@ -48,10 +48,10 @@ exports[`Research List View > matches snapshot 1`] = `
}
.c13.btn:focus {
- outline-width: 0.4rem;
+ outline-width: 2px;
outline-style: solid;
- outline-color: var(--surface-color-primary-button-hover);
- outline-offset: 1px;
+ outline-color: #2E5DD7;
+ outline-offset: 2px;
box-shadow: none;
}
@@ -191,6 +191,8 @@ exports[`Research List View > matches snapshot 1`] = `
.c13.btn:disabled,
.c13.btn:disabled:hover {
+ color: #9F9D9C;
+ background-color: #EDEBE9;
box-shadow: none;
-webkit-user-select: none;
-moz-user-select: none;
@@ -198,7 +200,6 @@ exports[`Research List View > matches snapshot 1`] = `
user-select: none;
pointer-events: none;
cursor: not-allowed;
- opacity: 0.65;
}
.c13.Button .Button__icon {
diff --git a/source/frontend/src/hooks/pims-api/useApiLeaseStakeholders.ts b/source/frontend/src/hooks/pims-api/useApiLeaseStakeholders.ts
index 758c069d4c..ada791e48d 100644
--- a/source/frontend/src/hooks/pims-api/useApiLeaseStakeholders.ts
+++ b/source/frontend/src/hooks/pims-api/useApiLeaseStakeholders.ts
@@ -4,11 +4,11 @@ import { ApiGen_Concepts_LeaseStakeholder } from '@/models/api/generated/ApiGen_
export const updateLeaseStakeholders = (
leaseId: number,
- improvements: ApiGen_Concepts_LeaseStakeholder[],
+ stakeholders: ApiGen_Concepts_LeaseStakeholder[],
) =>
CustomAxios({ baseURL: ENVIRONMENT.apiUrl }).put(
`/leases/${leaseId}/stakeholders`,
- improvements,
+ stakeholders,
);
export const getLeaseStakeholders = (leaseId: number) =>
diff --git a/source/frontend/src/hooks/repositories/useLeaseStakeholderRepository.ts b/source/frontend/src/hooks/repositories/useLeaseStakeholderRepository.ts
index fafa8bbd33..879fb46a41 100644
--- a/source/frontend/src/hooks/repositories/useLeaseStakeholderRepository.ts
+++ b/source/frontend/src/hooks/repositories/useLeaseStakeholderRepository.ts
@@ -26,17 +26,17 @@ export const useLeaseStakeholderRepository = () => {
const updateLeaseStakeholdersApi = useApiRequestWrapper<
(
leaseId: number,
- improvements: ApiGen_Concepts_LeaseStakeholder[],
+ stakeholders: ApiGen_Concepts_LeaseStakeholder[],
) => Promise>
>({
requestFunction: useCallback(
- async (leaseId: number, improvements: ApiGen_Concepts_LeaseStakeholder[]) =>
- await updateLeaseStakeholders(leaseId, improvements),
+ async (leaseId: number, stakeholders: ApiGen_Concepts_LeaseStakeholder[]) =>
+ await updateLeaseStakeholders(leaseId, stakeholders),
[],
),
requestName: 'updateLeaseStakeholders',
onSuccess: useAxiosSuccessHandler('Stakeholders saved successfully.'),
- onError: useAxiosErrorHandler(),
+ throwError: true,
});
return useMemo(
diff --git a/source/frontend/src/mocks/acquisitionFiles.mock.ts b/source/frontend/src/mocks/acquisitionFiles.mock.ts
index 17c1484c70..6d813d1c78 100644
--- a/source/frontend/src/mocks/acquisitionFiles.mock.ts
+++ b/source/frontend/src/mocks/acquisitionFiles.mock.ts
@@ -54,12 +54,16 @@ export const mockAcquisitionFileResponse = (
legacyFileNumber: 'legacy file number',
assignedDate: '2022-06-27T00:00:00',
deliveryDate: '2022-07-29T00:00:00',
+ estimatedCompletionDate: '2024-07-10T00:00:00',
+ possessionDate: '2025-07-10T00:00:00',
fileStatusTypeCode: {
id: 'ACTIVE',
description: 'Active',
isDisabled: false,
displayOrder: null,
},
+ subfileInterestTypeCode: null,
+ otherSubfileInterestType: null,
acquisitionTypeCode: {
id: 'CONSEN',
description: 'Consensual Agreement',
@@ -1419,6 +1423,8 @@ export const mockAcquisitionFileSubFilesResponse = (): ApiGen_Concepts_Acquisiti
legacyFileNumber: '',
assignedDate: '2024-10-17T21:44:15.107',
deliveryDate: null,
+ estimatedCompletionDate: null,
+ possessionDate: null,
acquisitionPhysFileStatusTypeCode: null,
acquisitionTypeCode: null,
productId: 2,
@@ -1445,6 +1451,13 @@ export const mockAcquisitionFileSubFilesResponse = (): ApiGen_Concepts_Acquisiti
isDisabled: false,
displayOrder: null,
},
+ subfileInterestTypeCode: {
+ id: 'SUBTENANT',
+ description: 'Sub-Tenant / Lease',
+ isDisabled: false,
+ displayOrder: 8,
+ },
+ otherSubfileInterestType: null,
appCreateTimestamp: '2024-10-17T21:44:15.007',
appLastUpdateTimestamp: '2024-10-17T21:44:15.007',
appLastUpdateUserid: 'EHERRERA',
@@ -1460,6 +1473,8 @@ export const mockAcquisitionFileSubFilesResponse = (): ApiGen_Concepts_Acquisiti
legacyFileNumber: '',
assignedDate: '2024-10-17T21:45:36.29',
deliveryDate: null,
+ estimatedCompletionDate: null,
+ possessionDate: null,
acquisitionPhysFileStatusTypeCode: null,
acquisitionTypeCode: null,
productId: 2,
@@ -1486,6 +1501,13 @@ export const mockAcquisitionFileSubFilesResponse = (): ApiGen_Concepts_Acquisiti
isDisabled: false,
displayOrder: null,
},
+ subfileInterestTypeCode: {
+ id: 'OTHER',
+ description: 'Other',
+ isDisabled: false,
+ displayOrder: 999,
+ },
+ otherSubfileInterestType: 'SOME OTHER VALUE',
appCreateTimestamp: '2024-10-17T21:45:36.21',
appLastUpdateTimestamp: '2024-10-18T22:19:33.767',
appLastUpdateUserid: 'EHERRERA',
diff --git a/source/frontend/src/mocks/documents.mock.ts b/source/frontend/src/mocks/documents.mock.ts
index 6932b47745..66ab1c52e1 100644
--- a/source/frontend/src/mocks/documents.mock.ts
+++ b/source/frontend/src/mocks/documents.mock.ts
@@ -898,6 +898,865 @@ export const mockDocumentTypesAcquisition = (): ApiGen_Concepts_DocumentType[] =
},
];
+export const mockDocumentTypesAll = (): ApiGen_Concepts_DocumentType[] => [
+ {
+ id: 11,
+ documentType: 'AFFISERV',
+ documentTypeDescription: 'Affidavit of service',
+ documentTypePurpose: null,
+ mayanId: 143,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 28,
+ },
+ {
+ id: 55,
+ documentType: 'ALC',
+ documentTypeDescription: 'Agricultural Land Commission (ALC)',
+ documentTypePurpose: null,
+ mayanId: 205,
+ isDisabled: false,
+ appCreateTimestamp: '2024-09-20T23:18:12.197',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'MARODRIG',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '5d661d1e-14f0-477c-a7fb-31f21e8b4fda',
+ rowVersion: 34,
+ },
+ {
+ id: 25,
+ documentType: 'APPRREVI',
+ documentTypeDescription: 'Appraisals/Reviews',
+ documentTypePurpose: null,
+ mayanId: 145,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 27,
+ },
+ {
+ id: 9,
+ documentType: 'APPREXPR',
+ documentTypeDescription: 'Approval of expropriation (Form 5)',
+ documentTypePurpose: null,
+ mayanId: 146,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 33,
+ },
+ {
+ id: 42,
+ documentType: 'BCASSE',
+ documentTypeDescription: 'BC assessment search',
+ documentTypePurpose: null,
+ mayanId: 144,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 27,
+ },
+ {
+ id: 18,
+ documentType: 'BRIENOTE',
+ documentTypeDescription: 'Briefing notes',
+ documentTypePurpose: null,
+ mayanId: 155,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 27,
+ },
+ {
+ id: 50,
+ documentType: 'CDOGTEMP',
+ documentTypeDescription: 'CDOGS template',
+ documentTypePurpose: null,
+ mayanId: 148,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 27,
+ },
+ {
+ id: 39,
+ documentType: 'CANALAND',
+ documentTypeDescription: 'Canada lands survey',
+ documentTypePurpose: null,
+ mayanId: 151,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 32,
+ },
+ {
+ id: 51,
+ documentType: 'CERTCOMPL',
+ documentTypeDescription: 'Certificate of Compliance',
+ documentTypePurpose: null,
+ mayanId: 201,
+ isDisabled: false,
+ appCreateTimestamp: '2024-04-09T17:08:53.417',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 33,
+ },
+ {
+ id: 16,
+ documentType: 'CERTINSU',
+ documentTypeDescription: 'Certificate of Insurance (H0111)',
+ documentTypePurpose: null,
+ mayanId: 160,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 27,
+ },
+ {
+ id: 48,
+ documentType: 'COMPSEAR',
+ documentTypeDescription: 'Company search',
+ documentTypePurpose: null,
+ mayanId: 156,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 32,
+ },
+ {
+ id: 4,
+ documentType: 'COMPCHEQ',
+ documentTypeDescription: 'Compensation cheque',
+ documentTypePurpose: null,
+ mayanId: 159,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 33,
+ },
+ {
+ id: 3,
+ documentType: 'COMPREQU',
+ documentTypeDescription: 'Compensation requisition (H-120)',
+ documentTypePurpose: null,
+ mayanId: 158,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 28,
+ },
+ {
+ id: 5,
+ documentType: 'CONDENTR',
+ documentTypeDescription: 'Condition of entry (H0443)',
+ documentTypePurpose: null,
+ mayanId: 147,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 33,
+ },
+ {
+ id: 21,
+ documentType: 'CONVCLOS',
+ documentTypeDescription: 'Conveyance closing documents (ex: PTT forms, Form A transfer etc.)',
+ documentTypePurpose: null,
+ mayanId: 157,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 33,
+ },
+ {
+ id: 35,
+ documentType: 'CORR',
+ documentTypeDescription: 'Correspondence',
+ documentTypePurpose: null,
+ mayanId: 149,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 32,
+ },
+ {
+ id: 33,
+ documentType: 'CROWGRAN',
+ documentTypeDescription: 'Crown grant',
+ documentTypePurpose: null,
+ mayanId: 154,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 33,
+ },
+ {
+ id: 43,
+ documentType: 'DISTREGI',
+ documentTypeDescription: 'District road register',
+ documentTypePurpose: null,
+ mayanId: 152,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 28,
+ },
+ {
+ id: 52,
+ documentType: 'ENHREFREC',
+ documentTypeDescription: 'Enhanced Referral Records',
+ documentTypePurpose: null,
+ mayanId: 202,
+ isDisabled: false,
+ appCreateTimestamp: '2024-04-09T17:08:53.42',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 33,
+ },
+ {
+ id: 44,
+ documentType: 'FIELNOTE',
+ documentTypeDescription: 'Field notes',
+ documentTypePurpose: null,
+ mayanId: 150,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 28,
+ },
+ {
+ id: 45,
+ documentType: 'FINRECRD',
+ documentTypeDescription: 'Financial records (invoices, journal vouchers etc.)',
+ documentTypePurpose: null,
+ mayanId: 153,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 32,
+ },
+ {
+ id: 53,
+ documentType: 'FNSCR',
+ documentTypeDescription: 'First Nations Strength of Claim Report',
+ documentTypePurpose: null,
+ mayanId: 203,
+ isDisabled: false,
+ appCreateTimestamp: '2024-04-09T17:08:53.42',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 33,
+ },
+ {
+ id: 13,
+ documentType: 'FIRSNTAI',
+ documentTypeDescription: 'First nations consultation',
+ documentTypePurpose: null,
+ mayanId: 161,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 32,
+ },
+ {
+ id: 56,
+ documentType: 'FORM12',
+ documentTypeDescription: 'Form 12',
+ documentTypePurpose: null,
+ mayanId: 207,
+ isDisabled: false,
+ appCreateTimestamp: '2024-09-20T23:18:12.197',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'MARODRIG',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '5d661d1e-14f0-477c-a7fb-31f21e8b4fda',
+ rowVersion: 33,
+ },
+ {
+ id: 28,
+ documentType: 'GAZE',
+ documentTypeDescription: 'Gazette',
+ documentTypePurpose: null,
+ mayanId: 170,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 32,
+ },
+ {
+ id: 34,
+ documentType: 'HISTFILE',
+ documentTypeDescription: 'Historical file',
+ documentTypePurpose: null,
+ mayanId: 171,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 32,
+ },
+ {
+ id: 26,
+ documentType: 'LTSADOCU',
+ documentTypeDescription: 'LTSA documents and plans (except title search)',
+ documentTypePurpose: null,
+ mayanId: 172,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 32,
+ },
+ {
+ id: 57,
+ documentType: 'LANDACTTENRES',
+ documentTypeDescription: 'Land Act Tenure/Reserves',
+ documentTypePurpose: null,
+ mayanId: 206,
+ isDisabled: false,
+ appCreateTimestamp: '2024-09-20T23:18:12.197',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'MARODRIG',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '5d661d1e-14f0-477c-a7fb-31f21e8b4fda',
+ rowVersion: 34,
+ },
+ {
+ id: 27,
+ documentType: 'LEASLICE',
+ documentTypeDescription: 'Lease / License (H1005/H1005A)',
+ documentTypePurpose: null,
+ mayanId: 169,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 33,
+ },
+ {
+ id: 22,
+ documentType: 'LEGACORR',
+ documentTypeDescription: 'Legal correspondence (ex: to AG/external lawyers)',
+ documentTypePurpose: null,
+ mayanId: 166,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 32,
+ },
+ {
+ id: 30,
+ documentType: 'LEGASURV',
+ documentTypeDescription: 'Legal survey plan',
+ documentTypePurpose: null,
+ mayanId: 164,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 32,
+ },
+ {
+ id: 17,
+ documentType: 'LICEAPPR',
+ documentTypeDescription: 'Licensing approval/sign-off',
+ documentTypePurpose: null,
+ mayanId: 168,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 33,
+ },
+ {
+ id: 40,
+ documentType: 'MINIORDE',
+ documentTypeDescription: 'Ministerial order',
+ documentTypePurpose: null,
+ mayanId: 167,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 33,
+ },
+ {
+ id: 38,
+ documentType: 'MISCNOTE',
+ documentTypeDescription: 'Miscellaneous notes (LTSA)',
+ documentTypePurpose: null,
+ mayanId: 165,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 32,
+ },
+ {
+ id: 29,
+ documentType: 'MOTIPLAN',
+ documentTypeDescription: 'MoTI plan',
+ documentTypePurpose: null,
+ mayanId: 162,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 32,
+ },
+ {
+ id: 6,
+ documentType: 'NOTIADVA',
+ documentTypeDescription: 'Notice of advanced payment (Form 8)',
+ documentTypePurpose: null,
+ mayanId: 163,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 33,
+ },
+ {
+ id: 15,
+ documentType: 'NOTICLAI',
+ documentTypeDescription: 'Notice of claims/Litigation documents',
+ documentTypePurpose: null,
+ mayanId: 173,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 33,
+ },
+ {
+ id: 8,
+ documentType: 'NOTIEXPR',
+ documentTypeDescription: 'Notice of expropriation (Form 1)',
+ documentTypePurpose: null,
+ mayanId: 174,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 33,
+ },
+ {
+ id: 12,
+ documentType: 'NOTIPOSS',
+ documentTypeDescription: 'Notice of possible entry (H0224)',
+ documentTypePurpose: null,
+ mayanId: 178,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 33,
+ },
+ {
+ id: 31,
+ documentType: 'OIC',
+ documentTypeDescription: 'Order in Council (OIC)',
+ documentTypePurpose: null,
+ mayanId: 175,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 33,
+ },
+ {
+ id: 47,
+ documentType: 'OTHER',
+ documentTypeDescription: 'Other',
+ documentTypePurpose: null,
+ mayanId: 185,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 32,
+ },
+ {
+ id: 46,
+ documentType: 'OTHERLANDAGREEMENT',
+ documentTypeDescription:
+ 'Other Land Agreement (Indemnity Letter, Letter of Intended Use, Assumption Agreement, etc)',
+ documentTypePurpose: null,
+ mayanId: 181,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 32,
+ },
+ {
+ id: 2,
+ documentType: 'OWNEAGRE',
+ documentTypeDescription: 'Owner agreement/offer',
+ documentTypePurpose: null,
+ mayanId: 176,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 34,
+ },
+ {
+ id: 1,
+ documentType: 'PAPLAN',
+ documentTypeDescription: 'PA plans / Design drawings',
+ documentTypePurpose: null,
+ mayanId: 182,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 34,
+ },
+ {
+ id: 49,
+ documentType: 'PHOTIMAG',
+ documentTypeDescription: 'Photos / Images / Video',
+ documentTypePurpose: null,
+ mayanId: 184,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 32,
+ },
+ {
+ id: 32,
+ documentType: 'PRIVCOUN',
+ documentTypeDescription: 'Privy council',
+ documentTypePurpose: null,
+ mayanId: 180,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 33,
+ },
+ {
+ id: 24,
+ documentType: 'PROFREPO',
+ documentTypeDescription: 'Professional reports (ex: engineering/environmental etc.)',
+ documentTypePurpose: null,
+ mayanId: 177,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 32,
+ },
+ {
+ id: 54,
+ documentType: 'PURSALEAGRE',
+ documentTypeDescription: 'Purchase and Sale Agreement',
+ documentTypePurpose: null,
+ mayanId: 204,
+ isDisabled: false,
+ appCreateTimestamp: '2024-04-09T17:08:53.42',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 33,
+ },
+ {
+ id: 37,
+ documentType: 'RECONEGO',
+ documentTypeDescription: 'Record of negotiation',
+ documentTypePurpose: null,
+ mayanId: 179,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 33,
+ },
+ {
+ id: 7,
+ documentType: 'RELECLAI',
+ documentTypeDescription: 'Release of claims',
+ documentTypePurpose: null,
+ mayanId: 183,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 34,
+ },
+ {
+ id: 23,
+ documentType: 'SPENAUTH',
+ documentTypeDescription: 'Spending authority approval (SAA)',
+ documentTypePurpose: null,
+ mayanId: 188,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 32,
+ },
+ {
+ id: 19,
+ documentType: 'SURPPROP',
+ documentTypeDescription: 'Surplus property declaration',
+ documentTypePurpose: null,
+ mayanId: 189,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 32,
+ },
+ {
+ id: 14,
+ documentType: 'TAXNOTI',
+ documentTypeDescription: 'Tax notices and assessments',
+ documentTypePurpose: null,
+ mayanId: 191,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 32,
+ },
+ {
+ id: 20,
+ documentType: 'TEMPLICE',
+ documentTypeDescription: 'Temporary license for construction access (H0074)',
+ documentTypePurpose: null,
+ mayanId: 186,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 33,
+ },
+ {
+ id: 36,
+ documentType: 'TITLSEAR',
+ documentTypeDescription: 'Title search / Historical title',
+ documentTypePurpose: null,
+ mayanId: 190,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 32,
+ },
+ {
+ id: 41,
+ documentType: 'TRANADMI',
+ documentTypeDescription: 'Transfer of administration',
+ documentTypePurpose: null,
+ mayanId: 187,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 33,
+ },
+ {
+ id: 10,
+ documentType: 'VESTNOTI',
+ documentTypeDescription: 'Vesting notice (Form 9)',
+ documentTypePurpose: null,
+ mayanId: 192,
+ isDisabled: false,
+ appCreateTimestamp: '2023-11-03T20:51:08.747',
+ appLastUpdateTimestamp: '2024-10-25T18:48:12.55',
+ appLastUpdateUserid: 'service',
+ appCreateUserid: 'service',
+ appLastUpdateUserGuid: '00000000-0000-0000-0000-000000000000',
+ appCreateUserGuid: '00000000-0000-0000-0000-000000000000',
+ rowVersion: 33,
+ },
+];
+
export const mockDocumentTypeMetadata = (): ApiGen_Mayan_DocumentTypeMetadataType[] => [
{
id: 1,
@@ -1027,7 +1886,7 @@ export const mockDocumentBatchUploadResponse =
},
documentExternalResponse: {
status: ApiGen_CodeTypes_ExternalResponseStatus.Success,
- message: null,
+ message: 'File uploaded',
payload: {
id: 162,
label: 'Test.PDF',
diff --git a/source/frontend/src/mocks/lookups.mock.ts b/source/frontend/src/mocks/lookups.mock.ts
index f52ef23686..a2ec43b0d1 100644
--- a/source/frontend/src/mocks/lookups.mock.ts
+++ b/source/frontend/src/mocks/lookups.mock.ts
@@ -4825,6 +4825,76 @@ export const mockLookups: ILookupCode[] = [
displayOrder: 3,
type: 'PimsLeasePaymentCategoryType',
},
+ {
+ id: 'XINGPERMIT',
+ name: 'Crossing Permit',
+ isDisabled: false,
+ displayOrder: 1,
+ type: 'PimsSubfileInterestType',
+ },
+ {
+ id: 'EASEMENT',
+ name: 'Easement Holder',
+ isDisabled: false,
+ displayOrder: 2,
+ type: 'PimsSubfileInterestType',
+ },
+ {
+ id: 'LICOCCUPY',
+ name: 'License of Occupation',
+ isDisabled: false,
+ displayOrder: 3,
+ type: 'PimsSubfileInterestType',
+ },
+ {
+ id: 'LIEN',
+ name: 'Lis Pendens / Lien',
+ isDisabled: false,
+ displayOrder: 4,
+ type: 'PimsSubfileInterestType',
+ },
+ {
+ id: 'MORTGAGE',
+ name: 'Mortgage Interest',
+ isDisabled: false,
+ displayOrder: 5,
+ type: 'PimsSubfileInterestType',
+ },
+ {
+ id: 'SRWUTILITY',
+ name: 'SRW / Utility Holder',
+ isDisabled: false,
+ displayOrder: 6,
+ type: 'PimsSubfileInterestType',
+ },
+ {
+ id: 'STRATALOT',
+ name: 'Strata Lot Owner',
+ isDisabled: false,
+ displayOrder: 7,
+ type: 'PimsSubfileInterestType',
+ },
+ {
+ id: 'SUBTENANT',
+ name: 'Sub-Tenant / Lease',
+ isDisabled: false,
+ displayOrder: 8,
+ type: 'PimsSubfileInterestType',
+ },
+ {
+ id: 'TENANT',
+ name: 'Tenant (Monthly) Leaseholder',
+ isDisabled: false,
+ displayOrder: 9,
+ type: 'PimsSubfileInterestType',
+ },
+ {
+ id: 'OTHER',
+ name: 'Other ',
+ isDisabled: false,
+ displayOrder: 999,
+ type: 'PimsSubfileInterestType',
+ },
];
export const getMockLookUpsByType = (codeType: string): SelectOption[] => {
diff --git a/source/frontend/src/mocks/mapFSM.mock.ts b/source/frontend/src/mocks/mapFSM.mock.ts
index ffddca46de..b25c60f594 100644
--- a/source/frontend/src/mocks/mapFSM.mock.ts
+++ b/source/frontend/src/mocks/mapFSM.mock.ts
@@ -6,6 +6,7 @@ import {
emptyPmbcFeatureCollection,
} from '@/components/common/mapFSM/models';
import { defaultBounds } from '@/components/maps/constants';
+import { PropertyFilterFormModel } from '@/components/maps/leaflet/Control/AdvancedFilter/models';
import { layersTree } from '@/components/maps/leaflet/Control/LayersControl/data';
export const mapMachineBaseMock: IMapStateMachineContext = {
@@ -50,6 +51,9 @@ export const mapMachineBaseMock: IMapStateMachineContext = {
isShowingMapLayers: false,
showDisposed: false,
showRetired: false,
+ mapLayersToRefresh: [],
+ advancedSearchCriteria: new PropertyFilterFormModel(),
+ isMapVisible: true,
requestFlyToLocation: vi.fn(),
@@ -79,4 +83,6 @@ export const mapMachineBaseMock: IMapStateMachineContext = {
toggleSidebarDisplay: vi.fn(),
setFullWidthSideBar: vi.fn(),
resetMapFilter: vi.fn(),
+ setMapLayersToRefresh: vi.fn(),
+ setAdvancedSearchCriteria: vi.fn(),
};
diff --git a/source/frontend/src/mocks/researchFile.mock.ts b/source/frontend/src/mocks/researchFile.mock.ts
index 1df95e78d6..494cacc20c 100644
--- a/source/frontend/src/mocks/researchFile.mock.ts
+++ b/source/frontend/src/mocks/researchFile.mock.ts
@@ -41,7 +41,7 @@ export const getMockResearchFile = (): ApiGen_Concepts_ResearchFile => ({
latitude: 49.27720127104871,
longitude: -123.128633565,
isRwyBeltDomPatent: false,
- pin: 0,
+ pin: undefined,
pid: 123456789,
planNumber: 'EPP92028',
landArea: 0,
diff --git a/source/frontend/src/models/api/UserOverrideCode.ts b/source/frontend/src/models/api/UserOverrideCode.ts
index 00e3e77728..ca3ab03b33 100644
--- a/source/frontend/src/models/api/UserOverrideCode.ts
+++ b/source/frontend/src/models/api/UserOverrideCode.ts
@@ -11,4 +11,5 @@ export enum UserOverrideCode {
DELETE_COMPLETED_TAKE = 'DELETE_COMPLETED_TAKE',
DELETE_LAST_TAKE = 'DELETE_LAST_TAKE',
DELETE_TAKE_ACTIVE_DISPOSITION = 'DELETE_TAKE_ACTIVE_DISPOSITION',
+ UPDATE_SUBFILES_PROJECT_PRODUCT = 'UPDATE_SUBFILES_PROJECT_PRODUCT',
}
diff --git a/source/frontend/src/models/api/generated/ApiGen_CodeTypes_SubfileInterestTypes.ts b/source/frontend/src/models/api/generated/ApiGen_CodeTypes_SubfileInterestTypes.ts
new file mode 100644
index 0000000000..1f7e7fa11b
--- /dev/null
+++ b/source/frontend/src/models/api/generated/ApiGen_CodeTypes_SubfileInterestTypes.ts
@@ -0,0 +1,16 @@
+/**
+ * File autogenerated by TsGenerator.
+ * Do not manually modify, changes made to this file will be lost when this file is regenerated.
+ */
+export enum ApiGen_CodeTypes_SubfileInterestTypes {
+ EASEMENT = 'EASEMENT',
+ LICOCCUPY = 'LICOCCUPY',
+ LIEN = 'LIEN',
+ MORTGAGE = 'MORTGAGE',
+ OTHER = 'OTHER',
+ SRWUTILITY = 'SRWUTILITY',
+ STRATALOT = 'STRATALOT',
+ SUBTENANT = 'SUBTENANT',
+ TENANT = 'TENANT',
+ XINGPERMIT = 'XINGPERMIT',
+}
diff --git a/source/frontend/src/models/api/generated/ApiGen_Concepts_AcquisitionFile.ts b/source/frontend/src/models/api/generated/ApiGen_Concepts_AcquisitionFile.ts
index 8393365c16..f90d2facdb 100644
--- a/source/frontend/src/models/api/generated/ApiGen_Concepts_AcquisitionFile.ts
+++ b/source/frontend/src/models/api/generated/ApiGen_Concepts_AcquisitionFile.ts
@@ -23,6 +23,8 @@ export interface ApiGen_Concepts_AcquisitionFile extends ApiGen_Concepts_FileWit
legacyFileNumber: string | null;
assignedDate: UtcIsoDateTime | null;
deliveryDate: UtcIsoDate | null;
+ estimatedCompletionDate: UtcIsoDate | null;
+ possessionDate: UtcIsoDate | null;
acquisitionPhysFileStatusTypeCode: ApiGen_Base_CodeType | null;
acquisitionTypeCode: ApiGen_Base_CodeType | null;
productId: number | null;
@@ -32,6 +34,8 @@ export interface ApiGen_Concepts_AcquisitionFile extends ApiGen_Concepts_FileWit
projectId: number | null;
project: ApiGen_Concepts_Project | null;
regionCode: ApiGen_Base_CodeType | null;
+ subfileInterestTypeCode: ApiGen_Base_CodeType | null;
+ otherSubfileInterestType: string | null;
legacyStakeholders: string[] | null;
fileProperties: ApiGen_Concepts_AcquisitionFileProperty[] | null;
acquisitionTeam: ApiGen_Concepts_AcquisitionFileTeam[] | null;
diff --git a/source/frontend/src/models/defaultInitializers.ts b/source/frontend/src/models/defaultInitializers.ts
index 59e1b2c281..16a725dad4 100644
--- a/source/frontend/src/models/defaultInitializers.ts
+++ b/source/frontend/src/models/defaultInitializers.ts
@@ -197,8 +197,12 @@ export const getEmptyAcquisitionFile = (): ApiGen_Concepts_AcquisitionFile => {
legacyFileNumber: null,
assignedDate: null,
deliveryDate: null,
+ estimatedCompletionDate: null,
+ possessionDate: null,
acquisitionPhysFileStatusTypeCode: null,
acquisitionTypeCode: null,
+ subfileInterestTypeCode: null,
+ otherSubfileInterestType: null,
productId: null,
totalAllowableCompensation: null,
product: null,
diff --git a/source/frontend/src/utils/mapPropertyUtils.test.tsx b/source/frontend/src/utils/mapPropertyUtils.test.tsx
index a920a64fea..072bba575c 100644
--- a/source/frontend/src/utils/mapPropertyUtils.test.tsx
+++ b/source/frontend/src/utils/mapPropertyUtils.test.tsx
@@ -324,6 +324,13 @@ describe('mapPropertyUtils', () => {
},
null,
],
+ [
+ {
+ pimsFeature: { properties: { pin: '4321' } } as any,
+ parcelFeature: { properties: { pid: 1234 } } as any,
+ },
+ null,
+ ],
])(
'pinFromFeatureSet test with feature set %o - expected %s',
(featureSet: LocationFeatureDataset, expectedValue: string | null) => {
diff --git a/source/frontend/src/utils/mapPropertyUtils.ts b/source/frontend/src/utils/mapPropertyUtils.ts
index 61c4f4d42d..c5bcb8c962 100644
--- a/source/frontend/src/utils/mapPropertyUtils.ts
+++ b/source/frontend/src/utils/mapPropertyUtils.ts
@@ -23,7 +23,7 @@ import { ApiGen_CodeTypes_GeoJsonTypes } from '@/models/api/generated/ApiGen_Cod
import { ApiGen_Concepts_FileProperty } from '@/models/api/generated/ApiGen_Concepts_FileProperty';
import { ApiGen_Concepts_Geometry } from '@/models/api/generated/ApiGen_Concepts_Geometry';
import { ApiGen_Concepts_Property } from '@/models/api/generated/ApiGen_Concepts_Property';
-import { enumFromValue, exists, formatApiAddress, isValidId, pidFormatter } from '@/utils';
+import { enumFromValue, exists, formatApiAddress, pidFormatter } from '@/utils';
export enum NameSourceType {
PID = 'PID',
@@ -214,28 +214,13 @@ export function featuresetToMapProperty(
if (featureSet === undefined) {
return undefined;
}
- return {
+ const commonFeature = {
propertyId: propertyId ? Number.parseInt(propertyId?.toString()) : undefined,
pid: pid ?? undefined,
pin: pin ?? undefined,
latitude: featureSet?.location?.lat,
longitude: featureSet?.location?.lng,
fileLocation: featureSet?.fileLocation ?? featureSet?.location ?? undefined,
- polygon:
- parcelFeature?.geometry?.type === ApiGen_CodeTypes_GeoJsonTypes.Polygon
- ? (parcelFeature.geometry as Polygon)
- : parcelFeature?.geometry?.type === ApiGen_CodeTypes_GeoJsonTypes.MultiPolygon
- ? (parcelFeature.geometry as MultiPolygon)
- : undefined,
- planNumber:
- pimsFeature?.properties?.SURVEY_PLAN_NUMBER ??
- parcelFeature?.properties?.PLAN_NUMBER ??
- undefined,
- address: address ?? formattedAddress ?? undefined,
- legalDescription:
- pimsFeature?.properties?.LAND_LEGAL_DESCRIPTION ??
- parcelFeature?.properties?.LEGAL_DESCRIPTION ??
- undefined,
region: isNumber(regionFeature?.properties?.REGION_NUMBER)
? regionFeature?.properties?.REGION_NUMBER
: RegionCodes.Unknown,
@@ -244,27 +229,64 @@ export function featuresetToMapProperty(
? districtFeature?.properties?.DISTRICT_NUMBER
: DistrictCodes.Unknown,
districtName: districtFeature?.properties?.DISTRICT_NAME ?? 'Cannot determine',
- areaUnit: pimsFeature?.properties?.PROPERTY_AREA_UNIT_TYPE_CODE
- ? enumFromValue(pimsFeature?.properties?.PROPERTY_AREA_UNIT_TYPE_CODE, AreaUnitTypes)
- : AreaUnitTypes.SquareMeters,
- landArea: pimsFeature?.properties?.LAND_AREA
- ? +pimsFeature?.properties?.LAND_AREA
- : parcelFeature?.properties?.FEATURE_AREA_SQM ?? 0,
};
+ if (exists(pimsFeature?.properties)) {
+ return {
+ ...commonFeature,
+ polygon:
+ pimsFeature?.geometry?.type === ApiGen_CodeTypes_GeoJsonTypes.Polygon
+ ? (pimsFeature.geometry as Polygon)
+ : pimsFeature?.geometry?.type === ApiGen_CodeTypes_GeoJsonTypes.MultiPolygon
+ ? (pimsFeature.geometry as MultiPolygon)
+ : parcelFeature?.geometry?.type === ApiGen_CodeTypes_GeoJsonTypes.Polygon
+ ? (parcelFeature.geometry as Polygon)
+ : parcelFeature?.geometry?.type === ApiGen_CodeTypes_GeoJsonTypes.MultiPolygon
+ ? (parcelFeature.geometry as MultiPolygon)
+ : undefined,
+ planNumber: pimsFeature?.properties?.SURVEY_PLAN_NUMBER ?? undefined,
+ address: address ?? formattedAddress ?? undefined,
+ legalDescription: pimsFeature?.properties?.LAND_LEGAL_DESCRIPTION ?? undefined,
+ areaUnit: pimsFeature?.properties?.PROPERTY_AREA_UNIT_TYPE_CODE
+ ? enumFromValue(pimsFeature?.properties?.PROPERTY_AREA_UNIT_TYPE_CODE, AreaUnitTypes)
+ : AreaUnitTypes.SquareMeters,
+ landArea: pimsFeature?.properties?.LAND_AREA ? +pimsFeature?.properties?.LAND_AREA : 0,
+ };
+ } else {
+ return {
+ ...commonFeature,
+ polygon:
+ parcelFeature?.geometry?.type === ApiGen_CodeTypes_GeoJsonTypes.Polygon
+ ? (parcelFeature.geometry as Polygon)
+ : parcelFeature?.geometry?.type === ApiGen_CodeTypes_GeoJsonTypes.MultiPolygon
+ ? (parcelFeature.geometry as MultiPolygon)
+ : undefined,
+ planNumber: parcelFeature?.properties?.PLAN_NUMBER ?? undefined,
+ address: address ?? formattedAddress ?? undefined,
+ legalDescription: parcelFeature?.properties?.LEGAL_DESCRIPTION ?? undefined,
+ areaUnit: AreaUnitTypes.SquareMeters,
+ landArea: parcelFeature?.properties?.FEATURE_AREA_SQM ?? 0,
+ };
+ }
}
export function pidFromFeatureSet(featureset: LocationFeatureDataset): string | null {
- return (
- featureset?.pimsFeature?.properties?.PID?.toString() ??
- featureset?.parcelFeature?.properties?.PID ??
- null
- );
+ if (exists(featureset?.pimsFeature?.properties)) {
+ return exists(featureset?.pimsFeature?.properties?.PID)
+ ? featureset?.pimsFeature?.properties?.PID?.toString()
+ : null;
+ }
+ return exists(featureset?.parcelFeature?.properties)
+ ? featureset?.parcelFeature?.properties?.PID
+ : null;
}
export function pinFromFeatureSet(featureset: LocationFeatureDataset): string | null {
- return isValidId(featureset?.pimsFeature?.properties?.PIN)
- ? featureset?.pimsFeature?.properties?.PIN?.toString()
- : isValidId(featureset?.parcelFeature?.properties?.PIN)
+ if (exists(featureset?.pimsFeature?.properties)) {
+ return exists(featureset?.pimsFeature?.properties?.PIN)
+ ? featureset?.pimsFeature?.properties?.PIN?.toString()
+ : null;
+ }
+ return exists(featureset?.parcelFeature?.properties?.PIN)
? featureset?.parcelFeature?.properties?.PIN?.toString()
: null;
}
diff --git a/source/frontend/src/utils/test-utils.tsx b/source/frontend/src/utils/test-utils.tsx
index 9f45925ac3..1a983e355d 100644
--- a/source/frontend/src/utils/test-utils.tsx
+++ b/source/frontend/src/utils/test-utils.tsx
@@ -62,7 +62,7 @@ export const mockKeycloak = (
// mock what would be returned by keycloak userinfo endpoint
const defaultUserInfo = {
organizations: organizations ?? [1],
- client_roles: [...(claims ?? []), ...(roles ?? [])] ?? [],
+ client_roles: [...(claims ?? []), ...(roles ?? [])],
email: 'test@test.com',
name: 'Chester Tester',
idir_user_guid: '00000000000000000000000000000000',
diff --git a/testing/PIMS.Tests.Automation/Data/PIMS_Testing_Data.xlsx b/testing/PIMS.Tests.Automation/Data/PIMS_Testing_Data.xlsx
index 64a6d2227f..1e9c90a7bb 100644
Binary files a/testing/PIMS.Tests.Automation/Data/PIMS_Testing_Data.xlsx and b/testing/PIMS.Tests.Automation/Data/PIMS_Testing_Data.xlsx differ
diff --git a/testing/PIMS.Tests.Automation/PIMS.Tests.Automation.csproj b/testing/PIMS.Tests.Automation/PIMS.Tests.Automation.csproj
index daff4dee69..bc60b96b59 100644
--- a/testing/PIMS.Tests.Automation/PIMS.Tests.Automation.csproj
+++ b/testing/PIMS.Tests.Automation/PIMS.Tests.Automation.csproj
@@ -20,18 +20,18 @@
-
+
-
-
+
+
-
+
-
-
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/testing/PIMS.Tests.Automation/PageObjects/AcquisitionDetails.cs b/testing/PIMS.Tests.Automation/PageObjects/AcquisitionDetails.cs
index 957ed134bd..d01560d907 100644
--- a/testing/PIMS.Tests.Automation/PageObjects/AcquisitionDetails.cs
+++ b/testing/PIMS.Tests.Automation/PageObjects/AcquisitionDetails.cs
@@ -14,7 +14,7 @@ public class AcquisitionDetails : PageObjectBase
private readonly By acquisitionFileDetailsTab = By.XPath("//a[contains(text(),'File details')]");
//Acquisition File Details View Form Elements
- private readonly By acquisitionFileViewTitle = By.XPath("//h1[contains(text(),'Acquisition File')]");
+ private readonly By acquisitionFileViewTitle = By.XPath("//html[1]/body[1]/div[1]/div[2]/div[2]/div[1]/div[1]/div[1]/div[1]/div[1]/h1[contains(text(),'Acquisition File')]");
private readonly By acquisitionFileCreateTitle = By.XPath("//h1[contains(text(),'Create Acquisition File')]");
private readonly By acquisitionFileHeaderCodeLabel = By.XPath("//label[contains(text(), 'File:')]");
@@ -186,7 +186,7 @@ public void UpdateAcquisitionFile(AcquisitionFile acquisition)
webDriver.FindElement(acquisitionFileProjectInput).SendKeys(Keys.Backspace);
Wait();
- webDriver.FindElement(acquisitionFileProject1stOption).Click();
+ FocusAndClick(acquisitionFileProject1stOption);
}
if (acquisition.AcquisitionProjProduct != "")
@@ -306,7 +306,7 @@ public void SaveAcquisitionFileDetails()
ButtonElement("Save");
Wait();
- if (webDriver.FindElements(acquisitionFileConfirmationModal).Count() > 0)
+ while (webDriver.FindElements(acquisitionFileConfirmationModal).Count() > 0)
{
if (sharedModals.ModalContent().Contains("The selected Ministry region is different from that associated to one or more selected properties"))
{
@@ -322,16 +322,26 @@ public void SaveAcquisitionFileDetails()
Assert.Contains("To add the property, the spatial details for this property will need to be updated. The system will attempt to update the property record with spatial information from the current selection.", sharedModals.ModalContent());
sharedModals.ModalClickOKBttn();
}
+ else if (sharedModals.ModalContent().Contains("This change will be reflected on other related entities - generated documents, sub-files, etc."))
+ {
+ Assert.Equal("Different Project or Product", sharedModals.ModalHeader());
+ Assert.Contains("This change will be reflected on other related entities - generated documents, sub-files, etc.", sharedModals.ModalContent());
+ Assert.Contains("Do you want to proceed?", sharedModals.ModalContent());
+ sharedModals.ModalClickOKBttn();
+ }
+ Wait();
}
+
+ WaitUntilVisible(acquisitionFileDetailsTab);
}
public void SaveAcquisitionFileDetailsWithExpectedErrors()
{
- Wait();
+ Wait(5000);
ButtonElement("Save");
sharedModals.IsToastyPresent();
- Assert.Contains("Acquisition File Interest Holder can not be removed since it's assigned as a payee for a compensation requisition", sharedModals.ToastifyText());
+ //Assert.Contains("Acquisition File Interest Holder can not be removed since it's assigned as a payee for a compensation requisition", sharedModals.ToastifyText());
}
public void CancelAcquisitionFile()
diff --git a/testing/PIMS.Tests.Automation/PageObjects/AcquisitionStakeholders.cs b/testing/PIMS.Tests.Automation/PageObjects/AcquisitionStakeholders.cs
index 8897dc7a8d..6b05bc6ca9 100644
--- a/testing/PIMS.Tests.Automation/PageObjects/AcquisitionStakeholders.cs
+++ b/testing/PIMS.Tests.Automation/PageObjects/AcquisitionStakeholders.cs
@@ -7,12 +7,12 @@ public class AcquisitionStakeholders : PageObjectBase
{
private By stakeholderLinkTab = By.XPath("//a[contains(text(),'Stakeholders')]");
- private By stakeholderInterestsSubtitle = By.XPath("//h2/div/div[contains(text(),'Interests')]");
+ private By stakeholderInterestsSubtitle = By.XPath("//h2/div/div/div/div[contains(text(),'Interests')]");
private By stakeholderInterestsEditBttn = By.CssSelector("button[title = 'Edit Interests']");
private By stakeholderInterestInitP1 = By.XPath("//p[contains(text(),'There are no interest holders associated with this file.')]");
private By stakeholderInterestInitP2 = By.XPath("//p[contains(text(),'To add an interest holder, click the edit button.')]");
- private By stakeholderNonInterestsSubtitle = By.XPath("//h2/div/div[contains(text(),'Non-interest Payees')]");
+ private By stakeholderNonInterestsSubtitle = By.XPath("//h2/div/div/div/div[contains(text(),'Non-interest Payees')]");
private By stakeholderNonInterestsEditBttn = By.CssSelector("button[title = 'Edit Non-interest payees']");
private By stakeholderNonInterestInitP1 = By.XPath("//p[contains(text(),'There are no non-interest payees associated with this file.')]");
private By stakeholderNonInterestInitP2 = By.XPath("//p[contains(text(),'To add a non-interest payee, click the edit button.')]");
@@ -25,11 +25,11 @@ public class AcquisitionStakeholders : PageObjectBase
private By stakeholderNonInterestsEditP2 = By.XPath("//i[contains(text(),'No Non-interest payees to display')]");
private By stakeholderInterestAddNonInterestHolderLink = By.XPath("//button/div[contains(text(),'Add a Non-interest payee')]");
- private By stakeholderInterestTable = By.XPath("//div[contains(text(),'Interests')]/parent::div/parent::h2/following-sibling::div/div[@data-testid='interest-holders-by-property-table']");
- private By stakeholderInterestTotalCount = By.XPath("//div[contains(text(),'Interests')]/parent::div/parent::h2/following-sibling::div/div[@data-testid='interest-holders-by-property-table']/div[@class='tbody']/div[@class='tr-wrapper']");
+ private By stakeholderInterestTable = By.XPath("//div[contains(text(),'Interests')]/parent::div/parent::div/parent::div/parent::h2/following-sibling::div/div[@data-testid='interest-holders-by-property-table']");
+ private By stakeholderInterestTotalCount = By.XPath("//div[contains(text(),'Interests')]/parent::div/parent::div/parent::div/parent::h2/following-sibling::div/div[@data-testid='interest-holders-by-property-table']/div[@class='tbody']/div[@class='tr-wrapper']");
- private By stakeholderNonInterestTable = By.XPath("//div[contains(text(),'Non-interest Payees')]/parent::div/parent::h2/following-sibling::div/div[@data-testid='interest-holders-by-property-table']");
- private By stakeholderNonInterestTotalCount = By.XPath("//div[contains(text(),'Non-interest Payees')]/parent::div/parent::h2/following-sibling::div/div[@data-testid='interest-holders-by-property-table']/div[@class='tbody']/div[@class='tr-wrapper']");
+ private By stakeholderNonInterestTable = By.XPath("//div[contains(text(),'Non-interest Payees')]/parent::div/parent::div/parent::div/parent::h2/following-sibling::div/div[@data-testid='interest-holders-by-property-table']");
+ private By stakeholderNonInterestTotalCount = By.XPath("//div[contains(text(),'Non-interest Payees')]/parent::div/parent::div/parent::div/parent::h2/following-sibling::div/div[@data-testid='interest-holders-by-property-table']/div[@class='tbody']/div[@class='tr-wrapper']");
//Acquisition File Confirmation Modal Elements
private By acquisitionFileConfirmationModal = By.CssSelector("div[class='modal-content']");
@@ -191,9 +191,9 @@ public void VerifyInterestStakeholderViewForm(AcquisitionStakeholder interest)
AssertTrueIsDisplayed(stakeholderInterestTable);
var lastStakeholder = webDriver.FindElements(stakeholderInterestTotalCount).Count();
- AssertTrueContentEquals(By.XPath("//div[contains(text(),'Interests')]/parent::div/parent::h2/following-sibling::div/div[@data-testid='interest-holders-by-property-table']/div[@class='tbody']/div[@class='tr-wrapper']["+ lastStakeholder +"]/div/div[1]/a"), interest.InterestHolder);
- AssertTrueContentEquals(By.XPath("//div[contains(text(),'Interests')]/parent::div/parent::h2/following-sibling::div/div[@data-testid='interest-holders-by-property-table']/div[@class='tbody']/div[@class='tr-wrapper']["+ lastStakeholder +"]/div/div[2]"), interest.PrimaryContact);
- AssertTrueContentEquals(By.XPath("//div[contains(text(),'Interests')]/parent::div/parent::h2/following-sibling::div/div[@data-testid='interest-holders-by-property-table']/div[@class='tbody']/div[@class='tr-wrapper']["+ lastStakeholder +"]/div/div[3]"), interest.InterestType);
+ AssertTrueContentEquals(By.XPath("//div[contains(text(),'Interests')]/parent::div/parent::div/parent::div/parent::h2/following-sibling::div/div[@data-testid='interest-holders-by-property-table']/div[@class='tbody']/div[@class='tr-wrapper']["+ lastStakeholder +"]/div/div[1]/a"), interest.InterestHolder);
+ AssertTrueContentEquals(By.XPath("//div[contains(text(),'Interests')]/parent::div/parent::div/parent::div/parent::h2/following-sibling::div/div[@data-testid='interest-holders-by-property-table']/div[@class='tbody']/div[@class='tr-wrapper']["+ lastStakeholder +"]/div/div[2]"), interest.PrimaryContact);
+ AssertTrueContentEquals(By.XPath("//div[contains(text(),'Interests')]/parent::div/parent::div/parent::div/parent::h2/following-sibling::div/div[@data-testid='interest-holders-by-property-table']/div[@class='tbody']/div[@class='tr-wrapper']["+ lastStakeholder +"]/div/div[3]"), interest.InterestType);
}
public void VerifyNonInterestStakeholderViewForm(AcquisitionStakeholder interest)
@@ -204,8 +204,8 @@ public void VerifyNonInterestStakeholderViewForm(AcquisitionStakeholder interest
AssertTrueIsDisplayed(stakeholderNonInterestTable);
var lastStakeholder = webDriver.FindElements(stakeholderNonInterestTotalCount).Count();
- AssertTrueContentEquals(By.XPath("//div[contains(text(),'Non-interest Payee')]/parent::div/parent::h2/following-sibling::div/div[@data-testid='interest-holders-by-property-table']/div[@class='tbody']/div[@class='tr-wrapper']["+ lastStakeholder +"]/div/div[1]/a"), interest.PayeeName);
- AssertTrueContentEquals(By.XPath("//div[contains(text(),'Non-interest Payee')]/parent::div/parent::h2/following-sibling::div/div[@data-testid='interest-holders-by-property-table']/div[@class='tbody']/div[@class='tr-wrapper']["+ lastStakeholder +"]/div/div[2]"), interest.StakeholderType);
+ AssertTrueContentEquals(By.XPath("//div[contains(text(),'Non-interest Payee')]/parent::div/parent::div/parent::div/parent::h2/following-sibling::div/div[@data-testid='interest-holders-by-property-table']/div[@class='tbody']/div[@class='tr-wrapper']["+ lastStakeholder +"]/div/div[1]/a"), interest.PayeeName);
+ AssertTrueContentEquals(By.XPath("//div[contains(text(),'Non-interest Payee')]/parent::div/parent::div/parent::div/parent::h2/following-sibling::div/div[@data-testid='interest-holders-by-property-table']/div[@class='tbody']/div[@class='tr-wrapper']["+ lastStakeholder +"]/div/div[2]"), interest.StakeholderType);
}
public int TotalInterestHolders()
diff --git a/testing/PIMS.Tests.Automation/PageObjects/DigitalDocuments.cs b/testing/PIMS.Tests.Automation/PageObjects/DigitalDocuments.cs
index ddae4167f4..73e4b55205 100644
--- a/testing/PIMS.Tests.Automation/PageObjects/DigitalDocuments.cs
+++ b/testing/PIMS.Tests.Automation/PageObjects/DigitalDocuments.cs
@@ -22,15 +22,17 @@ public class DigitalDocuments: PageObjectBase
private readonly By documentUploadConfirmationMessage = By.XPath("//span[contains(text(),'files successfully uploaded')]");
//Update Documents General Elements
- private readonly By documentUpdateDocStatusLabel = By.XPath("//label[contains(text(),'Status')]");
+ private readonly By documentsGeneralUpdateDocumentTypeLabel = By.XPath("//div[@class='modal-body']/div/div/div/div/div/div/label[contains(text(),'Document type')]");
+ private readonly By documentGeneralUpdateDocumentSelect = By.Id("input-documentTypeId");
+ private readonly By documentGeneralUpdateStatusLabel = By.XPath("//div[@class='modal-body']/div/div/div/div/div/div/label[contains(text(),'Status')]");
private readonly By documentUploadStatusSelect = By.Id("input-documentStatusCode");
private readonly By documentUpdateDetailsSubtitle = By.XPath("//h3[contains(text(),'Details')]");
//Upload Documents Other Type Fields
- private readonly By documentOtherTypePINLabel = By.XPath("//div[@class='pb-2 row'][2]/div/label[contains(text(),'PIN')]");
+ private readonly By documentOtherTypePINLabel = By.XPath("//div[@class='pb-2 row'][3]/div/label[contains(text(),'PIN')]");
private readonly By documentOtherTypePINInput = By.Id("input-documentMetadata.71");
- private readonly By documentOtherTypePropIdLabel = By.XPath("//div[@class='pb-2 row'][3]/div/label[contains(text(),'Property identifier')]");
+ private readonly By documentOtherTypePropIdLabel = By.XPath("//div[@class='pb-2 row'][4]/div/label[contains(text(),'Property identifier')]");
private readonly By documentRoadNameInput = By.Id("input-documentMetadata.75");
private readonly By documentShortDescriptorLabel = By.XPath("//label[contains(text(),'Short descriptor')]");
@@ -183,8 +185,8 @@ public class DigitalDocuments: PageObjectBase
private readonly By documentPAPlanProjectNameMandatory = By.XPath("//div[contains(text(),'Project name is required')]");
//View Document Details Elements
- private readonly By documentViewDocumentTypeLabel = By.XPath("//div[@class='modal-body']/div/div/div/div/label[contains(text(),'Document type')]");
- private readonly By documentViewDocumentTypeContent = By.XPath("//div[@class='modal-body']/div/div/div/div/label[contains(text(),'Document type')]/parent::div/following-sibling::div");
+ private readonly By documentViewDocumentTypeLabel = By.XPath("//div[@class='modal-body']/div/div/div/div/div/label[contains(text(),'Document type')]");
+ private readonly By documentViewDocumentTypeContent = By.XPath("//div[@class='modal-body']/div/div/div/div/div/label[contains(text(),'Document type')]/parent::div/following-sibling::div");
private readonly By documenyViewDocumentNameLabel = By.XPath("//div[@class='modal-body']/div/div/div/div/label[contains(text(),'File name')]");
private readonly By documentViewFileNameContent = By.XPath("//div[@class='modal-body']/div/div/div/div/label[contains(text(),'File name')]/parent::div/following-sibling::div");
private readonly By documentViewDownloadButton = By.CssSelector("button[data-testid='document-download-button']");
@@ -455,7 +457,7 @@ public int DigitalDocumentsTableResultNumber()
public void OrderByDocumentFileType()
{
- WaitUntilClickable(documentDocumentTypeSortBttn);
+ Wait();
webDriver.FindElement(documentDocumentTypeSortBttn).Click();
}
@@ -540,6 +542,7 @@ public void SaveDigitalDocumentUpload()
public void SaveDigitalDocumentUpdate()
{
+ Wait();
webDriver.FindElement(documentSaveEditButton).Click();
WaitUntilSpinnerDisappear();
}
@@ -787,6 +790,7 @@ public void InsertDocumentTypeDetails(DigitalDocument document)
public void UpdateNewDocumentType(DigitalDocument document)
{
+ ChooseSpecificSelectOption(documentGeneralUpdateDocumentSelect, document.DocumentType);
ChooseSpecificSelectOption(documentUploadStatusSelect, document.DocumentStatus);
if (document.CanadaLandSurvey != "" && webDriver.FindElements(documentCanLandSurveyTypeCanLandSurveyInput).Count > 0)
@@ -1193,170 +1197,6 @@ public void VerifyDocumentDetailsViewForm(DigitalDocument document)
AssertTrueContentEquals(documentViewYearPrivyCouncilContent, document.YearPrivyCouncil);
}
- //public void VerifyDocumentDetailsUpdateViewForm(DigitalDocument document)
- //{
- // WaitUntilClickable(documentEditBttn);
-
- // //Header
- // AssertTrueIsDisplayed(documentViewDocumentTypeLabel);
-
- // AssertTrueContentNotEquals(documentViewDocumentTypeContent, "");
- // AssertTrueIsDisplayed(documenyViewDocumentNameLabel);
- // AssertTrueContentNotEquals(documentViewFileNameContent, "");
- // AssertTrueIsDisplayed(documentViewDownloadButton);
-
- // //Document Information
- // //AssertTrueIsDisplayed(documentUploadDocInfoSubtitle);
- // AssertTrueIsDisplayed(documentViewDocumentInfoTooltip);
- // AssertTrueIsDisplayed(documentEditBttn);
- // //AssertTrueIsDisplayed(documentUploadStatusLabel);
- // AssertTrueContentEquals(documentViewStatusContent, document.DocumentStatus);
-
- // //Document Details
- // Assert.True(webDriver.FindElement(documentViewDetailsSubtitle).Displayed);
-
- // if (document.CanadaLandSurvey != "" && webDriver.FindElements(documentCanLandSurveyTypeCanLandSurveyLabel).Count > 0)
- // AssertTrueContentEquals(documentViewCanadaLandSurveyContent, document.CanadaLandSurvey);
-
- // if (document.CivicAddress != "" && webDriver.FindElements(documentCivicAddressLabel).Count > 0)
- // AssertTrueContentEquals(documentViewCivicAddressContent, document.CivicAddress);
-
- // if (document.CrownGrant != "" && webDriver.FindElements(documentCrownGrantTypeCrownLabel).Count > 0)
- // AssertTrueContentEquals(documentViewCrownGrantContent,document.CrownGrant);
-
- // if (document.Date != "" && webDriver.FindElements(documentPhotosCorrespondenceTypeDateLabel).Count > 0)
- // AssertTrueContentEquals(documentViewDateContent, TranformFormatDateDocument(document.Date));
-
- // if (document.DateSigned != "" && webDriver.FindElements(documentDateSignedLabel).Count > 0)
- // AssertTrueContentEquals(documentViewDateSignedContent, TranformFormatDateDocument(document.DateSigned));
-
- // if (document.DistrictLot != "" && webDriver.FindElements(documentFieldNotesTypeDistrictLotLabel).Count > 0)
- // AssertTrueContentEquals(documentViewDistrictLotContent, document.DistrictLot);
-
- // if (document.ElectoralDistrict != "" && webDriver.FindElements(documentDistrictRoadRegisterTypeElectoralDistrictLabel).Count > 0)
- // AssertTrueContentEquals(documentViewElectoralDistrictContent, document.ElectoralDistrict);
-
- // if (document.EndDate != "" && webDriver.FindElements(documentHistoricFileTypeEndDateLabel).Count > 0)
- // AssertTrueContentEquals(documentViewEndDateContent, TranformFormatDateDocument(document.EndDate));
-
- // if (document.FieldBook != "" && webDriver.FindElements(documentFieldNotesTypeYearLabel).Count > 0)
- // AssertTrueContentEquals(documentViewFieldBookContent, document.FieldBook);
-
- // if (document.File != "" && webDriver.FindElements(documentHistoricFileTypeFileLabel).Count > 0)
- // AssertTrueContentEquals(documentViewFileNumberContent, document.File);
-
- // if (document.GazetteDate != "" && webDriver.FindElements(documentGazetteDateLabel).Count > 0)
- // AssertTrueContentEquals(documentViewGazetteDateContent, TranformFormatDateDocument(document.GazetteDate));
-
- // if (document.GazettePage != "" && webDriver.FindElements(documentGazettePageLabel).Count > 0)
- // AssertTrueContentEquals(documentViewGazettePageContent, document.GazettePage);
-
- // if (document.GazettePublishedDate != "" && webDriver.FindElements(documentGazettePublishedDateLabel).Count > 0)
- // AssertTrueContentEquals(documentViewGazettePublishedDateContent, TranformFormatDateDocument(document.GazettePublishedDate));
-
- // if (document.GazetteType != "" && webDriver.FindElements(documentGazettePublishedTypeLabel).Count > 0)
- // AssertTrueContentEquals(documentViewGazettePublishedTypeContent, document.GazetteType);
-
- // if (document.HighwayDistrict != "" && webDriver.FindElements(documentDistrictRoadRegisterTypeHighwayDistrictLabel).Count > 0)
- // AssertTrueContentEquals(documentViewGazetteHighwayDistrictContent, document.HighwayDistrict);
-
- // if (document.IndianReserveOrNationalPark != "" && webDriver.FindElements(documentCanLandSurveyTypeIndianReserveLabel).Count > 0)
- // AssertTrueContentEquals(documentViewIndianReserveContent, document.IndianReserveOrNationalPark);
-
- // if (document.Jurisdiction != "" && webDriver.FindElements(documentBCAssessmentTypeJurisdictionLabel).Count > 0)
- // AssertTrueContentEquals(documentViewJurisdictionContent, document.Jurisdiction);
-
- // if (document.LandDistrict != "" && webDriver.FindElements(documentFieldNotesTypeLandDistrictLabel).Count > 0)
- // AssertTrueContentEquals(documentViewLandDistrictContent, document.LandDistrict);
-
- // if (document.LegalSurveyPlan != "" && webDriver.FindElements(documentLegalSurveyNbrLabel).Count > 0)
- // AssertTrueContentEquals(documentViewLegalSurveyPlanContent, document.LegalSurveyPlan);
-
- // if (document.LTSAScheduleFiling != "" && webDriver.FindElements(documentGazetteLTSALabel).Count > 0)
- // AssertTrueContentEquals(documentViewLTSAScheduleFilingContent, document.LTSAScheduleFiling);
-
- // if (document.MO != "" && webDriver.FindElements(documentMinisterialOrderTypeMOLabel).Count > 0)
- // AssertTrueContentEquals(documentViewMOContent, document.MO);
-
- // if (document.MoTIFile != "" && webDriver.FindElements(documentMOTIFileLabel).Count > 0)
- // AssertTrueContentEquals(documentViewMotiFileContent, document.MoTIFile);
-
- // if (document.MoTIPlan != "" && webDriver.FindElements(documentMOTIPlanLabel).Count > 0)
- // AssertTrueContentEquals(documentViewMotiPlanContent, document.MoTIPlan);
-
- // if (document.OIC != "" && webDriver.FindElements(documentOICTypeOICLabel).Count > 0)
- // AssertTrueContentEquals(documentViewOICNumberContent, document.OIC);
-
- // if (document.OICRoute != "" && webDriver.FindElements(documentOICTypeOICRouteLabel).Count > 0)
- // AssertTrueContentEquals(documentViewOICRouteContent, document.OICRoute);
-
- // if (document.OICType != "" && webDriver.FindElements(documentOICTypeOICTypeLabel).Count > 0)
- // AssertTrueContentEquals(documentViewOICTypeContent, document.OICType);
-
- // if (document.Owner != "" && webDriver.FindElements(documentOwnerLabel).Count > 0)
- // AssertTrueContentEquals(documentViewOwnerContent, document.Owner);
-
- // if (document.PhysicalLocation != "" && webDriver.FindElements(documentHistoricFileTypePhyLocationLabel).Count > 0)
- // AssertTrueContentEquals(documentViewPhysicalLocationContent, document.PhysicalLocation);
-
- // if (document.PIDNumber != "" && webDriver.FindElements(documentViewPIDLabel).Count > 0)
- // AssertTrueContentEquals(documentViewPIDContent, document.PIDNumber);
-
- // if (document.PINNumber != "" && webDriver.FindElements(documentOtherTypePINLabel).Count > 0)
- // AssertTrueContentEquals(documentViewPINContent, document.PINNumber);
-
- // if (document.Plan != "" && webDriver.FindElements(documentPAPlanNbrLabel).Count > 0)
- // AssertTrueContentEquals(documentViewPlanNumberContent, document.Plan);
-
- // if (document.PlanRevision != "" && webDriver.FindElements(documentPAPlanRevisionLabel).Count > 0)
- // AssertTrueContentEquals(documentViewPlanRevisionContent, document.PlanRevision);
-
- // if (document.PlanType != "" && webDriver.FindElements(documentLegalSurveyPlanTypeLabel).Count > 0)
- // AssertTrueContentEquals(documentViewPlanTypeContent, document.PlanType);
-
- // if (document.Project != "" && webDriver.FindElements(documentPAPlanProjectLabel).Count > 0)
- // AssertTrueContentEquals(documentViewProjectNumberContent, document.Project);
-
- // if (document.ProjectName != "" && webDriver.FindElements(documentViewProjectLabel).Count > 0)
- // AssertTrueContentEquals(documentViewProjectContent, document.ProjectName);
-
- // if (document.PropertyIdentifier != "" && webDriver.FindElements(documentViewPropertyIdentifierLabel).Count > 0)
- // AssertTrueContentEquals(documentViewPropertyIdentifierContent, document.PropertyIdentifier);
-
- // if (document.PublishedDate != "" && webDriver.FindElements(documentMoTIPlanLegalSurveyPublishDateLabel).Count > 0)
- // AssertTrueContentEquals(documentViewPublishedDateContent,TranformFormatDateDocument(document.PublishedDate));
-
- // if (document.RelatedGazette != "" && webDriver.FindElements(documentMoTIPlanLegalSurveyRelatedGazetteLabel).Count > 0)
- // AssertTrueContentEquals(documentViewRelatedGazetteContent, document.RelatedGazette);
-
- // if (document.RoadName != "" && webDriver.FindElements(documentRoadNameLabel).Count > 0)
- // AssertTrueContentEquals(documentViewRoadNameContent, document.RoadName);
-
- // if (document.Roll != "" && webDriver.FindElements(documentBCAssessmentTypeRollLabel).Count > 0)
- // AssertTrueContentEquals(documentViewRollContent, document.Roll);
-
- // if (document.Section != "" && webDriver.FindElements(documentHistoricFileTypeSectionLabel).Count > 0)
- // AssertTrueContentEquals(documentViewSectionContent, document.Section);
-
- // if (document.ShortDescriptor != "" && webDriver.FindElements(documentShortDescriptorLabel).Count > 0)
- // AssertTrueContentEquals(documentViewShortDescriptorContent, document.ShortDescriptor);
-
- // if (document.StartDate != "" && webDriver.FindElements(documentHistoricFileTypeStartDateLabel).Count > 0)
- // AssertTrueContentEquals(documentViewStartDateContent, TranformFormatDateDocument(document.StartDate));
-
- // if (document.Title != "" && webDriver.FindElements(documentTitleSearchTypeTitleLabel).Count > 0)
- // AssertTrueContentEquals(documentViewTitleContent, document.Title);
-
- // if (document.Transfer != "" && webDriver.FindElements(documentTransferAdmTypeTransferLabel).Count > 0)
- // AssertTrueContentEquals(documentViewTransferContent, document.Transfer);
-
- // if (document.Year != "" && webDriver.FindElements(documentYearLabel).Count > 0)
- // AssertTrueContentEquals(documentViewYearContent, document.Year);
-
- // if (document.YearPrivyCouncil != "" && webDriver.FindElements(documentPrivyCouncilTypePrivyLabel).Count > 0)
- // AssertTrueContentEquals(documentViewYearPrivyCouncilContent, document.YearPrivyCouncil);
- //}
-
public void VerifyInitUploadDocumentForm()
{
WaitUntilVisible(documentsUploadHeader);
@@ -1372,13 +1212,13 @@ private void VerifyGeneralUpdateDocumentForm()
WaitUntilVisible(documentsUploadHeader);
AssertTrueIsDisplayed(documentsUploadHeader);
- AssertTrueIsDisplayed(documentViewDocumentTypeLabel);
- AssertTrueIsDisplayed(documentViewDocumentTypeContent);
AssertTrueIsDisplayed(documenyViewDocumentNameLabel);
AssertTrueIsDisplayed(documentViewFileNameContent);
AssertTrueIsDisplayed(documentViewInfoSubtitle);
- AssertTrueIsDisplayed(documentUploadStatusSelect);
+ AssertTrueIsDisplayed(documentsGeneralUpdateDocumentTypeLabel);
+ AssertTrueIsDisplayed(documentGeneralUpdateDocumentSelect);
+ AssertTrueIsDisplayed(documentGeneralUpdateStatusLabel);
AssertTrueIsDisplayed(documentUploadStatusSelect);
AssertTrueIsDisplayed(documentUpdateDetailsSubtitle);
diff --git a/testing/PIMS.Tests.Automation/PageObjects/HelpDesk.cs b/testing/PIMS.Tests.Automation/PageObjects/HelpDesk.cs
index 5ce1b4bea5..ae7d6a7317 100644
--- a/testing/PIMS.Tests.Automation/PageObjects/HelpDesk.cs
+++ b/testing/PIMS.Tests.Automation/PageObjects/HelpDesk.cs
@@ -5,7 +5,7 @@ namespace PIMS.Tests.Automation.PageObjects
public class HelpDesk : PageObjectBase
{
//Help Desk Main Button
- private By mainMenuHelpDeskBttn = By.CssSelector("div[class='nav-item'] svg");
+ private By mainMenuHelpDeskBttn = By.CssSelector("header div[class='nav-item'] div");
//Modal Header
private By mainMenuHeader = By.XPath("//div[contains(text(),'Help Desk')]");
@@ -13,7 +13,7 @@ public class HelpDesk : PageObjectBase
//Modal Content
private By helpDeskSubtitle = By.XPath("//h3[contains(text(),'Get started with PIMS')]");
private By helpDeskDescription = By.XPath("//p[contains(text(),'This overview has useful tools that will support you to start using the application. You can also watch the video demos.')]");
- private By helpDeskPIMSResourcesLink = By.XPath("//a[contains(text(),'PIMS Resources')]");
+ private By helpDeskPIMSResourcesLink = By.XPath("//a[contains(text(),'PIMS Training Materials')]");
private By helpDeskContactUsSubtitle = By.XPath("//h3[contains(text(),'Contact us')]");
private By helpDeskUserLabel = By.XPath("//label[contains(text(),'Name')]");
@@ -26,7 +26,7 @@ public class HelpDesk : PageObjectBase
//Help Desk Buttons Elements
private By noButton = By.CssSelector("button[data-testid='cancel-modal-button']");
- private By yesButton = By.CssSelector("a[data-testid='ok-modal-button']");
+ private By yesButton = By.CssSelector("div[class='modal-footer'] button[data-testid='ok-modal-button']");
public HelpDesk(IWebDriver webDriver) : base(webDriver)
{}
@@ -34,7 +34,7 @@ public HelpDesk(IWebDriver webDriver) : base(webDriver)
public void NavigateToHelpDesk()
{
Wait();
- webDriver.FindElement(mainMenuHelpDeskBttn).Click();
+ FocusAndClick(mainMenuHelpDeskBttn);
}
public void VerifyHelpDeskModal()
diff --git a/testing/PIMS.Tests.Automation/PageObjects/LeaseConsultations.cs b/testing/PIMS.Tests.Automation/PageObjects/LeaseConsultations.cs
index 951475c7b7..50c22698b6 100644
--- a/testing/PIMS.Tests.Automation/PageObjects/LeaseConsultations.cs
+++ b/testing/PIMS.Tests.Automation/PageObjects/LeaseConsultations.cs
@@ -19,10 +19,10 @@ public class LeaseConsultations : PageObjectBase
private readonly By consultationFirstNationExpandBttn = By.XPath("//span[contains(text(),'First Nation')]/parent::div/parent::div/parent::div/following-sibling::div/*");
private readonly By consultationHeadquarterSubtitle = By.XPath("//span[contains(text(),'Headquarter (HQ)')]");
private readonly By consultationHeadquarterExpandBttn = By.XPath("//span[contains(text(),'Headquarter (HQ)')]/parent::div/parent::div/parent::div/following-sibling::div/*");
- private readonly By consultationRegionalPlanningSubtitle = By.XPath("//span[contains(text(),'Regional planning')]");
- private readonly By consultationRegionalPlanningExpandBttn = By.XPath("//span[contains(text(),'Regional planning')]/parent::div/parent::div/parent::div/following-sibling::div/*");
- private readonly By consultationRegionalPropServicesSubtitle = By.XPath("//span[contains(text(),'Regional property services')]");
- private readonly By consultationRegionalPropServicesExpandBttn = By.XPath("//span[contains(text(),'Regional property services')]/parent::div/parent::div/parent::div/following-sibling::div/*");
+ private readonly By consultationRegionalPlanningSubtitle = By.XPath("//span[contains(text(),'Regional Planning')]");
+ private readonly By consultationRegionalPlanningExpandBttn = By.XPath("//span[contains(text(),'Regional Planning')]/parent::div/parent::div/parent::div/following-sibling::div/*");
+ private readonly By consultationRegionalPropServicesSubtitle = By.XPath("//span[contains(text(),'Regional Property Services')]");
+ private readonly By consultationRegionalPropServicesExpandBttn = By.XPath("//span[contains(text(),'Regional Property Services')]/parent::div/parent::div/parent::div/following-sibling::div/*");
private readonly By consultationSRESubtitle = By.XPath("//span[contains(text(),'Strategic Real Estate (SRE)')]");
private readonly By consultationSREExpandBttn = By.XPath("//span[contains(text(),'Strategic Real Estate (SRE)')]/parent::div/parent::div/parent::div/following-sibling::div/*");
private readonly By consultationOtherSubtitle = By.XPath("//span[contains(text(),'Other')]");
diff --git a/testing/PIMS.Tests.Automation/PageObjects/LeaseDetails.cs b/testing/PIMS.Tests.Automation/PageObjects/LeaseDetails.cs
index 7c093786b4..e20d494a57 100644
--- a/testing/PIMS.Tests.Automation/PageObjects/LeaseDetails.cs
+++ b/testing/PIMS.Tests.Automation/PageObjects/LeaseDetails.cs
@@ -20,6 +20,7 @@ public class LeaseDetails : PageObjectBase
private readonly By licenseHeaderProperty = By.XPath("//h1[contains(text(),'Lease / Licence')]/parent::div/parent::div/following-sibling::div[2]/div[1]/div/div/div/div[2]/div/label[contains(text(),'Property')]");
private readonly By licenseHeaderPropertyContent = By.XPath("//h1[contains(text(),'Lease / Licence')]/parent::div/parent::div/following-sibling::div[2]/div[1]/div/div/div/div[2]/div/label[contains(text(),'Property')]/parent::div/following-sibling::div/div/span");
private readonly By licenseHeaderTenantLabel = By.XPath("//label[contains(text(),'Tenant')]");
+ private readonly By licenseHeaderPayeeLabel = By.XPath("//label[contains(text(),'Payee')]");
private readonly By licenseHeaderStartDateLabel = By.XPath("//h1/parent::div/parent::div/following-sibling::div[2]/div/div/div/div/div[4]/div/label[contains(text(),'Commencement')]");
private readonly By licenseHeaderStartDateContent = By.XPath("//label[contains(text(),'Commencement')]/parent::div/following-sibling::div[1]");
private readonly By licenseHeaderExpiryDateLabel = By.XPath("//label[contains(text(),'Commencement')]/parent::div/following-sibling::div[2]/label[contains(text(),'Expiry')]");
@@ -227,6 +228,12 @@ public void CreateMinimumLicenseDetails(Lease lease)
webDriver.FindElement(licenseDetailsCommencementDateInput).SendKeys(Keys.Enter);
}
+ if (lease.LeaseExpiryDate != "")
+ {
+ webDriver.FindElement(licenseDetailsExpiryDateInput).SendKeys(lease.LeaseExpiryDate);
+ webDriver.FindElement(licenseDetailsExpiryDateInput).SendKeys(Keys.Enter);
+ }
+
//Administration Details
//MOTI Region
if(lease.MOTIRegion != "")
@@ -696,14 +703,16 @@ public void VerifyLicenseHeader(Lease lease)
AssertTrueContentNotEquals(licenseHeaderNbrContent, "");
AssertTrueContentNotEquals(licenseHeaderAccountType, "");
AssertTrueIsDisplayed(licenseHeaderProperty);
- //AssertTrueIsDisplayed(licenseHeaderPropertyContent);
- AssertTrueIsDisplayed(licenseHeaderTenantLabel);
+
+ if(lease.AccountType == "Receivable")
+ AssertTrueIsDisplayed(licenseHeaderTenantLabel);
+ else
+ AssertTrueIsDisplayed(licenseHeaderPayeeLabel);
AssertTrueIsDisplayed(licenseHeaderStartDateLabel);
AssertTrueContentEquals(licenseHeaderStartDateContent, TransformDateFormat(lease.LeaseStartDate));
AssertTrueIsDisplayed(licenseHeaderExpiryDateLabel);
AssertTrueContentEquals(licenseHeaderExpiryDateContent, CalculateExpiryCurrentDate(lease.LeaseExpiryDate, lease.LeaseRenewals));
AssertTrueIsDisplayed(licenseHeaderHistoricalFileLabel);
- //Assert.True(webDriver.FindElements(licenseHeaderHistoricalFileContent).Count > 0);
AssertTrueIsDisplayed(licenseHeaderCreatedLabel);
AssertTrueContentNotEquals(licenseHeaderCreatedContent, "");
AssertTrueContentEquals(licenseHeaderCreatedByContent, "TRANPSP1");
@@ -725,14 +734,17 @@ public void VerifyLicenseHeader(Lease lease)
}
}
- public void VerifyLicensePropertiesHeader()
+ public void VerifyLicensePropertiesHeader(string leaseType)
{
AssertTrueIsDisplayed(licenseHeaderNbrLabel);
AssertTrueContentNotEquals(licenseHeaderNbrContent, "");
AssertTrueContentNotEquals(licenseHeaderAccountType, "");
AssertTrueIsDisplayed(licenseHeaderProperty);
AssertTrueIsDisplayed(licenseHeaderPropertyContent);
- AssertTrueIsDisplayed(licenseHeaderTenantLabel);
+ if (leaseType == "Receivable")
+ AssertTrueIsDisplayed(licenseHeaderTenantLabel);
+ else
+ AssertTrueIsDisplayed(licenseHeaderPayeeLabel);
AssertTrueIsDisplayed(licenseHeaderStartDateLabel);
AssertTrueIsDisplayed(licenseHeaderExpiryDateLabel);
AssertTrueIsDisplayed(licenseHeaderHistoricalFileLabel);
@@ -922,9 +934,9 @@ public void VerifyLicenseDetailsViewForm(Lease lease)
AssertTrueContentEquals(licenseDetailsFeeDeterminationNotesContent, lease.FeeDeterminationNotes);
}
- public void VerifyLicensePropertyViewForm(List properties)
+ public void VerifyLicensePropertyViewForm(List properties, string leaseType)
{
- VerifyLicensePropertiesHeader();
+ VerifyLicensePropertiesHeader(leaseType);
AssertTrueIsDisplayed(leasePropertiesSubtitle);
for (var i = 0; i < properties.Count; i++)
diff --git a/testing/PIMS.Tests.Automation/PageObjects/PageObjectBase.cs b/testing/PIMS.Tests.Automation/PageObjects/PageObjectBase.cs
index 8e90ab7de5..7120af6169 100644
--- a/testing/PIMS.Tests.Automation/PageObjects/PageObjectBase.cs
+++ b/testing/PIMS.Tests.Automation/PageObjects/PageObjectBase.cs
@@ -113,7 +113,6 @@ protected void ChooseSpecificSelectOption(By parentElement, string option)
var selectedOption = childrenElements.Should().ContainSingle(b => b.Text.Equals(option)).Subject;
js.ExecuteScript("arguments[0].scrollIntoView();", selectedOption);
-
selectedOption.Click();
}
diff --git a/testing/PIMS.Tests.Automation/PageObjects/Projects.cs b/testing/PIMS.Tests.Automation/PageObjects/Projects.cs
index 0dbb8da976..09a3073641 100644
--- a/testing/PIMS.Tests.Automation/PageObjects/Projects.cs
+++ b/testing/PIMS.Tests.Automation/PageObjects/Projects.cs
@@ -59,7 +59,7 @@ public class Projects : PageObjectBase
private By productDeleteButton = By.CssSelector("button[title='Delete Project']");
//View Project Form Elements
- private By projectViewTitle = By.XPath("//h1[contains(text(),'Project')]");
+ private By projectViewTitle = By.XPath("//html[1]/body[1]/div[1]/div[2]/div[2]/div[1]/div[1]/div[1]/div[1]/div[1]/h1[contains(text(),'Project')]");
private By projectHeaderProjectNameLabel = By.XPath("//h1[contains(text(),'Project')]/parent::div/parent::div/following-sibling::div/div/div/div/div/div/label[contains(text(),'Project')]");
private By projectHeaderProjectNameContent = By.XPath("//h1[contains(text(),'Project')]/parent::div/parent::div/following-sibling::div/div/div/div/div/div/label[contains(text(),'Project')]/parent::div/following-sibling::div");
private By projectHeaderMoTIRegionLabel = By.XPath("//label[contains(text(),'MoTI region')]");
diff --git a/testing/PIMS.Tests.Automation/PageObjects/PropertyManagementTab.cs b/testing/PIMS.Tests.Automation/PageObjects/PropertyManagementTab.cs
index 80360fdd25..e875d43a7e 100644
--- a/testing/PIMS.Tests.Automation/PageObjects/PropertyManagementTab.cs
+++ b/testing/PIMS.Tests.Automation/PageObjects/PropertyManagementTab.cs
@@ -21,7 +21,7 @@ public class PropertyManagementTab : PageObjectBase
private readonly By managementAdditionalDetailsContent = By.XPath("//label[contains(text(),'Additional details')]/parent::div/following-sibling::div");
//Create Summary Elements
- private readonly By managementSummaryEditBttn = By.XPath("//div[contains(text(),'Summary')]/parent::div/parent::h2/following-sibling::div/div/button[@data-testid='edit-button']");
+ private readonly By managementSummaryEditBttn = By.CssSelector("button[title='Edit property management information']");
private readonly By managementPropertyPurposeInput = By.Id("multiselect-managementPurposes_input");
private readonly By managementPropertyPurposeOptions = By.XPath("//input[@id='multiselect-managementPurposes_input']/parent::div/following-sibling::div/ul[@class='optionContainer']");
private readonly By managementPropertyPurposeDeleteBttns = By.CssSelector("div[id='multiselect-managementPurposes'] i[class='custom-close']");
@@ -111,7 +111,7 @@ public class PropertyManagementTab : PageObjectBase
private readonly By managementActInvoiceGrandTotalContent = By.XPath("//div[contains(text(),'Invoices Total')]/parent::div/parent::h2/following-sibling::div/div/div/label[contains(text(),'Total amount')]/parent::div/following-sibling::div");
//Invoices View Element
- private readonly By managementAddInvoiceBttn = By.XPath("//div[contains(text(),'Invoices Total')]/parent::div/parent::h2/parent::div/preceding-sibling::div/div/button");
+ private readonly By managementAddInvoiceBttn = By.XPath("//div[contains(text(),'Invoices Total')]/following-sibling::div/button");
private readonly By managementInvoicesTotalSubtitle = By.XPath("//div[contains(text(),'Invoices Total')]");
private readonly By managementActPretaxAmountLabel = By.XPath("//label[contains(text(),'Total (before tax)')]");
private readonly By managementActPretaxAmountInput = By.Id("input-pretaxAmount");
diff --git a/testing/PIMS.Tests.Automation/PageObjects/SearchProperties.cs b/testing/PIMS.Tests.Automation/PageObjects/SearchProperties.cs
index a3de0261ff..e30ba01e09 100644
--- a/testing/PIMS.Tests.Automation/PageObjects/SearchProperties.cs
+++ b/testing/PIMS.Tests.Automation/PageObjects/SearchProperties.cs
@@ -126,7 +126,7 @@ public void SelectFoundPin()
public void NavigatePropertyListView()
{
- Wait();
+ Wait(10000);
webDriver.FindElement(searchPropertyListViewIcon).Click();
}
diff --git a/testing/PIMS.Tests.Automation/PageObjects/SearchResearchFiles.cs b/testing/PIMS.Tests.Automation/PageObjects/SearchResearchFiles.cs
index 6de82a1560..dc8b29f7dc 100644
--- a/testing/PIMS.Tests.Automation/PageObjects/SearchResearchFiles.cs
+++ b/testing/PIMS.Tests.Automation/PageObjects/SearchResearchFiles.cs
@@ -68,7 +68,7 @@ public SearchResearchFiles(IWebDriver webDriver) : base(webDriver)
//Navigates to Search a Research File
public void NavigateToSearchResearchFile()
{
- Wait();
+ Wait(4000);
FocusAndClick(menuResearchButton);
Wait();
diff --git a/testing/PIMS.Tests.Automation/PageObjects/SharedModals.cs b/testing/PIMS.Tests.Automation/PageObjects/SharedModals.cs
index 43c235979a..0ddac1062d 100644
--- a/testing/PIMS.Tests.Automation/PageObjects/SharedModals.cs
+++ b/testing/PIMS.Tests.Automation/PageObjects/SharedModals.cs
@@ -45,7 +45,7 @@ public void ModalClickOKBttn()
public void ModalClickCancelBttn()
{
- Wait(2000);
+ Wait();
webDriver.FindElement(generalModalCancelBttn).Click();
}
diff --git a/testing/PIMS.Tests.Automation/PageObjects/SubdivisionConsolidationProperties.cs b/testing/PIMS.Tests.Automation/PageObjects/SubdivisionConsolidationProperties.cs
index 19c5b87a03..2fc9d0b279 100644
--- a/testing/PIMS.Tests.Automation/PageObjects/SubdivisionConsolidationProperties.cs
+++ b/testing/PIMS.Tests.Automation/PageObjects/SubdivisionConsolidationProperties.cs
@@ -167,7 +167,7 @@ public void SaveConsolidation()
public void CancelSubdivisionConsolidation()
{
- Wait();
+ Wait(4000);
webDriver.FindElement(subconPropertiesCancelButton).Click();
sharedModals.CancelActionModal();
diff --git a/testing/PIMS.Tests.Automation/StepDefinitions/AcquisitionFileSteps.cs b/testing/PIMS.Tests.Automation/StepDefinitions/AcquisitionFileSteps.cs
index 02ed4e85ea..03bd67e540 100644
--- a/testing/PIMS.Tests.Automation/StepDefinitions/AcquisitionFileSteps.cs
+++ b/testing/PIMS.Tests.Automation/StepDefinitions/AcquisitionFileSteps.cs
@@ -604,6 +604,9 @@ public void UpdateCompensationRequisition(int rowNumber)
//Select first created compensation requisition
h120.OpenCompensationDetails(0);
+ //Update Allowable Compensation Amount
+ h120.UpdateTotalAllowableCompensation(acquisitionFile.AcquisitionCompensationTotalAllowableAmount);
+
//Edit Compensation button
h120.EditCompensationDetails();
diff --git a/testing/PIMS.Tests.Automation/StepDefinitions/DigitalDocumentSteps.cs b/testing/PIMS.Tests.Automation/StepDefinitions/DigitalDocumentSteps.cs
index 87277636f9..4113226a50 100644
--- a/testing/PIMS.Tests.Automation/StepDefinitions/DigitalDocumentSteps.cs
+++ b/testing/PIMS.Tests.Automation/StepDefinitions/DigitalDocumentSteps.cs
@@ -97,6 +97,7 @@ public void DocumentTabCreate(string fileType, int rowNumber)
digitalDocumentsTab.VerifyDocumentFields(digitalDocumentList[l].DocumentType);
digitalDocumentsTab.InsertDocumentTypeDetails(digitalDocumentList[l]);
digitalDocumentsTab.SaveDigitalDocumentUpdate();
+
}
//Go back to 1st page
diff --git a/testing/PIMS.Tests.Automation/StepDefinitions/LeaseLicenseSteps.cs b/testing/PIMS.Tests.Automation/StepDefinitions/LeaseLicenseSteps.cs
index 75e2c36e1b..de7a213e6f 100644
--- a/testing/PIMS.Tests.Automation/StepDefinitions/LeaseLicenseSteps.cs
+++ b/testing/PIMS.Tests.Automation/StepDefinitions/LeaseLicenseSteps.cs
@@ -157,7 +157,7 @@ public void AddPropertiesLicenseDetails()
leaseDetails.SaveLicense();
//Verify File Details Form
- leaseDetails.VerifyLicensePropertyViewForm(lease.LeasePropertiesDetails);
+ leaseDetails.VerifyLicensePropertyViewForm(lease.LeasePropertiesDetails, lease.AccountType);
}
[StepDefinition(@"I update a Lease's Details from row number (.*)")]
@@ -221,7 +221,7 @@ public void UpdateLeaseProperties(int rowNumber)
leaseDetails.SaveLicense();
//Verify File Details Form
- leaseDetails.VerifyLicensePropertyViewForm(lease.LeasePropertiesDetails);
+ leaseDetails.VerifyLicensePropertyViewForm(lease.LeasePropertiesDetails, lease.AccountType);
//Edit File Details Section
leaseDetails.EditLeaseFileDetailsBttn();
diff --git a/testing/PIMS.Tests.Automation/StepDefinitions/PropertiesSteps.cs b/testing/PIMS.Tests.Automation/StepDefinitions/PropertiesSteps.cs
index a84c83a47d..3014b4d4ae 100644
--- a/testing/PIMS.Tests.Automation/StepDefinitions/PropertiesSteps.cs
+++ b/testing/PIMS.Tests.Automation/StepDefinitions/PropertiesSteps.cs
@@ -53,6 +53,13 @@ public void SearchInventoryPropertyOnMap(int rowNumber)
//Validate that the result gives only one pin
Assert.True(searchProperties.PropertiesMapFoundCount() == 1);
+ //Search for a valid Plan in Inventory
+ searchProperties.SearchPropertyReset();
+ searchProperties.SearchPropertyByPlan(searchProperty.PlanNumber);
+
+ //Validate that the result gives only one pin
+ Assert.True(searchProperties.PropertiesClustersFoundCount() == 1);
+
//Search for a valid PIN in Inventory
searchProperties.SearchPropertyReset();
searchProperties.SearchPropertyByPINPID(searchProperty.PIN);
@@ -66,14 +73,6 @@ public void SearchInventoryPropertyOnMap(int rowNumber)
//Validate that the result gives only one pin
Assert.True(searchProperties.PropertiesMapFoundCount() == 1);
-
- //Search for a valid Plan in Inventory
- searchProperties.SearchPropertyReset();
- searchProperties.SearchPropertyByPlan(searchProperty.PlanNumber);
-
- //Validate that the result gives only one pin
- Assert.True(searchProperties.PropertiesClustersFoundCount() == 1);
-
}
[StepDefinition(@"I search for an Invalid Property from row number (.*)")]
@@ -191,7 +190,7 @@ public void ReviewPropertyInformationList(int rowNumber)
searchProperties.SearchPropertyByAddressList(searchProperty.Address);
//Validate that the result gives only one pin
- Assert.True(searchProperties.PropertiesListFoundCount() == 1);
+ Assert.True(searchProperties.PropertiesListFoundCount() == 3);
//Search for a valid PIN in Inventory
searchProperties.SearchPropertyReset();
@@ -212,7 +211,7 @@ public void ReviewPropertyInformationList(int rowNumber)
searchProperties.SearchPropertyByPlan(searchProperty.PlanNumber);
//Validate that the result gives only one pin
- Assert.True(searchProperties.PropertiesListFoundCount() == 2);
+ Assert.True(searchProperties.PropertiesListFoundCount() == 1);
}
[StepDefinition(@"I search for a non MOTI property from row number (.*)")]
diff --git a/tools/mayan_sync_helper/json_output/mayan_sync.json b/tools/mayan_sync_helper/json_output/mayan_sync.json
index 22b56f884c..346d0c3c3b 100644
--- a/tools/mayan_sync_helper/json_output/mayan_sync.json
+++ b/tools/mayan_sync_helper/json_output/mayan_sync.json
@@ -2,272 +2,296 @@
"document_types": [
{
"categories": [
- "PROJECT",
- "RESEARCH",
"ACQUIRE",
- "LEASLIC",
"MANAGEMENT"
],
- "display_order": 43,
- "label": "PA plans / Design drawings",
- "purpose": "testing purpose 36",
+ "display_order": 0,
+ "label": "Affidavit of service",
+ "purpose": "The Affidavit of Services and correspondence with the Process Server ",
"metadata_types": [
{
- "name": "PROJECT_NAME",
- "required": false
- },
- {
- "name": "PROJECT_NUMBER",
+ "name": "SHORT_DESCRIPTOR",
"required": false
- },
+ }
+ ],
+ "name": "AFFISERV"
+ },
+ {
+ "categories": [
+ "ACQUIRE"
+ ],
+ "display_order": 1,
+ "label": "Agricultural Land Commission (ALC)",
+ "purpose": "For ALC Applications, Orders, and Resolutions ",
+ "metadata_types": [
{
- "name": "PLAN_NUMBER",
+ "name": "APPLICATION_NUMBER",
"required": false
},
{
- "name": "PLAN_REVISION",
+ "name": "SHORT_DESCRIPTOR",
"required": false
}
],
- "name": "PAPLAN"
+ "name": "ALC"
},
{
"categories": [
- "RESEARCH",
"ACQUIRE",
- "LEASLIC",
- "DISPOSE",
"MANAGEMENT"
],
- "display_order": 24,
- "label": "Gazette",
- "purpose": "testing purpose 19",
+ "display_order": 25,
+ "label": "Form 5 - Approval of expropriation",
+ "purpose": "The Approval of Expropriation (Form 5) for Expropriations",
"metadata_types": [
{
- "name": "ROAD_NAME",
- "required": false
- },
- {
- "name": "GAZETTE_PUBLISHED_DATE",
- "required": false
- },
- {
- "name": "GAZETTE_DATE",
- "required": false
- },
- {
- "name": "GAZETTE_PAGE_NUMBER",
- "required": false
- },
- {
- "name": "GAZETTE_TYPE",
- "required": false
- },
- {
- "name": "MOTI_PLAN_NUMBER",
- "required": false
- },
- {
- "name": "LEGAL_SURVEY_PLAN_NUMBER",
- "required": false
- },
- {
- "name": "LTSA_SCHEDULE_FILING_NUMBER",
+ "name": "SHORT_DESCRIPTOR",
"required": false
}
],
- "name": "GAZE"
+ "name": "APPREXPR"
},
{
"categories": [
- "PROJECT",
- "RESEARCH",
"ACQUIRE",
- "LEASLIC",
"DISPOSE",
+ "LEASLIC",
"MANAGEMENT"
],
- "display_order": 34,
- "label": "MoTI plan",
- "purpose": "testing purpose 28",
+ "display_order": 2,
+ "label": "Appraisals/Reviews",
+ "purpose": "Appraisals property in draft / final state",
"metadata_types": [
{
- "name": "MOTI_PLAN_NUMBER",
+ "name": "SHORT_DESCRIPTOR",
"required": false
- },
+ }
+ ],
+ "name": "APPRREVI"
+ },
+ {
+ "categories": [
+ "ACQUIRE",
+ "DISPOSE",
+ "LEASLIC",
+ "MANAGEMENT",
+ "RESEARCH"
+ ],
+ "display_order": 4,
+ "label": "BC assessment search",
+ "purpose": "BC Assessment search",
+ "metadata_types": [
{
- "name": "RELATED_GAZETTE",
+ "name": "CIVIC_ADDRESS",
"required": false
},
{
- "name": "PUBLISHED_DATE",
+ "name": "JURISDICTION",
"required": false
},
{
- "name": "LEGAL_SURVEY_PLAN_NUMBER",
+ "name": "ROLL_NUMBER",
"required": false
},
{
- "name": "MOTI_FILE_NUMBER",
+ "name": "YEAR",
"required": false
}
],
- "name": "MOTIPLAN"
+ "name": "BCASSE"
},
{
"categories": [
- "PROJECT",
- "RESEARCH",
"ACQUIRE",
- "LEASLIC",
"DISPOSE",
- "MANAGEMENT"
+ "LEASLIC",
+ "MANAGEMENT",
+ "PROJECT",
+ "RESEARCH"
],
- "display_order": 30,
- "label": "Legal survey plan",
- "purpose": "testing purpose 23",
+ "display_order": 5,
+ "label": "Briefing notes",
+ "purpose": "Draft / final versions of the briefing notes",
"metadata_types": [
{
- "name": "LEGAL_SURVEY_PLAN_NUMBER",
- "required": false
- },
- {
- "name": "MOTI_PLAN_NUMBER",
- "required": false
- },
- {
- "name": "PLAN_TYPE",
+ "name": "SHORT_DESCRIPTOR",
"required": false
}
],
- "name": "LEGASURV"
+ "name": "BRIENOTE"
},
{
"categories": [
- "RESEARCH",
"ACQUIRE",
"LEASLIC",
- "DISPOSE",
- "MANAGEMENT"
+ "MANAGEMENT",
+ "RESEARCH"
],
- "display_order": 39,
- "label": "Order in Council (OIC)",
- "purpose": "testing purpose 33",
+ "display_order": 7,
+ "label": "Canada lands survey",
+ "purpose": "Surveys registered in the Canada Land System.",
"metadata_types": [
{
- "name": "OIC_NUMBER",
- "required": false
- },
- {
- "name": "YEAR",
- "required": false
- },
- {
- "name": "OIC_TYPE",
+ "name": "CANADA_LAND_SURVEY_NUMBER",
"required": false
},
{
- "name": "OIC_ROUTE_NUMBER",
+ "name": "INDIAN_RESERVE_OR_NATIONAL_PARK",
"required": false
- },
+ }
+ ],
+ "name": "CANALAND"
+ },
+ {
+ "categories": [
+ "MANAGEMENT"
+ ],
+ "display_order": 6,
+ "label": "CDOGS template",
+ "purpose": "Templates used for document generation in PIMS",
+ "metadata_types": [],
+ "name": "CDOGTEMP"
+ },
+ {
+ "categories": [
+ "DISPOSE",
+ "MANAGEMENT"
+ ],
+ "display_order": 8,
+ "label": "Certificate of Compliance",
+ "purpose": "The Certificate of Compliance (CoC)",
+ "metadata_types": [
{
- "name": "ROAD_NAME",
+ "name": "SHORT_DESCRIPTOR",
"required": false
}
],
- "name": "OIC"
+ "name": "CERTCOMPL"
},
{
"categories": [
- "RESEARCH",
"ACQUIRE",
+ "DISPOSE",
"LEASLIC",
"MANAGEMENT"
],
- "display_order": 45,
- "label": "Privy council",
- "purpose": "testing purpose 38",
+ "display_order": 9,
+ "label": "Certificate of Insurance (H0111)",
+ "purpose": "The Certificate of Insurance H.0111",
"metadata_types": [
{
- "name": "YEAR_PRIVY_COUNCIL_NUMBER",
+ "name": "SHORT_DESCRIPTOR",
"required": false
}
],
- "name": "PRIVCOUN"
+ "name": "CERTINSU"
},
{
"categories": [
- "RESEARCH",
"ACQUIRE",
- "LEASLIC",
+ "DISPOSE",
"MANAGEMENT"
],
- "display_order": 16,
- "label": "Crown grant",
- "purpose": "testing purpose 15",
+ "display_order": 11,
+ "label": "Compensation cheque",
+ "purpose": "The compensation cheque ",
"metadata_types": [
{
- "name": "CROWN_GRANT_NUMBER",
+ "name": "SHORT_DESCRIPTOR",
"required": false
}
],
- "name": "CROWGRAN"
+ "name": "COMPCHEQ"
},
{
"categories": [
- "PROJECT",
- "RESEARCH",
"ACQUIRE",
- "LEASLIC",
"DISPOSE",
"MANAGEMENT"
],
- "display_order": 25,
- "label": "Historical file",
- "purpose": "testing purpose 20",
+ "display_order": 12,
+ "label": "Compensation requisition (H-120)",
+ "purpose": "The H.120 Compensation Requisitions ",
"metadata_types": [
{
- "name": "FILE_NUMBER",
- "required": false
- },
- {
- "name": "SECTION_NUMBER",
+ "name": "SHORT_DESCRIPTOR",
"required": false
- },
+ }
+ ],
+ "name": "COMPREQU"
+ },
+ {
+ "categories": [
+ "ACQUIRE",
+ "DISPOSE",
+ "LEASLIC",
+ "MANAGEMENT",
+ "RESEARCH"
+ ],
+ "display_order": 10,
+ "label": "Company search",
+ "purpose": "The company search",
+ "metadata_types": [
{
- "name": "START_DATE",
+ "name": "SHORT_DESCRIPTOR",
"required": false
- },
+ }
+ ],
+ "name": "COMPSEAR"
+ },
+ {
+ "categories": [
+ "ACQUIRE",
+ "MANAGEMENT",
+ "RESEARCH"
+ ],
+ "display_order": 13,
+ "label": "Condition of entry (H0443)",
+ "purpose": "H.0443 Conditions of Entry ",
+ "metadata_types": [
{
- "name": "END_DATE",
+ "name": "SHORT_DESCRIPTOR",
"required": false
- },
+ }
+ ],
+ "name": "CONDENTR"
+ },
+ {
+ "categories": [
+ "DISPOSE",
+ "LEASLIC",
+ "MANAGEMENT"
+ ],
+ "display_order": 14,
+ "label": "Conveyance closing documents (ex: PTT forms, Form A transfer etc.)",
+ "purpose": "The conveyance closing documents which might include PTT, Form A Transfer, or Statement of Adjustments. ",
+ "metadata_types": [
{
- "name": "PHYSICAL_LOCATION",
+ "name": "SHORT_DESCRIPTOR",
"required": false
}
],
- "name": "HISTFILE"
+ "name": "CONVCLOS"
},
{
"categories": [
- "PROJECT",
- "RESEARCH",
"ACQUIRE",
- "LEASLIC",
"DISPOSE",
- "MANAGEMENT"
+ "LEASLIC",
+ "MANAGEMENT",
+ "PROJECT",
+ "RESEARCH"
],
"display_order": 15,
"label": "Correspondence",
- "purpose": "testing purpose 10",
+ "purpose": "Attach letters, memos, emails (not record of negotiation, or legal correspondence)",
"metadata_types": [
{
- "name": "PROPERTY_IDENTIFIER",
+ "name": "CIVIC_ADDRESS",
"required": false
},
{
- "name": "CIVIC_ADDRESS",
+ "name": "DATE",
"required": false
},
{
@@ -275,11 +299,11 @@
"required": false
},
{
- "name": "SHORT_DESCRIPTOR",
+ "name": "PROPERTY_IDENTIFIER",
"required": false
},
{
- "name": "DATE",
+ "name": "SHORT_DESCRIPTOR",
"required": false
}
],
@@ -287,286 +311,272 @@
},
{
"categories": [
- "RESEARCH",
"ACQUIRE",
- "LEASLIC",
+ "MANAGEMENT",
+ "RESEARCH"
+ ],
+ "display_order": 16,
+ "label": "Crown grant",
+ "purpose": "The crown grant application and final crown grant",
+ "metadata_types": [
+ {
+ "name": "CROWN_GRANT_NUMBER",
+ "required": false
+ }
+ ],
+ "name": "CROWGRAN"
+ },
+ {
+ "categories": [
+ "ACQUIRE",
"DISPOSE",
- "MANAGEMENT"
+ "MANAGEMENT",
+ "RESEARCH"
],
- "display_order": 54,
- "label": "Title search / Historical title",
- "purpose": "testing purpose 46",
+ "display_order": 17,
+ "label": "District road register",
+ "purpose": "The District road register ",
"metadata_types": [
{
- "name": "PID",
+ "name": "ELECTORAL_DISTRICT",
"required": false
},
{
- "name": "TITLE_NUMBER",
+ "name": "HIGHWAY_DISTRICT",
"required": false
},
{
- "name": "OWNER",
+ "name": "ROAD_NAME",
"required": false
}
],
- "name": "TITLSEAR"
+ "name": "DISTREGI"
},
{
"categories": [
- "RESEARCH",
- "ACQUIRE",
- "LEASLIC",
"DISPOSE",
"MANAGEMENT"
],
- "display_order": 33,
- "label": "Miscellaneous notes (LTSA)",
- "purpose": "testing purpose 27",
+ "display_order": 18,
+ "label": "Enhanced Referral Records",
+ "purpose": "The Referral Record for both incoming and outgoing referrals.",
"metadata_types": [
{
- "name": "PID",
+ "name": "SHORT_DESCRIPTOR",
"required": false
}
],
- "name": "MISCNOTE"
+ "name": "ENHREFREC"
},
{
"categories": [
- "PROJECT",
- "RESEARCH",
"ACQUIRE",
- "LEASLIC",
"DISPOSE",
- "MANAGEMENT"
+ "MANAGEMENT",
+ "RESEARCH"
],
- "display_order": 44,
- "label": "Photos / Images / Video",
- "purpose": "testing purpose 37",
+ "display_order": 19,
+ "label": "Field notes",
+ "purpose": "The survey field notes ",
"metadata_types": [
{
- "name": "PROPERTY_IDENTIFIER",
+ "name": "DISTRICT_LOT_NUMBER",
"required": false
},
{
- "name": "CIVIC_ADDRESS",
+ "name": "FIELD_BOOK_NUMBER_YEAR",
"required": false
},
{
- "name": "OWNER",
+ "name": "LAND_DISTRICT",
"required": false
- },
+ }
+ ],
+ "name": "FIELNOTE"
+ },
+ {
+ "categories": [
+ "ACQUIRE",
+ "DISPOSE",
+ "LEASLIC",
+ "MANAGEMENT",
+ "PROJECT",
+ "RESEARCH"
+ ],
+ "display_order": 20,
+ "label": "Financial records (invoices, journal vouchers, received cheques etc.)",
+ "purpose": "Financial records which could include invoices, JV\u2019s, contracts ect. ",
+ "metadata_types": [
{
"name": "SHORT_DESCRIPTOR",
"required": false
- },
- {
- "name": "DATE",
- "required": false
}
],
- "name": "PHOTIMAG"
+ "name": "FINRECRD"
},
{
"categories": [
- "RESEARCH",
"ACQUIRE",
+ "DISPOSE",
"LEASLIC",
- "MANAGEMENT"
+ "MANAGEMENT",
+ "RESEARCH"
],
- "display_order": 7,
- "label": "Canada lands survey",
- "purpose": "testing purpose 6",
+ "display_order": 22,
+ "label": "First nations consultation",
+ "purpose": "Record of engagement with first nations (ex: First Nations Consultation Log)",
"metadata_types": [
{
- "name": "CANADA_LAND_SURVEY_NUMBER",
- "required": false
- },
- {
- "name": "INDIAN_RESERVE_OR_NATIONAL_PARK",
+ "name": "SHORT_DESCRIPTOR",
"required": false
}
],
- "name": "CANALAND"
+ "name": "FIRSNTAI"
},
{
"categories": [
- "RESEARCH",
- "ACQUIRE",
- "LEASLIC",
"DISPOSE",
"MANAGEMENT"
],
- "display_order": 32,
- "label": "Ministerial order",
- "purpose": "testing purpose 26",
+ "display_order": 21,
+ "label": "First Nations Strength of Claim Report",
+ "purpose": "The First Nation Strength of Claim report",
"metadata_types": [
{
- "name": "MO_NUMBER",
+ "name": "SHORT_DESCRIPTOR",
"required": false
- },
+ }
+ ],
+ "name": "FNSCR"
+ },
+ {
+ "categories": [
+ "ACQUIRE",
+ "DISPOSE",
+ "LEASLIC",
+ "MANAGEMENT",
+ "RESEARCH"
+ ],
+ "display_order": 24,
+ "label": "Form 12",
+ "purpose": "Form 12 - Certificate As To Highway In Statutory Right Of Way Plan, pre and post registration",
+ "metadata_types": [
{
- "name": "PROPERTY_IDENTIFIER",
+ "name": "GAZETTE_DATE",
"required": false
},
{
- "name": "MOTI_FILE_NUMBER",
+ "name": "LEGAL_SURVEY_PLAN_NUMBER",
"required": false
},
{
- "name": "ROAD_NAME",
+ "name": "MOTI_PLAN_NUMBER",
"required": false
},
{
- "name": "DATE_SIGNED",
+ "name": "SHORT_DESCRIPTOR",
"required": false
}
],
- "name": "MINIORDE"
+ "name": "FORM12"
},
{
"categories": [
- "RESEARCH",
"ACQUIRE",
- "LEASLIC",
"DISPOSE",
- "MANAGEMENT"
+ "LEASLIC",
+ "MANAGEMENT",
+ "RESEARCH"
],
- "display_order": 55,
- "label": "Transfer of administration",
- "purpose": "testing purpose 47",
+ "display_order": 29,
+ "label": "Gazette",
+ "purpose": "Gazette notices \u2013 all types of gazettes (establishing, closing, widening, erratum\u2019s) ",
"metadata_types": [
{
- "name": "TRANSFER_NUMBER",
+ "name": "GAZETTE_DATE",
"required": false
},
{
- "name": "PROPERTY_IDENTIFIER",
+ "name": "GAZETTE_PAGE_NUMBER",
"required": false
},
{
- "name": "MOTI_FILE_NUMBER",
+ "name": "GAZETTE_PUBLISHED_DATE",
"required": false
},
{
- "name": "ROAD_NAME",
+ "name": "GAZETTE_TYPE",
"required": false
},
{
- "name": "DATE_SIGNED",
- "required": false
- }
- ],
- "name": "TRANADMI"
- },
- {
- "categories": [
- "RESEARCH",
- "ACQUIRE",
- "LEASLIC",
- "DISPOSE",
- "MANAGEMENT"
- ],
- "display_order": 4,
- "label": "BC assessment search",
- "purpose": "testing purpose 4",
- "metadata_types": [
- {
- "name": "JURISDICTION",
+ "name": "LEGAL_SURVEY_PLAN_NUMBER",
"required": false
},
{
- "name": "ROLL_NUMBER",
+ "name": "LTSA_SCHEDULE_FILING_NUMBER",
"required": false
},
{
- "name": "CIVIC_ADDRESS",
+ "name": "MOTI_PLAN_NUMBER",
"required": false
},
{
- "name": "YEAR",
+ "name": "ROAD_NAME",
"required": false
}
],
- "name": "BCASSE"
+ "name": "GAZE"
},
{
"categories": [
- "RESEARCH",
"ACQUIRE",
- "LEASLIC",
"DISPOSE",
- "MANAGEMENT"
+ "LEASLIC",
+ "MANAGEMENT",
+ "PROJECT",
+ "RESEARCH"
],
- "display_order": 17,
- "label": "District road register",
- "purpose": "testing purpose 16",
+ "display_order": 30,
+ "label": "Historical file",
+ "purpose": "All types of scanned documents from a historical file",
"metadata_types": [
{
- "name": "ROAD_NAME",
+ "name": "END_DATE",
"required": false
},
{
- "name": "ELECTORAL_DISTRICT",
+ "name": "FILE_NUMBER",
"required": false
},
{
- "name": "HIGHWAY_DISTRICT",
- "required": false
- }
- ],
- "name": "DISTREGI"
- },
- {
- "categories": [
- "RESEARCH",
- "ACQUIRE",
- "LEASLIC",
- "DISPOSE",
- "MANAGEMENT"
- ],
- "display_order": 19,
- "label": "Field notes",
- "purpose": "testing purpose 17",
- "metadata_types": [
- {
- "name": "FIELD_BOOK_NUMBER_YEAR",
+ "name": "PHYSICAL_LOCATION",
"required": false
},
{
- "name": "DISTRICT_LOT_NUMBER",
+ "name": "SECTION_NUMBER",
"required": false
},
{
- "name": "LAND_DISTRICT",
+ "name": "START_DATE",
"required": false
}
],
- "name": "FIELNOTE"
+ "name": "HISTFILE"
},
{
"categories": [
- "PROJECT",
- "RESEARCH",
- "ACQUIRE",
- "LEASLIC",
- "DISPOSE",
- "MANAGEMENT"
+ "ACQUIRE"
],
- "display_order": 40,
- "label": "Other",
- "purpose": "testing purpose 34",
+ "display_order": 32,
+ "label": "Land Act Tenure/Reserves",
+ "purpose": "Applications and final Land Act Tenure Reserves (Sections 15/16/17)",
"metadata_types": [
{
- "name": "PROPERTY_IDENTIFIER",
- "required": false
- },
- {
- "name": "PIN",
+ "name": "REFAG_DOC_NUMBER",
"required": false
},
{
- "name": "ROAD_NAME",
+ "name": "REFAG_LANDFILE_NUMBER",
"required": false
},
{
@@ -574,18 +584,18 @@
"required": false
}
],
- "name": "OTHER"
+ "name": "LANDACTTENRES"
},
{
"categories": [
- "RESEARCH",
"ACQUIRE",
"LEASLIC",
- "MANAGEMENT"
+ "MANAGEMENT",
+ "RESEARCH"
],
- "display_order": 28,
- "label": "Lease / License (H1005/H1005A)",
- "purpose": "testing purpose 21",
+ "display_order": 33,
+ "label": "Lease / License agreement",
+ "purpose": "Draft or Final Lease/License agreement, amending agreement or extension",
"metadata_types": [
{
"name": "SHORT_DESCRIPTOR",
@@ -596,683 +606,706 @@
},
{
"categories": [
- "RESEARCH",
"ACQUIRE",
- "LEASLIC",
"DISPOSE",
- "MANAGEMENT"
+ "LEASLIC",
+ "MANAGEMENT",
+ "PROJECT",
+ "RESEARCH"
],
- "display_order": 10,
- "label": "Company search",
- "purpose": "testing purpose 12",
+ "display_order": 34,
+ "label": "Legal correspondence (ex: to AG/external lawyers)",
+ "purpose": "Emails or letters with internal and external lawyers ",
"metadata_types": [
{
"name": "SHORT_DESCRIPTOR",
"required": false
}
],
- "name": "COMPSEAR"
+ "name": "LEGACORR"
},
{
"categories": [
- "RESEARCH",
"ACQUIRE",
- "LEASLIC",
"DISPOSE",
- "MANAGEMENT"
+ "LEASLIC",
+ "MANAGEMENT",
+ "PROJECT",
+ "RESEARCH"
],
- "display_order": 26,
- "label": "LTSA documents and plans (except title search)",
- "purpose": "testing purpose 25",
+ "display_order": 35,
+ "label": "Legal survey plan",
+ "purpose": "Attach copies of legal survey plans, draft or registered versions",
"metadata_types": [
{
- "name": "SHORT_DESCRIPTOR",
+ "name": "LEGAL_SURVEY_PLAN_NUMBER",
+ "required": false
+ },
+ {
+ "name": "MOTI_PLAN_NUMBER",
+ "required": false
+ },
+ {
+ "name": "PLAN_TYPE",
"required": false
}
],
- "name": "LTSADOCU"
+ "name": "LEGASURV"
},
{
"categories": [
- "ACQUIRE",
"LEASLIC",
- "DISPOSE",
"MANAGEMENT"
],
- "display_order": 2,
- "label": "Appraisals/Reviews",
- "purpose": "testing purpose 3",
+ "display_order": 3,
+ "label": "Approval/sign-off",
+ "purpose": "The record of correspondence (email) approving Lease/Licence",
"metadata_types": [
{
"name": "SHORT_DESCRIPTOR",
"required": false
}
],
- "name": "APPRREVI"
+ "name": "LICEAPPR"
},
{
"categories": [
- "RESEARCH",
"ACQUIRE",
- "LEASLIC",
"DISPOSE",
- "MANAGEMENT"
+ "LEASLIC",
+ "MANAGEMENT",
+ "RESEARCH"
],
- "display_order": 46,
- "label": "Professional reports (ex: engineering/environmental etc.)",
- "purpose": "testing purpose 39",
+ "display_order": 31,
+ "label": "LTSA documents and plans (except title search)",
+ "purpose": "Attach LTSA documents ie: copies of mortgages, SRW\u2019s, Easements, Pending Litigation (except title searches and legal plans)",
"metadata_types": [
{
"name": "SHORT_DESCRIPTOR",
"required": false
}
],
- "name": "PROFREPO"
+ "name": "LTSADOCU"
},
{
"categories": [
- "PROJECT",
"ACQUIRE",
- "LEASLIC",
"DISPOSE",
- "MANAGEMENT"
+ "MANAGEMENT",
+ "RESEARCH"
],
- "display_order": 50,
- "label": "Spending authority approval (SAA)",
- "purpose": "testing purpose 42",
+ "display_order": 36,
+ "label": "Ministerial order",
+ "purpose": "Ministerial Orders",
"metadata_types": [
{
- "name": "SHORT_DESCRIPTOR",
+ "name": "DATE_SIGNED",
+ "required": false
+ },
+ {
+ "name": "MOTI_FILE_NUMBER",
+ "required": false
+ },
+ {
+ "name": "MO_NUMBER",
+ "required": false
+ },
+ {
+ "name": "PROPERTY_IDENTIFIER",
+ "required": false
+ },
+ {
+ "name": "ROAD_NAME",
"required": false
}
],
- "name": "SPENAUTH"
+ "name": "MINIORDE"
},
{
"categories": [
- "RESEARCH",
"ACQUIRE",
+ "DISPOSE",
"LEASLIC",
- "MANAGEMENT"
+ "MANAGEMENT",
+ "RESEARCH"
],
- "display_order": 42,
- "label": "Owner agreement/offer",
- "purpose": "testing purpose 35",
+ "display_order": 37,
+ "label": "Miscellaneous notes (LTSA)",
+ "purpose": "Miscellaneous Notes from the property title",
"metadata_types": [
{
- "name": "SHORT_DESCRIPTOR",
+ "name": "PID",
"required": false
}
],
- "name": "OWNEAGRE"
+ "name": "MISCNOTE"
},
{
"categories": [
"ACQUIRE",
- "LEASLIC",
"DISPOSE",
- "MANAGEMENT"
+ "LEASLIC",
+ "MANAGEMENT",
+ "PROJECT",
+ "RESEARCH"
],
- "display_order": 12,
- "label": "Compensation requisition (H-120)",
- "purpose": "testing purpose 11",
+ "display_order": 38,
+ "label": "MoTI plan",
+ "purpose": "Moti Plans, plans not found in LTSA (Road Surveys)",
"metadata_types": [
{
- "name": "SHORT_DESCRIPTOR",
+ "name": "LEGAL_SURVEY_PLAN_NUMBER",
+ "required": false
+ },
+ {
+ "name": "MOTI_FILE_NUMBER",
+ "required": false
+ },
+ {
+ "name": "MOTI_PLAN_NUMBER",
+ "required": false
+ },
+ {
+ "name": "PUBLISHED_DATE",
+ "required": false
+ },
+ {
+ "name": "RELATED_GAZETTE",
"required": false
}
],
- "name": "COMPREQU"
+ "name": "MOTIPLAN"
},
{
"categories": [
- "ACQUIRE",
- "LEASLIC",
- "DISPOSE",
- "MANAGEMENT"
+ "ACQUIRE"
],
- "display_order": 11,
- "label": "Compensation cheque",
- "purpose": "testing purpose 9",
+ "display_order": 26,
+ "label": "Form 7 - Notice of abandonement",
+ "purpose": "",
"metadata_types": [
{
"name": "SHORT_DESCRIPTOR",
"required": false
}
],
- "name": "COMPCHEQ"
+ "name": "NOTIABANDON"
},
{
"categories": [
- "RESEARCH",
"ACQUIRE",
- "LEASLIC",
"MANAGEMENT"
],
- "display_order": 13,
- "label": "Condition of entry (H0443)",
- "purpose": "testing purpose 13",
+ "display_order": 27,
+ "label": "Form 8 - Notice of advanced payment ",
+ "purpose": "The Notice of Advance Payment (Form 8) for Expropriation",
"metadata_types": [
{
"name": "SHORT_DESCRIPTOR",
"required": false
}
],
- "name": "CONDENTR"
+ "name": "NOTIADVA"
},
{
"categories": [
"ACQUIRE",
- "LEASLIC",
- "MANAGEMENT"
+ "DISPOSE",
+ "MANAGEMENT",
+ "RESEARCH"
],
- "display_order": 35,
- "label": "Notice of advanced payment (Form 8)",
- "purpose": "testing purpose 29",
+ "display_order": 39,
+ "label": "Notice of claims/Litigation documents",
+ "purpose": "The Notice of Claims/Litigation documents ",
"metadata_types": [
{
"name": "SHORT_DESCRIPTOR",
"required": false
}
],
- "name": "NOTIADVA"
+ "name": "NOTICLAI"
},
{
"categories": [
"ACQUIRE",
- "LEASLIC",
- "DISPOSE",
"MANAGEMENT"
],
- "display_order": 49,
- "label": "Release of claims",
- "purpose": "testing purpose 41",
+ "display_order": 23,
+ "label": "Form 1 - Notice of expropriation ",
+ "purpose": "The Notice of Expropriation (Form 1)",
"metadata_types": [
{
"name": "SHORT_DESCRIPTOR",
"required": false
}
],
- "name": "RELECLAI"
+ "name": "NOTIEXPR"
},
{
"categories": [
"ACQUIRE",
- "LEASLIC",
- "MANAGEMENT"
+ "MANAGEMENT",
+ "RESEARCH"
],
- "display_order": 37,
- "label": "Notice of expropriation (Form 1)",
- "purpose": "testing purpose 31",
+ "display_order": 40,
+ "label": "Notice of possible entry (H0224)",
+ "purpose": "The Notice of Possible Entry (H.0224) ",
"metadata_types": [
{
"name": "SHORT_DESCRIPTOR",
"required": false
}
],
- "name": "NOTIEXPR"
+ "name": "NOTIPOSS"
},
{
"categories": [
"ACQUIRE",
- "LEASLIC",
- "MANAGEMENT"
+ "DISPOSE",
+ "MANAGEMENT",
+ "RESEARCH"
],
- "display_order": 3,
- "label": "Approval of expropriation (Form 5)",
- "purpose": "testing purpose 2",
+ "display_order": 41,
+ "label": "Order in Council (OIC)",
+ "purpose": "The Order in Council",
"metadata_types": [
{
- "name": "SHORT_DESCRIPTOR",
+ "name": "OIC_NUMBER",
+ "required": false
+ },
+ {
+ "name": "OIC_ROUTE_NUMBER",
+ "required": false
+ },
+ {
+ "name": "OIC_TYPE",
+ "required": false
+ },
+ {
+ "name": "ROAD_NAME",
+ "required": false
+ },
+ {
+ "name": "YEAR",
"required": false
}
],
- "name": "APPREXPR"
+ "name": "OIC"
},
{
"categories": [
"ACQUIRE",
+ "DISPOSE",
"LEASLIC",
- "MANAGEMENT"
+ "MANAGEMENT",
+ "PROJECT",
+ "RESEARCH"
],
- "display_order": 56,
- "label": "Vesting notice (Form 9)",
- "purpose": "testing purpose 48",
+ "display_order": 42,
+ "label": "Other",
+ "purpose": "Uncategorized / Miscellaneous document",
"metadata_types": [
+ {
+ "name": "PIN",
+ "required": false
+ },
+ {
+ "name": "PROPERTY_IDENTIFIER",
+ "required": false
+ },
+ {
+ "name": "ROAD_NAME",
+ "required": false
+ },
{
"name": "SHORT_DESCRIPTOR",
"required": false
}
],
- "name": "VESTNOTI"
+ "name": "OTHER"
},
{
"categories": [
"ACQUIRE",
+ "DISPOSE",
"LEASLIC",
"MANAGEMENT"
],
- "display_order": 0,
- "label": "Affidavit of service",
- "purpose": "testing purpose 1",
+ "display_order": 43,
+ "label": "Other Land Agreement (Indemnity Letter, Letter of Intended Use, Assumption Agreement, etc)",
+ "purpose": "Other forms of Land Agreements such as Indemnity Letters, Letter of Intended Use, Assumption Agreements etc. ",
"metadata_types": [
{
"name": "SHORT_DESCRIPTOR",
"required": false
}
],
- "name": "AFFISERV"
+ "name": "OTHERLANDAGREEMENT"
},
{
"categories": [
- "RESEARCH",
"ACQUIRE",
- "LEASLIC",
- "MANAGEMENT"
+ "MANAGEMENT",
+ "RESEARCH"
],
- "display_order": 38,
- "label": "Notice of possible entry (H0224)",
- "purpose": "testing purpose 32",
+ "display_order": 44,
+ "label": "Owner agreement/offer",
+ "purpose": "Attach copies of draft or final Offer to Purchase agreements (H.179s) or external Owner agreements for Offer and Purchase",
"metadata_types": [
{
"name": "SHORT_DESCRIPTOR",
"required": false
}
],
- "name": "NOTIPOSS"
+ "name": "OWNEAGRE"
},
{
"categories": [
- "RESEARCH",
"ACQUIRE",
- "LEASLIC",
- "DISPOSE",
- "MANAGEMENT"
+ "MANAGEMENT",
+ "PROJECT",
+ "RESEARCH"
],
- "display_order": 22,
- "label": "First nations consultation",
- "purpose": "testing purpose 18",
+ "display_order": 45,
+ "label": "PA plans / Design drawings",
+ "purpose": "Property acquisition drawings, design drawings, engineered drawings in draft and final versions ",
"metadata_types": [
{
- "name": "SHORT_DESCRIPTOR",
+ "name": "PLAN_NUMBER",
+ "required": false
+ },
+ {
+ "name": "PLAN_REVISION",
+ "required": false
+ },
+ {
+ "name": "PROJECT_NAME",
+ "required": false
+ },
+ {
+ "name": "PROJECT_NUMBER",
"required": false
}
],
- "name": "FIRSNTAI"
+ "name": "PAPLAN"
},
{
"categories": [
- "RESEARCH",
"ACQUIRE",
- "LEASLIC",
"DISPOSE",
- "MANAGEMENT"
+ "LEASLIC",
+ "MANAGEMENT",
+ "PROJECT",
+ "RESEARCH"
],
- "display_order": 52,
- "label": "Tax notices and assessments",
- "purpose": "testing purpose 44",
+ "display_order": 46,
+ "label": "Photos / Images / Video",
+ "purpose": "Attach Photos, images or videos relevant to file/property",
"metadata_types": [
+ {
+ "name": "CIVIC_ADDRESS",
+ "required": false
+ },
+ {
+ "name": "DATE",
+ "required": false
+ },
+ {
+ "name": "OWNER",
+ "required": false
+ },
+ {
+ "name": "PROPERTY_IDENTIFIER",
+ "required": false
+ },
{
"name": "SHORT_DESCRIPTOR",
"required": false
}
],
- "name": "TAXNOTI"
+ "name": "PHOTIMAG"
},
{
"categories": [
- "RESEARCH",
"ACQUIRE",
- "LEASLIC",
- "DISPOSE",
- "MANAGEMENT"
+ "MANAGEMENT",
+ "RESEARCH"
],
- "display_order": 36,
- "label": "Notice of claims/Litigation documents",
- "purpose": "testing purpose 30",
+ "display_order": 47,
+ "label": "Privy council",
+ "purpose": "The Privy Council ",
"metadata_types": [
{
- "name": "SHORT_DESCRIPTOR",
+ "name": "YEAR_PRIVY_COUNCIL_NUMBER",
"required": false
}
],
- "name": "NOTICLAI"
+ "name": "PRIVCOUN"
},
{
"categories": [
"ACQUIRE",
- "LEASLIC",
"DISPOSE",
- "MANAGEMENT"
+ "LEASLIC",
+ "MANAGEMENT",
+ "RESEARCH"
],
- "display_order": 9,
- "label": "Certificate of Insurance (H0111)",
- "purpose": "testing purpose 8",
+ "display_order": 48,
+ "label": "Professional reports (ex: engineering/environmental etc.)",
+ "purpose": "Professional/Expert Report in draft or final (Ie: Geotechnical, Environmental, Archeology, Engineering Reports) ",
"metadata_types": [
{
"name": "SHORT_DESCRIPTOR",
"required": false
}
],
- "name": "CERTINSU"
+ "name": "PROFREPO"
},
{
"categories": [
+ "DISPOSE",
"MANAGEMENT"
],
- "display_order": 31,
- "label": "Licensing approval/sign-off",
- "purpose": "testing purpose 24",
+ "display_order": 49,
+ "label": "Purchase and Sale Agreement",
+ "purpose": "The Purchase and Sale Agreement for a road closure file (H.179RC)",
"metadata_types": [
{
"name": "SHORT_DESCRIPTOR",
"required": false
}
],
- "name": "LICEAPPR"
+ "name": "PURSALEAGRE"
},
{
"categories": [
- "PROJECT",
- "RESEARCH",
"ACQUIRE",
- "LEASLIC",
"DISPOSE",
"MANAGEMENT"
],
- "display_order": 5,
- "label": "Briefing notes",
- "purpose": "testing purpose 5",
+ "display_order": 50,
+ "label": "Record of negotiation",
+ "purpose": "The Record of Negotiations ",
"metadata_types": [
{
"name": "SHORT_DESCRIPTOR",
"required": false
}
],
- "name": "BRIENOTE"
+ "name": "RECONEGO"
},
{
"categories": [
- "PROJECT",
"ACQUIRE",
- "LEASLIC",
"DISPOSE",
"MANAGEMENT"
],
"display_order": 51,
- "label": "Surplus property declaration",
- "purpose": "testing purpose 43",
+ "label": "Release of claims",
+ "purpose": "The Release of Claims document, Draft and Final versions",
"metadata_types": [
{
"name": "SHORT_DESCRIPTOR",
"required": false
}
],
- "name": "SURPPROP"
+ "name": "RELECLAI"
},
{
"categories": [
"ACQUIRE",
- "LEASLIC",
- "MANAGEMENT"
- ],
- "display_order": 53,
- "label": "Temporary license for construction access (H0074)",
- "purpose": "testing purpose 45",
- "metadata_types": [
- {
- "name": "SHORT_DESCRIPTOR",
- "required": false
- }
- ],
- "name": "TEMPLICE"
- },
- {
- "categories": [
"DISPOSE",
- "MANAGEMENT"
+ "LEASLIC",
+ "MANAGEMENT",
+ "PROJECT"
],
- "display_order": 14,
- "label": "Conveyance closing documents (ex: PTT forms, Form A transfer etc.)",
- "purpose": "testing purpose 14",
+ "display_order": 52,
+ "label": "Spending authority approval (SAA)",
+ "purpose": "The Spending Authority Approval (SAA) document, Draft and Final versions ",
"metadata_types": [
{
"name": "SHORT_DESCRIPTOR",
"required": false
}
],
- "name": "CONVCLOS"
+ "name": "SPENAUTH"
},
{
"categories": [
- "PROJECT",
- "RESEARCH",
"ACQUIRE",
- "LEASLIC",
"DISPOSE",
- "MANAGEMENT"
+ "LEASLIC",
+ "MANAGEMENT",
+ "PROJECT"
],
- "display_order": 29,
- "label": "Legal correspondence (ex: to AG/external lawyers)",
- "purpose": "testing purpose 22",
+ "display_order": 53,
+ "label": "Surplus property declaration",
+ "purpose": "The Surplus Property Declarations document in Draft or Final indicating surplus land",
"metadata_types": [
{
"name": "SHORT_DESCRIPTOR",
"required": false
}
],
- "name": "LEGACORR"
+ "name": "SURPPROP"
},
{
"categories": [
"ACQUIRE",
- "LEASLIC",
"DISPOSE",
- "MANAGEMENT"
+ "LEASLIC",
+ "MANAGEMENT",
+ "RESEARCH"
],
- "display_order": 48,
- "label": "Record of negotiation",
- "purpose": "testing purpose 40",
+ "display_order": 54,
+ "label": "Tax notices and assessments",
+ "purpose": "Tax notices or Tax assessments",
"metadata_types": [
{
"name": "SHORT_DESCRIPTOR",
"required": false
}
],
- "name": "RECONEGO"
+ "name": "TAXNOTI"
},
{
"categories": [
"ACQUIRE",
- "LEASLIC",
- "DISPOSE",
"MANAGEMENT"
],
- "display_order": 41,
- "label": "Other Land Agreement (Indemnity Letter, Letter of Intended Use, Assumption Agreement, etc)",
- "purpose": "testing purpose 50",
+ "display_order": 55,
+ "label": "Temporary license for construction access (H0074)",
+ "purpose": "The Temporary License for Construction Access Agreement (TLCA) Draft or Final version",
"metadata_types": [
{
"name": "SHORT_DESCRIPTOR",
"required": false
}
],
- "name": "OTHERLANDAGREEMENT"
+ "name": "TEMPLICE"
},
{
"categories": [
- "PROJECT",
- "RESEARCH",
"ACQUIRE",
- "LEASLIC",
"DISPOSE",
- "MANAGEMENT"
+ "LEASLIC",
+ "MANAGEMENT",
+ "RESEARCH"
],
- "display_order": 20,
- "label": "Financial records (invoices, journal vouchers etc.)",
- "purpose": "testing purpose 49",
+ "display_order": 56,
+ "label": "Title search / Historical title",
+ "purpose": "The Title Search from LTSA which could be a current or historical search ",
"metadata_types": [
{
- "name": "SHORT_DESCRIPTOR",
+ "name": "OWNER",
"required": false
- }
- ],
- "name": "FINRECRD"
- },
- {
- "categories": [
- "ACQUIRE",
- "LEASLIC"
- ],
- "display_order": 1,
- "label": "Agricultural Land Commission (ALC)",
- "purpose": "testing purpose 55",
- "metadata_types": [
+ },
{
- "name": "SHORT_DESCRIPTOR",
+ "name": "PID",
"required": false
},
{
- "name": "APPLICATION_NUMBER",
+ "name": "TITLE_NUMBER",
"required": false
}
],
- "name": "ALC"
+ "name": "TITLSEAR"
},
{
"categories": [
- "RESEARCH",
"ACQUIRE",
- "LEASLIC",
"DISPOSE",
- "MANAGEMENT"
+ "MANAGEMENT",
+ "RESEARCH"
],
- "display_order": 23,
- "label": "Form 12",
- "purpose": "testing purpose 56",
+ "display_order": 57,
+ "label": "Transfer of administration",
+ "purpose": "The Transfer of Administration (TAC) document \u2013 Draft or Final version ",
"metadata_types": [
{
- "name": "GAZETTE_DATE",
+ "name": "DATE_SIGNED",
"required": false
},
{
- "name": "MOTI_PLAN_NUMBER",
+ "name": "MOTI_FILE_NUMBER",
"required": false
},
{
- "name": "LEGAL_SURVEY_PLAN_NUMBER",
+ "name": "PROPERTY_IDENTIFIER",
"required": false
},
{
- "name": "SHORT_DESCRIPTOR",
+ "name": "ROAD_NAME",
+ "required": false
+ },
+ {
+ "name": "TRANSFER_NUMBER",
"required": false
}
],
- "name": "FORM12"
+ "name": "TRANADMI"
},
{
"categories": [
"ACQUIRE",
- "LEASLIC"
+ "MANAGEMENT"
],
- "display_order": 27,
- "label": "Land Act Tenure/Reserves",
- "purpose": "testing purpose 57",
+ "display_order": 28,
+ "label": "Form 9 - Vesting notice (Form 9)",
+ "purpose": "The Vesting Notice (Form 9) for Expropriations ",
"metadata_types": [
- {
- "name": "REFAG_LANDFILE_NUMBER",
- "required": false
- },
- {
- "name": "REFAG_DOC_NUMBER",
- "required": false
- },
{
"name": "SHORT_DESCRIPTOR",
"required": false
}
],
- "name": "LANDACTTENRES"
- },
+ "name": "VESTNOTI"
+ }
+ ],
+ "metadata_types": [
{
- "categories": [
- "MANAGEMENT"
- ],
- "display_order": 6,
- "label": "CDOGS template",
- "purpose": "testing purpose 7",
- "metadata_types": [],
- "name": "CDOGTEMP"
+ "label": "Application #",
+ "name": "APPLICATION_NUMBER"
},
{
- "categories": [
- "DISPOSE",
- "MANAGEMENT"
- ],
- "display_order": 8,
- "label": "Certificate of Compliance",
- "purpose": "testing purpose 51",
- "metadata_types": [],
- "name": "CERTCOMPL"
+ "label": "Canada land survey #",
+ "name": "CANADA_LAND_SURVEY_NUMBER"
},
{
- "categories": [
- "DISPOSE",
- "MANAGEMENT"
- ],
- "display_order": 18,
- "label": "Enhanced Referral Records",
- "purpose": "testing purpose 52",
- "metadata_types": [],
- "name": "ENHREFREC"
+ "label": "Civic address",
+ "name": "CIVIC_ADDRESS"
},
{
- "categories": [
- "DISPOSE",
- "MANAGEMENT"
- ],
- "display_order": 21,
- "label": "First Nations Strength of Claim Report",
- "purpose": "testing purpose 53",
- "metadata_types": [],
- "name": "FNSCR"
+ "label": "Crown grant #",
+ "name": "CROWN_GRANT_NUMBER"
},
{
- "categories": [
- "DISPOSE",
- "MANAGEMENT"
- ],
- "display_order": 47,
- "label": "Purchase and Sale Agreement",
- "purpose": "testing purpose 54",
- "metadata_types": [],
- "name": "PURSALEAGRE"
- }
- ],
- "metadata_types": [
+ "label": "Date",
+ "name": "DATE"
+ },
{
- "label": "Project name",
- "name": "PROJECT_NAME"
+ "label": "Date signed",
+ "name": "DATE_SIGNED"
},
{
- "label": "Project #",
- "name": "PROJECT_NUMBER"
+ "label": "District lot #",
+ "name": "DISTRICT_LOT_NUMBER"
},
{
- "label": "Plan #",
- "name": "PLAN_NUMBER"
+ "label": "Electoral district",
+ "name": "ELECTORAL_DISTRICT"
},
{
- "label": "Plan revision",
- "name": "PLAN_REVISION"
+ "label": "End date",
+ "name": "END_DATE"
},
{
- "label": "Road name",
- "name": "ROAD_NAME"
+ "label": "Field book #/Year",
+ "name": "FIELD_BOOK_NUMBER_YEAR"
},
{
- "label": "Gazette published date",
- "name": "GAZETTE_PUBLISHED_DATE"
+ "label": "File #",
+ "name": "FILE_NUMBER"
},
{
"label": "Gazette date",
@@ -1282,177 +1315,157 @@
"label": "Gazette page #",
"name": "GAZETTE_PAGE_NUMBER"
},
+ {
+ "label": "Gazette published date",
+ "name": "GAZETTE_PUBLISHED_DATE"
+ },
{
"label": "Gazette type",
"name": "GAZETTE_TYPE"
},
{
- "label": "MoTI plan #",
- "name": "MOTI_PLAN_NUMBER"
+ "label": "Highway district",
+ "name": "HIGHWAY_DISTRICT"
},
{
- "label": "Legal survey plan #",
- "name": "LEGAL_SURVEY_PLAN_NUMBER"
+ "label": "Indian reserve or national park",
+ "name": "INDIAN_RESERVE_OR_NATIONAL_PARK"
},
{
- "label": "LTSA schedule filing #",
- "name": "LTSA_SCHEDULE_FILING_NUMBER"
+ "label": "Jurisdiction",
+ "name": "JURISDICTION"
},
{
- "label": "Related gazette",
- "name": "RELATED_GAZETTE"
+ "label": "Land district",
+ "name": "LAND_DISTRICT"
},
{
- "label": "Published date",
- "name": "PUBLISHED_DATE"
+ "label": "Legal survey plan #",
+ "name": "LEGAL_SURVEY_PLAN_NUMBER"
},
{
- "label": "MoTI file #",
- "name": "MOTI_FILE_NUMBER"
+ "label": "LTSA schedule filing #",
+ "name": "LTSA_SCHEDULE_FILING_NUMBER"
},
{
- "label": "Plan type",
- "name": "PLAN_TYPE"
+ "label": "MoTI file #",
+ "name": "MOTI_FILE_NUMBER"
},
{
- "label": "OIC #",
- "name": "OIC_NUMBER"
+ "label": "MoTI plan #",
+ "name": "MOTI_PLAN_NUMBER"
},
{
- "label": "Year",
- "name": "YEAR"
+ "label": "MO #",
+ "name": "MO_NUMBER"
},
{
- "label": "OIC type",
- "name": "OIC_TYPE"
+ "label": "OIC #",
+ "name": "OIC_NUMBER"
},
{
"label": "OIC route #",
"name": "OIC_ROUTE_NUMBER"
},
{
- "label": "Year - privy council #",
- "name": "YEAR_PRIVY_COUNCIL_NUMBER"
- },
- {
- "label": "Crown grant #",
- "name": "CROWN_GRANT_NUMBER"
- },
- {
- "label": "File #",
- "name": "FILE_NUMBER"
- },
- {
- "label": "Section #",
- "name": "SECTION_NUMBER"
- },
- {
- "label": "Start date",
- "name": "START_DATE"
+ "label": "OIC type",
+ "name": "OIC_TYPE"
},
{
- "label": "End date",
- "name": "END_DATE"
+ "label": "Owner",
+ "name": "OWNER"
},
{
"label": "Physical location",
"name": "PHYSICAL_LOCATION"
},
{
- "label": "Property identifier (PID or PIN or road name)",
- "name": "PROPERTY_IDENTIFIER"
+ "label": "PID",
+ "name": "PID"
},
{
- "label": "Civic address",
- "name": "CIVIC_ADDRESS"
+ "label": "PIN",
+ "name": "PIN"
},
{
- "label": "Owner",
- "name": "OWNER"
+ "label": "Plan #",
+ "name": "PLAN_NUMBER"
},
{
- "label": "Short descriptor",
- "name": "SHORT_DESCRIPTOR"
+ "label": "Plan revision",
+ "name": "PLAN_REVISION"
},
{
- "label": "Date",
- "name": "DATE"
+ "label": "Plan type",
+ "name": "PLAN_TYPE"
},
{
- "label": "PID",
- "name": "PID"
+ "label": "Project name",
+ "name": "PROJECT_NAME"
},
{
- "label": "Title #",
- "name": "TITLE_NUMBER"
+ "label": "Project #",
+ "name": "PROJECT_NUMBER"
},
{
- "label": "Canada land survey #",
- "name": "CANADA_LAND_SURVEY_NUMBER"
+ "label": "Property identifier (PID or PIN or road name)",
+ "name": "PROPERTY_IDENTIFIER"
},
{
- "label": "Indian reserve or national park",
- "name": "INDIAN_RESERVE_OR_NATIONAL_PARK"
+ "label": "Published date",
+ "name": "PUBLISHED_DATE"
},
{
- "label": "MO #",
- "name": "MO_NUMBER"
+ "label": "Reference/Agency Document #",
+ "name": "REFAG_DOC_NUMBER"
},
{
- "label": "Road name",
- "name": "ROAD_NAME"
+ "label": "Reference/Agency Lands file #",
+ "name": "REFAG_LANDFILE_NUMBER"
},
{
- "label": "Date signed",
- "name": "DATE_SIGNED"
+ "label": "Related gazette",
+ "name": "RELATED_GAZETTE"
},
{
- "label": "Transfer #",
- "name": "TRANSFER_NUMBER"
+ "label": "Road name",
+ "name": "ROAD_NAME"
},
{
- "label": "Jurisdiction",
- "name": "JURISDICTION"
+ "label": "Road name",
+ "name": "ROAD_NAME"
},
{
"label": "Roll #",
"name": "ROLL_NUMBER"
},
{
- "label": "Electoral district",
- "name": "ELECTORAL_DISTRICT"
- },
- {
- "label": "Highway district",
- "name": "HIGHWAY_DISTRICT"
- },
- {
- "label": "Field book #/Year",
- "name": "FIELD_BOOK_NUMBER_YEAR"
+ "label": "Section #",
+ "name": "SECTION_NUMBER"
},
{
- "label": "District lot #",
- "name": "DISTRICT_LOT_NUMBER"
+ "label": "Short descriptor",
+ "name": "SHORT_DESCRIPTOR"
},
{
- "label": "Land district",
- "name": "LAND_DISTRICT"
+ "label": "Start date",
+ "name": "START_DATE"
},
{
- "label": "PIN",
- "name": "PIN"
+ "label": "Title #",
+ "name": "TITLE_NUMBER"
},
{
- "label": "Application #",
- "name": "APPLICATION_NUMBER"
+ "label": "Transfer #",
+ "name": "TRANSFER_NUMBER"
},
{
- "label": "Reference/Agency Lands file #",
- "name": "REFAG_LANDFILE_NUMBER"
+ "label": "Year",
+ "name": "YEAR"
},
{
- "label": "Reference/Agency Document #",
- "name": "REFAG_DOC_NUMBER"
+ "label": "Year - privy council #",
+ "name": "YEAR_PRIVY_COUNCIL_NUMBER"
}
],
"remove_lingering_document_types": true,
diff --git a/tools/mayan_sync_helper/mayan_sync_transformer.py b/tools/mayan_sync_helper/mayan_sync_transformer.py
index 3bb7b03ed2..dbedbe322d 100644
--- a/tools/mayan_sync_helper/mayan_sync_transformer.py
+++ b/tools/mayan_sync_helper/mayan_sync_transformer.py
@@ -39,6 +39,10 @@ def __init__(self, name, label, purpose, display_order, categories):
def add_metadata(self, metadata_reference):
self.metadata_references.append(metadata_reference)
+ def sort_internal(self):
+ self.categories.sort(reverse=False)
+ self.metadata_references.sort(key=lambda x: x.name, reverse=False)
+
def toJson(self):
return {
"categories": [value for value in self.categories],
@@ -85,7 +89,7 @@ def load_document_definitions():
project = doctype_sheet.cell_value(i, 4)
research = doctype_sheet.cell_value(i, 5)
acquisition = doctype_sheet.cell_value(i, 6)
- lease = doctype_sheet.cell_value(i, 6)
+ lease = doctype_sheet.cell_value(i, 7)
disposition = doctype_sheet.cell_value(i, 8)
management = doctype_sheet.cell_value(i, 9)
@@ -156,33 +160,44 @@ def match_doc_metadata(document_types, metadata_types):
doctype_sort_order = []
- for i in range(3, sheet.nrows):
- print("--------------" + str(i))
- current_row_name = sheet.cell_value(i, 1)
+ first_row = 2
- if current_row_name != "":
- doc_type_name = current_row_name
+ document_type_col = 1
+ metadata_type_col = 2
+ metadata_required_col = 3
+
+ for i in range(first_row, sheet.nrows):
+ print("--------------" + str(i))
+ current_row_doctype = sheet.cell_value(i, document_type_col)
- if doc_type_name not in doctype_sort_order:
- doctype_sort_order.append(doc_type_name)
+ if current_row_doctype == "":
+ raise Exception('Invalid document type', current_row_doctype)
+ # for debugging
for a in document_types:
- print(a.label + "|" + doc_type_name +
- "|" + str(a.label == doc_type_name))
- # Get document object from list based on the current label
- doc_type = next(x for x in document_types if x.label == doc_type_name)
+ print(a.name + "|" + current_row_doctype +
+ "|" + str(a.name == current_row_doctype))
- metadata_label = sheet.cell_value(i, 2)
- if metadata_label != "":
+ # Get document object from list based on the current document type
+ doc_type = next(x for x in document_types if x.name ==
+ current_row_doctype)
+ metadata_type = sheet.cell_value(i, metadata_type_col)
+
+ # skip empty metadata associations
+ if metadata_type != "":
+
+ # for debugging
for a in metadata_types:
- print(a.label + "|" + metadata_label +
- "|" + str(a.label == metadata_label))
+ print(a.name + "|" + metadata_type +
+ "|" + str(a.name == metadata_type))
+
+ # Get metadata object from list based on the current metadata type
metadata_type = next(
- x for x in metadata_types if x.label == metadata_label)
+ x for x in metadata_types if x.name == metadata_type)
# get required field
- meta_data_required = sheet.cell_value(i, 3)
+ meta_data_required = sheet.cell_value(i, metadata_required_col)
if meta_data_required != "":
meta_data_required = meta_data_required.lower() == "yes"
else:
@@ -193,18 +208,13 @@ def match_doc_metadata(document_types, metadata_types):
doc_type.add_metadata(meta_data_type)
- sorted_docs = []
- for name in doctype_sort_order:
- doc = next(x for x in document_types if x.label == name)
- index = document_types.index(doc)
- sorted_docs.append(doc)
- del document_types[index]
+ # sort the documents for the request by document type
+ document_types.sort(key=lambda x: x.name, reverse=False)
+ [doctype.sort_internal() for doctype in document_types]
- # add the reamining doc types
- for doc in document_types:
- sorted_docs.append(doc)
+ metadata_types.sort(key=lambda x: x.name, reverse=False)
- return MayanRequest(sorted_docs, metadata_types)
+ return MayanRequest(document_types, metadata_types)
meta_types = load_metadata_definitions()
diff --git a/tools/mayan_sync_helper/xml_definitions/doc_metadata.xlsx b/tools/mayan_sync_helper/xml_definitions/doc_metadata.xlsx
index 41a1d84778..e75cfededb 100644
Binary files a/tools/mayan_sync_helper/xml_definitions/doc_metadata.xlsx and b/tools/mayan_sync_helper/xml_definitions/doc_metadata.xlsx differ
diff --git a/tools/mayan_sync_helper/xml_definitions/doctype_definitions.xlsx b/tools/mayan_sync_helper/xml_definitions/doctype_definitions.xlsx
index 8541c020f0..279e0c71ca 100644
Binary files a/tools/mayan_sync_helper/xml_definitions/doctype_definitions.xlsx and b/tools/mayan_sync_helper/xml_definitions/doctype_definitions.xlsx differ
diff --git a/tools/mayan_sync_helper/xml_definitions/metadata_definitions.xlsx b/tools/mayan_sync_helper/xml_definitions/metadata_definitions.xlsx
index 4fd5cd3163..fa16ee93fa 100644
Binary files a/tools/mayan_sync_helper/xml_definitions/metadata_definitions.xlsx and b/tools/mayan_sync_helper/xml_definitions/metadata_definitions.xlsx differ