forked from scg-unibe-ch/ese2018-team2
-
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.
* Added Navigation button on org jobs * Overview displays application count * Redesigned org joboverview * Added checkbox toggling * Modeled OrganizationJob from model to graphql * Added Navigation button on org jobs * Overview displays application count * Redesigned org joboverview * Added checkbox toggling * Modeled OrganizationJob from model to graphql * Fix compilation and finish implementation
- Loading branch information
1 parent
cbc3842
commit 50fd5c2
Showing
23 changed files
with
497 additions
and
341 deletions.
There are no files selected for viewing
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
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
9 changes: 9 additions & 0 deletions
9
backend/applications/server/src/graphql/resolvers/OrganizationJob.ts
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,9 @@ | ||
import {OrganizationJobResolvers} from "../__generated__/graphqlgen"; | ||
|
||
const OrganizationJob: OrganizationJobResolvers.Type = { | ||
...OrganizationJobResolvers.defaultResolvers, | ||
applicationCount: ({id}, args, {jobApplicationRepository, session}) => | ||
jobApplicationRepository.applicationsCount(id, session), | ||
}; | ||
|
||
export default OrganizationJob; |
2 changes: 1 addition & 1 deletion
2
backend/applications/server/src/graphql/resolvers/_mutations/applyForJob.ts
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,6 +1,6 @@ | ||
import { MutationResolvers } from "../../__generated__/graphqlgen"; | ||
|
||
const applyForJob: MutationResolvers.ApplyForJobResolver = (_, args, ctx) => | ||
ctx.applicationRepository.applyForJob(args.jobId, ctx.session); | ||
ctx.jobApplicationRepository.applyForJob(args.jobId, ctx.session); | ||
|
||
export default applyForJob; |
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
2 changes: 1 addition & 1 deletion
2
backend/applications/server/src/graphql/resolvers/_queries/applications.ts
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,7 +1,7 @@ | ||
import { QueryResolvers } from "../../__generated__/graphqlgen"; | ||
|
||
const applications: QueryResolvers.ApplicationsResolver = (_, args, ctx) => { | ||
return ctx.applicationRepository.getApplications(args, ctx.session); | ||
return ctx.jobApplicationRepository.getApplications(args, ctx.session); | ||
}; | ||
|
||
export default applications; |
7 changes: 7 additions & 0 deletions
7
backend/applications/server/src/graphql/resolvers/_queries/applicationsForJob.ts
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,7 @@ | ||
import { QueryResolvers } from "../../__generated__/graphqlgen"; | ||
|
||
const applicationsForJob: QueryResolvers.ApplicationsForJobResolver = (_, args, ctx) => { | ||
return ctx.jobApplicationRepository.getApplicationsForJob(args.jobId, ctx.session); | ||
}; | ||
|
||
export default applicationsForJob; |
13 changes: 13 additions & 0 deletions
13
backend/applications/server/src/graphql/resolvers/_queries/getOrganizationJobs.ts
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,13 @@ | ||
import { QueryResolvers } from "../../__generated__/graphqlgen"; | ||
|
||
const getOrganizationJobs: QueryResolvers.GetOrganizationJobsResolver = ( | ||
_, | ||
args, | ||
ctx | ||
) => | ||
ctx.jobRepository.getOrganizationJobs( | ||
args.organizationId, | ||
ctx.session | ||
) as any; | ||
|
||
export default getOrganizationJobs; |
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
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 |
---|---|---|
@@ -1,98 +1,109 @@ | ||
import { JobRepository } from "@unijobs/backend-modules-repositories"; | ||
import { OrganizationRepository } from "@unijobs/backend-modules-repositories"; | ||
import { UserRepository } from "@unijobs/backend-modules-repositories"; | ||
import { JobApplicationRepository } from "@unijobs/backend-modules-repositories"; | ||
import { SkillRepository } from "@unijobs/backend-modules-repositories"; | ||
import {JobRepository} from "@unijobs/backend-modules-repositories"; | ||
import {OrganizationRepository} from "@unijobs/backend-modules-repositories"; | ||
import {UserRepository} from "@unijobs/backend-modules-repositories"; | ||
import {JobApplicationRepository} from "@unijobs/backend-modules-repositories"; | ||
import {SkillRepository} from "@unijobs/backend-modules-repositories"; | ||
|
||
export interface Context { | ||
jobRepository: JobRepository; | ||
organizationRepository: OrganizationRepository; | ||
userRepository: UserRepository; | ||
applicationRepository: JobApplicationRepository; | ||
skillRepository: SkillRepository; | ||
session?: Express.Session; | ||
jobRepository: JobRepository; | ||
organizationRepository: OrganizationRepository; | ||
userRepository: UserRepository; | ||
jobApplicationRepository: JobApplicationRepository; | ||
skillRepository: SkillRepository; | ||
session?: Express.Session; | ||
} | ||
|
||
export interface Organization { | ||
id: string; | ||
name: string; | ||
email: string; | ||
phone: string; | ||
approved: boolean; | ||
jobs: Promise<any[]>; | ||
id: string; | ||
name: string; | ||
email: string; | ||
phone: string; | ||
approved: boolean; | ||
jobs: Promise<any[]>; | ||
} | ||
|
||
export interface Job { | ||
id: string; | ||
title: string; | ||
description: string; | ||
salary: number; | ||
organization: any; | ||
id: string; | ||
title: string; | ||
description: string; | ||
salary: number; | ||
organization: any; | ||
} | ||
|
||
export interface OrganizationJob { | ||
id: string; | ||
title: string; | ||
description: string; | ||
salary: number; | ||
applied: boolean; | ||
organization: any; | ||
applicationCount: number; | ||
} | ||
|
||
export interface AggregationBucket { | ||
key: string; | ||
count: number; | ||
label: string; | ||
key: string; | ||
count: number; | ||
label: string; | ||
} | ||
|
||
export interface SearchAggregation { | ||
id: string; | ||
value: string; | ||
id: string; | ||
value: string; | ||
} | ||
|
||
export interface SearchConnection { | ||
nodes: any[]; | ||
buckets: any[]; | ||
aggregations: any[]; | ||
nodes: any[]; | ||
buckets: any[]; | ||
aggregations: any[]; | ||
} | ||
|
||
export interface JobConnection { | ||
nodes: Job[]; | ||
pageInfo: JobPageInfo; | ||
totalCount: number; | ||
nodes: Job[]; | ||
pageInfo: JobPageInfo; | ||
totalCount: number; | ||
} | ||
|
||
export interface JobPageInfo { | ||
endCursor: string | null; | ||
hasNextPage: boolean; | ||
hasPreviousPage: boolean; | ||
startCursor: string | null; | ||
endCursor: string | null; | ||
hasNextPage: boolean; | ||
hasPreviousPage: boolean; | ||
startCursor: string | null; | ||
} | ||
|
||
export interface Skill { | ||
id: string; | ||
title: string; | ||
description: string; | ||
id: string; | ||
title: string; | ||
description: string; | ||
} | ||
|
||
export interface User { | ||
id: string; | ||
firstname: string; | ||
lastname: string; | ||
email: string; | ||
phone: string; | ||
siteAdmin: boolean; | ||
hasOrganizations: boolean; | ||
isStudent: boolean; | ||
id: string; | ||
firstname: string; | ||
lastname: string; | ||
email: string; | ||
phone: string; | ||
siteAdmin: boolean; | ||
hasOrganizations: boolean; | ||
isStudent: boolean; | ||
} | ||
|
||
export interface StudentProfile { | ||
id: string; | ||
student: User; | ||
studyProgram: string; | ||
university: string; | ||
id: string; | ||
student: User; | ||
studyProgram: string; | ||
university: string; | ||
} | ||
|
||
export interface JobApplication { | ||
id: string; | ||
state: JobApplicationState; | ||
user: any; | ||
job: Job; | ||
id: string; | ||
state: JobApplicationState; | ||
user: any; | ||
job: Job; | ||
} | ||
|
||
export interface JobAutocompletion { | ||
id: string; | ||
title: string; | ||
id: string; | ||
title: string; | ||
} | ||
|
||
export type JobApplicationState = "PENDING" | "REJECTED" | "APPROVED"; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.