refactor: update terminology from 'preferenze' to 'parametri' for consistency across components and forms
This commit is contained in:
parent
bc9689cb4d
commit
4899c66822
15 changed files with 106 additions and 109 deletions
|
|
@ -11,9 +11,9 @@
|
||||||
1. **Introduzione al Servizio**: L'interessato ci contratta tramite Idealista, Casa.it etc per richiedere informazioni su un annuncio. Viene guidato alla visita del sito InfoAlloggi.it e informato del servizio di ricerca.
|
1. **Introduzione al Servizio**: L'interessato ci contratta tramite Idealista, Casa.it etc per richiedere informazioni su un annuncio. Viene guidato alla visita del sito InfoAlloggi.it e informato del servizio di ricerca.
|
||||||
2. **Profilazione utente**: Tramite i messaggi, email, chiamate o WhatsApp, si raccolgono informazioni sulle esigenze abitative dell'interessato (budget, zona, tipologia di alloggio, tempistiche).
|
2. **Profilazione utente**: Tramite i messaggi, email, chiamate o WhatsApp, si raccolgono informazioni sulle esigenze abitative dell'interessato (budget, zona, tipologia di alloggio, tempistiche).
|
||||||
3. **Proposta del Servizio**: Si spiega il funzionamento del servizio di ricerca, le possibili opzioni in quanto ad immobili e i costi associati.
|
3. **Proposta del Servizio**: Si spiega il funzionamento del servizio di ricerca, le possibili opzioni in quanto ad immobili e i costi associati.
|
||||||
Si precompila il profilo, documenti utente, preferenze ri ricerca e si invia il link per la registrazione.
|
Si precompila il profilo, documenti utente, parametri ri ricerca e si invia il link per la registrazione.
|
||||||
4. **Registrazione e Pagamento**: L'interessato completa la registrazione sul sito e procede con il pagamento del servizio.
|
4. **Registrazione e Pagamento**: L'interessato completa la registrazione sul sito e procede con il pagamento del servizio.
|
||||||
5. **Fruizione del servizio**: L'utente contatta i proprietari degli immobili proposti, organizza visite e/o richiede l'accesso ad altri immobili tra quelli disponibili nel sito.
|
5. **Fruizione del servizio**: L'utente contatta i proprietari degli immobili proposti, organizza visite e/o richiede l'accesso ad altri immobili tra quelli disponibili nel sito.
|
||||||
6. **Conferma**: Una volta trovato l'alloggio, l'utente notifica il suo interesse a confermare la locazione. Allegando il doc di motivazione nel caso di locazione transitoria. Il consulente recepisce la conferma e convalida la compatibilità dell'immobile con le esigenze dell'utente e accetta la conferma.
|
6. **Conferma**: Una volta trovato l'alloggio, l'utente notifica il suo interesse a confermare la locazione. Allegando il doc di motivazione nel caso di locazione transitoria. Il consulente recepisce la conferma e convalida la compatibilità dell'immobile con le esigenze dell'utente e accetta la conferma.
|
||||||
7. **Saldo e Contratto**: L'utente procede con il saldo del servizio, basato sul tipo di servizio scelto (stabile o transitorio) e alle preferenze di ricerca indicate e basate sull'effettivo immobile confermato. Viene predisposto il contratto di locazione e viene inviato all'utente.
|
7. **Saldo e Contratto**: L'utente procede con il saldo del servizio, basato sul tipo di servizio scelto (stabile o transitorio) e alle parametri di ricerca indicate e basate sull'effettivo immobile confermato. Viene predisposto il contratto di locazione e viene inviato all'utente.
|
||||||
8. **Post Contratto**: Nel caso di locazione stabile l'utente salda il costo del contratto redatto. La ricevuta di registrazione viene caricata una volta ottenuta.
|
8. **Post Contratto**: Nel caso di locazione stabile l'utente salda il costo del contratto redatto. La ricevuta di registrazione viene caricata una volta ottenuta.
|
||||||
|
|
|
||||||
|
|
@ -152,7 +152,7 @@ const SelectedComp = memo(
|
||||||
aggiornamento: t.card.in_aggiornamento,
|
aggiornamento: t.card.in_aggiornamento,
|
||||||
consegna: selected.consegna,
|
consegna: selected.consegna,
|
||||||
consegna_da: t.card.consegna_da,
|
consegna_da: t.card.consegna_da,
|
||||||
mesi: t.preferenze.mesi,
|
mesi: t.parametri.mesi,
|
||||||
subito: t.card.consegna_subito,
|
subito: t.card.consegna_subito,
|
||||||
})}
|
})}
|
||||||
</p>
|
</p>
|
||||||
|
|
|
||||||
|
|
@ -401,7 +401,7 @@ export const CardAnnuncio = ({
|
||||||
aggiornamento: t.card.in_aggiornamento,
|
aggiornamento: t.card.in_aggiornamento,
|
||||||
consegna: consegna,
|
consegna: consegna,
|
||||||
consegna_da: t.card.consegna_da,
|
consegna_da: t.card.consegna_da,
|
||||||
mesi: t.preferenze.mesi,
|
mesi: t.parametri.mesi,
|
||||||
subito: t.card.consegna_subito,
|
subito: t.card.consegna_subito,
|
||||||
})}
|
})}
|
||||||
</p>
|
</p>
|
||||||
|
|
|
||||||
|
|
@ -384,7 +384,7 @@ function SchedaAnnuncio({ data }: { data: Annunci }) {
|
||||||
aggiornamento: it.card.in_aggiornamento,
|
aggiornamento: it.card.in_aggiornamento,
|
||||||
consegna: data.consegna,
|
consegna: data.consegna,
|
||||||
consegna_da: it.card.consegna_da,
|
consegna_da: it.card.consegna_da,
|
||||||
mesi: it.preferenze.mesi,
|
mesi: it.parametri.mesi,
|
||||||
subito: it.card.consegna_subito,
|
subito: it.card.consegna_subito,
|
||||||
})}
|
})}
|
||||||
</p>
|
</p>
|
||||||
|
|
|
||||||
|
|
@ -470,7 +470,7 @@ const MotivazioneSection = () => {
|
||||||
{servizio.motivazione_transitorio ? (
|
{servizio.motivazione_transitorio ? (
|
||||||
<span>
|
<span>
|
||||||
{
|
{
|
||||||
t.preferenze.motivazioni_mappings.find(
|
t.parametri.motivazioni_mappings.find(
|
||||||
(m) => m.id === servizio.motivazione_transitorio,
|
(m) => m.id === servizio.motivazione_transitorio,
|
||||||
)?.title
|
)?.title
|
||||||
}
|
}
|
||||||
|
|
@ -561,14 +561,14 @@ const TransitorioSection = () => {
|
||||||
<div className="flex flex-col gap-2">
|
<div className="flex flex-col gap-2">
|
||||||
<div className="max-w-sm">
|
<div className="max-w-sm">
|
||||||
<Label className="text-base" htmlFor="permanenza">
|
<Label className="text-base" htmlFor="permanenza">
|
||||||
Permanenza (da preferenze servizio):
|
Permanenza (da parametri servizio):
|
||||||
</Label>
|
</Label>
|
||||||
|
|
||||||
<MultiSelect
|
<MultiSelect
|
||||||
defaultValue={
|
defaultValue={
|
||||||
servizio.permanenza
|
servizio.permanenza
|
||||||
? {
|
? {
|
||||||
label: t.preferenze.permanenza[servizio.permanenza] || "",
|
label: t.parametri.permanenza[servizio.permanenza] || "",
|
||||||
value: servizio.permanenza.toString(),
|
value: servizio.permanenza.toString(),
|
||||||
}
|
}
|
||||||
: undefined
|
: undefined
|
||||||
|
|
@ -578,7 +578,7 @@ const TransitorioSection = () => {
|
||||||
isMulti={false}
|
isMulti={false}
|
||||||
onValueChange={handlePermanenzaChange}
|
onValueChange={handlePermanenzaChange}
|
||||||
options={UnpackOptions({
|
options={UnpackOptions({
|
||||||
options: t.preferenze.permanenza,
|
options: t.parametri.permanenza,
|
||||||
})}
|
})}
|
||||||
placeholder="Seleziona..."
|
placeholder="Seleziona..."
|
||||||
/>
|
/>
|
||||||
|
|
@ -703,7 +703,7 @@ const GeneralSection = () => {
|
||||||
aggiornamento: it.card.in_aggiornamento,
|
aggiornamento: it.card.in_aggiornamento,
|
||||||
|
|
||||||
consegna_da: it.card.consegna_da,
|
consegna_da: it.card.consegna_da,
|
||||||
mesi: it.preferenze.mesi,
|
mesi: it.parametri.mesi,
|
||||||
subito: it.card.consegna_subito,
|
subito: it.card.consegna_subito,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -713,7 +713,7 @@ const GeneralSection = () => {
|
||||||
<span className="font-semibold">Persone:</span>
|
<span className="font-semibold">Persone:</span>
|
||||||
<div className="flex w-full gap-4">
|
<div className="flex w-full gap-4">
|
||||||
<div className="flex w-1/2 flex-col gap-2">
|
<div className="flex w-1/2 flex-col gap-2">
|
||||||
<Label htmlFor="n_adulti">{t.preferenze.nadulti_label}</Label>
|
<Label htmlFor="n_adulti">{t.parametri.nadulti_label}</Label>
|
||||||
<Counter
|
<Counter
|
||||||
name="n_adulti"
|
name="n_adulti"
|
||||||
onlyPositive
|
onlyPositive
|
||||||
|
|
@ -723,7 +723,7 @@ const GeneralSection = () => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex w-1/2 flex-col gap-2">
|
<div className="flex w-1/2 flex-col gap-2">
|
||||||
<Label htmlFor="n_minori">{t.preferenze.nminori_label}</Label>
|
<Label htmlFor="n_minori">{t.parametri.nminori_label}</Label>
|
||||||
<Counter
|
<Counter
|
||||||
name="n_minori"
|
name="n_minori"
|
||||||
onlyPositive
|
onlyPositive
|
||||||
|
|
@ -740,13 +740,13 @@ const GeneralSection = () => {
|
||||||
<div className="flex flex-col gap-2">
|
<div className="flex flex-col gap-2">
|
||||||
<span className="font-semibold">Entro mese:</span>
|
<span className="font-semibold">Entro mese:</span>
|
||||||
<div className="max-w-sm">
|
<div className="max-w-sm">
|
||||||
<Label htmlFor="select-mesi">{t.preferenze.dalmese_label}</Label>
|
<Label htmlFor="select-mesi">{t.parametri.dalmese_label}</Label>
|
||||||
<MultiSelect
|
<MultiSelect
|
||||||
defaultValue={
|
defaultValue={
|
||||||
servizio.entromese !== null
|
servizio.entromese !== null
|
||||||
? {
|
? {
|
||||||
// biome-ignore lint/style/noNonNullAssertion: <known size>
|
// biome-ignore lint/style/noNonNullAssertion: <known size>
|
||||||
label: t.preferenze.mesi[servizio.entromese]!,
|
label: t.parametri.mesi[servizio.entromese]!,
|
||||||
value: String(servizio.entromese),
|
value: String(servizio.entromese),
|
||||||
}
|
}
|
||||||
: undefined
|
: undefined
|
||||||
|
|
@ -756,7 +756,7 @@ const GeneralSection = () => {
|
||||||
isMulti={false}
|
isMulti={false}
|
||||||
onValueChange={handleDisponibilitàChange}
|
onValueChange={handleDisponibilitàChange}
|
||||||
options={UnpackOptions({
|
options={UnpackOptions({
|
||||||
options: t.preferenze.mesi,
|
options: t.parametri.mesi,
|
||||||
})}
|
})}
|
||||||
placeholder="Seleziona..."
|
placeholder="Seleziona..."
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ export const BasicAnnuncioCard = ({
|
||||||
aggiornamento: t.card.in_aggiornamento,
|
aggiornamento: t.card.in_aggiornamento,
|
||||||
consegna: data.consegna,
|
consegna: data.consegna,
|
||||||
consegna_da: t.card.consegna_da,
|
consegna_da: t.card.consegna_da,
|
||||||
mesi: t.preferenze.mesi,
|
mesi: t.parametri.mesi,
|
||||||
subito: t.card.consegna_subito,
|
subito: t.card.consegna_subito,
|
||||||
})}
|
})}
|
||||||
</span>
|
</span>
|
||||||
|
|
|
||||||
|
|
@ -38,12 +38,12 @@ export const AnnunciCompatibili = () => {
|
||||||
<DialogContent className="max-w-xl p-2 sm:max-w-5xl sm:p-6 md:max-w-7xl 2xl:max-w-[100rem]">
|
<DialogContent className="max-w-xl p-2 sm:max-w-5xl sm:p-6 md:max-w-7xl 2xl:max-w-[100rem]">
|
||||||
<DialogHeader className="flex-row flex-wrap items-center gap-5 pt-6">
|
<DialogHeader className="flex-row flex-wrap items-center gap-5 pt-6">
|
||||||
<DialogTitle>
|
<DialogTitle>
|
||||||
Annunci compatibili con le preferenze del servizio
|
Annunci compatibili con i parametri del servizio
|
||||||
</DialogTitle>
|
</DialogTitle>
|
||||||
{isAdmin && (
|
{isAdmin && (
|
||||||
<div className="flex flex-wrap items-center gap-x-2">
|
<div className="flex flex-wrap items-center gap-x-2">
|
||||||
<Label htmlFor="adminOverride">
|
<Label htmlFor="adminOverride">
|
||||||
Ignora limitazioni preferenze
|
Ignora limitazioni parametri
|
||||||
</Label>
|
</Label>
|
||||||
|
|
||||||
<Switch
|
<Switch
|
||||||
|
|
|
||||||
|
|
@ -169,7 +169,7 @@ const ServizioBasicActions = ({ className }: { className?: string }) => {
|
||||||
if (isAdmin || canUserEdit) {
|
if (isAdmin || canUserEdit) {
|
||||||
return (
|
return (
|
||||||
<div className={cn("flex flex-wrap items-center gap-3", className)}>
|
<div className={cn("flex flex-wrap items-center gap-3", className)}>
|
||||||
<EditPreferenze />
|
<EditParametri />
|
||||||
<InterruzioneServizio />
|
<InterruzioneServizio />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
@ -399,9 +399,9 @@ const InterruzioneServizio = () => {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const EditPreferenze = () => {
|
const EditParametri = () => {
|
||||||
const { servizioId, userId, isAdmin, servizio } = useServizio();
|
const { servizioId, userId, isAdmin, servizio } = useServizio();
|
||||||
const [openEditPreferenze, setOpenEditPreferenze] = useState(false);
|
const [openEditParametri, setOpenEditParametri] = useState(false);
|
||||||
const { data, isLoading } = api.servizio.getServizio.useQuery({ servizioId });
|
const { data, isLoading } = api.servizio.getServizio.useQuery({ servizioId });
|
||||||
const utils = api.useUtils();
|
const utils = api.useUtils();
|
||||||
|
|
||||||
|
|
@ -416,7 +416,7 @@ const EditPreferenze = () => {
|
||||||
await utils.servizio.getCompatibileAnnunci.invalidate({
|
await utils.servizio.getCompatibileAnnunci.invalidate({
|
||||||
servizioId,
|
servizioId,
|
||||||
});
|
});
|
||||||
setOpenEditPreferenze(false);
|
setOpenEditParametri(false);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -430,10 +430,10 @@ const EditPreferenze = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Credenza onOpenChange={setOpenEditPreferenze} open={openEditPreferenze}>
|
<Credenza onOpenChange={setOpenEditParametri} open={openEditParametri}>
|
||||||
<CredenzaTrigger asChild>
|
<CredenzaTrigger asChild>
|
||||||
<Button
|
<Button
|
||||||
aria-label="Preferenze di ricerca"
|
aria-label="Parametri di ricerca"
|
||||||
className=""
|
className=""
|
||||||
disabled={
|
disabled={
|
||||||
!isAdmin &&
|
!isAdmin &&
|
||||||
|
|
@ -443,14 +443,14 @@ const EditPreferenze = () => {
|
||||||
variant="secondary"
|
variant="secondary"
|
||||||
>
|
>
|
||||||
<Calculator />
|
<Calculator />
|
||||||
Preferenze
|
Parametri
|
||||||
</Button>
|
</Button>
|
||||||
</CredenzaTrigger>
|
</CredenzaTrigger>
|
||||||
<CredenzaContent className="max-h-[90vh] w-full sm:max-w-5xl">
|
<CredenzaContent className="max-h-[90vh] w-full sm:max-w-5xl">
|
||||||
<CredenzaHeader>
|
<CredenzaHeader>
|
||||||
<CredenzaTitle>Preferenze di ricerca</CredenzaTitle>
|
<CredenzaTitle>Parametri di ricerca</CredenzaTitle>
|
||||||
<CredenzaDescription className="sr-only">
|
<CredenzaDescription className="sr-only">
|
||||||
Preferenze
|
Parametri
|
||||||
</CredenzaDescription>
|
</CredenzaDescription>
|
||||||
</CredenzaHeader>
|
</CredenzaHeader>
|
||||||
<CredenzaBody className="max-h-[80vh] w-full max-w-3xl overflow-y-auto pb-5 sm:max-w-5xl">
|
<CredenzaBody className="max-h-[80vh] w-full max-w-3xl overflow-y-auto pb-5 sm:max-w-5xl">
|
||||||
|
|
|
||||||
|
|
@ -124,7 +124,7 @@ export const FormNewServizio = ({
|
||||||
["ascensore", string],
|
["ascensore", string],
|
||||||
["pianoterra", string],
|
["pianoterra", string],
|
||||||
];
|
];
|
||||||
const altrePrefMapping = t.altrePrefMapping as altrePrefMappingType;
|
const altrePrefMapping = t.altriParamsMapping as altrePrefMappingType;
|
||||||
const tipologia = form.watch("tipologia");
|
const tipologia = form.watch("tipologia");
|
||||||
return (
|
return (
|
||||||
<Form {...form}>
|
<Form {...form}>
|
||||||
|
|
@ -192,8 +192,8 @@ export const FormNewServizio = ({
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<div className="flex flex-wrap items-center gap-x-2 pb-1">
|
<div className="flex flex-wrap items-center gap-x-2 pb-1">
|
||||||
<FormLabel htmlFor="budgetslider">
|
<FormLabel htmlFor="budgetslider">
|
||||||
{`${t.preferenze.budget_label1} - ${field.value.toLocaleString("it")},00 ${
|
{`${t.parametri.budget_label1} - ${field.value.toLocaleString("it")},00 ${
|
||||||
t.preferenze.budget_label2
|
t.parametri.budget_label2
|
||||||
}`}
|
}`}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
|
|
@ -213,7 +213,7 @@ export const FormNewServizio = ({
|
||||||
value={[form.getValues("budget")]}
|
value={[form.getValues("budget")]}
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormDescription>{t.preferenze.budget_desc}</FormDescription>
|
<FormDescription>{t.parametri.budget_desc}</FormDescription>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
|
@ -225,7 +225,7 @@ export const FormNewServizio = ({
|
||||||
<FormItem className="w-full">
|
<FormItem className="w-full">
|
||||||
<div className="flex flex-wrap items-center gap-x-2">
|
<div className="flex flex-wrap items-center gap-x-2">
|
||||||
<FormLabel htmlFor="select-mesi">
|
<FormLabel htmlFor="select-mesi">
|
||||||
{t.preferenze.dalmese_label}...
|
{t.parametri.dalmese_label}...
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
{field.value !== null && !initialData && (
|
{field.value !== null && !initialData && (
|
||||||
<button
|
<button
|
||||||
|
|
@ -245,7 +245,7 @@ export const FormNewServizio = ({
|
||||||
field.value !== null
|
field.value !== null
|
||||||
? {
|
? {
|
||||||
// biome-ignore lint/style/noNonNullAssertion: <known size>
|
// biome-ignore lint/style/noNonNullAssertion: <known size>
|
||||||
label: t.preferenze.mesi[field.value]!,
|
label: t.parametri.mesi[field.value]!,
|
||||||
value: String(field.value),
|
value: String(field.value),
|
||||||
}
|
}
|
||||||
: undefined
|
: undefined
|
||||||
|
|
@ -259,7 +259,7 @@ export const FormNewServizio = ({
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
options={UnpackOptions({
|
options={UnpackOptions({
|
||||||
options: t.preferenze.mesi,
|
options: t.parametri.mesi,
|
||||||
})}
|
})}
|
||||||
placeholder="Seleziona..."
|
placeholder="Seleziona..."
|
||||||
/>
|
/>
|
||||||
|
|
@ -275,7 +275,7 @@ export const FormNewServizio = ({
|
||||||
<FormItem className="w-full">
|
<FormItem className="w-full">
|
||||||
<div className="flex flex-wrap items-center gap-x-2">
|
<div className="flex flex-wrap items-center gap-x-2">
|
||||||
<FormLabel htmlFor="permanenza">
|
<FormLabel htmlFor="permanenza">
|
||||||
{t.preferenze.permanenza_label}
|
{t.parametri.permanenza_label}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
{field.value !== null && !initialData && (
|
{field.value !== null && !initialData && (
|
||||||
<button
|
<button
|
||||||
|
|
@ -294,7 +294,7 @@ export const FormNewServizio = ({
|
||||||
defaultValue={
|
defaultValue={
|
||||||
field.value
|
field.value
|
||||||
? {
|
? {
|
||||||
label: t.preferenze.permanenza[field.value] || "",
|
label: t.parametri.permanenza[field.value] || "",
|
||||||
value: field.value.toString(),
|
value: field.value.toString(),
|
||||||
}
|
}
|
||||||
: undefined
|
: undefined
|
||||||
|
|
@ -309,14 +309,12 @@ export const FormNewServizio = ({
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
options={UnpackOptions({
|
options={UnpackOptions({
|
||||||
options: t.preferenze.permanenza,
|
options: t.parametri.permanenza,
|
||||||
})}
|
})}
|
||||||
placeholder="Seleziona..."
|
placeholder="Seleziona..."
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormDescription>
|
<FormDescription>{t.parametri.permanenza_desc}</FormDescription>
|
||||||
{t.preferenze.permanenza_desc}
|
|
||||||
</FormDescription>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
|
@ -332,7 +330,7 @@ export const FormNewServizio = ({
|
||||||
className={cn("font-semibold text-base")}
|
className={cn("font-semibold text-base")}
|
||||||
htmlFor="n_adulti"
|
htmlFor="n_adulti"
|
||||||
>
|
>
|
||||||
{t.preferenze.nadulti_label}
|
{t.parametri.nadulti_label}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -357,7 +355,7 @@ export const FormNewServizio = ({
|
||||||
className={cn("font-semibold text-base")}
|
className={cn("font-semibold text-base")}
|
||||||
htmlFor="n_minori"
|
htmlFor="n_minori"
|
||||||
>
|
>
|
||||||
{t.preferenze.nminori_label}
|
{t.parametri.nminori_label}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -380,7 +378,7 @@ export const FormNewServizio = ({
|
||||||
<FormItem className="w-full">
|
<FormItem className="w-full">
|
||||||
<div className="flex flex-wrap items-center gap-x-2">
|
<div className="flex flex-wrap items-center gap-x-2">
|
||||||
<FormLabel htmlFor="arredato">
|
<FormLabel htmlFor="arredato">
|
||||||
{t.preferenze.arredato_label}
|
{t.parametri.arredato_label}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Switch
|
<Switch
|
||||||
|
|
@ -393,7 +391,7 @@ export const FormNewServizio = ({
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<FormDescription>{t.preferenze.arredato_desc}</FormDescription>
|
<FormDescription>{t.parametri.arredato_desc}</FormDescription>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
|
@ -405,14 +403,14 @@ export const FormNewServizio = ({
|
||||||
key={tipologia}
|
key={tipologia}
|
||||||
name="motivazione_transitorio"
|
name="motivazione_transitorio"
|
||||||
render={({ field }) => {
|
render={({ field }) => {
|
||||||
const existingValue = t.preferenze.motivazioni_mappings.find(
|
const existingValue = t.parametri.motivazioni_mappings.find(
|
||||||
(m) => m.id === field.value,
|
(m) => m.id === field.value,
|
||||||
);
|
);
|
||||||
return (
|
return (
|
||||||
<FormItem className="w-full">
|
<FormItem className="w-full">
|
||||||
<div className="flex w-full flex-wrap items-center gap-x-2">
|
<div className="flex w-full flex-wrap items-center gap-x-2">
|
||||||
<FormLabel htmlFor="motivazione_transitorio">
|
<FormLabel htmlFor="motivazione_transitorio">
|
||||||
{t.preferenze.motivazione_label}
|
{t.parametri.motivazione_label}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -443,7 +441,7 @@ export const FormNewServizio = ({
|
||||||
onValueChange={(value) => {
|
onValueChange={(value) => {
|
||||||
field.onChange(value.value);
|
field.onChange(value.value);
|
||||||
}}
|
}}
|
||||||
options={t.preferenze.motivazioni_mappings.map(
|
options={t.parametri.motivazioni_mappings.map(
|
||||||
(option) => ({
|
(option) => ({
|
||||||
label: option.title,
|
label: option.title,
|
||||||
value: option.id,
|
value: option.id,
|
||||||
|
|
@ -452,7 +450,7 @@ export const FormNewServizio = ({
|
||||||
placeholder={t.seleziona_placeholder}
|
placeholder={t.seleziona_placeholder}
|
||||||
/>
|
/>
|
||||||
<FormDescription>
|
<FormDescription>
|
||||||
{t.preferenze.motivazione_desc}
|
{t.parametri.motivazione_desc}
|
||||||
</FormDescription>
|
</FormDescription>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
@ -538,7 +536,7 @@ export const FormNewServizio = ({
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<div className="flex flex-wrap items-center gap-x-2">
|
<div className="flex flex-wrap items-center gap-x-2">
|
||||||
<FormLabel htmlFor="select-reddito">
|
<FormLabel htmlFor="select-reddito">
|
||||||
{t.preferenze.reddito_label}
|
{t.parametri.reddito_label}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -552,7 +550,7 @@ export const FormNewServizio = ({
|
||||||
field.onChange(value.value);
|
field.onChange(value.value);
|
||||||
}}
|
}}
|
||||||
options={UnpackOptions({
|
options={UnpackOptions({
|
||||||
options: t.preferenze.reddito_options,
|
options: t.parametri.reddito_options,
|
||||||
})}
|
})}
|
||||||
placeholder={t.seleziona_placeholder}
|
placeholder={t.seleziona_placeholder}
|
||||||
/>
|
/>
|
||||||
|
|
@ -563,9 +561,9 @@ export const FormNewServizio = ({
|
||||||
|
|
||||||
<div className="flex flex-col space-y-2">
|
<div className="flex flex-col space-y-2">
|
||||||
<Label htmlFor="altrePrefDialogButton">
|
<Label htmlFor="altrePrefDialogButton">
|
||||||
{t.preferenze.altrepref_label}
|
{t.parametri.altriparams_label}
|
||||||
</Label>
|
</Label>
|
||||||
<FormDescription>{t.preferenze.altrepref_desc}</FormDescription>
|
<FormDescription>{t.parametri.altriparams_desc}</FormDescription>
|
||||||
<div className="mt-2 flex flex-wrap gap-2">
|
<div className="mt-2 flex flex-wrap gap-2">
|
||||||
{altrePrefMapping.map((pair) => {
|
{altrePrefMapping.map((pair) => {
|
||||||
if (pair) {
|
if (pair) {
|
||||||
|
|
|
||||||
|
|
@ -462,7 +462,7 @@ export const FormNewServizioAcquisto = ({
|
||||||
["ascensore", string],
|
["ascensore", string],
|
||||||
["pianoterra", string],
|
["pianoterra", string],
|
||||||
];
|
];
|
||||||
const altrePrefMapping = t.altrePrefMapping as altrePrefMappingType;
|
const altrePrefMapping = t.altriParamsMapping as altrePrefMappingType;
|
||||||
const [tipologia, nazione_nascita, budget] = form.watch([
|
const [tipologia, nazione_nascita, budget] = form.watch([
|
||||||
"tipologia",
|
"tipologia",
|
||||||
"nazione_nascita",
|
"nazione_nascita",
|
||||||
|
|
@ -509,7 +509,7 @@ export const FormNewServizioAcquisto = ({
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<div className="flex flex-wrap items-center gap-x-2">
|
<div className="flex flex-wrap items-center gap-x-2">
|
||||||
<FormLabel htmlFor="select-tipologia">
|
<FormLabel htmlFor="select-tipologia">
|
||||||
{t.preferenze.tipologia}
|
{t.parametri.tipologia}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -557,8 +557,8 @@ export const FormNewServizioAcquisto = ({
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<div className="flex flex-wrap items-center gap-x-2 pb-1">
|
<div className="flex flex-wrap items-center gap-x-2 pb-1">
|
||||||
<FormLabel htmlFor="budgetslider">
|
<FormLabel htmlFor="budgetslider">
|
||||||
{`${t.preferenze.budget_label1} - ${field.value},00 ${
|
{`${t.parametri.budget_label1} - ${field.value},00 ${
|
||||||
t.preferenze.budget_label2
|
t.parametri.budget_label2
|
||||||
}`}
|
}`}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
|
|
@ -578,7 +578,7 @@ export const FormNewServizioAcquisto = ({
|
||||||
value={[budget]}
|
value={[budget]}
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormDescription>{t.preferenze.budget_desc}</FormDescription>
|
<FormDescription>{t.parametri.budget_desc}</FormDescription>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
|
@ -590,7 +590,7 @@ export const FormNewServizioAcquisto = ({
|
||||||
<FormItem className="w-full">
|
<FormItem className="w-full">
|
||||||
<div className="flex flex-wrap items-center gap-x-2">
|
<div className="flex flex-wrap items-center gap-x-2">
|
||||||
<FormLabel htmlFor="select-mesi">
|
<FormLabel htmlFor="select-mesi">
|
||||||
{t.preferenze.dalmese_label}...
|
{t.parametri.dalmese_label}...
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -600,7 +600,7 @@ export const FormNewServizioAcquisto = ({
|
||||||
field.value !== null
|
field.value !== null
|
||||||
? {
|
? {
|
||||||
// biome-ignore lint/style/noNonNullAssertion: <known size>
|
// biome-ignore lint/style/noNonNullAssertion: <known size>
|
||||||
label: t.preferenze.mesi[field.value]!,
|
label: t.parametri.mesi[field.value]!,
|
||||||
value: String(field.value),
|
value: String(field.value),
|
||||||
}
|
}
|
||||||
: undefined
|
: undefined
|
||||||
|
|
@ -614,7 +614,7 @@ export const FormNewServizioAcquisto = ({
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
options={UnpackOptions({
|
options={UnpackOptions({
|
||||||
options: t.preferenze.mesi,
|
options: t.parametri.mesi,
|
||||||
})}
|
})}
|
||||||
placeholder="Seleziona..."
|
placeholder="Seleziona..."
|
||||||
/>
|
/>
|
||||||
|
|
@ -630,7 +630,7 @@ export const FormNewServizioAcquisto = ({
|
||||||
<FormItem className="w-full">
|
<FormItem className="w-full">
|
||||||
<div className="flex flex-wrap items-center gap-x-2">
|
<div className="flex flex-wrap items-center gap-x-2">
|
||||||
<FormLabel htmlFor="permanenza">
|
<FormLabel htmlFor="permanenza">
|
||||||
{t.preferenze.permanenza_label}
|
{t.parametri.permanenza_label}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -641,7 +641,7 @@ export const FormNewServizioAcquisto = ({
|
||||||
field.value
|
field.value
|
||||||
? {
|
? {
|
||||||
label:
|
label:
|
||||||
t.preferenze.permanenza[field.value] || "",
|
t.parametri.permanenza[field.value] || "",
|
||||||
value: field.value.toString(),
|
value: field.value.toString(),
|
||||||
}
|
}
|
||||||
: undefined
|
: undefined
|
||||||
|
|
@ -658,13 +658,13 @@ export const FormNewServizioAcquisto = ({
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
options={UnpackOptions({
|
options={UnpackOptions({
|
||||||
options: t.preferenze.permanenza,
|
options: t.parametri.permanenza,
|
||||||
})}
|
})}
|
||||||
placeholder="Seleziona..."
|
placeholder="Seleziona..."
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormDescription>
|
<FormDescription>
|
||||||
{t.preferenze.permanenza_desc}
|
{t.parametri.permanenza_desc}
|
||||||
</FormDescription>
|
</FormDescription>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
|
|
@ -679,7 +679,7 @@ export const FormNewServizioAcquisto = ({
|
||||||
<FormItem className={cn("w-full")}>
|
<FormItem className={cn("w-full")}>
|
||||||
<div className="flex flex-wrap items-center gap-x-2">
|
<div className="flex flex-wrap items-center gap-x-2">
|
||||||
<FormLabel className={cn("")} htmlFor="n_adulti">
|
<FormLabel className={cn("")} htmlFor="n_adulti">
|
||||||
{t.preferenze.nadulti_label}
|
{t.parametri.nadulti_label}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -701,7 +701,7 @@ export const FormNewServizioAcquisto = ({
|
||||||
<FormItem className={cn("w-full")}>
|
<FormItem className={cn("w-full")}>
|
||||||
<div className="flex flex-wrap items-center gap-x-2">
|
<div className="flex flex-wrap items-center gap-x-2">
|
||||||
<FormLabel className={cn("")} htmlFor="n_minori">
|
<FormLabel className={cn("")} htmlFor="n_minori">
|
||||||
{t.preferenze.nminori_label}
|
{t.parametri.nminori_label}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -725,7 +725,7 @@ export const FormNewServizioAcquisto = ({
|
||||||
<FormItem className="w-full">
|
<FormItem className="w-full">
|
||||||
<div className="flex flex-wrap items-center gap-x-2">
|
<div className="flex flex-wrap items-center gap-x-2">
|
||||||
<FormLabel htmlFor="arredato">
|
<FormLabel htmlFor="arredato">
|
||||||
{t.preferenze.arredato_label}
|
{t.parametri.arredato_label}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Switch
|
<Switch
|
||||||
|
|
@ -739,7 +739,7 @@ export const FormNewServizioAcquisto = ({
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<FormDescription>
|
<FormDescription>
|
||||||
{t.preferenze.arredato_desc}
|
{t.parametri.arredato_desc}
|
||||||
</FormDescription>
|
</FormDescription>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
|
|
@ -753,15 +753,14 @@ export const FormNewServizioAcquisto = ({
|
||||||
key={tipologia}
|
key={tipologia}
|
||||||
name="motivazione_transitorio"
|
name="motivazione_transitorio"
|
||||||
render={({ field }) => {
|
render={({ field }) => {
|
||||||
const existingValue =
|
const existingValue = t.parametri.motivazioni_mappings.find(
|
||||||
t.preferenze.motivazioni_mappings.find(
|
(m) => m.id === field.value,
|
||||||
(m) => m.id === field.value,
|
);
|
||||||
);
|
|
||||||
return (
|
return (
|
||||||
<FormItem className="w-full">
|
<FormItem className="w-full">
|
||||||
<div className="flex w-full flex-wrap items-center gap-x-2">
|
<div className="flex w-full flex-wrap items-center gap-x-2">
|
||||||
<FormLabel htmlFor="motivazione_transitorio">
|
<FormLabel htmlFor="motivazione_transitorio">
|
||||||
{t.preferenze.motivazione_label}
|
{t.parametri.motivazione_label}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -780,7 +779,7 @@ export const FormNewServizioAcquisto = ({
|
||||||
onValueChange={(value) => {
|
onValueChange={(value) => {
|
||||||
field.onChange(value.value);
|
field.onChange(value.value);
|
||||||
}}
|
}}
|
||||||
options={t.preferenze.motivazioni_mappings.map(
|
options={t.parametri.motivazioni_mappings.map(
|
||||||
(option) => ({
|
(option) => ({
|
||||||
label: option.title,
|
label: option.title,
|
||||||
value: option.id,
|
value: option.id,
|
||||||
|
|
@ -789,7 +788,7 @@ export const FormNewServizioAcquisto = ({
|
||||||
placeholder={t.seleziona_placeholder}
|
placeholder={t.seleziona_placeholder}
|
||||||
/>
|
/>
|
||||||
<FormDescription>
|
<FormDescription>
|
||||||
{t.preferenze.motivazione_desc}
|
{t.parametri.motivazione_desc}
|
||||||
</FormDescription>
|
</FormDescription>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
);
|
);
|
||||||
|
|
@ -855,7 +854,7 @@ export const FormNewServizioAcquisto = ({
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<div className="flex flex-wrap items-center gap-x-2">
|
<div className="flex flex-wrap items-center gap-x-2">
|
||||||
<FormLabel htmlFor="select-reddito">
|
<FormLabel htmlFor="select-reddito">
|
||||||
{t.preferenze.reddito_label}
|
{t.parametri.reddito_label}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -869,7 +868,7 @@ export const FormNewServizioAcquisto = ({
|
||||||
field.onChange(value.value);
|
field.onChange(value.value);
|
||||||
}}
|
}}
|
||||||
options={UnpackOptions({
|
options={UnpackOptions({
|
||||||
options: t.preferenze.reddito_options,
|
options: t.parametri.reddito_options,
|
||||||
})}
|
})}
|
||||||
placeholder={t.seleziona_placeholder}
|
placeholder={t.seleziona_placeholder}
|
||||||
/>
|
/>
|
||||||
|
|
@ -880,9 +879,9 @@ export const FormNewServizioAcquisto = ({
|
||||||
|
|
||||||
<div className="flex flex-col space-y-2">
|
<div className="flex flex-col space-y-2">
|
||||||
<Label htmlFor="altrePrefDialogButton">
|
<Label htmlFor="altrePrefDialogButton">
|
||||||
{t.preferenze.altrepref_label}
|
{t.parametri.altriparams_label}
|
||||||
</Label>
|
</Label>
|
||||||
<FormDescription>{t.preferenze.altrepref_desc}</FormDescription>
|
<FormDescription>{t.parametri.altriparams_desc}</FormDescription>
|
||||||
<div className="mt-2 flex flex-wrap gap-2">
|
<div className="mt-2 flex flex-wrap gap-2">
|
||||||
{altrePrefMapping.map((pair) => {
|
{altrePrefMapping.map((pair) => {
|
||||||
if (pair) {
|
if (pair) {
|
||||||
|
|
|
||||||
|
|
@ -248,7 +248,7 @@ export const en: LangDict = {
|
||||||
success_caricamento: "Files uploaded successfully",
|
success_caricamento: "Files uploaded successfully",
|
||||||
title: "Attachments",
|
title: "Attachments",
|
||||||
},
|
},
|
||||||
altrePrefMapping: [
|
altriParamsMapping: [
|
||||||
["animali", "I have pets"],
|
["animali", "I have pets"],
|
||||||
["giardino", "Garden or outdoor space"],
|
["giardino", "Garden or outdoor space"],
|
||||||
["terrazzo", "Terrace"],
|
["terrazzo", "Terrace"],
|
||||||
|
|
@ -808,9 +808,9 @@ export const en: LangDict = {
|
||||||
newPw: "New password",
|
newPw: "New password",
|
||||||
pwAggiornata: "Password updated",
|
pwAggiornata: "Password updated",
|
||||||
},
|
},
|
||||||
preferenze: {
|
parametri: {
|
||||||
altrepref_desc: "Select any additional preferences",
|
altriparams_desc: "Select any additional preferences",
|
||||||
altrepref_label: "Other preferences",
|
altriparams_label: "Other preferences",
|
||||||
arredato_desc: "Select if you want a furnished property",
|
arredato_desc: "Select if you want a furnished property",
|
||||||
arredato_label: "Furnished",
|
arredato_label: "Furnished",
|
||||||
budget_acquisto: " €",
|
budget_acquisto: " €",
|
||||||
|
|
@ -967,7 +967,7 @@ export const en: LangDict = {
|
||||||
titolo2: "Working information",
|
titolo2: "Working information",
|
||||||
titolo3: "Other preferences",
|
titolo3: "Other preferences",
|
||||||
},
|
},
|
||||||
preferenze_mancanti: {
|
parametri_mancanti: {
|
||||||
description: "You have not yet entered your search preferences",
|
description: "You have not yet entered your search preferences",
|
||||||
inserisci: "Enter your preferences now",
|
inserisci: "Enter your preferences now",
|
||||||
text: `Search preferences are essential to use the service.
|
text: `Search preferences are essential to use the service.
|
||||||
|
|
|
||||||
|
|
@ -253,7 +253,7 @@ export const it: LangDict = {
|
||||||
success_caricamento: "File caricati con successo",
|
success_caricamento: "File caricati con successo",
|
||||||
title: "Allegati",
|
title: "Allegati",
|
||||||
},
|
},
|
||||||
altrePrefMapping: [
|
altriParamsMapping: [
|
||||||
["animali", "Ho animali"],
|
["animali", "Ho animali"],
|
||||||
["giardino", "Giardino o spazio esterno"],
|
["giardino", "Giardino o spazio esterno"],
|
||||||
["terrazzo", "Terrazzo"],
|
["terrazzo", "Terrazzo"],
|
||||||
|
|
@ -670,7 +670,7 @@ export const it: LangDict = {
|
||||||
title: "Profilo",
|
title: "Profilo",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
impostazioni: "Preferenze",
|
impostazioni: "Parametri",
|
||||||
impostazioni_chiudi: "Chiudi",
|
impostazioni_chiudi: "Chiudi",
|
||||||
loginMenuAdmin: [
|
loginMenuAdmin: [
|
||||||
{
|
{
|
||||||
|
|
@ -804,9 +804,9 @@ export const it: LangDict = {
|
||||||
newPw: "Nuova password",
|
newPw: "Nuova password",
|
||||||
pwAggiornata: "Password aggiornata",
|
pwAggiornata: "Password aggiornata",
|
||||||
},
|
},
|
||||||
preferenze: {
|
parametri: {
|
||||||
altrepref_desc: "Seleziona le preferenze aggiuntive",
|
altriparams_desc: "Seleziona gli altri parametri",
|
||||||
altrepref_label: "Altre preferenze",
|
altriparams_label: "Altri parametri",
|
||||||
arredato_desc: "Se stai cercando un immobile arredato",
|
arredato_desc: "Se stai cercando un immobile arredato",
|
||||||
arredato_label: "Arredato",
|
arredato_label: "Arredato",
|
||||||
budget_acquisto: " €",
|
budget_acquisto: " €",
|
||||||
|
|
@ -959,17 +959,17 @@ export const it: LangDict = {
|
||||||
"Villetta schiera",
|
"Villetta schiera",
|
||||||
],
|
],
|
||||||
tipologie_label: "Tipologie di immobile",
|
tipologie_label: "Tipologie di immobile",
|
||||||
titolo: "Preferenze di Ricerca",
|
titolo: "Parametri di Ricerca",
|
||||||
titolo2: "Informazioni Lavorative",
|
titolo2: "Informazioni Lavorative",
|
||||||
titolo3: "Altre Preferenze",
|
titolo3: "Altri Parametri",
|
||||||
},
|
},
|
||||||
preferenze_mancanti: {
|
parametri_mancanti: {
|
||||||
description: "Non hai ancora inserito le tue preferenze di ricerca",
|
description: "Non hai ancora inserito i tuoi parametri di ricerca",
|
||||||
inserisci: "Inserisci ora le tue preferenze",
|
inserisci: "Inserisci ora i tuoi parametri",
|
||||||
text: `Le preferenze di ricerca sono fondamentali per usufruire del servizio,
|
text: `I parametri di ricerca sono fondamentali per usufruire del servizio,
|
||||||
inserisci ora le tue preferenze per poter inviare una richiesta al
|
inserisci ora i tuoi parametri per poter inviare una richiesta al
|
||||||
proprietario.`,
|
proprietario.`,
|
||||||
title: "Preferenze Mancanti",
|
title: "Parametri Mancanti",
|
||||||
},
|
},
|
||||||
prezzi: {
|
prezzi: {
|
||||||
acconto: "Acconto",
|
acconto: "Acconto",
|
||||||
|
|
|
||||||
|
|
@ -426,7 +426,7 @@ export type LangDict = {
|
||||||
alert_inserito: string;
|
alert_inserito: string;
|
||||||
alert_inserito_corretto: string;
|
alert_inserito_corretto: string;
|
||||||
};
|
};
|
||||||
preferenze: {
|
parametri: {
|
||||||
titolo: string;
|
titolo: string;
|
||||||
titolo2: string;
|
titolo2: string;
|
||||||
titolo3: string;
|
titolo3: string;
|
||||||
|
|
@ -445,8 +445,8 @@ export type LangDict = {
|
||||||
npersone_label: string;
|
npersone_label: string;
|
||||||
nadulti_label: string;
|
nadulti_label: string;
|
||||||
nminori_label: string;
|
nminori_label: string;
|
||||||
altrepref_label: string;
|
altriparams_label: string;
|
||||||
altrepref_desc: string;
|
altriparams_desc: string;
|
||||||
comuni: string[];
|
comuni: string[];
|
||||||
tipologie: string[];
|
tipologie: string[];
|
||||||
mesi: string[];
|
mesi: string[];
|
||||||
|
|
@ -463,7 +463,7 @@ export type LangDict = {
|
||||||
cta_label: string;
|
cta_label: string;
|
||||||
}[];
|
}[];
|
||||||
};
|
};
|
||||||
altrePrefMapping: string[][];
|
altriParamsMapping: string[][];
|
||||||
pwReset: {
|
pwReset: {
|
||||||
titolo: string;
|
titolo: string;
|
||||||
oldPw: string;
|
oldPw: string;
|
||||||
|
|
@ -665,7 +665,7 @@ export type LangDict = {
|
||||||
title: string;
|
title: string;
|
||||||
rating_text: string;
|
rating_text: string;
|
||||||
};
|
};
|
||||||
preferenze_mancanti: {
|
parametri_mancanti: {
|
||||||
title: string;
|
title: string;
|
||||||
description: string;
|
description: string;
|
||||||
text: string;
|
text: string;
|
||||||
|
|
|
||||||
|
|
@ -135,8 +135,8 @@ const Filters = () => {
|
||||||
} = useRicerca();
|
} = useRicerca();
|
||||||
const mappedConsegnaOptions = useMemo(
|
const mappedConsegnaOptions = useMemo(
|
||||||
// biome-ignore lint/style/noNonNullAssertion: <known lenght>
|
// biome-ignore lint/style/noNonNullAssertion: <known lenght>
|
||||||
() => consegnaOptions.map((m) => t.preferenze.mesi[m]!).filter(Boolean),
|
() => consegnaOptions.map((m) => t.parametri.mesi[m]!).filter(Boolean),
|
||||||
[consegnaOptions, t.preferenze.mesi],
|
[consegnaOptions, t.parametri.mesi],
|
||||||
);
|
);
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|
@ -177,16 +177,16 @@ const Filters = () => {
|
||||||
await setConsegna(null);
|
await setConsegna(null);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (t.preferenze.mesi.includes(value)) {
|
if (t.parametri.mesi.includes(value)) {
|
||||||
await setConsegna(t.preferenze.mesi.indexOf(value));
|
await setConsegna(t.parametri.mesi.indexOf(value));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.warn("Value not found in preferenze.mesi");
|
console.warn("Value not found in parametri.mesi");
|
||||||
await setConsegna(null);
|
await setConsegna(null);
|
||||||
}}
|
}}
|
||||||
options={mappedConsegnaOptions}
|
options={mappedConsegnaOptions}
|
||||||
placeholder={t.seleziona_placeholder}
|
placeholder={t.seleziona_placeholder}
|
||||||
value={consegna ? t.preferenze.mesi[consegna] || "" : ""}
|
value={consegna ? t.parametri.mesi[consegna] || "" : ""}
|
||||||
/>
|
/>
|
||||||
<SelectFilter
|
<SelectFilter
|
||||||
defaultValue={sort}
|
defaultValue={sort}
|
||||||
|
|
|
||||||
|
|
@ -528,7 +528,7 @@ const CardInfos = ({ data }: { data: Annunci }) => {
|
||||||
aggiornamento: t.card.in_aggiornamento,
|
aggiornamento: t.card.in_aggiornamento,
|
||||||
consegna: data.consegna,
|
consegna: data.consegna,
|
||||||
consegna_da: t.card.consegna_da,
|
consegna_da: t.card.consegna_da,
|
||||||
mesi: t.preferenze.mesi,
|
mesi: t.parametri.mesi,
|
||||||
subito: t.card.consegna_subito,
|
subito: t.card.consegna_subito,
|
||||||
})}
|
})}
|
||||||
</span>
|
</span>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue