From 19d273ff4914f4c6be66d3c4a2de3d70bb011f41 Mon Sep 17 00:00:00 2001
From: Marco Pedone
Date: Wed, 27 Aug 2025 12:33:14 +0200
Subject: [PATCH] fix: enhance pricing component formatting and update sorting
logic in PrezzarioTable
---
apps/infoalloggi/src/components/prezzi.tsx | 6 +++-
.../components/tables/prezziario-tables.tsx | 2 +-
apps/infoalloggi/src/forms/FormPrezzo.tsx | 5 +++-
.../src/server/api/routers/prezziario.ts | 3 +-
.../controllers/prezziario.controller.ts | 18 ------------
.../src/server/services/prezziario.service.ts | 28 +++++++++++++++++--
6 files changed, 38 insertions(+), 24 deletions(-)
delete mode 100644 apps/infoalloggi/src/server/controllers/prezziario.controller.ts
diff --git a/apps/infoalloggi/src/components/prezzi.tsx b/apps/infoalloggi/src/components/prezzi.tsx
index 6589229..671452a 100644
--- a/apps/infoalloggi/src/components/prezzi.tsx
+++ b/apps/infoalloggi/src/components/prezzi.tsx
@@ -172,7 +172,11 @@ export const PricingComponent = ({
className="xs:text-3xl text-2xl font-semibold sm:text-6xl"
data-role="amount"
>
-
+
diff --git a/apps/infoalloggi/src/components/tables/prezziario-tables.tsx b/apps/infoalloggi/src/components/tables/prezziario-tables.tsx
index b133a88..49e4336 100644
--- a/apps/infoalloggi/src/components/tables/prezziario-tables.tsx
+++ b/apps/infoalloggi/src/components/tables/prezziario-tables.tsx
@@ -207,7 +207,7 @@ export const PrezzarioTable = ({
pinnedFiltri={pinnedFiltri}
searchColumn={searchFiltro}
columns_titles={columns_titles}
- defaultSort={[{ desc: false, id: "categoria" }]}
+ defaultSort={[{ desc: false, id: "id" }]}
/>
);
diff --git a/apps/infoalloggi/src/forms/FormPrezzo.tsx b/apps/infoalloggi/src/forms/FormPrezzo.tsx
index ba93315..3ccf1c8 100644
--- a/apps/infoalloggi/src/forms/FormPrezzo.tsx
+++ b/apps/infoalloggi/src/forms/FormPrezzo.tsx
@@ -26,6 +26,7 @@ import {
SelectValue,
} from "~/components/ui/select";
import { useEffect } from "react";
+import { DevTool } from "@hookform/devtools";
type FormPrezzoProps = {
initialValues: Prezziario | null;
@@ -130,6 +131,7 @@ export const FormPrezzo = ({
return (
<>