From 834e0926759e5a5319161bf9ec3572d07a9f1879 Mon Sep 17 00:00:00 2001 From: Sue Tairaku Date: Wed, 18 Dec 2024 10:41:20 -0800 Subject: [PATCH 1/6] Changes for PSP-9710 and PSP-9313 --- .../src/components/common/Section/Section.tsx | 2 +- .../common/Section/SectionStyles.tsx | 2 +- .../common/{ => buttons}/EditButton.tsx | 15 ++++-- .../common/buttons/EditPropertiesButton.tsx | 4 +- .../common/buttons/RemoveButton.tsx | 36 +++++++++++--- .../components/common/buttons/ViewButton.tsx | 33 +++++++++++++ .../src/components/common/form/NotesModal.tsx | 4 +- .../ToggleSaveInput/ToggleSaveInputView.tsx | 18 +++++-- .../ContactResultComponent/columns.tsx | 19 +++---- .../contacts/contact/detail/Container.tsx | 11 ++--- .../leases/detail/LeaseEditButton.tsx | 2 +- .../DepositsReceivedContainer/columns.tsx | 11 ++--- .../DepositsReturnedContainer/columns.tsx | 12 ++--- .../table/payments/paymentsColumns.tsx | 22 ++++----- .../payment/table/periods/periodColumns.tsx | 18 +++---- .../acquisition/common/AcquisitionMenu.tsx | 2 +- .../tabs/agreement/detail/AgreementView.tsx | 17 +++---- .../form8/Form8PaymentItemsSubForm.tsx | 12 ++--- .../details/ExpropriationForm8Details.tsx | 16 +++--- .../detail/AcquisitionSummaryView.tsx | 4 +- .../stakeholders/detail/StakeHolderView.tsx | 4 +- .../update/InterestHolderSubForm.tsx | 12 ++--- .../update/UpdateStakeHolderForm.tsx | 12 ++--- .../CompensationRequisitionDetailView.tsx | 3 +- .../mapSideBar/compensation/list/columns.tsx | 38 ++++---------- .../financials/FinancialActivitiesSubForm.tsx | 14 ++---- .../disposition/common/DispositionMenu.tsx | 2 +- .../detail/DispositionSummaryView.tsx | 4 +- .../tabs/offersAndSale/OffersAndSaleView.tsx | 2 +- .../DispositionOfferDetails.tsx | 14 ++---- .../form/DispositionSalePurchasersSubForm.tsx | 12 ++--- .../detail/ConsultationListView.tsx | 27 +++++----- .../project/add/ProductsArrayForm.tsx | 14 ++---- .../detail/ProjectSummaryView.tsx | 4 +- .../detail/PropertyDetailsTabView.tsx | 3 +- .../detail/PropertyActivityDetailView.tsx | 3 +- .../list/ManagementActivitiesList.tsx | 34 +++++-------- .../detail/PropertyContactList.tsx | 12 ++--- .../summary/PropertyManagementDetailView.tsx | 2 +- .../tabs/takes/detail/TakesDetailView.tsx | 38 +++++++------- .../research/common/ResearchMenu.tsx | 2 +- .../details/ResearchSummaryView.tsx | 3 +- .../tabs/checklist/detail/ChecklistView.tsx | 4 +- .../notes/list/NoteResults/columns.tsx | 49 +++++++++---------- .../src/features/properties/list/columns.tsx | 4 +- source/frontend/src/utils/columnUtils.tsx | 13 ++--- 46 files changed, 283 insertions(+), 306 deletions(-) rename source/frontend/src/components/common/{ => buttons}/EditButton.tsx (63%) create mode 100644 source/frontend/src/components/common/buttons/ViewButton.tsx diff --git a/source/frontend/src/components/common/Section/Section.tsx b/source/frontend/src/components/common/Section/Section.tsx index 5d0e7b2dbc..88c56f97c6 100644 --- a/source/frontend/src/components/common/Section/Section.tsx +++ b/source/frontend/src/components/common/Section/Section.tsx @@ -42,7 +42,7 @@ export const Section: React.FC< {header} {isCollapsable && ( - + {isCollapsed && ( props.theme.css.primary}; - text-align: right; + overflow: hidden; `; export const StyledSubtleText = styled.p` diff --git a/source/frontend/src/components/common/EditButton.tsx b/source/frontend/src/components/common/buttons/EditButton.tsx similarity index 63% rename from source/frontend/src/components/common/EditButton.tsx rename to source/frontend/src/components/common/buttons/EditButton.tsx index 78806d91b9..b54cdc1ba5 100644 --- a/source/frontend/src/components/common/EditButton.tsx +++ b/source/frontend/src/components/common/buttons/EditButton.tsx @@ -1,11 +1,14 @@ -import { Button } from 'react-bootstrap'; import { FaEdit } from 'react-icons/fa'; +import { CSSProperties } from 'styled-components'; + +import { StyledIconButton } from './IconButton'; interface IEditButtonProps { onClick: () => void; title?: string; icon?: React.ReactNode; dataTestId?: string | null; + style?: CSSProperties | null; } export const EditButton: React.FunctionComponent> = ({ @@ -13,16 +16,18 @@ export const EditButton: React.FunctionComponent { return ( - + {icon ?? } + ); }; diff --git a/source/frontend/src/components/common/buttons/EditPropertiesButton.tsx b/source/frontend/src/components/common/buttons/EditPropertiesButton.tsx index 5da4943eb4..e9e8f8a7eb 100644 --- a/source/frontend/src/components/common/buttons/EditPropertiesButton.tsx +++ b/source/frontend/src/components/common/buttons/EditPropertiesButton.tsx @@ -7,8 +7,8 @@ export const EditPropertiesIcon: React.FC = () => { }; const EditMapMarkerButton = styled(EditMapMarkerIcon)` - fill: ${props => props.theme.css.iconBlueAction}; + fill: ${props => props.theme.bcTokens.surfaceColorPrimaryButtonDefault}; &:hover { - fill: ${props => props.theme.css.iconBlueHover}; + fill: ${props => props.theme.bcTokens.surfaceColorPrimaryButtonHover}; } `; diff --git a/source/frontend/src/components/common/buttons/RemoveButton.tsx b/source/frontend/src/components/common/buttons/RemoveButton.tsx index 22df0ce57e..a25e2e1a9e 100644 --- a/source/frontend/src/components/common/buttons/RemoveButton.tsx +++ b/source/frontend/src/components/common/buttons/RemoveButton.tsx @@ -1,14 +1,19 @@ -import React from 'react'; +import React, { CSSProperties } from 'react'; +import { ButtonProps } from 'react-bootstrap'; +import { FaTrash } from 'react-icons/fa'; import { MdClose } from 'react-icons/md'; import styled, { css } from 'styled-components'; import { StyledIconButton } from './IconButton'; import { LinkButton } from './LinkButton'; -interface IRemoveButtonProps { +interface IRemoveButtonProps extends ButtonProps { label?: string; + title?: string; dataTestId?: string | null; fontSize?: string; + icon?: React.ReactNode; + style?: CSSProperties | null; onRemove: () => void; } @@ -26,6 +31,22 @@ export const RemoveButton: React.FunctionComponent +> = ({ onRemove, title, icon, dataTestId, style }) => { + return ( + + {icon ?? } + + ); +}; + // Support font-size override for remove buttons export const StyledRemoveLinkButton = styled(LinkButton)<{ $fontSize?: string }>` &&.btn { @@ -60,20 +81,19 @@ export const StyledRemoveIconButton = styled(StyledIconButton)` &&.btn { &.btn-primary { svg { - color: ${({ theme }) => theme.bcTokens.iconsColorDisabled}; + color: #aaaaaa !important; } text-decoration: none; line-height: unset; .text { display: none; } - &:hover, - &:active, - &:focus { - color: #d8292f; + svg:hover, + svg:active, + svg:focus { + color: #d8292f !important; text-decoration: none; opacity: unset; - display: flex; flex-direction: row; .text { display: inline; diff --git a/source/frontend/src/components/common/buttons/ViewButton.tsx b/source/frontend/src/components/common/buttons/ViewButton.tsx new file mode 100644 index 0000000000..67a46bc636 --- /dev/null +++ b/source/frontend/src/components/common/buttons/ViewButton.tsx @@ -0,0 +1,33 @@ +import { ButtonProps } from 'react-bootstrap/Button'; +import { FaEye } from 'react-icons/fa'; +import { CSSProperties } from 'styled-components'; + +import { StyledIconButton } from './IconButton'; + +interface IViewButtonProps extends ButtonProps { + onClick: () => void; + title?: string; + icon?: React.ReactNode; + dataTestId?: string | null; + style?: CSSProperties | null; +} + +export const ViewButton: React.FunctionComponent> = ({ + onClick, + title, + icon, + dataTestId, + style, +}) => ( + + {icon ?? } + +); + +export default ViewButton; diff --git a/source/frontend/src/components/common/form/NotesModal.tsx b/source/frontend/src/components/common/form/NotesModal.tsx index c02acd7d90..b45e0843aa 100644 --- a/source/frontend/src/components/common/form/NotesModal.tsx +++ b/source/frontend/src/components/common/form/NotesModal.tsx @@ -1,7 +1,7 @@ import { Formik } from 'formik'; import { ReactNode } from 'react'; import React from 'react'; -import { FaRegFileAlt } from 'react-icons/fa'; +import { FaEye } from 'react-icons/fa'; import * as Yup from 'yup'; import { StyledIconButton } from '@/components/common/buttons'; @@ -70,7 +70,7 @@ export const NotesModal = ({ setDisplayModal(true); }} > - + ); }; diff --git a/source/frontend/src/components/common/form/ToggleSaveInput/ToggleSaveInputView.tsx b/source/frontend/src/components/common/form/ToggleSaveInput/ToggleSaveInputView.tsx index 996b137286..ccdb607efd 100644 --- a/source/frontend/src/components/common/form/ToggleSaveInput/ToggleSaveInputView.tsx +++ b/source/frontend/src/components/common/form/ToggleSaveInput/ToggleSaveInputView.tsx @@ -2,10 +2,11 @@ import React from 'react'; import { Button, Form, Spinner } from 'react-bootstrap'; import { FaCheck } from 'react-icons/fa'; import NumberFormat from 'react-number-format'; +import styled from 'styled-components'; import { formatMoney } from '@/utils'; -import EditButton from '../../EditButton'; +import EditButton from '../../buttons/EditButton'; /** * Non formik form that allows a user to toggle between a value and an input and save the input. @@ -65,9 +66,20 @@ export const ToggleSaveInputView: React.FC = ({ } else { return ( <> - {asCurrency ? formatMoney(Number(value)) : value} - setIsEditing(true)} /> + + {asCurrency ? formatMoney(Number(value)) : value} + setIsEditing(true)} /> + ); } }; + +export const StyledCompensationContainer = styled.div` + display: flex; + flex-direction: row; + justify-content: flex-end; + align-items: center; + margin-bottom: 0.5rem; + align-items: center; +`; diff --git a/source/frontend/src/components/contact/ContactManagerView/ContactResultComponent/columns.tsx b/source/frontend/src/components/contact/ContactManagerView/ContactResultComponent/columns.tsx index 855c6fa1e7..e2ee674eac 100644 --- a/source/frontend/src/components/contact/ContactManagerView/ContactResultComponent/columns.tsx +++ b/source/frontend/src/components/contact/ContactManagerView/ContactResultComponent/columns.tsx @@ -1,12 +1,11 @@ import { FaRegBuilding, FaRegUser } from 'react-icons/fa'; import { FaCircle } from 'react-icons/fa'; -import { FaEdit } from 'react-icons/fa'; -import { MdContactMail } from 'react-icons/md'; import { Link, useHistory } from 'react-router-dom'; import { CellProps } from 'react-table'; import styled from 'styled-components'; -import { StyledIconButton } from '@/components/common/buttons'; +import EditButton from '@/components/common/buttons/EditButton'; +import ViewButton from '@/components/common/buttons/ViewButton'; import { InlineFlexDiv } from '@/components/common/styles'; import { ColumnWithProps } from '@/components/Table'; import { Claims } from '@/constants/claims'; @@ -131,23 +130,17 @@ const columns: ColumnWithProps[] = [ return ( {hasClaim(Claims.CONTACT_EDIT) && ( - history.push(`/contact/${props.row.original.id}/edit`)} - > - - + /> )} {hasClaim(Claims.CONTACT_VIEW) && ( - history.push(`/contact/${props.row.original.id}`)} - > - - + /> )} ); diff --git a/source/frontend/src/features/contacts/contact/detail/Container.tsx b/source/frontend/src/features/contacts/contact/detail/Container.tsx index 19c10a46d3..790882895c 100644 --- a/source/frontend/src/features/contacts/contact/detail/Container.tsx +++ b/source/frontend/src/features/contacts/contact/detail/Container.tsx @@ -1,11 +1,11 @@ import React from 'react'; import { Col, Row } from 'react-bootstrap'; -import { FaEdit, FaWindowClose } from 'react-icons/fa'; +import { FaWindowClose } from 'react-icons/fa'; import { MdContactMail } from 'react-icons/md'; import { useHistory } from 'react-router-dom'; import styled from 'styled-components'; -import { StyledIconButton } from '@/components/common/buttons'; +import EditButton from '@/components/common/buttons/EditButton'; import { ProtectedComponent } from '@/components/common/ProtectedComponent'; import { H1 } from '@/components/common/styles'; import { Claims } from '@/constants/claims'; @@ -52,13 +52,10 @@ const ContactViewContainer: React.FunctionComponent< - history.push(`/contact/${props?.match?.params?.id}/edit`)} - > - - + /> diff --git a/source/frontend/src/features/leases/detail/LeaseEditButton.tsx b/source/frontend/src/features/leases/detail/LeaseEditButton.tsx index cd498ca5c1..7a4a0df19c 100644 --- a/source/frontend/src/features/leases/detail/LeaseEditButton.tsx +++ b/source/frontend/src/features/leases/detail/LeaseEditButton.tsx @@ -16,7 +16,7 @@ export const LeaseEditButton: React.FunctionComponent< {!isEditing && !!onEdit && ( - + )} diff --git a/source/frontend/src/features/leases/detail/LeasePages/deposits/components/DepositsReceivedContainer/columns.tsx b/source/frontend/src/features/leases/detail/LeasePages/deposits/components/DepositsReceivedContainer/columns.tsx index 8f4a63f3b0..427d7fc604 100644 --- a/source/frontend/src/features/leases/detail/LeasePages/deposits/components/DepositsReceivedContainer/columns.tsx +++ b/source/frontend/src/features/leases/detail/LeasePages/deposits/components/DepositsReceivedContainer/columns.tsx @@ -1,10 +1,9 @@ -import { FaTrash } from 'react-icons/fa'; import { MdUndo } from 'react-icons/md'; import { Link } from 'react-router-dom'; import { CellProps } from 'react-table'; -import { LinkButton, StyledRemoveLinkButton } from '@/components/common/buttons'; -import EditButton from '@/components/common/EditButton'; +import { LinkButton, RemoveIconButton } from '@/components/common/buttons'; +import EditButton from '@/components/common/buttons/EditButton'; import { InlineFlexDiv } from '@/components/common/styles'; import TooltipIcon from '@/components/common/TooltipIcon'; import { ColumnWithProps, renderDate, renderMoney } from '@/components/Table'; @@ -87,10 +86,10 @@ function depositActions( /> )} {hasClaim(Claims.LEASE_EDIT) && original.depositReturnCount === 0 && ( - } - onClick={() => original?.id && onDelete(original.id)} + id={`delete-deposit-${index}`} + onRemove={() => original?.id && onDelete(original.id)} /> )} diff --git a/source/frontend/src/features/leases/detail/LeasePages/deposits/components/DepositsReturnedContainer/columns.tsx b/source/frontend/src/features/leases/detail/LeasePages/deposits/components/DepositsReturnedContainer/columns.tsx index 36ac5e69b9..daa1f60693 100644 --- a/source/frontend/src/features/leases/detail/LeasePages/deposits/components/DepositsReturnedContainer/columns.tsx +++ b/source/frontend/src/features/leases/detail/LeasePages/deposits/components/DepositsReturnedContainer/columns.tsx @@ -1,10 +1,9 @@ -import { FaTrash } from 'react-icons/fa'; import { Link } from 'react-router-dom'; import { CellProps } from 'react-table'; import styled from 'styled-components'; -import { StyledRemoveLinkButton } from '@/components/common/buttons'; -import EditButton from '@/components/common/EditButton'; +import { RemoveIconButton } from '@/components/common/buttons'; +import EditButton from '@/components/common/buttons/EditButton'; import { InlineFlexDiv } from '@/components/common/styles'; import { ColumnWithProps, renderDate, renderMoney } from '@/components/Table'; import Claims from '@/constants/claims'; @@ -77,10 +76,10 @@ function depositActions(onEdit: (id: number) => void, onDelete: (id: number) => onEdit(original.id)} /> )} {hasClaim(Claims.LEASE_EDIT) && ( - } - onClick={() => original?.id && onDelete(original.id)} + id={`delete-deposit-${index}`} + onRemove={() => original?.id && onDelete(original.id)} /> )} @@ -173,6 +172,5 @@ const StyledIcons = styled(InlineFlexDiv)` } .btn.btn-primary { background-color: transparent; - padding: 0; } `; diff --git a/source/frontend/src/features/leases/detail/LeasePages/payment/table/payments/paymentsColumns.tsx b/source/frontend/src/features/leases/detail/LeasePages/payment/table/payments/paymentsColumns.tsx index 61387d9a20..b383fce13b 100644 --- a/source/frontend/src/features/leases/detail/LeasePages/payment/table/payments/paymentsColumns.tsx +++ b/source/frontend/src/features/leases/detail/LeasePages/payment/table/payments/paymentsColumns.tsx @@ -1,9 +1,9 @@ -import { FaTrash } from 'react-icons/fa'; -import { MdEdit, MdReceipt } from 'react-icons/md'; +import { MdReceipt } from 'react-icons/md'; import { CellProps } from 'react-table'; import styled from 'styled-components'; -import { Button } from '@/components/common/buttons/Button'; +import { RemoveIconButton } from '@/components/common/buttons'; +import EditButton from '@/components/common/buttons/EditButton'; import NotesModal from '@/components/common/form/NotesModal'; import { InlineFlexDiv } from '@/components/common/styles'; import TooltipIcon from '@/components/common/TooltipIcon'; @@ -27,18 +27,14 @@ const actualsActions = ( return ( {hasClaim(Claims.LEASE_EDIT) && ( - + onEdit(original)} /> )} {hasClaim(Claims.LEASE_EDIT) && ( - + original.id && onDelete(original)} + /> )} ); diff --git a/source/frontend/src/features/leases/detail/LeasePages/payment/table/periods/periodColumns.tsx b/source/frontend/src/features/leases/detail/LeasePages/payment/table/periods/periodColumns.tsx index 5679e80b80..3d1202d5d7 100644 --- a/source/frontend/src/features/leases/detail/LeasePages/payment/table/periods/periodColumns.tsx +++ b/source/frontend/src/features/leases/detail/LeasePages/payment/table/periods/periodColumns.tsx @@ -1,12 +1,11 @@ import moment from 'moment'; -import { FaTrash } from 'react-icons/fa'; import { IoMdRefreshCircle } from 'react-icons/io'; -import { MdEdit } from 'react-icons/md'; import { TbArrowWaveRightUp } from 'react-icons/tb'; import { CellProps } from 'react-table'; import styled from 'styled-components'; -import { Button } from '@/components/common/buttons/Button'; +import { RemoveIconButton } from '@/components/common/buttons'; +import EditButton from '@/components/common/buttons/EditButton'; import { InlineFlexDiv } from '@/components/common/styles'; import TooltipIcon from '@/components/common/TooltipIcon'; import TooltipWrapper from '@/components/common/TooltipWrapper'; @@ -174,20 +173,15 @@ const paymentActions = ( return ( {hasClaim(Claims.LEASE_EDIT) && ( - + onEdit(original)} /> )} {hasClaim(Claims.LEASE_EDIT) && original.payments.length <= 0 && original.statusTypeCode?.id !== LeasePeriodStatusTypes.EXERCISED && ( - + onRemove={() => original.id && onDelete(original)} + /> )} {hasClaim(Claims.LEASE_EDIT) && (original.payments.length > 0 || diff --git a/source/frontend/src/features/mapSideBar/acquisition/common/AcquisitionMenu.tsx b/source/frontend/src/features/mapSideBar/acquisition/common/AcquisitionMenu.tsx index e23006e54d..f7d97dad9e 100644 --- a/source/frontend/src/features/mapSideBar/acquisition/common/AcquisitionMenu.tsx +++ b/source/frontend/src/features/mapSideBar/acquisition/common/AcquisitionMenu.tsx @@ -3,9 +3,9 @@ import { Col, Row } from 'react-bootstrap'; import { FaCaretRight } from 'react-icons/fa'; import styled from 'styled-components'; +import EditButton from '@/components/common/buttons/EditButton'; 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'; import { useKeycloakWrapper } from '@/hooks/useKeycloakWrapper'; diff --git a/source/frontend/src/features/mapSideBar/acquisition/tabs/agreement/detail/AgreementView.tsx b/source/frontend/src/features/mapSideBar/acquisition/tabs/agreement/detail/AgreementView.tsx index cfe33029f8..f0b3828a75 100644 --- a/source/frontend/src/features/mapSideBar/acquisition/tabs/agreement/detail/AgreementView.tsx +++ b/source/frontend/src/features/mapSideBar/acquisition/tabs/agreement/detail/AgreementView.tsx @@ -1,9 +1,9 @@ -import { FaMailBulk, FaPlus, FaTrash } from 'react-icons/fa'; +import { FaEdit, FaMailBulk, FaPlus, FaTrash } from 'react-icons/fa'; import { useHistory, useRouteMatch } from 'react-router-dom'; import styled from 'styled-components'; -import { StyledRemoveLinkButton } from '@/components/common/buttons/RemoveButton'; -import EditButton from '@/components/common/EditButton'; +import EditButton from '@/components/common/buttons/EditButton'; +import { RemoveIconButton } from '@/components/common/buttons/RemoveButton'; import LoadingBackdrop from '@/components/common/LoadingBackdrop'; import { Section } from '@/components/common/Section/Section'; import { SectionField } from '@/components/common/Section/SectionField'; @@ -97,12 +97,13 @@ export const AgreementView: React.FunctionComponent = ({ onClick={() => history.push(`${match.url}/${agreement.agreementId}/update`) } + icon={} /> - { + icon={} + onRemove={() => { setModalContent({ ...getDeleteModalProps(), variant: 'error', @@ -121,9 +122,7 @@ export const AgreementView: React.FunctionComponent = ({ }); setDisplayModal(true); }} - > - - + /> )} diff --git a/source/frontend/src/features/mapSideBar/acquisition/tabs/expropriation/form8/Form8PaymentItemsSubForm.tsx b/source/frontend/src/features/mapSideBar/acquisition/tabs/expropriation/form8/Form8PaymentItemsSubForm.tsx index 95fff8d092..b119cce161 100644 --- a/source/frontend/src/features/mapSideBar/acquisition/tabs/expropriation/form8/Form8PaymentItemsSubForm.tsx +++ b/source/frontend/src/features/mapSideBar/acquisition/tabs/expropriation/form8/Form8PaymentItemsSubForm.tsx @@ -1,8 +1,7 @@ import { FieldArray, FormikProps, useFormikContext } from 'formik'; -import { FaTrash } from 'react-icons/fa'; import styled from 'styled-components'; -import { LinkButton, StyledRemoveLinkButton } from '@/components/common/buttons'; +import { LinkButton, RemoveIconButton } from '@/components/common/buttons'; import { FastCurrencyInput, Select } from '@/components/common/form'; import { YesNoSelect } from '@/components/common/form/YesNoSelect'; import { SectionField } from '@/components/common/Section/SectionField'; @@ -77,11 +76,10 @@ export const Form8PaymentItemsSubForm: React.FunctionComponent - { + onRemove={() => { setModalContent({ ...getDeleteModalProps(), title: 'Remove Payment Item', @@ -97,9 +95,7 @@ export const Form8PaymentItemsSubForm: React.FunctionComponent - - + /> diff --git a/source/frontend/src/features/mapSideBar/acquisition/tabs/expropriation/form8/details/ExpropriationForm8Details.tsx b/source/frontend/src/features/mapSideBar/acquisition/tabs/expropriation/form8/details/ExpropriationForm8Details.tsx index 940e2fc569..25e84ad0ef 100644 --- a/source/frontend/src/features/mapSideBar/acquisition/tabs/expropriation/form8/details/ExpropriationForm8Details.tsx +++ b/source/frontend/src/features/mapSideBar/acquisition/tabs/expropriation/form8/details/ExpropriationForm8Details.tsx @@ -1,10 +1,10 @@ import { Col, Row } from 'react-bootstrap'; -import { FaExternalLinkAlt, FaMoneyCheck, FaTrash } from 'react-icons/fa'; +import { FaExternalLinkAlt, FaMoneyCheck } from 'react-icons/fa'; import { useHistory, useRouteMatch } from 'react-router-dom'; import styled from 'styled-components'; -import { StyledRemoveLinkButton } from '@/components/common/buttons'; -import EditButton from '@/components/common/EditButton'; +import { RemoveIconButton } from '@/components/common/buttons'; +import EditButton from '@/components/common/buttons/EditButton'; import { Section } from '@/components/common/Section/Section'; import { SectionField } from '@/components/common/Section/SectionField'; import { H3, StyledSectionAddButton } from '@/components/common/styles'; @@ -64,12 +64,12 @@ export const ExpropriationForm8Details: React.FunctionComponent< title="Edit form 8" dataTestId={`form8[${form8Index}].edit-form8`} onClick={() => history.push(`${match.url}/${form8.id}`)} + style={{ float: 'right' }} /> - { + onRemove={() => { setModalContent({ ...getDeleteModalProps(), title: 'Remove Form 8', @@ -85,9 +85,7 @@ export const ExpropriationForm8Details: React.FunctionComponent< }); setDisplayModal(true); }} - > - - + /> )} 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 d99db2373d..e570c85f30 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 @@ -3,7 +3,7 @@ import { FaExternalLinkAlt } from 'react-icons/fa'; import { Link } from 'react-router-dom'; import styled from 'styled-components'; -import EditButton from '@/components/common/EditButton'; +import EditButton from '@/components/common/buttons/EditButton'; import { Section } from '@/components/common/Section/Section'; import { SectionField } from '@/components/common/Section/SectionField'; import { StyledEditWrapper, StyledSummarySection } from '@/components/common/Section/SectionStyles'; @@ -74,7 +74,7 @@ const AcquisitionSummaryView: React.FC = ({ {hasClaim(Claims.ACQUISITION_EDIT) && canEditDetails() ? ( - + ) : null} {!canEditDetails() && ( = ( {keycloak.hasClaim(Claims.ACQUISITION_EDIT) && statusSolver.canEditStakeholders() ? ( - + ) : null}
diff --git a/source/frontend/src/features/mapSideBar/acquisition/tabs/stakeholders/update/InterestHolderSubForm.tsx b/source/frontend/src/features/mapSideBar/acquisition/tabs/stakeholders/update/InterestHolderSubForm.tsx index 795470e13a..1a3a976768 100644 --- a/source/frontend/src/features/mapSideBar/acquisition/tabs/stakeholders/update/InterestHolderSubForm.tsx +++ b/source/frontend/src/features/mapSideBar/acquisition/tabs/stakeholders/update/InterestHolderSubForm.tsx @@ -1,9 +1,8 @@ import { FieldArrayRenderProps, FormikErrors, getIn, useFormikContext } from 'formik'; import { Fragment, useEffect } from 'react'; import { Col, Row } from 'react-bootstrap'; -import { FaTrash } from 'react-icons/fa'; -import { StyledRemoveLinkButton } from '@/components/common/buttons'; +import { RemoveIconButton } from '@/components/common/buttons'; import { DisplayError, Select } from '@/components/common/form'; import { SelectOption } from '@/components/common/form'; import { ContactInputContainer } from '@/components/common/form/ContactInput/ContactInputContainer'; @@ -88,15 +87,12 @@ export const InterestHolderSubForm: React.FunctionComponent - { + onRemove={() => { arrayHelpers.remove(index); }} - > - - + /> {getIn(errors, `interestHolders.${index}.contact`) && ( diff --git a/source/frontend/src/features/mapSideBar/acquisition/tabs/stakeholders/update/UpdateStakeHolderForm.tsx b/source/frontend/src/features/mapSideBar/acquisition/tabs/stakeholders/update/UpdateStakeHolderForm.tsx index ef598da270..9397e8b042 100644 --- a/source/frontend/src/features/mapSideBar/acquisition/tabs/stakeholders/update/UpdateStakeHolderForm.tsx +++ b/source/frontend/src/features/mapSideBar/acquisition/tabs/stakeholders/update/UpdateStakeHolderForm.tsx @@ -1,9 +1,8 @@ import { FieldArray, Formik, FormikHelpers, FormikProps, getIn } from 'formik'; import { Fragment } from 'react'; import { Col, Row } from 'react-bootstrap'; -import { FaTrash } from 'react-icons/fa'; -import { Button, StyledRemoveLinkButton } from '@/components/common/buttons'; +import { Button, RemoveIconButton } from '@/components/common/buttons'; import { DisplayError } from '@/components/common/form'; import { ContactInputContainer } from '@/components/common/form/ContactInput/ContactInputContainer'; import ContactInputView from '@/components/common/form/ContactInput/ContactInputView'; @@ -153,15 +152,12 @@ export const UpdateStakeHolderForm: React.FunctionComponent - { + onRemove={() => { arrayHelpers.remove(index); }} - > - - + /> {getIn(errors, `nonInterestPayees.${index}.contact`) && ( diff --git a/source/frontend/src/features/mapSideBar/compensation/detail/CompensationRequisitionDetailView.tsx b/source/frontend/src/features/mapSideBar/compensation/detail/CompensationRequisitionDetailView.tsx index b093e47cc7..9caa614c72 100644 --- a/source/frontend/src/features/mapSideBar/compensation/detail/CompensationRequisitionDetailView.tsx +++ b/source/frontend/src/features/mapSideBar/compensation/detail/CompensationRequisitionDetailView.tsx @@ -5,7 +5,7 @@ import { FaExternalLinkAlt, FaMoneyCheck } from 'react-icons/fa'; import { Link } from 'react-router-dom'; import styled from 'styled-components'; -import EditButton from '@/components/common/EditButton'; +import EditButton from '@/components/common/buttons/EditButton'; import { HeaderField } from '@/components/common/HeaderField/HeaderField'; import LoadingBackdrop from '@/components/common/LoadingBackdrop'; import { Section } from '@/components/common/Section/Section'; @@ -191,6 +191,7 @@ export const CompensationRequisitionDetailView: React.FunctionComponent< onClick={() => { setEditMode(true); }} + style={{ float: 'right' }} /> ); diff --git a/source/frontend/src/features/mapSideBar/compensation/list/columns.tsx b/source/frontend/src/features/mapSideBar/compensation/list/columns.tsx index b1bee2ee69..b2c19b28de 100644 --- a/source/frontend/src/features/mapSideBar/compensation/list/columns.tsx +++ b/source/frontend/src/features/mapSideBar/compensation/list/columns.tsx @@ -1,9 +1,8 @@ -import { FaEye, FaTrash } from 'react-icons/fa'; import { CellProps } from 'react-table'; import styled from 'styled-components'; -import { LinkButton, StyledRemoveIconButton } from '@/components/common/buttons'; -import { Button } from '@/components/common/buttons/Button'; +import { LinkButton, RemoveIconButton } from '@/components/common/buttons'; +import ViewButton from '@/components/common/buttons/ViewButton'; import { InlineFlexDiv } from '@/components/common/styles'; import TooltipIcon from '@/components/common/TooltipIcon'; import { ColumnWithProps } from '@/components/Table'; @@ -98,28 +97,21 @@ export function createCompensationTableColumns( return ( {hasClaim(Claims.COMPENSATION_REQUISITION_VIEW) && ( - + /> )} {hasClaim(Claims.COMPENSATION_REQUISITION_DELETE) && canEditDetails(cellProps.row.original.isDraft) && ( - cellProps.row.original.id && onDelete(cellProps.row.original.id)} + onRemove={() => cellProps.row.original.id && onDelete(cellProps.row.original.id)} title="Delete Compensation" - > - - + /> )} {hasClaim(Claims.COMPENSATION_REQUISITION_DELETE) && !canEditDetails(cellProps.row.original.isDraft) && ( @@ -141,16 +133,6 @@ const StyledDiv = styled(InlineFlexDiv)` justify-content: space-around; width: 100%; - [id^='compensation-view'] { - color: ${props => props.theme.css.activeActionColor}; - } - [id^='compensation-delete'] { - color: ${props => props.theme.css.activeActionColor}; - :hover { - color: ${({ theme }) => theme.bcTokens.surfaceColorPrimaryDangerButtonDefault}; - } - } - .btn.btn-primary { background-color: transparent; padding: 0; diff --git a/source/frontend/src/features/mapSideBar/compensation/update/financials/FinancialActivitiesSubForm.tsx b/source/frontend/src/features/mapSideBar/compensation/update/financials/FinancialActivitiesSubForm.tsx index 1f4cc293fe..247730680a 100644 --- a/source/frontend/src/features/mapSideBar/compensation/update/financials/FinancialActivitiesSubForm.tsx +++ b/source/frontend/src/features/mapSideBar/compensation/update/financials/FinancialActivitiesSubForm.tsx @@ -1,9 +1,8 @@ import { FieldArray, FormikProps, useFormikContext } from 'formik'; import { useState } from 'react'; -import { FaTrash } from 'react-icons/fa'; import styled from 'styled-components'; -import { LinkButton, StyledRemoveLinkButton } from '@/components/common/buttons'; +import { LinkButton, RemoveIconButton } from '@/components/common/buttons'; import { FastCurrencyInput } from '@/components/common/form'; import { Select, SelectOption } from '@/components/common/form/Select'; import { TypeaheadSelect } from '@/components/common/form/TypeaheadSelect'; @@ -88,17 +87,14 @@ export const FinancialActivitiesSubForm: React.FunctionComponent< <> - { + onRemove={() => { setRowToDelete(index); setShowModal(true); }} - > - - + /> diff --git a/source/frontend/src/features/mapSideBar/disposition/common/DispositionMenu.tsx b/source/frontend/src/features/mapSideBar/disposition/common/DispositionMenu.tsx index 816af41846..ec9c201dad 100644 --- a/source/frontend/src/features/mapSideBar/disposition/common/DispositionMenu.tsx +++ b/source/frontend/src/features/mapSideBar/disposition/common/DispositionMenu.tsx @@ -3,9 +3,9 @@ import { Col, Row } from 'react-bootstrap'; import { FaCaretRight } from 'react-icons/fa'; import styled from 'styled-components'; +import EditButton from '@/components/common/buttons/EditButton'; 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'; import { useKeycloakWrapper } from '@/hooks/useKeycloakWrapper'; diff --git a/source/frontend/src/features/mapSideBar/disposition/tabs/fileDetails/detail/DispositionSummaryView.tsx b/source/frontend/src/features/mapSideBar/disposition/tabs/fileDetails/detail/DispositionSummaryView.tsx index e3c7063d5a..d0d1048405 100644 --- a/source/frontend/src/features/mapSideBar/disposition/tabs/fileDetails/detail/DispositionSummaryView.tsx +++ b/source/frontend/src/features/mapSideBar/disposition/tabs/fileDetails/detail/DispositionSummaryView.tsx @@ -1,7 +1,7 @@ import { Fragment } from 'react'; import { FaExternalLinkAlt } from 'react-icons/fa'; -import EditButton from '@/components/common/EditButton'; +import EditButton from '@/components/common/buttons/EditButton'; import { Section } from '@/components/common/Section/Section'; import { SectionField } from '@/components/common/Section/SectionField'; import { StyledEditWrapper, StyledSummarySection } from '@/components/common/Section/SectionStyles'; @@ -48,7 +48,7 @@ export const DispositionSummaryView: React.FunctionComponent + ) : null} {keycloak.hasClaim(Claims.DISPOSITION_EDIT) && dispositionFile !== undefined && diff --git a/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/OffersAndSaleView.tsx b/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/OffersAndSaleView.tsx index 02a918c141..7769601f3f 100644 --- a/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/OffersAndSaleView.tsx +++ b/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/OffersAndSaleView.tsx @@ -3,7 +3,7 @@ import { FaPlus } from 'react-icons/fa'; import { useHistory, useRouteMatch } from 'react-router-dom'; import styled from 'styled-components'; -import EditButton from '@/components/common/EditButton'; +import EditButton from '@/components/common/buttons/EditButton'; import LoadingBackdrop from '@/components/common/LoadingBackdrop'; import { Section } from '@/components/common/Section/Section'; import { SectionField } from '@/components/common/Section/SectionField'; 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 d5e97a9261..c27882af26 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 @@ -1,9 +1,8 @@ -import { FaTrash } from 'react-icons/fa'; import { useHistory, useRouteMatch } from 'react-router-dom'; import styled from 'styled-components'; -import { StyledRemoveLinkButton } from '@/components/common/buttons/RemoveButton'; -import EditButton from '@/components/common/EditButton'; +import EditButton from '@/components/common/buttons/EditButton'; +import { RemoveIconButton } from '@/components/common/buttons/RemoveButton'; import { SectionField } from '@/components/common/Section/SectionField'; import TooltipIcon from '@/components/common/TooltipIcon'; import { Claims, Roles } from '@/constants'; @@ -55,11 +54,10 @@ const DispositionOfferDetails: React.FunctionComponent history.push(`${match.url}/offers/${dispositionOffer.id}/update`)} /> - { + onRemove={() => { setModalContent({ ...getDeleteModalProps(), variant: 'error', @@ -78,9 +76,7 @@ const DispositionOfferDetails: React.FunctionComponent - - + /> )} {keycloak.hasClaim(Claims.DISPOSITION_EDIT) && !canEditDetails() && ( diff --git a/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/dispositionSale/form/DispositionSalePurchasersSubForm.tsx b/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/dispositionSale/form/DispositionSalePurchasersSubForm.tsx index 9905052a63..e2fd1c9a16 100644 --- a/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/dispositionSale/form/DispositionSalePurchasersSubForm.tsx +++ b/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/dispositionSale/form/DispositionSalePurchasersSubForm.tsx @@ -1,9 +1,8 @@ import { FieldArray, useFormikContext } from 'formik'; import React from 'react'; import { Col, Row } from 'react-bootstrap'; -import { FaTrash } from 'react-icons/fa'; -import { LinkButton, StyledRemoveLinkButton } from '@/components/common/buttons'; +import { LinkButton, RemoveIconButton } from '@/components/common/buttons'; import { ContactInputContainer } from '@/components/common/form/ContactInput/ContactInputContainer'; import ContactInputView from '@/components/common/form/ContactInput/ContactInputView'; import { PrimaryContactSelector } from '@/components/common/form/PrimaryContactSelector/PrimaryContactSelector'; @@ -41,11 +40,10 @@ const DispositionSalePurchaserSubForm: React.FunctionComponent< > - { + onRemove={() => { setModalContent({ ...getDeleteModalProps(), title: 'Remove Purchaser', @@ -62,9 +60,7 @@ const DispositionSalePurchaserSubForm: React.FunctionComponent< }); setDisplayModal(true); }} - > - - + /> diff --git a/source/frontend/src/features/mapSideBar/lease/tabs/consultations/detail/ConsultationListView.tsx b/source/frontend/src/features/mapSideBar/lease/tabs/consultations/detail/ConsultationListView.tsx index d7c1e45b06..0e9edf7d47 100644 --- a/source/frontend/src/features/mapSideBar/lease/tabs/consultations/detail/ConsultationListView.tsx +++ b/source/frontend/src/features/mapSideBar/lease/tabs/consultations/detail/ConsultationListView.tsx @@ -1,11 +1,11 @@ import { useMemo } from 'react'; import { Col, Row } from 'react-bootstrap'; -import { FaCheckCircle, FaExclamationCircle, FaPlus, FaTimesCircle, FaTrash } from 'react-icons/fa'; +import { FaCheckCircle, FaExclamationCircle, FaPlus, FaTimesCircle } from 'react-icons/fa'; import styled from 'styled-components'; -import { StyledRemoveLinkButton } from '@/components/common/buttons/RemoveButton'; +import EditButton from '@/components/common/buttons/EditButton'; +import { RemoveIconButton } from '@/components/common/buttons/RemoveButton'; import ContactFieldContainer from '@/components/common/ContactFieldContainer'; -import EditButton from '@/components/common/EditButton'; import LoadingBackdrop from '@/components/common/LoadingBackdrop'; import { Section } from '@/components/common/Section/Section'; import { SectionField } from '@/components/common/Section/SectionField'; @@ -106,11 +106,10 @@ export const ConsultationListView: React.FunctionComponent - { + onRemove={() => { setModalContent({ ...getDeleteModalProps(), variant: 'error', @@ -129,16 +128,16 @@ export const ConsultationListView: React.FunctionComponent - - + /> - onEdit(consultation.id)} - /> + + onEdit(consultation.id)} + /> + )} diff --git a/source/frontend/src/features/mapSideBar/project/add/ProductsArrayForm.tsx b/source/frontend/src/features/mapSideBar/project/add/ProductsArrayForm.tsx index 53d719f284..b950f99009 100644 --- a/source/frontend/src/features/mapSideBar/project/add/ProductsArrayForm.tsx +++ b/source/frontend/src/features/mapSideBar/project/add/ProductsArrayForm.tsx @@ -1,10 +1,9 @@ import { FieldArray, FieldArrayRenderProps, FormikProps, useFormikContext } from 'formik'; import React, { useRef, useState } from 'react'; import { Col, Row } from 'react-bootstrap'; -import { FaTrash } from 'react-icons/fa'; import styled from 'styled-components'; -import { LinkButton, StyledRemoveLinkButton } from '@/components/common/buttons'; +import { LinkButton, RemoveIconButton } from '@/components/common/buttons'; import GenericModal from '@/components/common/GenericModal'; import LoadingBackdrop from '@/components/common/LoadingBackdrop'; import { Section } from '@/components/common/Section/Section'; @@ -75,13 +74,10 @@ export const ProductsArrayForm: React.FunctionComponent - handleRemove(index)} - > - - + handleRemove(index)} + /> {keycloak.hasClaim(Claims.PROJECT_EDIT) && project !== undefined ? ( - + ) : null}
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 2ab10c650d..b0762aa254 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 @@ -3,7 +3,7 @@ import React from 'react'; import { Col, Form, Row } from 'react-bootstrap'; import { useHistory } from 'react-router-dom'; -import { EditButton } from '@/components/common/EditButton'; +import { EditButton } from '@/components/common/buttons/EditButton'; import { readOnlyMultiSelectStyle } from '@/components/common/form'; import LoadingBackdrop from '@/components/common/LoadingBackdrop'; import { Section } from '@/components/common/Section/Section'; @@ -76,6 +76,7 @@ export const PropertyDetailsTabView: React.FunctionComponent ) : null} {hasClaim(Claims.PROPERTY_EDIT) && propertyIsRetired ? ( diff --git a/source/frontend/src/features/mapSideBar/property/tabs/propertyDetailsManagement/activity/detail/PropertyActivityDetailView.tsx b/source/frontend/src/features/mapSideBar/property/tabs/propertyDetailsManagement/activity/detail/PropertyActivityDetailView.tsx index 0840a64579..f533361647 100644 --- a/source/frontend/src/features/mapSideBar/property/tabs/propertyDetailsManagement/activity/detail/PropertyActivityDetailView.tsx +++ b/source/frontend/src/features/mapSideBar/property/tabs/propertyDetailsManagement/activity/detail/PropertyActivityDetailView.tsx @@ -4,8 +4,8 @@ import { MdClose } from 'react-icons/md'; import { useHistory } from 'react-router-dom'; import ReactVisibilitySensor from 'react-visibility-sensor'; +import EditButton from '@/components/common/buttons/EditButton'; import ContactLink from '@/components/common/ContactLink'; -import EditButton from '@/components/common/EditButton'; import LoadingBackdrop from '@/components/common/LoadingBackdrop'; import { Section } from '@/components/common/Section/Section'; import { SectionField } from '@/components/common/Section/SectionField'; @@ -85,6 +85,7 @@ export const PropertyActivityDetailView: React.FunctionComponent< `/mapview/sidebar/property/${props.propertyId}/management/activity/${props.activity?.id}/edit`, ); }} + style={{ float: 'right' }} /> )} diff --git a/source/frontend/src/features/mapSideBar/property/tabs/propertyDetailsManagement/activity/list/ManagementActivitiesList.tsx b/source/frontend/src/features/mapSideBar/property/tabs/propertyDetailsManagement/activity/list/ManagementActivitiesList.tsx index 4d1f800579..56154b557c 100644 --- a/source/frontend/src/features/mapSideBar/property/tabs/propertyDetailsManagement/activity/list/ManagementActivitiesList.tsx +++ b/source/frontend/src/features/mapSideBar/property/tabs/propertyDetailsManagement/activity/list/ManagementActivitiesList.tsx @@ -1,10 +1,11 @@ import React from 'react'; -import { FaEye, FaInfoCircle, FaTrash } from 'react-icons/fa'; +import { FaInfoCircle } from 'react-icons/fa'; import { CellProps } from 'react-table'; import styled from 'styled-components'; -import { LinkButton } from '@/components/common/buttons'; -import { StyledRemoveIconButton } from '@/components/common/buttons/RemoveButton'; +import { RemoveIconButton } from '@/components/common/buttons/RemoveButton'; +import ViewButton from '@/components/common/buttons/ViewButton'; +import { InlineFlexDiv } from '@/components/common/styles'; import TooltipWrapper from '@/components/common/TooltipWrapper'; import { ColumnWithProps, Table } from '@/components/Table'; import { TableSort } from '@/components/Table/TableSort'; @@ -87,29 +88,22 @@ export function createTableColumns( return ( {hasClaim(Claims.MANAGEMENT_VIEW) && ( - - } onClick={() => activityRow?.id && onView(activityRow.activityId)} + id={`activity-view-${cellProps.row.id}`} + title="property-activity view details" /> )} {hasClaim(Claims.MANAGEMENT_DELETE) && activityRow?.activityStatusType?.id === PropertyManagementActivityStatusTypes.NOTSTARTED ? ( - activityRow.id && onDelete(activityRow.id)} + onRemove={() => activityRow.id && onDelete(activityRow.id)} title="Delete" - > - - + /> ) : ( )} {hasClaim(Claims.PROPERTY_EDIT) && ( - cellProps.row.original.id && onDelete(cellProps.row.original.id)} + onRemove={() => cellProps.row.original.id && onDelete(cellProps.row.original.id)} title="Delete contact" - > - - + /> )} ); diff --git a/source/frontend/src/features/mapSideBar/property/tabs/propertyDetailsManagement/detail/summary/PropertyManagementDetailView.tsx b/source/frontend/src/features/mapSideBar/property/tabs/propertyDetailsManagement/detail/summary/PropertyManagementDetailView.tsx index d5c24a1371..342442d21e 100644 --- a/source/frontend/src/features/mapSideBar/property/tabs/propertyDetailsManagement/detail/summary/PropertyManagementDetailView.tsx +++ b/source/frontend/src/features/mapSideBar/property/tabs/propertyDetailsManagement/detail/summary/PropertyManagementDetailView.tsx @@ -1,7 +1,7 @@ import { Col, Row } from 'react-bootstrap'; import { useHistory } from 'react-router-dom'; -import { EditButton } from '@/components/common/EditButton'; +import { EditButton } from '@/components/common/buttons/EditButton'; import LoadingBackdrop from '@/components/common/LoadingBackdrop'; import { MultiselectTextList } from '@/components/common/MultiselectTextList'; import { Section } from '@/components/common/Section/Section'; diff --git a/source/frontend/src/features/mapSideBar/property/tabs/takes/detail/TakesDetailView.tsx b/source/frontend/src/features/mapSideBar/property/tabs/takes/detail/TakesDetailView.tsx index 24d4300f8d..aa1672d36f 100644 --- a/source/frontend/src/features/mapSideBar/property/tabs/takes/detail/TakesDetailView.tsx +++ b/source/frontend/src/features/mapSideBar/property/tabs/takes/detail/TakesDetailView.tsx @@ -1,13 +1,13 @@ import { Col, Row } from 'react-bootstrap'; -import { FaPlus, FaTrash } from 'react-icons/fa'; +import { FaPlus } from 'react-icons/fa'; import styled from 'styled-components'; -import { StyledRemoveLinkButton } from '@/components/common/buttons'; -import EditButton from '@/components/common/EditButton'; +import { RemoveIconButton } from '@/components/common/buttons'; +import EditButton from '@/components/common/buttons/EditButton'; import LoadingBackdrop from '@/components/common/LoadingBackdrop'; import { Section } from '@/components/common/Section/Section'; import { SectionField } from '@/components/common/Section/SectionField'; -import { StyledEditWrapper, StyledSummarySection } from '@/components/common/Section/SectionStyles'; +import { StyledSummarySection } from '@/components/common/Section/SectionStyles'; import { SectionListHeader } from '@/components/common/SectionListHeader'; import { H2 } from '@/components/common/styles'; import TooltipIcon from '@/components/common/TooltipIcon'; @@ -123,22 +123,20 @@ export const TakesDetailView: React.FunctionComponent = ( Take {index + 1} - - {onEdit !== undefined && canEditTakes(take) ? ( - onEdit(take.id)} /> - ) : null} - {!canEditTakes(take) && ( - - )} - + {onEdit !== undefined && canEditTakes(take) ? ( + onEdit(take.id)} /> + ) : null} + {!canEditTakes(take) && ( + + )} + {canEditTakes(take) && ( - { + onRemove={() => { setModalContent({ ...getDeleteModalProps(), handleOk: () => { @@ -148,9 +146,7 @@ export const TakesDetailView: React.FunctionComponent = ( }); setDisplayModal(true); }} - > - - + /> )} diff --git a/source/frontend/src/features/mapSideBar/research/common/ResearchMenu.tsx b/source/frontend/src/features/mapSideBar/research/common/ResearchMenu.tsx index 5a551eb41e..38ac802356 100644 --- a/source/frontend/src/features/mapSideBar/research/common/ResearchMenu.tsx +++ b/source/frontend/src/features/mapSideBar/research/common/ResearchMenu.tsx @@ -3,8 +3,8 @@ import { FaCaretRight } from 'react-icons/fa'; import styled from 'styled-components'; import { LinkButton } from '@/components/common/buttons'; +import { EditButton } from '@/components/common/buttons/EditButton'; import { EditPropertiesIcon } from '@/components/common/buttons/EditPropertiesButton'; -import { EditButton } from '@/components/common/EditButton'; import { Claims } from '@/constants/index'; import { useKeycloakWrapper } from '@/hooks/useKeycloakWrapper'; diff --git a/source/frontend/src/features/mapSideBar/research/tabs/fileDetails/details/ResearchSummaryView.tsx b/source/frontend/src/features/mapSideBar/research/tabs/fileDetails/details/ResearchSummaryView.tsx index 0e539dc957..0587ef2473 100644 --- a/source/frontend/src/features/mapSideBar/research/tabs/fileDetails/details/ResearchSummaryView.tsx +++ b/source/frontend/src/features/mapSideBar/research/tabs/fileDetails/details/ResearchSummaryView.tsx @@ -1,4 +1,4 @@ -import EditButton from '@/components/common/EditButton'; +import EditButton from '@/components/common/buttons/EditButton'; import { Section } from '@/components/common/Section/Section'; import { SectionField } from '@/components/common/Section/SectionField'; import { StyledEditWrapper, StyledSummarySection } from '@/components/common/Section/SectionStyles'; @@ -86,6 +86,7 @@ const ResearchSummaryView: React.FunctionComponent = onClick={() => { props.setEditMode(true); }} + style={{ float: 'right' }} /> ) : null} diff --git a/source/frontend/src/features/mapSideBar/shared/tabs/checklist/detail/ChecklistView.tsx b/source/frontend/src/features/mapSideBar/shared/tabs/checklist/detail/ChecklistView.tsx index 9af48157c5..3451e420b6 100644 --- a/source/frontend/src/features/mapSideBar/shared/tabs/checklist/detail/ChecklistView.tsx +++ b/source/frontend/src/features/mapSideBar/shared/tabs/checklist/detail/ChecklistView.tsx @@ -3,7 +3,7 @@ import { Col, Row } from 'react-bootstrap'; import { FiCheck, FiMinus, FiX } from 'react-icons/fi'; import styled from 'styled-components'; -import { EditButton } from '@/components/common/EditButton'; +import { EditButton } from '@/components/common/buttons/EditButton'; import { Section } from '@/components/common/Section/Section'; import { SectionField } from '@/components/common/Section/SectionField'; import { StyledEditWrapper, StyledSummarySection } from '@/components/common/Section/SectionStyles'; @@ -47,7 +47,7 @@ export const ChecklistView: React.FC = ({ {showEditButton && ( {keycloak.hasClaim(editClaim) ? ( - + ) : null} )} diff --git a/source/frontend/src/features/notes/list/NoteResults/columns.tsx b/source/frontend/src/features/notes/list/NoteResults/columns.tsx index 605149c04d..a27e4c7413 100644 --- a/source/frontend/src/features/notes/list/NoteResults/columns.tsx +++ b/source/frontend/src/features/notes/list/NoteResults/columns.tsx @@ -1,10 +1,9 @@ -import { FaTrash } from 'react-icons/fa'; -import { ImFileText2 } from 'react-icons/im'; +import { Col, Row } from 'react-bootstrap'; import { CellProps } from 'react-table'; import styled from 'styled-components'; -import { StyledIconButton, StyledRemoveLinkButton } from '@/components/common/buttons'; -import { InlineFlexDiv } from '@/components/common/styles'; +import { RemoveIconButton } from '@/components/common/buttons'; +import ViewButton from '@/components/common/buttons/ViewButton'; import { ColumnWithProps, DateCell } from '@/components/Table'; import { Claims } from '@/constants/index'; import { useKeycloakWrapper } from '@/hooks/useKeycloakWrapper'; @@ -52,26 +51,24 @@ export function createTableColumns( return ( - {hasClaim(Claims.NOTE_VIEW) && ( - onShowDetails(cellProps.row.original)} - className="pl-0" - > - - - )} - - {hasClaim(Claims.NOTE_DELETE) && !cellProps.row.original.isSystemGenerated && ( - onDelete(cellProps.row.original)} - > - - - )} + + {' '} + {hasClaim(Claims.NOTE_VIEW) && ( + onShowDetails(cellProps.row.original)} + title="View Note" + /> + )} + + + {hasClaim(Claims.NOTE_DELETE) && !cellProps.row.original.isSystemGenerated && ( + onDelete(cellProps.row.original)} + /> + )} + ); }, @@ -81,7 +78,7 @@ export function createTableColumns( return columns; } -const StyledDiv = styled(InlineFlexDiv)` - justify-content: space-around; +const StyledDiv = styled(Row)` + justify-content: space-evenly; width: 100%; `; diff --git a/source/frontend/src/features/properties/list/columns.tsx b/source/frontend/src/features/properties/list/columns.tsx index 6c61f349d3..03362eb789 100644 --- a/source/frontend/src/features/properties/list/columns.tsx +++ b/source/frontend/src/features/properties/list/columns.tsx @@ -179,10 +179,10 @@ export const columns = ({ - + )} diff --git a/source/frontend/src/utils/columnUtils.tsx b/source/frontend/src/utils/columnUtils.tsx index f266f32bb9..85358275d8 100644 --- a/source/frontend/src/utils/columnUtils.tsx +++ b/source/frontend/src/utils/columnUtils.tsx @@ -1,8 +1,7 @@ import difference from 'lodash/difference'; import map from 'lodash/map'; -import { FaTrash } from 'react-icons/fa'; -import { StyledRemoveLinkButton } from '@/components/common/buttons/RemoveButton'; +import { RemoveIconButton } from '@/components/common/buttons/RemoveButton'; import { ColumnWithProps } from '../components/Table/types'; @@ -24,16 +23,12 @@ export const getColumnsWithRemove = ( accessor: 'id' as any, maxWidth: 35, Cell: (props: any) => ( - { + onRemove={() => { setRows(difference(map(props.rows, 'original'), [props.row.original])); }} - > - - + /> ), }); return cols; From 859606576ca6199938fc10bb56718dc6c617c367 Mon Sep 17 00:00:00 2001 From: Sue Tairaku Date: Wed, 18 Dec 2024 13:07:28 -0800 Subject: [PATCH 2/6] Updated Snapshots and unit tests --- .../common/buttons/RemoveButton.tsx | 2 +- .../ToggleSaveInputView.test.tsx.snap | 322 +++++++++- .../__snapshots__/NotesModal.test.tsx.snap | 8 +- .../ContactResultComponent.test.tsx.snap | 45 +- .../__snapshots__/SideNavbar.test.tsx.snap | 590 ------------------ .../FilterContentForm.test.tsx.snap | 10 +- .../CreateOrganizationForm.test.tsx.snap | 6 +- .../CreatePersonForm.test.tsx.snap | 6 +- .../CreateContactContainer.test.tsx.snap | 6 +- .../UpdateOrganizationForm.test.tsx.snap | 6 +- .../UpdatePersonForm.test.tsx.snap | 6 +- .../UpdateContactContainer.test.tsx.snap | 6 +- .../ContactListView.test.tsx.snap | 15 +- .../DocumentListView.test.tsx.snap | 2 +- .../DepositsContainer.test.tsx.snap | 2 +- .../__snapshots__/DepositNotes.test.tsx.snap | 2 +- .../DepositsReturnedContainer.test.tsx.snap | 1 - .../DetailAdministration.test.tsx.snap | 4 +- .../DetailFeeDetermination.test.tsx.snap | 4 +- .../PropertiesInformation.test.tsx.snap | 2 +- .../__snapshots__/DocumentsPage.test.tsx.snap | 2 +- .../payment/PeriodPaymentsContainer.test.tsx | 6 +- .../PeriodPaymentsContainer.test.tsx.snap | 228 +++++-- .../table/payments/PaymentsView.test.tsx | 10 +- .../PaymentPeriodsView.test.tsx.snap | 114 +++- .../AcquisitionView.test.tsx.snap | 1 + .../AcquisitionMenu.test.tsx.snap | 195 +++--- .../AcquisitionFileTabs.test.tsx.snap | 1 + .../tabs/agreement/detail/AgreementView.tsx | 2 +- .../__snapshots__/AgreementView.test.tsx.snap | 4 +- .../form8/Form8PaymentItemsSubForm.tsx | 2 +- .../details/ExpropriationForm8Details.tsx | 2 +- .../AcquisitionSummaryView.test.tsx.snap | 1 + .../StakeHolderView.test.tsx.snap | 5 +- .../UpdateStakeHolderForm.test.tsx.snap | 96 ++- ...nsationRequisitionDetailView.test.tsx.snap | 6 +- .../CompensationListView.test.tsx.snap | 328 +++++++++- .../mapSideBar/compensation/list/columns.tsx | 2 +- ...eCompensationRequisitionForm.test.tsx.snap | 4 +- .../financials/FinancialActivitiesSubForm.tsx | 2 +- .../DispositionView.test.tsx.snap | 1 + .../DispositionFileTabs.test.tsx.snap | 1 + .../DispositionSummaryView.test.tsx.snap | 1 + .../OffersAndSaleView.test.tsx.snap | 2 +- .../DispositionOfferDetails.tsx | 2 +- .../form/DispositionSalePurchasersSubForm.tsx | 2 +- .../detail/ConsultationListView.tsx | 2 +- .../ConsultationListView.test.tsx.snap | 253 +++++--- .../AddProjectForm.test.tsx.snap | 130 ++-- .../ProjectSummaryView.test.tsx.snap | 7 +- .../PropertyAssociationTabView.test.tsx.snap | 8 +- .../OperationSectionView.test.tsx.snap | 4 +- .../__snapshots__/OperationView.test.tsx.snap | 2 +- .../list/ManagementActivitiesList.tsx | 4 +- ...ManagementActivitiesListView.test.tsx.snap | 209 ++++--- .../detail/PropertyContactList.tsx | 2 +- .../PropertyContactListView.test.tsx.snap | 27 +- ...PropertyManagementDetailView.test.tsx.snap | 3 +- .../TakesDetailView.test.tsx.snap | 96 ++- .../TakeUpdateForm.test.tsx.snap | 2 +- .../ResearchContainer.test.tsx.snap | 1 + .../__snapshots__/ResearchMenu.test.tsx.snap | 195 +++--- .../ResearchTabsContainer.test.tsx.snap | 1 + .../ResearchSummaryView.test.tsx.snap | 1 + .../__snapshots__/ChecklistView.test.tsx.snap | 13 +- .../__snapshots__/NoteResults.test.tsx.snap | 388 +++++++----- .../notes/list/NoteResults/columns.tsx | 1 - .../__snapshots__/NoteListView.test.tsx.snap | 2 +- 68 files changed, 1988 insertions(+), 1428 deletions(-) diff --git a/source/frontend/src/components/common/buttons/RemoveButton.tsx b/source/frontend/src/components/common/buttons/RemoveButton.tsx index a25e2e1a9e..45f36d93f9 100644 --- a/source/frontend/src/components/common/buttons/RemoveButton.tsx +++ b/source/frontend/src/components/common/buttons/RemoveButton.tsx @@ -39,7 +39,7 @@ export const RemoveIconButton: React.FunctionComponent< variant="primary" title={title ?? 'edit'} onClick={onRemove} - data-testid={dataTestId ?? 'edit-button'} + data-testid={dataTestId ?? 'remove-button'} style={style} > {icon ?? } diff --git a/source/frontend/src/components/common/form/ToggleSaveInput/__snapshots__/ToggleSaveInputView.test.tsx.snap b/source/frontend/src/components/common/form/ToggleSaveInput/__snapshots__/ToggleSaveInputView.test.tsx.snap index dd7225285f..8ff61aa60f 100644 --- a/source/frontend/src/components/common/form/ToggleSaveInput/__snapshots__/ToggleSaveInputView.test.tsx.snap +++ b/source/frontend/src/components/common/form/ToggleSaveInput/__snapshots__/ToggleSaveInputView.test.tsx.snap @@ -6,25 +6,311 @@ exports[`TogleSaveInputView component > renders as expected 1`] = ` class="Toastify" />
- +
+ + + +
+ +
`; diff --git a/source/frontend/src/components/common/form/__snapshots__/NotesModal.test.tsx.snap b/source/frontend/src/components/common/form/__snapshots__/NotesModal.test.tsx.snap index 8e65c118d1..3e29c69f89 100644 --- a/source/frontend/src/components/common/form/__snapshots__/NotesModal.test.tsx.snap +++ b/source/frontend/src/components/common/form/__snapshots__/NotesModal.test.tsx.snap @@ -271,15 +271,15 @@ exports[`NotesModal component > renders as expected 1`] = ` > diff --git a/source/frontend/src/components/contact/ContactManagerView/ContactResultComponent/__snapshots__/ContactResultComponent.test.tsx.snap b/source/frontend/src/components/contact/ContactManagerView/ContactResultComponent/__snapshots__/ContactResultComponent.test.tsx.snap index cfa8dd2dd0..0e8e8e59c8 100644 --- a/source/frontend/src/components/contact/ContactManagerView/ContactResultComponent/__snapshots__/ContactResultComponent.test.tsx.snap +++ b/source/frontend/src/components/contact/ContactManagerView/ContactResultComponent/__snapshots__/ContactResultComponent.test.tsx.snap @@ -811,7 +811,8 @@ exports[`Contact Search Results Table > matches snapshot 1`] = ` class="c5 c6" > - - -
-
-
-
- -`; - -exports[`SideNavbar display and logic > renders 2`] = ` -.c4.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; -} - -.c4.btn .Button__value { - width: -webkit-max-content; - width: -moz-max-content; - width: max-content; -} - -.c4.btn:hover { - -webkit-text-decoration: underline; - text-decoration: underline; - opacity: 0.8; -} - -.c4.btn:focus { - outline-width: 2px; - outline-style: solid; - outline-color: #2E5DD7; - outline-offset: 2px; - box-shadow: none; -} - -.c4.btn.btn-primary { - color: #FFFFFF; - background-color: #013366; -} - -.c4.btn.btn-primary:hover, -.c4.btn.btn-primary:active, -.c4.btn.btn-primary:focus { - background-color: #1E5189; -} - -.c4.btn.btn-secondary { - color: #013366; - background: none; - border-color: #013366; -} - -.c4.btn.btn-secondary:hover, -.c4.btn.btn-secondary:active, -.c4.btn.btn-secondary:focus { - color: #FFFFFF; - background-color: #013366; -} - -.c4.btn.btn-info { - color: #9F9D9C; - border: none; - background: none; - padding-left: 0.6rem; - padding-right: 0.6rem; -} - -.c4.btn.btn-info:hover, -.c4.btn.btn-info:active, -.c4.btn.btn-info:focus { - color: var(--surface-color-primary-button-hover); - background: none; -} - -.c4.btn.btn-light { - color: #FFFFFF; - background-color: #606060; - border: none; -} - -.c4.btn.btn-light:hover, -.c4.btn.btn-light:active, -.c4.btn.btn-light:focus { - color: #FFFFFF; - background-color: #606060; -} - -.c4.btn.btn-dark { - color: #FFFFFF; - background-color: #474543; - border: none; -} - -.c4.btn.btn-dark:hover, -.c4.btn.btn-dark:active, -.c4.btn.btn-dark:focus { - color: #FFFFFF; - background-color: #474543; -} - -.c4.btn.btn-danger { - color: #FFFFFF; - background-color: #CE3E39; -} - -.c4.btn.btn-danger:hover, -.c4.btn.btn-danger:active, -.c4.btn.btn-danger:focus { - color: #FFFFFF; - background-color: #CE3E39; -} - -.c4.btn.btn-warning { - color: #FFFFFF; - background-color: #FCBA19; - border-color: #FCBA19; -} - -.c4.btn.btn-warning:hover, -.c4.btn.btn-warning:active, -.c4.btn.btn-warning:focus { - color: #FFFFFF; - border-color: #FCBA19; - background-color: #FCBA19; -} - -.c4.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; -} - -.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; - border: none; - background: none; - box-shadow: none; - outline: none; -} - -.c4.btn.btn-link:disabled, -.c4.btn.btn-link.disabled { - color: #9F9D9C; - background: none; - pointer-events: none; -} - -.c4.btn:disabled, -.c4.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; -} - -.c4.Button .Button__icon { - margin-right: 1.6rem; -} - -.c4.Button--icon-only:focus { - outline: none; -} - -.c4.Button--icon-only .Button__icon { - margin-right: 0; -} - -.c5.btn.btn-light.Button { - padding: 0; - border: 0.1rem solid #9F9D9C; - background-color: white; - color: #474543; -} - -.c5.btn.btn-light.Button:focus, -.c5.btn.btn-light.Button:active { - background-color: white; - color: #474543; -} - -.c5.btn, -.c5 .Button__icon, -.c5 svg { - max-width: 2.4rem; - min-width: 2.4rem; - max-height: 2.4rem; - min-height: 2.4rem; - font-size: 1.4rem; -} - -.c1 { - height: calc( 100vh - 7.2rem - 4.4rem ); - overflow-y: auto; - overflow-x: hidden; - padding-top: 1.5rem; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - position: relative; - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - grid-area: iconbar; - background-color: #003366; - -webkit-transition: 0.5s width; - transition: 0.5s width; - width: 6rem; -} - -.c1 label { - color: white; - min-width: 8rem; -} - -.c1.expanded { - width: 16rem; -} - -.c1 .nav-item svg { - min-width: 2.4rem; -} - -.c1 .to-bottom { - margin-top: auto; - margin-bottom: 1.6rem; -} - -.c1 .nav-link { - padding: 0.8rem 1.6rem; -} - -.c0 { - z-index: 1000; - position: relative; -} - -.c7 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - height: 100%; -} - -.c7 a { - font-size: 1.7rem; -} - -.c6 { - height: 100%; - overflow-y: auto; - position: absolute; - top: 0; - right: 0; - background-color: white; - z-index: -1; - width: 64rem; - padding: 0.8rem 1.6rem; - text-align: left; - -webkit-transition: -webkit-transform 0.3s ease-in-out; - -webkit-transition: transform 0.3s ease-in-out; - transition: transform 0.3s ease-in-out; - box-shadow: 0.3rem 0 0.4rem rgba(0,0,0,0.2); -} - -.c6.show { - -webkit-transform: translateX(64rem); - -ms-transform: translateX(64rem); - transform: translateX(64rem); -} - -.c2 { - width: 100%; - margin-bottom: 2rem; - fill: #f2f2f2; -} - -.c2:hover label { - color: #8ec6ff; -} - -.c2:hover svg { - fill: #8ec6ff; -} - -.c3 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex-direction: row; - -ms-flex-direction: row; - flex-direction: row; - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; -} - -.c3 svg { - fill: white; - min-width: -webkit-max-content; - min-width: -moz-max-content; - min-width: max-content; -} - .c3.active svg { fill: #fdb913; } diff --git a/source/frontend/src/components/maps/leaflet/Control/AdvancedFilter/__snapshots__/FilterContentForm.test.tsx.snap b/source/frontend/src/components/maps/leaflet/Control/AdvancedFilter/__snapshots__/FilterContentForm.test.tsx.snap index ab9355bac0..8dfaca5427 100644 --- a/source/frontend/src/components/maps/leaflet/Control/AdvancedFilter/__snapshots__/FilterContentForm.test.tsx.snap +++ b/source/frontend/src/components/maps/leaflet/Control/AdvancedFilter/__snapshots__/FilterContentForm.test.tsx.snap @@ -329,7 +329,7 @@ exports[`FilterContentForm component > renders as expected 1`] = ` Show Ownership
renders as expected 1`] = ` Project
renders as expected 1`] = ` Tenure
renders as expected 1`] = ` Lease / Licence
renders as expected 1`] = ` Anomaly
renders as expected 1`] = ` Mailing Address
renders as expected 1`] = ` Property Address
renders as expected 1`] = ` Billing Address
renders as expected 1`] = `
renders as expected 1`] = ` Property Address
renders as expected 1`] = ` Billing Address
should render as expected 1`] = `
should render as expected 1`] = ` Property Address
should render as expected 1`] = ` Billing Address
renders as expected 1`] = ` Mailing Address
renders as expected 1`] = ` Property Address
renders as expected 1`] = ` Billing Address
renders as expected 1`] = `
renders as expected 1`] = ` Property Address
renders as expected 1`] = ` Billing Address
renders as expected 1`] = `
renders as expected 1`] = ` Property Address
renders as expected 1`] = ` Billing Address
matches snapshot 1`] = ` class="c6 c19" >
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 7b4ecdff3e..930c304f7a 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 @@ -368,7 +368,7 @@ exports[`Document List View > renders as expected 1`] = `
renders as expected 1`] = `
renders as expected 1`] = `
renders as expected 1`] = ` .c3 .btn.btn-primary { background-color: transparent; - padding: 0; }
renders a complete lease as expected 1 Administration
renders minimally as expected 1`] = ` Administration
renders a complete lease as expected Fee Determination
renders minimally as expected 1`] = Fee Determination
renders as expected 1`] = ` Property Information
renders as expected 1`] = `
{ const expander = await findByTestId('table-row-expander-'); await act(async () => userEvent.click(expander)); - const editButton = await findAllByTitle('edit actual'); + const editButton = await findAllByTitle('edit payment'); await act(async () => { userEvent.click(editButton[0]); }); @@ -506,7 +506,7 @@ describe('PeriodsPaymentsContainer component', () => { const expander = getByTestId('table-row-expander-'); await act(async () => userEvent.click(expander)); - const deleteButton = (await findAllByTitle('delete actual'))[0]; + const deleteButton = (await findAllByTitle('delete payment'))[0]; await act(async () => userEvent.click(deleteButton)); const warning = getByText('You are about to delete a payment. Do you wish to continue?'); expect(warning).toBeVisible(); @@ -529,7 +529,7 @@ describe('PeriodsPaymentsContainer component', () => { const expander = getByTestId('table-row-expander-'); await act(async () => userEvent.click(expander)); - const deleteButton = (await findAllByTitle('delete actual'))[0]; + const deleteButton = (await findAllByTitle('delete payment'))[0]; await act(async () => userEvent.click(deleteButton)); const warning = getByText('You are about to delete a payment. Do you wish to continue?'); expect(warning).toBeVisible(); diff --git a/source/frontend/src/features/leases/detail/LeasePages/payment/__snapshots__/PeriodPaymentsContainer.test.tsx.snap b/source/frontend/src/features/leases/detail/LeasePages/payment/__snapshots__/PeriodPaymentsContainer.test.tsx.snap index d1a599a309..275311671e 100644 --- a/source/frontend/src/features/leases/detail/LeasePages/payment/__snapshots__/PeriodPaymentsContainer.test.tsx.snap +++ b/source/frontend/src/features/leases/detail/LeasePages/payment/__snapshots__/PeriodPaymentsContainer.test.tsx.snap @@ -910,6 +910,86 @@ exports[`PeriodsPaymentsContainer component > renders as expected 1`] = ` margin-right: 0; } +.c8.c8.btn { + background-color: unset; + border: none; +} + +.c8.c8.btn:hover, +.c8.c8.btn:focus, +.c8.c8.btn:active { + background-color: unset; + outline: none; + box-shadow: none; +} + +.c8.c8.btn svg { + -webkit-transition: all 0.3s ease-out; + transition: all 0.3s ease-out; +} + +.c8.c8.btn svg:hover { + -webkit-transition: all 0.3s ease-in; + transition: all 0.3s ease-in; +} + +.c8.c8.btn.btn-primary svg { + color: #013366; +} + +.c8.c8.btn.btn-primary svg:hover { + color: #013366; +} + +.c8.c8.btn.btn-light svg { + color: var(--surface-color-primary-button-default); +} + +.c8.c8.btn.btn-light svg:hover { + color: #CE3E39; +} + +.c8.c8.btn.btn-info svg { + color: var(--surface-color-primary-button-default); +} + +.c8.c8.btn.btn-info svg:hover { + color: var(--surface-color-primary-button-hover); +} + +.c9.c9.btn.btn-primary { + -webkit-text-decoration: none; + text-decoration: none; + line-height: unset; +} + +.c9.c9.btn.btn-primary svg { + color: #aaaaaa !important; +} + +.c9.c9.btn.btn-primary .text { + display: none; +} + +.c9.c9.btn.btn-primary svg:hover, +.c9.c9.btn.btn-primary svg:active, +.c9.c9.btn.btn-primary svg:focus { + color: #d8292f !important; + -webkit-text-decoration: none; + text-decoration: none; + opacity: unset; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; +} + +.c9.c9.btn.btn-primary svg:hover .text, +.c9.c9.btn.btn-primary svg:active .text, +.c9.c9.btn.btn-primary svg:focus .text { + display: inline; + line-height: 2rem; +} + .c1 { font-weight: bold; color: var(--theme-blue-100); @@ -1458,57 +1538,47 @@ exports[`PeriodsPaymentsContainer component > renders as expected 1`] = ` class="c6 c7" >
- - edit period - -
@@ -365,7 +416,7 @@ exports[`AcquisitionMenu component > matches snapshot 1`] = ` class="pr-2 col-auto" >
1
@@ -374,7 +425,7 @@ exports[`AcquisitionMenu component > matches snapshot 1`] = ` class="col" > +
+ + + +
+ +
@@ -321,7 +607,7 @@ exports[`compensation list view > renders as expected 1`] = ` Requisitions in this file (H120)
cellProps.row.original.id && onDelete(cellProps.row.original.id)} title="Delete Compensation" /> 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 d015c2f5d9..086c53fd10 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 @@ -1217,7 +1217,7 @@ exports[`Compensation Requisition UpdateForm component > renders as expected 1`] Payment
renders as expected 1`] Activities
Activity {index + 1} { setRowToDelete(index); setShowModal(true); 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 1ae443086e..6fc7fbcfcf 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 @@ -411,6 +411,7 @@ exports[`DispositionView component > renders as expected 1`] = ` .c31 { text-align: right; + overflow: hidden; } .c35 { 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 4c4b3fa4cc..1baf25206f 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 @@ -64,6 +64,7 @@ exports[`DispositionFileTabs component > matches snapshot 1`] = ` .c3 { text-align: right; + overflow: hidden; } .c7 { diff --git a/source/frontend/src/features/mapSideBar/disposition/tabs/fileDetails/detail/__snapshots__/DispositionSummaryView.test.tsx.snap b/source/frontend/src/features/mapSideBar/disposition/tabs/fileDetails/detail/__snapshots__/DispositionSummaryView.test.tsx.snap index 5da768d72d..99ccd29647 100644 --- a/source/frontend/src/features/mapSideBar/disposition/tabs/fileDetails/detail/__snapshots__/DispositionSummaryView.test.tsx.snap +++ b/source/frontend/src/features/mapSideBar/disposition/tabs/fileDetails/detail/__snapshots__/DispositionSummaryView.test.tsx.snap @@ -13,6 +13,7 @@ exports[`DispositionSummaryView component > matches snapshot 1`] = ` .c1 { text-align: right; + overflow: hidden; } .c5 { diff --git a/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/__snapshots__/OffersAndSaleView.test.tsx.snap b/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/__snapshots__/OffersAndSaleView.test.tsx.snap index e7a30b4dec..9ebae227cb 100644 --- a/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/__snapshots__/OffersAndSaleView.test.tsx.snap +++ b/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/__snapshots__/OffersAndSaleView.test.tsx.snap @@ -145,7 +145,7 @@ exports[`Disposition Offer Detail View component > renders as expected 1`] = `
{ setModalContent({ ...getDeleteModalProps(), diff --git a/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/dispositionSale/form/DispositionSalePurchasersSubForm.tsx b/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/dispositionSale/form/DispositionSalePurchasersSubForm.tsx index e2fd1c9a16..ded0361c65 100644 --- a/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/dispositionSale/form/DispositionSalePurchasersSubForm.tsx +++ b/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/dispositionSale/form/DispositionSalePurchasersSubForm.tsx @@ -42,7 +42,7 @@ const DispositionSalePurchaserSubForm: React.FunctionComponent< { setModalContent({ ...getDeleteModalProps(), diff --git a/source/frontend/src/features/mapSideBar/lease/tabs/consultations/detail/ConsultationListView.tsx b/source/frontend/src/features/mapSideBar/lease/tabs/consultations/detail/ConsultationListView.tsx index 0e9edf7d47..e9e72652c7 100644 --- a/source/frontend/src/features/mapSideBar/lease/tabs/consultations/detail/ConsultationListView.tsx +++ b/source/frontend/src/features/mapSideBar/lease/tabs/consultations/detail/ConsultationListView.tsx @@ -108,7 +108,7 @@ export const ConsultationListView: React.FunctionComponent { setModalContent({ ...getDeleteModalProps(), 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 c73698704a..53bc07216e 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 @@ -215,47 +215,93 @@ exports[`ConsultationListView component > renders as expected 1`] = ` } .c11.c11.btn { - color: #aaaaaa; + background-color: unset; + border: none; +} + +.c11.c11.btn:hover, +.c11.c11.btn:focus, +.c11.c11.btn:active { + background-color: unset; + outline: none; + box-shadow: none; +} + +.c11.c11.btn svg { + -webkit-transition: all 0.3s ease-out; + transition: all 0.3s ease-out; +} + +.c11.c11.btn svg:hover { + -webkit-transition: all 0.3s ease-in; + transition: all 0.3s ease-in; +} + +.c11.c11.btn.btn-primary svg { + color: #013366; +} + +.c11.c11.btn.btn-primary svg:hover { + color: #013366; +} + +.c11.c11.btn.btn-light svg { + color: var(--surface-color-primary-button-default); +} + +.c11.c11.btn.btn-light svg:hover { + color: #CE3E39; +} + +.c11.c11.btn.btn-info svg { + color: var(--surface-color-primary-button-default); +} + +.c11.c11.btn.btn-info svg:hover { + color: var(--surface-color-primary-button-hover); +} + +.c12.c12.btn.btn-primary { -webkit-text-decoration: none; text-decoration: none; line-height: unset; } -.c11.c11.btn .text { +.c12.c12.btn.btn-primary svg { + color: #aaaaaa !important; +} + +.c12.c12.btn.btn-primary .text { display: none; } -.c11.c11.btn:hover, -.c11.c11.btn:active, -.c11.c11.btn:focus { - color: #d8292f; +.c12.c12.btn.btn-primary svg:hover, +.c12.c12.btn.btn-primary svg:active, +.c12.c12.btn.btn-primary svg:focus { + color: #d8292f !important; -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; } -.c11.c11.btn:hover .text, -.c11.c11.btn:active .text, -.c11.c11.btn:focus .text { +.c12.c12.btn.btn-primary svg:hover .text, +.c12.c12.btn.btn-primary svg:active .text, +.c12.c12.btn.btn-primary svg:focus .text { display: inline; line-height: 2rem; } -.c13.required::before { +.c15.required::before { content: '*'; position: absolute; top: 0.75rem; left: 0rem; } -.c12 { +.c14 { font-weight: bold; } @@ -324,6 +370,29 @@ exports[`ConsultationListView component > renders as expected 1`] = ` margin: 0; } +.c13 { + 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: 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; + margin-bottom: 0.5rem; + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; +} + .c10 { border: solid 0.2rem var(--theme-blue-90); margin-bottom: 1.5rem; @@ -430,7 +499,7 @@ exports[`ConsultationListView component > renders as expected 1`] = `
renders as expected 1`] = `
renders as expected 1`] = `
renders as expected 1`] = `
renders as expected 1`] = `
renders as expected 1`] = ` class="px-1 col-auto" >
- +
+ + + +
+ +
@@ -817,7 +894,7 @@ exports[`ConsultationListView component > renders as expected 1`] = ` class="pr-0 text-left col-4" >
Jan 1, 2024
@@ -857,7 +934,7 @@ exports[`ConsultationListView component > renders as expected 1`] = ` class="pr-0 text-left col-4" >
renders as expected 1`] = ` class="pr-0 text-left col-4" >
Yes
@@ -913,13 +990,13 @@ exports[`ConsultationListView component > renders as expected 1`] = ` class="pr-0 text-left col-4" >
Dec 1, 2024
@@ -931,7 +1008,7 @@ exports[`ConsultationListView component > renders as expected 1`] = ` class="pr-0 text-left col-4" >
test comment
@@ -995,7 +1072,7 @@ exports[`ConsultationListView component > renders as expected 1`] = ` class="px-1 col-auto" > +
+ + + +
+ + @@ -1058,7 +1143,7 @@ exports[`ConsultationListView component > renders as expected 1`] = ` class="pr-0 text-left col-4" >
Jan 1, 2024
@@ -1098,7 +1183,7 @@ exports[`ConsultationListView component > renders as expected 1`] = ` class="pr-0 text-left col-4" >
renders as expected 1`] = ` class="pr-0 text-left col-4" >
Yes
@@ -1154,13 +1239,13 @@ exports[`ConsultationListView component > renders as expected 1`] = ` class="pr-0 text-left col-4" >
Dec 1, 2024
@@ -1172,7 +1257,7 @@ exports[`ConsultationListView component > renders as expected 1`] = ` class="pr-0 text-left col-4" >
test comment
@@ -1237,7 +1322,7 @@ exports[`ConsultationListView component > renders as expected 1`] = `
renders as expected 1`] = `
renders as expected with existing data 1`] = } .c8.c8.btn { - color: #aaaaaa; + background-color: unset; + border: none; +} + +.c8.c8.btn:hover, +.c8.c8.btn:focus, +.c8.c8.btn:active { + background-color: unset; + outline: none; + box-shadow: none; +} + +.c8.c8.btn svg { + -webkit-transition: all 0.3s ease-out; + transition: all 0.3s ease-out; +} + +.c8.c8.btn svg:hover { + -webkit-transition: all 0.3s ease-in; + transition: all 0.3s ease-in; +} + +.c8.c8.btn.btn-primary svg { + color: #013366; +} + +.c8.c8.btn.btn-primary svg:hover { + color: #013366; +} + +.c8.c8.btn.btn-light svg { + color: var(--surface-color-primary-button-default); +} + +.c8.c8.btn.btn-light svg:hover { + color: #CE3E39; +} + +.c8.c8.btn.btn-info svg { + color: var(--surface-color-primary-button-default); +} + +.c8.c8.btn.btn-info svg:hover { + color: var(--surface-color-primary-button-hover); +} + +.c9.c9.btn.btn-primary { -webkit-text-decoration: none; text-decoration: none; line-height: unset; } -.c8.c8.btn .text { +.c9.c9.btn.btn-primary svg { + color: #aaaaaa !important; +} + +.c9.c9.btn.btn-primary .text { display: none; } -.c8.c8.btn:hover, -.c8.c8.btn:active, -.c8.c8.btn:focus { - color: #d8292f; +.c9.c9.btn.btn-primary svg:hover, +.c9.c9.btn.btn-primary svg:active, +.c9.c9.btn.btn-primary svg:focus { + color: #d8292f !important; -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; } -.c8.c8.btn:hover .text, -.c8.c8.btn:active .text, -.c8.c8.btn:focus .text { +.c9.c9.btn.btn-primary svg:hover .text, +.c9.c9.btn.btn-primary svg:active .text, +.c9.c9.btn.btn-primary svg:focus .text { display: inline; line-height: 2rem; } -.c9 .react-datepicker__calendar-icon { +.c10 .react-datepicker__calendar-icon { width: 2.4rem; height: 3rem; margin-top: 0.5rem; @@ -964,19 +1010,19 @@ exports[`AddProjectForm component > renders as expected with existing data 1`] = pointer-events: none; } -.c9 .react-datepicker__view-calendar-icon input { +.c10 .react-datepicker__view-calendar-icon input { padding: 0.8rem 1.2rem 0.8rem 1.2rem; } -.c9 .react-datepicker-wrapper { +.c10 .react-datepicker-wrapper { max-width: 17rem; } -.c10.c10.form-control.is-valid { +.c11.c11.form-control.is-valid { background-image: none; } -.c10.c10.form-control.is-invalid { +.c11.c11.form-control.is-invalid { border-color: #d8292f !important; } @@ -1010,13 +1056,13 @@ exports[`AddProjectForm component > renders as expected with existing data 1`] = font-weight: bold; } -.c11 textarea.form-control { +.c12 textarea.form-control { min-width: 80rem; height: 7rem; resize: none; } -.c12 { +.c13 { border-bottom: 0.1rem solid grey; } @@ -1476,8 +1522,9 @@ exports[`AddProjectForm component > renders as expected with existing data 1`] = class="col-auto" >
renders as expected with existing data 1`] = > renders as expected with existing data 1`] = class="c4 text-left col-4" >
renders as expected with existing data 1`] = renders as expected with existing data 1`] = class="c4 text-left col" >
renders as expected with existing data 1`] = renders as expected with existing data 1`] = class="c4 text-left col" >