Repository navigation
MSPCA-2: get volunteer by id and update volunteer by id #2
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
base: main
Are you sure you want to change the base?
Changes from all commits
2bed4ed
91a46b2
abb1c10
c8a565b
833a402
0a2009f
c548f81
9f773f2
e229d8b
e93101f
26a1740
58956c5
ba4b369
1a7b55d
fc1fcb1
2f25424
0454032
df9447a
be0d504
dd3f822
efc5f8b
43f6006
ba68448
d073472
87bb1ce
a1bd218
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ticket says
but dto also exposes firstName, lastName, phone, secondaryPhone, email as editable fields - want to double check that's intended.. @dburkhart07
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. still waiting on client communication for what fields we want to be editable. for right now, let's just say all the ones currently implemented here (there are a few noneditable fields that i already had removed), and we will limit scope later on as we get more information. good catch though, sorry about the inconsistency |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| import { Homebase } from '../../types'; | ||
| import { FosterType } from '../volunteers.types'; | ||
| import { | ||
| IsOptional, | ||
| IsString, | ||
| IsEnum, | ||
| IsNotEmpty, | ||
| MaxLength, | ||
| IsPhoneNumber, | ||
| IsEmail, | ||
| } from 'class-validator'; | ||
|
|
||
| export class UpdateVolunteerDto { | ||
| @IsOptional() | ||
| @IsString() | ||
| @IsNotEmpty() | ||
| @MaxLength(255) | ||
| firstName?: string; | ||
|
|
||
| @IsOptional() | ||
| @IsString() | ||
| @IsNotEmpty() | ||
| @MaxLength(255) | ||
| lastName?: string; | ||
|
|
||
| @IsOptional() | ||
| @IsString() | ||
| @IsNotEmpty() | ||
| @IsPhoneNumber('US') | ||
| phone?: string; | ||
|
shreeyaadhikari marked this conversation as resolved.
|
||
|
|
||
| @IsOptional() | ||
| @IsString() | ||
| @IsNotEmpty() | ||
| @IsPhoneNumber('US') | ||
| secondaryPhone?: string; | ||
|
shreeyaadhikari marked this conversation as resolved.
shreeyaadhikari marked this conversation as resolved.
|
||
|
|
||
| @IsOptional() | ||
| @IsNotEmpty() | ||
| @MaxLength(255) | ||
| @IsEmail() | ||
| email?: string; | ||
|
shreeyaadhikari marked this conversation as resolved.
|
||
|
|
||
| @IsOptional() | ||
| @IsString() | ||
| @IsNotEmpty() | ||
| @MaxLength(255) | ||
| address?: string; | ||
|
|
||
| @IsOptional() | ||
| @IsString() | ||
| @IsNotEmpty() | ||
| @MaxLength(255) | ||
| city?: string; | ||
|
|
||
| @IsOptional() | ||
| @IsString() | ||
| @IsNotEmpty() | ||
| @MaxLength(10) | ||
| zipcode?: string; | ||
|
|
||
| @IsOptional() | ||
| @IsEnum(Homebase) | ||
| homebase?: Homebase; | ||
|
|
||
| @IsOptional() | ||
| @IsString() | ||
| @IsNotEmpty() | ||
| residentAnimals?: string; | ||
|
|
||
| @IsOptional() | ||
| @IsString() | ||
| @IsNotEmpty() | ||
| notes?: string; | ||
|
|
||
| @IsOptional() | ||
| @IsEnum(FosterType) | ||
| fosterType?: FosterType; | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.