ajustes al formulario de organizaciones

This commit is contained in:
2026-02-23 10:57:45 -04:00
parent 510327de58
commit d71ad98e85
8 changed files with 32 additions and 213 deletions

View File

@@ -118,8 +118,6 @@ export function CreateTrainingForm({
communeName: defaultValues?.communeName || '',
communeRif: defaultValues?.communeRif || '',
communeSpokespersonName: defaultValues?.communeSpokespersonName || '',
communeSpokespersonCedula: defaultValues?.communeSpokespersonCedula || '',
communeSpokespersonRif: defaultValues?.communeSpokespersonRif || '',
communeSpokespersonPhone: defaultValues?.communeSpokespersonPhone || '',
communeEmail: defaultValues?.communeEmail || '',
communalCouncil: defaultValues?.communalCouncil || '',
@@ -127,10 +125,6 @@ export function CreateTrainingForm({
communalCouncilRif: defaultValues?.communalCouncilRif || '',
communalCouncilSpokespersonName:
defaultValues?.communalCouncilSpokespersonName || '',
communalCouncilSpokespersonCedula:
defaultValues?.communalCouncilSpokespersonCedula || '',
communalCouncilSpokespersonRif:
defaultValues?.communalCouncilSpokespersonRif || '',
communalCouncilSpokespersonPhone:
defaultValues?.communalCouncilSpokespersonPhone || '',
communalCouncilEmail: defaultValues?.communalCouncilEmail || '',
@@ -215,27 +209,24 @@ export function CreateTrainingForm({
];
const coorMunicipalityOptions =
Array.isArray(dataCoorMunicipality?.data) &&
dataCoorMunicipality.data.length > 0
dataCoorMunicipality?.data?.length
? dataCoorMunicipality.data
: [{ id: 0, stateId: 0, name: 'Sin Municipios' }];
const coorParishOptions =
Array.isArray(dataCoorParish?.data) && dataCoorParish?.data.length > 0
Array.isArray(dataCoorParish?.data) && dataCoorParish?.data?.length
? dataCoorParish.data
: [{ id: 0, stateId: 0, name: 'Sin Parroquias' }];
const stateOptions = dataState?.data || [{ id: 0, name: 'Sin estados' }];
const municipalityOptions =
Array.isArray(dataMunicipality?.data) && dataMunicipality.data.length > 0
? dataMunicipality.data
: [{ id: 0, stateId: 0, name: 'Sin Municipios' }];
const municipalityOptions = dataMunicipality?.data?.length
? dataMunicipality.data
: [{ id: 0, stateId: 0, name: 'Sin Municipios' }];
const parishOptions =
Array.isArray(dataParish?.data) && dataParish.data.length > 0
? dataParish.data
: [{ id: 0, stateId: 0, name: 'Sin Parroquias' }];
const parishOptions = dataParish?.data?.length
? dataParish.data
: [{ id: 0, stateId: 0, name: 'Sin Parroquias' }];
// No local state needed for existing photos, we use form values
@@ -727,7 +718,7 @@ export function CreateTrainingForm({
render={({ field }) => (
<FormItem className="w-full flex flex-col space-y-3">
<FormLabel className="whitespace-normal leading-tight font-semibold">
Nombre de la organización
Nombre de la organización (opcional)
</FormLabel>
<FormControl>
<Input {...field} />
@@ -1025,38 +1016,7 @@ export function CreateTrainingForm({
)}
/>
<FormField
control={form.control}
name="communeSpokespersonCedula"
render={({ field }) => (
<FormItem className="w-full flex flex-col space-y-2">
<FormLabel className="font-semibold">
Cédula de Identidad del Vocero
</FormLabel>
<FormControl>
<Input {...field} />
</FormControl>
<FormMessage />
</FormItem>
)}
/>
<FormField
control={form.control}
name="communeSpokespersonRif"
render={({ field }) => (
<FormItem className="w-full flex flex-col space-y-2">
<FormLabel className="font-semibold">
RIF del Vocero
</FormLabel>
<FormControl>
<Input {...field} />
</FormControl>
<FormMessage />
</FormItem>
)}
/>
<FormField
control={form.control}
name="communeSpokespersonPhone"
@@ -1158,39 +1118,7 @@ export function CreateTrainingForm({
</FormItem>
)}
/>
<FormField
control={form.control}
name="communalCouncilSpokespersonCedula"
render={({ field }) => (
<FormItem className="w-full flex flex-col space-y-2">
<FormLabel className="font-semibold">
Cédula de Identidad del Vocero
</FormLabel>
<FormControl>
<Input {...field} />
</FormControl>
<FormMessage />
</FormItem>
)}
/>
<FormField
control={form.control}
name="communalCouncilSpokespersonRif"
render={({ field }) => (
<FormItem className="w-full flex flex-col space-y-2">
<FormLabel className="font-semibold">
RIF del Vocero
</FormLabel>
<FormControl>
<Input {...field} />
</FormControl>
<FormMessage />
</FormItem>
)}
/>
<FormField
control={form.control}
name="communalCouncilSpokespersonPhone"