Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Añadir nuevos tipos de ayuda #195

Merged
merged 1 commit into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/helpers/constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export const tiposAyudaOptions = {
import { HelpRequestHelpType } from '@/types/Requests';

export const tiposAyudaOptions: Record<HelpRequestHelpType, string> = {
limpieza: 'Labores de Limpieza',
evacuacion: 'Peticion de desplazamiento',
alojamiento: 'Alojamiento temporal',
Expand All @@ -9,6 +11,9 @@ export const tiposAyudaOptions = {
logistico: 'Apoyo logístico',
reparto: 'Labores de reparto de alimentos a domicilio',
donaciones: 'Labores de organización de donaciones',
maquinariaMovilidadReducida: 'Maquinaria para movilidad reducida',
maquinariaPesada: 'Maquinaria pesada (grúas, palas, ...)',
contenedoresEscombros: 'Contenedores de Escombros',
otros: 'Ayuda general',
} as const;

Expand Down
9 changes: 7 additions & 2 deletions src/types/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ export type Database = {
contact_info: string | null;
coordinates: unknown | null;
created_at: string | null;
crm_status: string | null;
description: string | null;
help_type: Database['public']['Enums']['help_type_enum'][] | null;
id: number;
Expand All @@ -190,7 +191,6 @@ export type Database = {
town_id: number | null;
type: string | null;
urgency: string | null;
crm_status: string | null;
user_id: string | null;
};
Insert: {
Expand All @@ -199,6 +199,7 @@ export type Database = {
contact_info?: string | null;
coordinates?: unknown | null;
created_at?: string | null;
crm_status?: string | null;
description?: string | null;
help_type?: Database['public']['Enums']['help_type_enum'][] | null;
id?: number;
Expand All @@ -222,6 +223,7 @@ export type Database = {
contact_info?: string | null;
coordinates?: unknown | null;
created_at?: string | null;
crm_status?: string | null;
description?: string | null;
help_type?: Database['public']['Enums']['help_type_enum'][] | null;
id?: number;
Expand Down Expand Up @@ -381,7 +383,10 @@ export type Database = {
| 'logistico'
| 'otros'
| 'reparto'
| 'donaciones';
| 'donaciones'
| 'maquinariaMovilidadReducida'
| 'maquinariaPesada'
| 'contenedoresEscombros';
roles: 'user' | 'moderator' | 'admin';
};
CompositeTypes: {
Expand Down
4 changes: 4 additions & 0 deletions supabase/migrations/20241111081800_add_help_types.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
alter type "public"."help_type_enum" add value 'maquinariaMovilidadReducida';
alter type "public"."help_type_enum" add value 'maquinariaPesada';
alter type "public"."help_type_enum" add value 'contenedoresEscombros';