diff --git a/src/app/admin/quotes/new/actions.ts b/src/app/admin/quotes/new/actions.ts deleted file mode 100644 index 0530a9c..0000000 --- a/src/app/admin/quotes/new/actions.ts +++ /dev/null @@ -1,3 +0,0 @@ -"use server"; - -export { createQuote } from "@/lib/quote-actions"; diff --git a/src/app/admin/quotes/new/page.tsx b/src/app/admin/quotes/new/page.tsx deleted file mode 100644 index 3ec49cf..0000000 --- a/src/app/admin/quotes/new/page.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import { Card } from "@/components/ui/card"; -import { QuoteBuilderForm } from "@/components/admin/quotes/QuoteBuilderForm"; -import { getAllClientsWithPayments } from "@/lib/admin-queries"; -import { getAllOfferMacrosWithMicros } from "@/lib/admin-queries"; - -export const revalidate = 0; - -export default async function QuoteBuilderPage() { - const [clientsData, offersData] = await Promise.all([ - getAllClientsWithPayments(), - getAllOfferMacrosWithMicros(), - ]); - - return ( -
- Componi un preventivo per il cliente selezionando l'offerta e il prezzo -
-- Crea un nuovo preventivo per questo lead. Ti reindirizzeremo al builder. +
- Prezzo calcolato: €{calculatedTotal.toLocaleString("it-IT", { - minimumFractionDigits: 2, - maximumFractionDigits: 2, - })} -
- )} - - {isTouched && value && !matches && ( -- Attenzione: il valore inserito non corrisponde al totale calcolato (server verificherà) -
- )} -- Il preventivo è stato salvato e il link è pronto per essere condiviso -
-Link pubblico
-
- {window.location.origin}
- {successLink}
-
-
- Seleziona un'offerta per visualizzare l'anteprima
-{offer.transformation_promise}
- )} -- Durata: {offer.duration_months} mese{offer.duration_months !== 1 ? "i" : ""} -
-{phase.title}
- {phase.description && ( -{phase.description}
- )} -Nessuna fase configurata
- )} -- Questo preventivo sarà visibile al cliente tramite link riservato -
-{ /** * Get all offer macros with their micros (ordered by sort_order) - * Used by: /admin/quotes/new form (OfferSelector dropdown) */ export async function getAllOfferMacrosWithMicros(): Promise< (OfferMacro & { micros: OfferMicro[] })[]