Skip to content

Commit

Permalink
Merge pull request #95 from turingschool/Refactor/ShowContact
Browse files Browse the repository at this point in the history
Refactor/show contact
  • Loading branch information
TDManning authored Feb 11, 2025
2 parents e0ae19d + 85c825d commit de04d25
Show file tree
Hide file tree
Showing 6 changed files with 240 additions and 278 deletions.
152 changes: 106 additions & 46 deletions src/Interfaces.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export interface UserData {
}

export interface UserInformationProps {
userData?: Partial<UserData>;
userData: UserData;
}

export interface CompanyAttributes {
Expand Down Expand Up @@ -48,56 +48,116 @@ export interface JobApplication {
updated_at: string;
}

export interface DashBoardDattaI{
job_applications: [ null |
{
id: number;
position_title: string;
date_applied: string;
status: number;
notes: string;
job_description: string;
application_url: string;
created_at: string;
updated_at: string;
company_id: number;
user_id: number;
}
],
contacts: [ null |
{
id: number;
first_name: string;
last_name: string;
email: string;
phone_number: string;
notes: string;
created_at: string;
updated_at: string;
user_id: number;
company_id: number;
}
],
companies: [ null |
{
id: number;
user_id: number;
name: string;
website: string;
street_address: string;
city: string;
state: string;
zip_code: string;
notes: string;
created_at: string;
updated_at: string ;
}
]
}

export interface ContactAttributes {
company: { name: string };
first_name: string;
last_name: string;
}

export interface Contact {
id: string;
attributes: ContactAttributes;
}

export interface ContactData {
id: string;
type: string;
attributes: {
first_name: string;
last_name: string;
company_id: number;
email: string;
phone_number: string;
notes: string;
user_id: number;
company: {
id: number;
name: string;
website: string;
street_address: string;
city: string;
state: string;
zip_code: string;
notes: string;
};
};
}

export interface DashBoardDattaI{
job_applications: [ null |
{
id: number;
position_title: string;
date_applied: string;
status: number;
notes: string;
job_description: string;
application_url: string;
created_at: string;
updated_at: string;
company_id: number;
user_id: number;
}
],
contacts: [ null |
export interface FormInputData {
firstName: string;
lastName: string;
email: string;
phoneNumber: string;
companyId?: number | null;
notes: string;
};

{
id: number;
first_name: string;
last_name: string;
email: string;
phone_number: string;
notes: string;
created_at: string;
updated_at: string;
user_id: number;
company_id: number;
}
],
companies: [ null |
export interface NewContact {
first_name: string,
last_name: string,
email: string,
phone_number: string,
notes: string,
}

{
id: number;
user_id: number;
name: string;
website: string;
street_address: string;
city: string;
state: string;
zip_code: string;
notes: string;
created_at: string;
updated_at: string ;
}
]
export interface DataCompile {
token?: string;
id?: number;
name?: string;
email?: string;
[key: string]: any;
}

export interface UserRegistrationData {
name: string,
email: string,
password: string,
passwordConfirmation: string
}
Loading

0 comments on commit de04d25

Please sign in to comment.