agregado los campos de distribucion (interna y externa)
This commit is contained in:
@@ -0,0 +1,9 @@
|
|||||||
|
ALTER TABLE "training_surveys" ALTER COLUMN "financial_requirement_description" SET DEFAULT '';--> statement-breakpoint
|
||||||
|
ALTER TABLE "training_surveys" ADD COLUMN "prod_description_internal" text DEFAULT '' NOT NULL;--> statement-breakpoint
|
||||||
|
ALTER TABLE "training_surveys" ADD COLUMN "internal_count" integer DEFAULT 0 NOT NULL;--> statement-breakpoint
|
||||||
|
ALTER TABLE "training_surveys" ADD COLUMN "external_count" integer DEFAULT 0 NOT NULL;--> statement-breakpoint
|
||||||
|
ALTER TABLE "training_surveys" ADD COLUMN "prod_description_external" text DEFAULT '' NOT NULL;--> statement-breakpoint
|
||||||
|
ALTER TABLE "training_surveys" ADD COLUMN "country" text DEFAULT '' NOT NULL;--> statement-breakpoint
|
||||||
|
ALTER TABLE "training_surveys" ADD COLUMN "city" text DEFAULT '' NOT NULL;--> statement-breakpoint
|
||||||
|
ALTER TABLE "training_surveys" ADD COLUMN "men_count" integer DEFAULT 0 NOT NULL;--> statement-breakpoint
|
||||||
|
ALTER TABLE "training_surveys" ADD COLUMN "women_count" integer DEFAULT 0 NOT NULL;
|
||||||
2159
apps/api/src/database/migrations/meta/0013_snapshot.json
Normal file
2159
apps/api/src/database/migrations/meta/0013_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -92,6 +92,13 @@
|
|||||||
"when": 1769621656400,
|
"when": 1769621656400,
|
||||||
"tag": "0012_sudden_venus",
|
"tag": "0012_sudden_venus",
|
||||||
"breakpoints": true
|
"breakpoints": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idx": 13,
|
||||||
|
"version": "7",
|
||||||
|
"when": 1769629815868,
|
||||||
|
"tag": "0013_cuddly_night_nurse",
|
||||||
|
"breakpoints": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -86,7 +86,8 @@ export const trainingSurveys = t.pgTable(
|
|||||||
productiveActivity: t.text('productive_activity').notNull(),
|
productiveActivity: t.text('productive_activity').notNull(),
|
||||||
financialRequirementDescription: t
|
financialRequirementDescription: t
|
||||||
.text('financial_requirement_description')
|
.text('financial_requirement_description')
|
||||||
.notNull(),
|
.notNull()
|
||||||
|
.default(''),
|
||||||
currentStatus: t.text('current_status').notNull().default('ACTIVA'),
|
currentStatus: t.text('current_status').notNull().default('ACTIVA'),
|
||||||
companyConstitutionYear: t.integer('company_constitution_year').notNull(),
|
companyConstitutionYear: t.integer('company_constitution_year').notNull(),
|
||||||
producerCount: t.integer('producer_count').notNull(),
|
producerCount: t.integer('producer_count').notNull(),
|
||||||
@@ -138,6 +139,15 @@ export const trainingSurveys = t.pgTable(
|
|||||||
productCountDaily: t.integer('product_count_daily').notNull().default(0),
|
productCountDaily: t.integer('product_count_daily').notNull().default(0),
|
||||||
productCountWeekly: t.integer('product_count_weekly').notNull().default(0),
|
productCountWeekly: t.integer('product_count_weekly').notNull().default(0),
|
||||||
productCountMonthly: t.integer('product_count_monthly').notNull().default(0),
|
productCountMonthly: t.integer('product_count_monthly').notNull().default(0),
|
||||||
|
// nuevos campos adicionales
|
||||||
|
prodDescriptionInternal: t.text('prod_description_internal').notNull().default(''),
|
||||||
|
internalCount: t.integer('internal_count').notNull().default(0),
|
||||||
|
externalCount: t.integer('external_count').notNull().default(0),
|
||||||
|
prodDescriptionExternal: t.text('prod_description_external').notNull().default(''),
|
||||||
|
country: t.text('country').notNull().default(''),
|
||||||
|
city: t.text('city').notNull().default(''),
|
||||||
|
menCount: t.integer('men_count').notNull().default(0),
|
||||||
|
womenCount: t.integer('women_count').notNull().default(0),
|
||||||
...timestamps,
|
...timestamps,
|
||||||
},
|
},
|
||||||
(trainingSurveys) => ({
|
(trainingSurveys) => ({
|
||||||
|
|||||||
@@ -20,7 +20,8 @@ export class CreateTrainingDto {
|
|||||||
|
|
||||||
@ApiProperty()
|
@ApiProperty()
|
||||||
@IsString()
|
@IsString()
|
||||||
financialRequirementDescription: string;
|
@IsOptional()
|
||||||
|
financialRequirementDescription?: string;
|
||||||
|
|
||||||
@ApiProperty()
|
@ApiProperty()
|
||||||
@IsInt()
|
@IsInt()
|
||||||
@@ -282,4 +283,36 @@ export class CreateTrainingDto {
|
|||||||
@ApiProperty()
|
@ApiProperty()
|
||||||
@IsInt()
|
@IsInt()
|
||||||
productCountMonthly: number;
|
productCountMonthly: number;
|
||||||
|
|
||||||
|
@ApiProperty()
|
||||||
|
@IsString()
|
||||||
|
prodDescriptionInternal: string;
|
||||||
|
|
||||||
|
@ApiProperty()
|
||||||
|
@IsInt()
|
||||||
|
internalCount: number;
|
||||||
|
|
||||||
|
@ApiProperty()
|
||||||
|
@IsInt()
|
||||||
|
externalCount: number;
|
||||||
|
|
||||||
|
@ApiProperty()
|
||||||
|
@IsString()
|
||||||
|
prodDescriptionExternal: string;
|
||||||
|
|
||||||
|
@ApiProperty()
|
||||||
|
@IsString()
|
||||||
|
country: string;
|
||||||
|
|
||||||
|
@ApiProperty()
|
||||||
|
@IsString()
|
||||||
|
city: string;
|
||||||
|
|
||||||
|
@ApiProperty()
|
||||||
|
@IsInt()
|
||||||
|
menCount: number;
|
||||||
|
|
||||||
|
@ApiProperty()
|
||||||
|
@IsInt()
|
||||||
|
womenCount: number;
|
||||||
}
|
}
|
||||||
|
|||||||
196
apps/web/constants/countries.ts
Normal file
196
apps/web/constants/countries.ts
Normal file
@@ -0,0 +1,196 @@
|
|||||||
|
export const COUNTRY_OPTIONS = [
|
||||||
|
'Afganistán',
|
||||||
|
'Albania',
|
||||||
|
'Alemania',
|
||||||
|
'Andorra',
|
||||||
|
'Angola',
|
||||||
|
'Antigua y Barbuda',
|
||||||
|
'Arabia Saudita',
|
||||||
|
'Argelia',
|
||||||
|
'Argentina',
|
||||||
|
'Armenia',
|
||||||
|
'Australia',
|
||||||
|
'Austria',
|
||||||
|
'Azerbaiyán',
|
||||||
|
'Bahamas',
|
||||||
|
'Bangladés',
|
||||||
|
'Barbados',
|
||||||
|
'Baréin',
|
||||||
|
'Bélgica',
|
||||||
|
'Belice',
|
||||||
|
'Benín',
|
||||||
|
'Bielorrusia',
|
||||||
|
'Birmania',
|
||||||
|
'Bolivia',
|
||||||
|
'Bosnia y Herzegovina',
|
||||||
|
'Botsuana',
|
||||||
|
'Brasil',
|
||||||
|
'Brunéi',
|
||||||
|
'Bulgaria',
|
||||||
|
'Burkina Faso',
|
||||||
|
'Burundi',
|
||||||
|
'Bután',
|
||||||
|
'Cabo Verde',
|
||||||
|
'Camboya',
|
||||||
|
'Camerún',
|
||||||
|
'Canadá',
|
||||||
|
'Catar',
|
||||||
|
'Chad',
|
||||||
|
'Chile',
|
||||||
|
'China',
|
||||||
|
'Chipre',
|
||||||
|
'Ciudad del Vaticano',
|
||||||
|
'Colombia',
|
||||||
|
'Comoras',
|
||||||
|
'Corea del Norte',
|
||||||
|
'Corea del Sur',
|
||||||
|
'Costa de Marfil',
|
||||||
|
'Costa Rica',
|
||||||
|
'Croacia',
|
||||||
|
'Cuba',
|
||||||
|
'Dinamarca',
|
||||||
|
'Dominica',
|
||||||
|
'Ecuador',
|
||||||
|
'Egipto',
|
||||||
|
'El Salvador',
|
||||||
|
'Emiratos Árabes Unidos',
|
||||||
|
'Eritrea',
|
||||||
|
'Eslovaquia',
|
||||||
|
'Eslovenia',
|
||||||
|
'España',
|
||||||
|
'Estados Unidos',
|
||||||
|
'Estonia',
|
||||||
|
'Etiopía',
|
||||||
|
'Filipinas',
|
||||||
|
'Finlandia',
|
||||||
|
'Fiyi',
|
||||||
|
'Francia',
|
||||||
|
'Gabón',
|
||||||
|
'Gambia',
|
||||||
|
'Georgia',
|
||||||
|
'Ghana',
|
||||||
|
'Granada',
|
||||||
|
'Grecia',
|
||||||
|
'Guatemala',
|
||||||
|
'Guyana',
|
||||||
|
'Guinea',
|
||||||
|
'Guinea Ecuatorial',
|
||||||
|
'Guinea-Bisáu',
|
||||||
|
'Haití',
|
||||||
|
'Honduras',
|
||||||
|
'Hungría',
|
||||||
|
'India',
|
||||||
|
'Indonesia',
|
||||||
|
'Irak',
|
||||||
|
'Irán',
|
||||||
|
'Irlanda',
|
||||||
|
'Islandia',
|
||||||
|
'Islas Marshall',
|
||||||
|
'Islas Salomón',
|
||||||
|
'Israel',
|
||||||
|
'Italia',
|
||||||
|
'Jamaica',
|
||||||
|
'Japón',
|
||||||
|
'Jordania',
|
||||||
|
'Kazajistán',
|
||||||
|
'Kenia',
|
||||||
|
'Kirguistán',
|
||||||
|
'Kiribati',
|
||||||
|
'Kuwait',
|
||||||
|
'Laos',
|
||||||
|
'Lesoto',
|
||||||
|
'Letonia',
|
||||||
|
'Líbano',
|
||||||
|
'Liberia',
|
||||||
|
'Libia',
|
||||||
|
'Liechtenstein',
|
||||||
|
'Lituania',
|
||||||
|
'Luxemburgo',
|
||||||
|
'Madagascar',
|
||||||
|
'Malasia',
|
||||||
|
'Malaui',
|
||||||
|
'Maldivas',
|
||||||
|
'Malí',
|
||||||
|
'Malta',
|
||||||
|
'Marruecos',
|
||||||
|
'Mauricio',
|
||||||
|
'Mauritania',
|
||||||
|
'México',
|
||||||
|
'Micronesia',
|
||||||
|
'Moldavia',
|
||||||
|
'Mónaco',
|
||||||
|
'Mongolia',
|
||||||
|
'Montenegro',
|
||||||
|
'Mozambique',
|
||||||
|
'Namibia',
|
||||||
|
'Nauru',
|
||||||
|
'Nepal',
|
||||||
|
'Nicaragua',
|
||||||
|
'Níger',
|
||||||
|
'Nigeria',
|
||||||
|
'Noruega',
|
||||||
|
'Nueva Zelanda',
|
||||||
|
'Omán',
|
||||||
|
'Países Bajos',
|
||||||
|
'Pakistán',
|
||||||
|
'Palaos',
|
||||||
|
'Panamá',
|
||||||
|
'Papúa Nueva Guinea',
|
||||||
|
'Paraguay',
|
||||||
|
'Perú',
|
||||||
|
'Polonia',
|
||||||
|
'Portugal',
|
||||||
|
'Reino Unido',
|
||||||
|
'República Centroafricana',
|
||||||
|
'República Checa',
|
||||||
|
'República de Macedonia',
|
||||||
|
'República del Congo',
|
||||||
|
'República Democrática del Congo',
|
||||||
|
'República Dominicana',
|
||||||
|
'República Sudafricana',
|
||||||
|
'Ruanda',
|
||||||
|
'Rumanía',
|
||||||
|
'Rusia',
|
||||||
|
'Samoa',
|
||||||
|
'San Cristóbal y Nieves',
|
||||||
|
'San Marino',
|
||||||
|
'San Vicente y las Granadinas',
|
||||||
|
'Santa Lucía',
|
||||||
|
'Santo Tomé y Príncipe',
|
||||||
|
'Senegal',
|
||||||
|
'Serbia',
|
||||||
|
'Seychelles',
|
||||||
|
'Sierra Leona',
|
||||||
|
'Singapur',
|
||||||
|
'Siria',
|
||||||
|
'Somalia',
|
||||||
|
'Sri Lanka',
|
||||||
|
'Suazilandia',
|
||||||
|
'Sudán',
|
||||||
|
'Sudán del Sur',
|
||||||
|
'Suecia',
|
||||||
|
'Suiza',
|
||||||
|
'Surinam',
|
||||||
|
'Tailandia',
|
||||||
|
'Tanzania',
|
||||||
|
'Tayikistán',
|
||||||
|
'Timor Oriental',
|
||||||
|
'Togo',
|
||||||
|
'Tonga',
|
||||||
|
'Trinidad y Tobago',
|
||||||
|
'Túnez',
|
||||||
|
'Turkmenistán',
|
||||||
|
'Turquía',
|
||||||
|
'Tuvalu',
|
||||||
|
'Ucrania',
|
||||||
|
'Uganda',
|
||||||
|
'Uruguay',
|
||||||
|
'Uzbekistán',
|
||||||
|
'Vanuatu',
|
||||||
|
'Venezuela',
|
||||||
|
'Vietnam',
|
||||||
|
'Yemen',
|
||||||
|
'Yibuti',
|
||||||
|
'Zambia',
|
||||||
|
'Zimbabue'
|
||||||
|
];
|
||||||
@@ -37,6 +37,8 @@ import {
|
|||||||
import { SelectSearchable } from '@repo/shadcn/select-searchable';
|
import { SelectSearchable } from '@repo/shadcn/select-searchable';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
import { COUNTRY_OPTIONS } from '@/constants/countries';
|
||||||
|
|
||||||
// const PRODUCTIVE_ACTIVITIES = [
|
// const PRODUCTIVE_ACTIVITIES = [
|
||||||
// 'Agricola',
|
// 'Agricola',
|
||||||
// 'Textil',
|
// 'Textil',
|
||||||
@@ -47,9 +49,6 @@ import React from 'react';
|
|||||||
|
|
||||||
const ECO_SECTORS = ['Primario', 'Secundario', 'Terciario'];
|
const ECO_SECTORS = ['Primario', 'Secundario', 'Terciario'];
|
||||||
|
|
||||||
// const ECO_SECTORS_PRIMARIO = ['Agropecuario', 'Pesca', 'Minería', 'Forestal'];
|
|
||||||
// const ECO_SECTORS_SECUNDARIO = ['Manufactura', 'Construcción', 'Energía'];
|
|
||||||
|
|
||||||
const PRODUCTIVE_SECTORS = ['Agricola', 'Manufactura', 'Servicios', 'Comercio', 'Turismo'];
|
const PRODUCTIVE_SECTORS = ['Agricola', 'Manufactura', 'Servicios', 'Comercio', 'Turismo'];
|
||||||
|
|
||||||
const CENTRAL_PRODUCTIVE_ACTIVITY = [
|
const CENTRAL_PRODUCTIVE_ACTIVITY = [
|
||||||
@@ -62,11 +61,6 @@ const CENTRAL_PRODUCTIVE_ACTIVITY = [
|
|||||||
'COMERCIO'
|
'COMERCIO'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
// const PRODUCTIVE_SECTORS_PRIMARIO = ['Agricola'];
|
|
||||||
// const PRODUCTIVE_SECTORS_SECUNDARIO = ['Manufactura'];
|
|
||||||
// const PRODUCTIVE_SECTORS_TERCIARIO = ['Servicios', 'Comercio', 'Turismo'];
|
|
||||||
|
|
||||||
const MAIN_PRODUCTIVE_ACTIVITY = [
|
const MAIN_PRODUCTIVE_ACTIVITY = [
|
||||||
'AGRICULTURA ',
|
'AGRICULTURA ',
|
||||||
'CRIA ',
|
'CRIA ',
|
||||||
@@ -168,10 +162,10 @@ export function CreateTrainingForm({
|
|||||||
|
|
||||||
const isSaving = isCreating || isUpdating;
|
const isSaving = isCreating || isUpdating;
|
||||||
|
|
||||||
// const [state, setState] = React.useState(0);
|
const [state, setState] = React.useState(0);
|
||||||
// const [municipality, setMunicipality] = React.useState(0);
|
const [municipality, setMunicipality] = React.useState(0);
|
||||||
// const [disabledMunicipality, setDisabledMunicipality] = React.useState(true);
|
const [disabledMunicipality, setDisabledMunicipality] = React.useState(true);
|
||||||
// const [disabledParish, setDisabledParish] = React.useState(true);
|
const [disabledParish, setDisabledParish] = React.useState(true);
|
||||||
|
|
||||||
const [coorState, setcoorState] = React.useState(0);
|
const [coorState, setcoorState] = React.useState(0);
|
||||||
const [coorMunicipality, setcoorMunicipality] = React.useState(0);
|
const [coorMunicipality, setcoorMunicipality] = React.useState(0);
|
||||||
@@ -180,9 +174,9 @@ export function CreateTrainingForm({
|
|||||||
|
|
||||||
const [selectedFiles, setSelectedFiles] = React.useState<File[]>([]);
|
const [selectedFiles, setSelectedFiles] = React.useState<File[]>([]);
|
||||||
|
|
||||||
// const { data: dataState } = useStateQuery();
|
const { data: dataState } = useStateQuery();
|
||||||
// const { data: dataMunicipality } = useMunicipalityQuery(state);
|
const { data: dataMunicipality } = useMunicipalityQuery(state);
|
||||||
// const { data: dataParish } = useParishQuery(municipality);
|
const { data: dataParish } = useParishQuery(municipality);
|
||||||
|
|
||||||
const { data: dataCoorState } = useStateQuery();
|
const { data: dataCoorState } = useStateQuery();
|
||||||
const { data: dataCoorMunicipality } = useMunicipalityQuery(coorState);
|
const { data: dataCoorMunicipality } = useMunicipalityQuery(coorState);
|
||||||
@@ -202,30 +196,30 @@ export function CreateTrainingForm({
|
|||||||
: [{ id: 0, stateId: 0, name: 'Sin Parroquias' }];
|
: [{ id: 0, stateId: 0, name: 'Sin Parroquias' }];
|
||||||
|
|
||||||
|
|
||||||
// const stateOptions = dataState?.data || [{ id: 0, name: 'Sin estados' }];
|
const stateOptions = dataState?.data || [{ id: 0, name: 'Sin estados' }];
|
||||||
|
|
||||||
// const municipalityOptions =
|
const municipalityOptions =
|
||||||
// Array.isArray(dataMunicipality?.data) && dataMunicipality.data.length > 0
|
Array.isArray(dataMunicipality?.data) && dataMunicipality.data.length > 0
|
||||||
// ? dataMunicipality.data
|
? dataMunicipality.data
|
||||||
// : [{ id: 0, stateId: 0, name: 'Sin Municipios' }];
|
: [{ id: 0, stateId: 0, name: 'Sin Municipios' }];
|
||||||
|
|
||||||
// const parishOptions =
|
const parishOptions =
|
||||||
// Array.isArray(dataParish?.data) && dataParish.data.length > 0
|
Array.isArray(dataParish?.data) && dataParish.data.length > 0
|
||||||
// ? dataParish.data
|
? dataParish.data
|
||||||
// : [{ id: 0, stateId: 0, name: 'Sin Parroquias' }];
|
: [{ id: 0, stateId: 0, name: 'Sin Parroquias' }];
|
||||||
|
|
||||||
// No local state needed for existing photos, we use form values
|
// No local state needed for existing photos, we use form values
|
||||||
|
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
if (defaultValues) {
|
if (defaultValues) {
|
||||||
// if (defaultValues.state) {
|
if (defaultValues.state) {
|
||||||
// setState(Number(defaultValues.state));
|
setState(Number(defaultValues.state));
|
||||||
// setDisabledMunicipality(false);
|
setDisabledMunicipality(false);
|
||||||
// }
|
}
|
||||||
// if (defaultValues.municipality) {
|
if (defaultValues.municipality) {
|
||||||
// setMunicipality(Number(defaultValues.municipality));
|
setMunicipality(Number(defaultValues.municipality));
|
||||||
// setDisabledParish(false);
|
setDisabledParish(false);
|
||||||
// }
|
}
|
||||||
|
|
||||||
if (defaultValues.coorState) {
|
if (defaultValues.coorState) {
|
||||||
setcoorState(Number(defaultValues.coorState));
|
setcoorState(Number(defaultValues.coorState));
|
||||||
@@ -272,8 +266,8 @@ export function CreateTrainingForm({
|
|||||||
productCountDaily: defaultValues?.productCountDaily || 0,
|
productCountDaily: defaultValues?.productCountDaily || 0,
|
||||||
productCountWeekly: defaultValues?.productCountWeekly || 0,
|
productCountWeekly: defaultValues?.productCountWeekly || 0,
|
||||||
productCountMonthly: defaultValues?.productCountMonthly || 0,
|
productCountMonthly: defaultValues?.productCountMonthly || 0,
|
||||||
financialRequirementDescription:
|
// financialRequirementDescription:
|
||||||
defaultValues?.financialRequirementDescription || '',
|
// defaultValues?.financialRequirementDescription || '',
|
||||||
siturCodeCommune: defaultValues?.siturCodeCommune || '',
|
siturCodeCommune: defaultValues?.siturCodeCommune || '',
|
||||||
communeName: defaultValues?.communeName || '',
|
communeName: defaultValues?.communeName || '',
|
||||||
communeRif: defaultValues?.communeRif || '',
|
communeRif: defaultValues?.communeRif || '',
|
||||||
@@ -299,8 +293,9 @@ export function CreateTrainingForm({
|
|||||||
companyConstitutionYear:
|
companyConstitutionYear:
|
||||||
defaultValues?.companyConstitutionYear || new Date().getFullYear(),
|
defaultValues?.companyConstitutionYear || new Date().getFullYear(),
|
||||||
producerCount: defaultValues?.producerCount || 0,
|
producerCount: defaultValues?.producerCount || 0,
|
||||||
productCount: defaultValues?.productCount || 0,
|
// productCount: defaultValues?.productCount || 0,
|
||||||
productDescription: defaultValues?.productDescription || '',
|
productDescription: defaultValues?.productDescription || '',
|
||||||
|
prodDescriptionInternal: defaultValues?.prodDescriptionInternal || '',
|
||||||
installedCapacity: defaultValues?.installedCapacity || '',
|
installedCapacity: defaultValues?.installedCapacity || '',
|
||||||
operationalCapacity: defaultValues?.operationalCapacity || '',
|
operationalCapacity: defaultValues?.operationalCapacity || '',
|
||||||
ospResponsibleFullname: defaultValues?.ospResponsibleFullname || '',
|
ospResponsibleFullname: defaultValues?.ospResponsibleFullname || '',
|
||||||
@@ -316,9 +311,16 @@ export function CreateTrainingForm({
|
|||||||
photo2: defaultValues?.photo2 || '',
|
photo2: defaultValues?.photo2 || '',
|
||||||
photo3: defaultValues?.photo3 || '',
|
photo3: defaultValues?.photo3 || '',
|
||||||
paralysisReason: defaultValues?.paralysisReason || '',
|
paralysisReason: defaultValues?.paralysisReason || '',
|
||||||
// state: defaultValues?.state || undefined,
|
state: defaultValues?.state || undefined,
|
||||||
// municipality: defaultValues?.municipality || undefined,
|
municipality: defaultValues?.municipality || undefined,
|
||||||
// parish: defaultValues?.parish || undefined
|
parish: defaultValues?.parish || undefined,
|
||||||
|
internalCount: defaultValues?.internalCount || 0,
|
||||||
|
externalCount: defaultValues?.externalCount || 0,
|
||||||
|
prodDescriptionExternal: defaultValues?.prodDescriptionExternal || '',
|
||||||
|
country: defaultValues?.country || undefined,
|
||||||
|
city: defaultValues?.city || undefined,
|
||||||
|
menCount: defaultValues?.menCount || 0,
|
||||||
|
womenCount: defaultValues?.womenCount || 0,
|
||||||
},
|
},
|
||||||
mode: 'onChange',
|
mode: 'onChange',
|
||||||
});
|
});
|
||||||
@@ -565,7 +567,7 @@ export function CreateTrainingForm({
|
|||||||
>
|
>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<SelectTrigger className="w-full">
|
<SelectTrigger className="w-full">
|
||||||
<SelectValue placeholder="Seleccione tipo" />
|
<SelectValue placeholder="Seleccione sector económico" />
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
@@ -593,7 +595,7 @@ export function CreateTrainingForm({
|
|||||||
>
|
>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<SelectTrigger className="w-full">
|
<SelectTrigger className="w-full">
|
||||||
<SelectValue placeholder="Seleccione tipo" />
|
<SelectValue placeholder="Seleccione sector productivo" />
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
@@ -621,7 +623,7 @@ export function CreateTrainingForm({
|
|||||||
>
|
>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<SelectTrigger className="w-full">
|
<SelectTrigger className="w-full">
|
||||||
<SelectValue placeholder="Seleccione tipo" />
|
<SelectValue placeholder="Seleccione actividad central productiva" />
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
@@ -640,6 +642,34 @@ export function CreateTrainingForm({
|
|||||||
<FormField
|
<FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
name="mainProductiveActivity"
|
name="mainProductiveActivity"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormItem>
|
||||||
|
<FormLabel>Actividad Productiva Principal</FormLabel>
|
||||||
|
<Select
|
||||||
|
onValueChange={field.onChange}
|
||||||
|
defaultValue={field.value}
|
||||||
|
>
|
||||||
|
<FormControl>
|
||||||
|
<SelectTrigger className="w-full">
|
||||||
|
<SelectValue placeholder="Seleccione actividad productiva principal" />
|
||||||
|
</SelectTrigger>
|
||||||
|
</FormControl>
|
||||||
|
<SelectContent>
|
||||||
|
{MAIN_PRODUCTIVE_ACTIVITY.map((type) => (
|
||||||
|
<SelectItem key={type} value={type}>
|
||||||
|
{type}
|
||||||
|
</SelectItem>
|
||||||
|
))}
|
||||||
|
</SelectContent>
|
||||||
|
</Select>
|
||||||
|
<FormMessage />
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="productiveActivity"
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>Actividad Productiva</FormLabel>
|
<FormLabel>Actividad Productiva</FormLabel>
|
||||||
@@ -649,7 +679,7 @@ export function CreateTrainingForm({
|
|||||||
>
|
>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<SelectTrigger className="w-full">
|
<SelectTrigger className="w-full">
|
||||||
<SelectValue placeholder="Seleccione tipo" />
|
<SelectValue placeholder="Seleccione actividad productiva" />
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
@@ -721,8 +751,64 @@ export function CreateTrainingForm({
|
|||||||
)}
|
)}
|
||||||
/> */}
|
/> */}
|
||||||
|
|
||||||
{/* Tipo de equipamiento */}
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="companyConstitutionYear"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormItem>
|
||||||
|
<FormLabel>Año de constitución</FormLabel>
|
||||||
|
<FormControl>
|
||||||
|
<Input type="number" {...field} />
|
||||||
|
</FormControl>
|
||||||
|
<FormMessage />
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="currentStatus"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormItem>
|
||||||
|
<FormLabel>Estatus</FormLabel>
|
||||||
|
<Select
|
||||||
|
onValueChange={field.onChange}
|
||||||
|
defaultValue={field.value}
|
||||||
|
>
|
||||||
|
<FormControl>
|
||||||
|
<SelectTrigger>
|
||||||
|
<SelectValue placeholder="Seleccione estatus" />
|
||||||
|
</SelectTrigger>
|
||||||
|
</FormControl>
|
||||||
|
<SelectContent>
|
||||||
|
{STATUS_OPTIONS.map((status) => (
|
||||||
|
<SelectItem key={status} value={status}>
|
||||||
|
{status}
|
||||||
|
</SelectItem>
|
||||||
|
))}
|
||||||
|
</SelectContent>
|
||||||
|
</Select>
|
||||||
|
<FormMessage />
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="paralysisReason"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormItem className="col-span-2">
|
||||||
|
<FormLabel>Razones de paralización (si aplica)</FormLabel>
|
||||||
|
<FormControl>
|
||||||
|
<Textarea {...field} />
|
||||||
|
</FormControl>
|
||||||
|
<FormMessage />
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
|
||||||
<hr className="col-span-2" />
|
<hr className="col-span-2" />
|
||||||
|
{/* Tipo de equipamiento */}
|
||||||
<h3 className="text-lg font-semibold col-span-2">Tipo de equipamiento:</h3>
|
<h3 className="text-lg font-semibold col-span-2">Tipo de equipamiento:</h3>
|
||||||
<FormField
|
<FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
@@ -767,7 +853,7 @@ export function CreateTrainingForm({
|
|||||||
/>
|
/>
|
||||||
<hr className="col-span-2" />
|
<hr className="col-span-2" />
|
||||||
|
|
||||||
{/* Productos Terminados */}
|
{/* Datos de Producción de la Organización Socio Productivo */}
|
||||||
<h3 className="text-lg font-semibold col-span-2">Datos de Producción de la Organización Socio Productivo:</h3>
|
<h3 className="text-lg font-semibold col-span-2">Datos de Producción de la Organización Socio Productivo:</h3>
|
||||||
|
|
||||||
<FormField
|
<FormField
|
||||||
@@ -871,16 +957,88 @@ export function CreateTrainingForm({
|
|||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
<hr className="col-span-2" />
|
<hr className="col-span-2" />
|
||||||
|
|
||||||
|
{/* Distribución Interna */}
|
||||||
|
<h3 className="text-lg font-semibold col-span-2">Distribución Interna</h3>
|
||||||
|
|
||||||
<FormField
|
<FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
name="companyConstitutionYear"
|
name="state"
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>Año de constitución</FormLabel>
|
<FormLabel>Estado</FormLabel>
|
||||||
|
<SelectSearchable
|
||||||
|
options={stateOptions.map((item) => ({
|
||||||
|
value: item.id.toString(),
|
||||||
|
label: item.name,
|
||||||
|
}))}
|
||||||
|
onValueChange={(value) => {
|
||||||
|
field.onChange(Number(value));
|
||||||
|
setState(Number(value));
|
||||||
|
setDisabledMunicipality(false);
|
||||||
|
setDisabledParish(true);
|
||||||
|
}}
|
||||||
|
placeholder="Selecciona un estado"
|
||||||
|
defaultValue={field.value?.toString()}
|
||||||
|
/>
|
||||||
|
<FormMessage />
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="municipality"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormItem>
|
||||||
|
<FormLabel>Municipio</FormLabel>
|
||||||
|
<SelectSearchable
|
||||||
|
options={municipalityOptions.map((item) => ({
|
||||||
|
value: item.id.toString(),
|
||||||
|
label: item.name,
|
||||||
|
}))}
|
||||||
|
onValueChange={(value) => {
|
||||||
|
field.onChange(Number(value));
|
||||||
|
setMunicipality(Number(value));
|
||||||
|
setDisabledParish(false);
|
||||||
|
}}
|
||||||
|
placeholder="Selecciona un municipio"
|
||||||
|
disabled={disabledMunicipality}
|
||||||
|
defaultValue={field.value?.toString()}
|
||||||
|
/>
|
||||||
|
<FormMessage />
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="parish"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormItem>
|
||||||
|
<FormLabel>Parroquia</FormLabel>
|
||||||
|
<SelectSearchable
|
||||||
|
options={parishOptions.map((item) => ({
|
||||||
|
value: item.id.toString(),
|
||||||
|
label: item.name,
|
||||||
|
}))}
|
||||||
|
onValueChange={(value) => field.onChange(Number(value))}
|
||||||
|
placeholder="Selecciona una parroquia"
|
||||||
|
disabled={disabledParish}
|
||||||
|
defaultValue={field.value?.toString()}
|
||||||
|
/>
|
||||||
|
<FormMessage />
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="internalCount"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormItem>
|
||||||
|
<FormLabel>Cantidad</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input type="number" {...field} />
|
<Input type="number" {...field} />
|
||||||
</FormControl>
|
</FormControl>
|
||||||
@@ -890,6 +1048,125 @@ export function CreateTrainingForm({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<FormField
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="prodDescriptionInternal"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormItem className="col-span-2">
|
||||||
|
<FormLabel>Breve descripción</FormLabel>
|
||||||
|
<FormControl>
|
||||||
|
<Textarea {...field} />
|
||||||
|
</FormControl>
|
||||||
|
<FormMessage />
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
<hr className='col-span-2' />
|
||||||
|
|
||||||
|
{/* Distribución Externa */}
|
||||||
|
<h3 className="text-lg font-semibold col-span-2">Distribución Externa (Exportación)</h3>
|
||||||
|
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="country"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormItem>
|
||||||
|
<FormLabel>País</FormLabel>
|
||||||
|
<Select
|
||||||
|
onValueChange={field.onChange}
|
||||||
|
defaultValue={field.value}
|
||||||
|
>
|
||||||
|
<FormControl>
|
||||||
|
<SelectTrigger className="w-full">
|
||||||
|
<SelectValue placeholder="Seleccione tipo" />
|
||||||
|
</SelectTrigger>
|
||||||
|
</FormControl>
|
||||||
|
<SelectContent>
|
||||||
|
{COUNTRY_OPTIONS.map((type) => (
|
||||||
|
<SelectItem key={type} value={type}>
|
||||||
|
{type}
|
||||||
|
</SelectItem>
|
||||||
|
))}
|
||||||
|
</SelectContent>
|
||||||
|
</Select>
|
||||||
|
<FormMessage />
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="city"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormItem>
|
||||||
|
<FormLabel>Ciudad</FormLabel>
|
||||||
|
<FormControl>
|
||||||
|
<Input type="number" {...field} />
|
||||||
|
</FormControl>
|
||||||
|
<FormMessage />
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="externalCount"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormItem>
|
||||||
|
<FormLabel>Cantidad (Kg, TON, UNID. LT)</FormLabel>
|
||||||
|
<FormControl>
|
||||||
|
<Input type="number" {...field} />
|
||||||
|
</FormControl>
|
||||||
|
<FormMessage />
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="prodDescriptionExternal"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormItem>
|
||||||
|
<FormLabel>Breve descripción</FormLabel>
|
||||||
|
<FormControl>
|
||||||
|
<Textarea {...field} />
|
||||||
|
</FormControl>
|
||||||
|
<FormMessage />
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
<hr className='col-span-2' />
|
||||||
|
|
||||||
|
<h3 className="text-lg font-semibold col-span-2">Cantidad Mano de Obra</h3>
|
||||||
|
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="menCount"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormItem>
|
||||||
|
<FormLabel>Hombres</FormLabel>
|
||||||
|
<FormControl>
|
||||||
|
<Input type="number" {...field} />
|
||||||
|
</FormControl>
|
||||||
|
<FormMessage />
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="womenCount"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormItem>
|
||||||
|
<FormLabel>Mujeres</FormLabel>
|
||||||
|
<FormControl>
|
||||||
|
<Input type="number" {...field} />
|
||||||
|
</FormControl>
|
||||||
|
<FormMessage />
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
|
||||||
|
{/* <FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
name="productCount"
|
name="productCount"
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
@@ -901,37 +1178,9 @@ export function CreateTrainingForm({
|
|||||||
<FormMessage />
|
<FormMessage />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
/>
|
/> */}
|
||||||
|
|
||||||
<FormField
|
{/* <FormField
|
||||||
control={form.control}
|
|
||||||
name="currentStatus"
|
|
||||||
render={({ field }) => (
|
|
||||||
<FormItem>
|
|
||||||
<FormLabel>Estatus</FormLabel>
|
|
||||||
<Select
|
|
||||||
onValueChange={field.onChange}
|
|
||||||
defaultValue={field.value}
|
|
||||||
>
|
|
||||||
<FormControl>
|
|
||||||
<SelectTrigger>
|
|
||||||
<SelectValue placeholder="Seleccione estatus" />
|
|
||||||
</SelectTrigger>
|
|
||||||
</FormControl>
|
|
||||||
<SelectContent>
|
|
||||||
{STATUS_OPTIONS.map((status) => (
|
|
||||||
<SelectItem key={status} value={status}>
|
|
||||||
{status}
|
|
||||||
</SelectItem>
|
|
||||||
))}
|
|
||||||
</SelectContent>
|
|
||||||
</Select>
|
|
||||||
<FormMessage />
|
|
||||||
</FormItem>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<FormField
|
|
||||||
control={form.control}
|
control={form.control}
|
||||||
name="productDescription"
|
name="productDescription"
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
@@ -945,9 +1194,9 @@ export function CreateTrainingForm({
|
|||||||
<FormMessage />
|
<FormMessage />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
/>
|
/> */}
|
||||||
|
|
||||||
<FormField
|
{/* <FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
name="installedCapacity"
|
name="installedCapacity"
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
@@ -959,9 +1208,9 @@ export function CreateTrainingForm({
|
|||||||
<FormMessage />
|
<FormMessage />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
/>
|
/> */}
|
||||||
|
|
||||||
<FormField
|
{/* <FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
name="operationalCapacity"
|
name="operationalCapacity"
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
@@ -973,9 +1222,9 @@ export function CreateTrainingForm({
|
|||||||
<FormMessage />
|
<FormMessage />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
/>
|
/> */}
|
||||||
|
|
||||||
<FormField
|
{/* <FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
name="financialRequirementDescription"
|
name="financialRequirementDescription"
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
@@ -989,21 +1238,7 @@ export function CreateTrainingForm({
|
|||||||
<FormMessage />
|
<FormMessage />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
/>
|
/> */}
|
||||||
|
|
||||||
<FormField
|
|
||||||
control={form.control}
|
|
||||||
name="paralysisReason"
|
|
||||||
render={({ field }) => (
|
|
||||||
<FormItem className="col-span-2">
|
|
||||||
<FormLabel>Razones de paralización (si aplica)</FormLabel>
|
|
||||||
<FormControl>
|
|
||||||
<Textarea {...field} />
|
|
||||||
</FormControl>
|
|
||||||
<FormMessage />
|
|
||||||
</FormItem>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ export const trainingSchema = z.object({
|
|||||||
productiveActivity: z
|
productiveActivity: z
|
||||||
.string()
|
.string()
|
||||||
.min(1, { message: 'Actividad productiva es requerida' }),
|
.min(1, { message: 'Actividad productiva es requerida' }),
|
||||||
financialRequirementDescription: z
|
// financialRequirementDescription: z
|
||||||
.string()
|
// .string()
|
||||||
.min(1, { message: 'Descripción es requerida' }),
|
// .min(1, { message: 'Descripción es requerida' }),
|
||||||
siturCodeCommune: z
|
siturCodeCommune: z
|
||||||
.string()
|
.string()
|
||||||
.min(1, { message: 'Código SITUR Comuna es requerido' }),
|
.min(1, { message: 'Código SITUR Comuna es requerido' }),
|
||||||
@@ -78,13 +78,16 @@ export const trainingSchema = z.object({
|
|||||||
producerCount: z.coerce
|
producerCount: z.coerce
|
||||||
.number()
|
.number()
|
||||||
.min(0, { message: 'Cantidad de productores requerida' }),
|
.min(0, { message: 'Cantidad de productores requerida' }),
|
||||||
productCount: z.coerce
|
// productCount: z.coerce
|
||||||
.number()
|
// .number()
|
||||||
.min(0, { message: 'Cantidad de productos requerida' })
|
// .min(0, { message: 'Cantidad de productos requerida' })
|
||||||
.optional(),
|
// .optional(),
|
||||||
productDescription: z
|
productDescription: z
|
||||||
.string()
|
.string()
|
||||||
.min(1, { message: 'Descripción del producto es requerida' }),
|
.min(1, { message: 'Descripción del producto es requerida' }),
|
||||||
|
prodDescriptionInternal: z
|
||||||
|
.string()
|
||||||
|
.min(1, { message: 'Descripción del producto es requerida' }),
|
||||||
installedCapacity: z
|
installedCapacity: z
|
||||||
.string()
|
.string()
|
||||||
.min(1, { message: 'Capacidad instalada es requerida' }),
|
.min(1, { message: 'Capacidad instalada es requerida' }),
|
||||||
@@ -119,9 +122,9 @@ export const trainingSchema = z.object({
|
|||||||
photo3: z.string().optional().nullable(),
|
photo3: z.string().optional().nullable(),
|
||||||
files: z.any().optional(),
|
files: z.any().optional(),
|
||||||
paralysisReason: z.string().optional().default(''),
|
paralysisReason: z.string().optional().default(''),
|
||||||
// state: z.number().optional().nullable(),
|
state: z.number().optional().nullable(),
|
||||||
// municipality: z.number().optional().nullable(),
|
municipality: z.number().optional().nullable(),
|
||||||
// parish: z.number().optional().nullable(),
|
parish: z.number().optional().nullable(),
|
||||||
coorState: z.number().optional().nullable(),
|
coorState: z.number().optional().nullable(),
|
||||||
coorMunicipality: z.number().optional().nullable(),
|
coorMunicipality: z.number().optional().nullable(),
|
||||||
coorParish: z.number().optional().nullable(),
|
coorParish: z.number().optional().nullable(),
|
||||||
@@ -139,7 +142,13 @@ export const trainingSchema = z.object({
|
|||||||
productCountDaily: z.coerce.number().min(0, { message: 'Cantidad diaria de productos requerida' }),
|
productCountDaily: z.coerce.number().min(0, { message: 'Cantidad diaria de productos requerida' }),
|
||||||
productCountWeekly: z.coerce.number().min(0, { message: 'Cantidad semanal de productos requerida' }),
|
productCountWeekly: z.coerce.number().min(0, { message: 'Cantidad semanal de productos requerida' }),
|
||||||
productCountMonthly: z.coerce.number().min(0, { message: 'Cantidad mensual de productos requerida' }),
|
productCountMonthly: z.coerce.number().min(0, { message: 'Cantidad mensual de productos requerida' }),
|
||||||
// productCountYearly: z.number().min(0, { message: 'Cantidad anual de productos requerida' }),
|
internalCount: z.coerce.number().min(0, { message: 'Cantidad interna requerida' }),
|
||||||
|
externalCount: z.coerce.number().min(0, { message: 'Cantidad externa requerida' }),
|
||||||
|
prodDescriptionExternal: z.string().min(1, { message: 'Descripción del producto es requerida' }),
|
||||||
|
country: z.string().min(1, { message: 'País es requerido' }),
|
||||||
|
city: z.string().min(1, { message: 'Ciudad es requerida' }),
|
||||||
|
menCount: z.coerce.number().min(0, { message: 'Cantidad de hombres requerida' }),
|
||||||
|
womenCount: z.coerce.number().min(0, { message: 'Cantidad de mujeres requerida' }),
|
||||||
});
|
});
|
||||||
|
|
||||||
export type TrainingSchema = z.infer<typeof trainingSchema>;
|
export type TrainingSchema = z.infer<typeof trainingSchema>;
|
||||||
|
|||||||
Reference in New Issue
Block a user