-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from tomvin/dev
Sprint 3.
- Loading branch information
Showing
67 changed files
with
1,836 additions
and
326 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { gql } from 'apollo-boost'; | ||
|
||
export const JOB_DETAILS_FRAGMENT = gql` | ||
fragment JobDetails on Job { | ||
_id | ||
name | ||
description | ||
location | ||
salary | ||
company{ | ||
_id | ||
name | ||
logoUrl | ||
} | ||
education{ | ||
_id | ||
field | ||
level | ||
} | ||
competence{ | ||
_id | ||
level | ||
skill | ||
} | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { gql } from 'apollo-boost'; | ||
|
||
export type UserForJobMatchFragment = { | ||
_id: string; | ||
email: string; | ||
jobSeeker: { | ||
_id: string; | ||
name: string; | ||
} | ||
} | ||
|
||
export const USER_FOR_JOB_MATCH_FRAGMENT = gql` | ||
fragment UserForJobMatch on User { | ||
_id | ||
jobSeeker { | ||
_id | ||
name | ||
} | ||
} | ||
`; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import gql from "graphql-tag"; | ||
|
||
export type AcceptJobVariables = { | ||
acceptInput: { | ||
userId: string; | ||
jobId: string; | ||
} | ||
} | ||
|
||
export type AcceptJobResult = { | ||
acceptJob: 'Already 1 Way Match' | '1 Way Match' | string; | ||
} | ||
|
||
export const ACCEPT_JOB = gql` | ||
mutation AcceptJob($acceptInput: AcceptInput!) { | ||
acceptJob(acceptInput: $acceptInput) | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import gql from "graphql-tag"; | ||
|
||
export type AcceptJobSeekerVariables = { | ||
acceptInput: { | ||
userId: string; | ||
jobId: string; | ||
} | ||
} | ||
|
||
export type AcceptJobSeekerResult = { | ||
acceptJobSeeker: 'Already 1 Way Match' | '1 Way Match' | string; | ||
} | ||
|
||
export const ACCEPT_JOB_SEEKER = gql` | ||
mutation AcceptJobSeeker($acceptInput: AcceptInput!) { | ||
acceptJobSeeker(acceptInput: $acceptInput) | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import gql from "graphql-tag"; | ||
|
||
export type CreateCompanyVariables = { | ||
companyInput: { | ||
name: string; | ||
phone: string; | ||
email: string; | ||
} | ||
userInput: { | ||
email: string; | ||
password: string; | ||
} | ||
} | ||
|
||
export type CreateCompanyResult = { | ||
createCompany: { | ||
_id: string; | ||
} | ||
} | ||
|
||
export const CREATE_COMPANY = gql` | ||
mutation CreateCompany($companyInput: CompanyInput!, $userInput: UserInput) { | ||
createCompany(companyInput: $companyInput, userInput: $userInput) { | ||
_id | ||
} | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import gql from "graphql-tag"; | ||
|
||
export type CreateJobSeekerVariables = { | ||
jobSeekerInput: { | ||
name: string; | ||
phone: string; | ||
education: string[]; | ||
competence: string[]; | ||
location: string; | ||
typeofwork: number; | ||
salary: number; | ||
education_p: number; | ||
competence_p: number; | ||
location_p: number; | ||
typeofwork_p: number; | ||
salary_p: number; | ||
} | ||
userInput: { | ||
email: string; | ||
password: string; | ||
} | ||
} | ||
|
||
export type CreateJobSeekerResult = { | ||
createJobSeeker: { | ||
_id: string; | ||
} | ||
} | ||
|
||
export const CREATE_JOB_SEEKER = gql` | ||
mutation CreateJobSeeker($jobSeekerInput: JobSeekerInput!, $userInput: UserInput) { | ||
createJobSeeker(jobSeekerInput: $jobSeekerInput, userInput: $userInput) { | ||
_id | ||
} | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import gql from "graphql-tag"; | ||
import { IUser } from "../../models/User"; | ||
|
||
export type AllJobSeekerUsersResult = { | ||
users: IUser[] | undefined; | ||
} | ||
|
||
export const ALL_JOB_SEEKER_USERS_QUERY = gql` | ||
query AllJobSeekerUsers { | ||
users { | ||
_id | ||
jobSeeker { | ||
_id | ||
name | ||
phone | ||
location | ||
typeofwork | ||
salary | ||
education { | ||
_id | ||
level | ||
field | ||
} | ||
competence { | ||
_id | ||
level | ||
skill | ||
} | ||
} | ||
} | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import gql from "graphql-tag"; | ||
import { IJob } from "../../models/Job"; | ||
import { JOB_DETAILS_FRAGMENT } from '../fragments/jobDetailsFragment'; | ||
|
||
export type AllJobDetailsResult = { | ||
allJobDetails: IJob[] | undefined; | ||
} | ||
|
||
export const ALL_JOB_DETAILS_QUERY = gql` | ||
query AllJobDetails { | ||
allJobDetails: jobs{ | ||
...JobDetails | ||
} | ||
} | ||
${JOB_DETAILS_FRAGMENT} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import gql from "graphql-tag"; | ||
import { USER_FOR_JOB_MATCH_FRAGMENT } from '../fragments/userForJobMatchFragment'; | ||
import { IUser } from "../../models/User"; | ||
|
||
export type JobCompleteMatchVariables = { | ||
companyUserId: string; | ||
} | ||
|
||
export type JobCompleteMatchResult = { | ||
jobCompleteMatches: { _id: string; completeJobSeekerMatch: IUser[] }[] | undefined; | ||
} | ||
|
||
export const JOB_COMPLETE_MATCH_QUERY = gql` | ||
query JobCompleteMatches($companyUserId:String!) { | ||
jobCompleteMatches(companyUserId:$companyUserId){ | ||
_id | ||
completeJobSeekerMatch { | ||
...UserForJobMatch | ||
} | ||
} | ||
} | ||
${USER_FOR_JOB_MATCH_FRAGMENT} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import gql from "graphql-tag"; | ||
import { USER_FOR_JOB_MATCH_FRAGMENT } from '../fragments/userForJobMatchFragment'; | ||
import { IJobMatch } from "../../models/JobMatch"; | ||
|
||
export type JobMatchVariables = { | ||
jobId: string; | ||
} | ||
|
||
export type JobMatchResult = { | ||
jobMatch: IJobMatch[] | undefined; | ||
} | ||
|
||
export const JOB_MATCH_QUERY = gql` | ||
query JobMatch($jobId:String!) { | ||
jobMatch(jobId:$jobId){ | ||
score | ||
user { | ||
...UserForJobMatch | ||
} | ||
} | ||
} | ||
${USER_FOR_JOB_MATCH_FRAGMENT} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import gql from "graphql-tag"; | ||
import { IJob } from "../../models/Job"; | ||
|
||
export type JobSeekerMatchOverviewsVariables = { | ||
userId: string; | ||
} | ||
|
||
export type JobSeekerMatchOverviewsResult = { | ||
JobSeekerMatchOverviews: IJob[] | undefined; | ||
} | ||
|
||
export const JOB_SEEKER_MATCH_OVERVIEWS_QUERY = gql` | ||
query JobSeekerMatchOverviews($userId:String!) { | ||
JobSeekerMatchOverviews: jobSeekerCompleteMatches(jobSeekerUserId:$userId){ | ||
_id | ||
name | ||
description | ||
company{ | ||
_id | ||
name | ||
logoUrl | ||
} | ||
} | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export interface ICompetence { | ||
_id: string; | ||
skill: string; | ||
level: 'Basic' | 'Intermediate' | 'Advanced'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,19 @@ | ||
import { ICompany } from './Company'; | ||
import { IEducation } from './Education'; | ||
import { IUser } from './User'; | ||
import { ICompetence } from './Competence'; | ||
|
||
export interface IJob { | ||
_id: string; | ||
company: ICompany; | ||
name: string; | ||
description: string; | ||
location: string; | ||
typeofwork: number; | ||
salary: number; | ||
education: IEducation[]; | ||
jobSeekerInterest: IUser[]; | ||
companyInterest: IUser[]; | ||
completeJobSeekerMatch: IUser[]; | ||
} | ||
competence: ICompetence[]; | ||
} |
Oops, something went wrong.