From 97943fa4a9420b7f7fa8859cd0de83eb57790947 Mon Sep 17 00:00:00 2001 From: Horacio Daniel Ros Date: Mon, 21 Sep 2026 21:10:00 -0300 Subject: [PATCH] =?UTF-8?q?feat:=20eliminar=20componente=20Filterable=20y?= =?UTF-8?q?=20ajustar=20la=20funcionalidad=20de=20filtrado=20en=20los=20co?= =?UTF-8?q?mponentes=20de=20ubicaci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../[id]/appointments/[appdate]/page.tsx | 4 +-- .../org/profile/[id]/cash/movements/page.tsx | 4 +-- .../org/profile/[id]/clients/page.module.css | 2 +- .../org/profile/[id]/clients/page.tsx | 4 +-- .../org/profile/[id]/discounts-email/page.tsx | 4 +-- .../Filterable/Filterable.module.css | 36 ------------------- .../app/components/Filterable/Filterable.tsx | 27 -------------- .../components/Location/Location.module.css | 28 ++++++++++++++- .../src/app/components/Location/Location.tsx | 26 ++++++++++++-- 9 files changed, 55 insertions(+), 80 deletions(-) delete mode 100644 txclient/src/app/components/Filterable/Filterable.module.css delete mode 100644 txclient/src/app/components/Filterable/Filterable.tsx diff --git a/txclient/src/app/admin/(organization-profile)/org/profile/[id]/appointments/[appdate]/page.tsx b/txclient/src/app/admin/(organization-profile)/org/profile/[id]/appointments/[appdate]/page.tsx index a659551..b3e7673 100644 --- a/txclient/src/app/admin/(organization-profile)/org/profile/[id]/appointments/[appdate]/page.tsx +++ b/txclient/src/app/admin/(organization-profile)/org/profile/[id]/appointments/[appdate]/page.tsx @@ -31,7 +31,6 @@ import filterObjects from "@components/TextObjectFilter/Filter.Service"; import dayjs, { ManipulateType } from "dayjs"; import "dayjs/locale/es"; -import Filterable from "@core/app/components/Filterable/Filterable"; import { useFilterStore } from "@core/Store/Filter.Store"; import { TextObjectFilterResult } from "@core/Models/TextObjectFilter.model"; import { FindEmployeesParams } from "@core/Models/Collaborators.model"; @@ -496,8 +495,7 @@ export default function OrganizationProfile() { return ( <> - - +

{dayjs(currentDate).format("dddd DD [de] MMMM, YYYY")}

diff --git a/txclient/src/app/admin/(organization-profile)/org/profile/[id]/cash/movements/page.tsx b/txclient/src/app/admin/(organization-profile)/org/profile/[id]/cash/movements/page.tsx index 3c18727..ac2b4a8 100644 --- a/txclient/src/app/admin/(organization-profile)/org/profile/[id]/cash/movements/page.tsx +++ b/txclient/src/app/admin/(organization-profile)/org/profile/[id]/cash/movements/page.tsx @@ -21,7 +21,6 @@ import { } from "@core/Models/CashFlow.model"; import { cashFlowPaginate, createInvoiceFromCashMovement, findInvoices, findOrganizationFiscalProfiles, Invoice, OrganizationFiscalProfile } from "../Cash.Service"; import SecureByPlan, { SECURE_CONTENTS } from "@core/app/components/SecureByPlan/SecureByPlan"; -import Filterable from "@core/app/components/Filterable/Filterable"; import { TextObjectFilterResult } from "@core/Models/TextObjectFilter.model"; import { TextObjectModalContent } from "@core/Store/TextObjectModal.Store"; import TextObjectFilterItem from "@core/app/components/TextObjectFilterItem/TextObjectFilterItem"; @@ -862,8 +861,7 @@ export default function CashFlowMovementsList() { return ( <> - - + <> diff --git a/txclient/src/app/admin/(organization-profile)/org/profile/[id]/clients/page.module.css b/txclient/src/app/admin/(organization-profile)/org/profile/[id]/clients/page.module.css index ef61be9..24a8a3e 100644 --- a/txclient/src/app/admin/(organization-profile)/org/profile/[id]/clients/page.module.css +++ b/txclient/src/app/admin/(organization-profile)/org/profile/[id]/clients/page.module.css @@ -2,7 +2,7 @@ display: flex; flex-direction: column; position: absolute; - top: 60px; /* Below Location/Filterable */ + top: 60px; /* Below Location */ left: 0; right: 0; bottom: 10px; diff --git a/txclient/src/app/admin/(organization-profile)/org/profile/[id]/clients/page.tsx b/txclient/src/app/admin/(organization-profile)/org/profile/[id]/clients/page.tsx index 63dc90a..50e4bd3 100644 --- a/txclient/src/app/admin/(organization-profile)/org/profile/[id]/clients/page.tsx +++ b/txclient/src/app/admin/(organization-profile)/org/profile/[id]/clients/page.tsx @@ -20,7 +20,6 @@ import { } from "@core/Models/Clients.model"; import { useNavigation } from "@hooks/goto"; import { FilterData, useFilterStore } from "@core/Store/Filter.Store"; -import Filterable from "@core/app/components/Filterable/Filterable"; import Textbox from "@core/app/components/Textbox/Textbox"; type UrlData = { @@ -179,8 +178,7 @@ export default function ClientsGrid() { return ( <> - - +
{clients?.data && clients.data.length > 0 ? (
diff --git a/txclient/src/app/admin/(organization-profile)/org/profile/[id]/discounts-email/page.tsx b/txclient/src/app/admin/(organization-profile)/org/profile/[id]/discounts-email/page.tsx index 7d422d1..d30266f 100644 --- a/txclient/src/app/admin/(organization-profile)/org/profile/[id]/discounts-email/page.tsx +++ b/txclient/src/app/admin/(organization-profile)/org/profile/[id]/discounts-email/page.tsx @@ -29,7 +29,6 @@ import DeleteIcon from "@mui/icons-material/DeleteOutlined"; import { useConfirmStore } from "@core/Store/Confirm.Store"; import { useAlert } from "@core/Store/Alert.Store"; import Textbox from "@components/Textbox/Textbox"; -import Filterable from "@core/app/components/Filterable/Filterable"; import { TextObjectFilterResult } from "@core/Models/TextObjectFilter.model"; import { TextObjectModalContent } from "@core/Store/TextObjectModal.Store"; import TextObjectFilterItem from "@core/app/components/TextObjectFilterItem/TextObjectFilterItem"; @@ -334,8 +333,7 @@ export default function DiscountsEmailGrid() { return ( <> - - +
diff --git a/txclient/src/app/components/Filterable/Filterable.module.css b/txclient/src/app/components/Filterable/Filterable.module.css deleted file mode 100644 index edc9ed8..0000000 --- a/txclient/src/app/components/Filterable/Filterable.module.css +++ /dev/null @@ -1,36 +0,0 @@ -.buttonFilter { - position: absolute; - z-index: 200; - display: flex; - align-items: center; - justify-content: center; - top: 5px; - right: -10px; - background-color: transparent; - color: var(--gray-dark); - border-radius: 50%; - cursor: pointer; - transition: - width 0.25s ease-in-out, - height 0.25s ease-in-out; - - width: 52px; - height: 52px; -} - -.buttonFilter > svg { - display: flex; - opacity: 1; - background: transparent; - animation: buttonFilterPulseShadow 1.5s ease-in-out infinite; -} - -@keyframes buttonFilterPulseShadow { - 0%, - 100% { - filter: drop-shadow(0px 2px 1px var(--gray-light)); - } - 50% { - filter: drop-shadow(0px 2px 4px var(--gray-dark)); - } -} diff --git a/txclient/src/app/components/Filterable/Filterable.tsx b/txclient/src/app/components/Filterable/Filterable.tsx deleted file mode 100644 index 4044972..0000000 --- a/txclient/src/app/components/Filterable/Filterable.tsx +++ /dev/null @@ -1,27 +0,0 @@ -"use client"; -import { ReactNode } from "react"; -import style from "./Filterable.module.css"; -import FilterAltOutlinedIcon from "@mui/icons-material/FilterAltOutlined"; -import { useFilterStore } from "@core/Store/Filter.Store"; - -interface FilterableProps { - children?: ReactNode; -} - -export default function Filterable(props: FilterableProps): React.ReactElement { - const filter = useFilterStore(); - - return ( - <> - {props.children} -
{ - filter.toggle(); - }} - > - -
- - ); -} diff --git a/txclient/src/app/components/Location/Location.module.css b/txclient/src/app/components/Location/Location.module.css index 0fdb0d0..38ca1e3 100644 --- a/txclient/src/app/components/Location/Location.module.css +++ b/txclient/src/app/components/Location/Location.module.css @@ -24,8 +24,34 @@ font-size: 24px; } +.locationTitleFilter { + padding-right: 64px; +} + +.filterButton { + position: absolute; + top: 50%; + right: 12px; + transform: translateY(-50%); + display: flex; + align-items: center; + justify-content: center; + width: 52px; + height: 52px; + padding: 0; + border: none; + border-radius: 50%; + background-color: transparent; + color: var(--gray-dark); + cursor: pointer; +} + +.filterButton:hover { + color: var(--black); +} + @media (max-width: 600px) { .locationContainer { left: 6px; } -} +} \ No newline at end of file diff --git a/txclient/src/app/components/Location/Location.tsx b/txclient/src/app/components/Location/Location.tsx index 50ee485..d0ce76e 100644 --- a/txclient/src/app/components/Location/Location.tsx +++ b/txclient/src/app/components/Location/Location.tsx @@ -2,18 +2,22 @@ import { useRouter } from "next/navigation"; import style from "./Location.module.css"; import { useLocationStore } from "@store/Location.Store"; +import { useFilterStore } from "@store/Filter.Store"; import Breadcrumbs from "@mui/material/Breadcrumbs"; import Link from "@mui/material/Link"; import HomeIcon from "@mui/icons-material/Home"; +import FilterAltOutlinedIcon from "@mui/icons-material/FilterAltOutlined"; export interface LocationProps { bottomSeperation?: string; + showFilter?: boolean; } export default function Location(props: LocationProps) { - const { bottomSeperation = "55px" } = props; + const { bottomSeperation = "55px", showFilter = false } = props; const router = useRouter(); const location = useLocationStore(); + const filter = useFilterStore(); const goTo = (path: string) => { router.push(path); @@ -48,10 +52,26 @@ export default function Location(props: LocationProps) { ))}
-
+
{location.last()?.icon}

{location.last()?.title}

+ {showFilter && ( + + )}
); -} +} \ No newline at end of file