Options
All
  • Public
  • Public/Protected
  • All
Menu

Module orm_functions/project

Index

Functions

  • deleteProject(projectId: number): Promise<project>
  • Parameters

    • projectId: number

      the project that we are deleting from the project-table

    Returns Promise<project>

    return deleted project, with all its fields

  • deleteProjectByOsocEdition(osocId: number): Promise<BatchPayload>
  • Parameters

    • osocId: number

      the osoc id of all the projects we want to delete

    Returns Promise<BatchPayload>

    returns batch payload object, with holds count of number of deleted objects

  • deleteProjectByPartner(partner: string): Promise<BatchPayload>
  • Parameters

    • partner: string

      the partner of who we want to delete all the projects

    Returns Promise<BatchPayload>

    returns batch payload object, with holds count of number of deleted objects

  • deleteProjectFromDB(projectId: number): Promise<void>
  • This query executes a full delete of all data associated with the project. This includes all projectUser AND projectrole data that is associated with this project!

    Parameters

    • projectId: number

    Returns Promise<void>

    the deleted record from the person-table in a promise or an error in a promise if the person was not found

  • filterProjects(page: DBPagination, projectNameFilter: FilterString, clientNameFilter: FilterString, fullyAssignedFilter: FilterBoolean, osocYearFilter: undefined | number, projectNameSort: FilterSort, clientNameSort: FilterSort, userId: number): Promise<{ data: (project & { project_role: { positions: number; role: { name: string } }[]; project_user: { login_user: { is_coach: boolean; login_user_id: number } }[] })[]; pagination: { count: number; page: number } }>
  • Parameters

    • page: DBPagination

      current page and page size

    • projectNameFilter: FilterString

      project name that we are filtering on (or undefined if not filtering on name)

    • clientNameFilter: FilterString

      client name that we are filtering on (or undefined if not filtering on name)

    • fullyAssignedFilter: FilterBoolean

      fully assigned status that we are filtering on (or undefined if not filtering on assigned)

    • osocYearFilter: undefined | number
    • projectNameSort: FilterSort

      asc or desc if we want to sort on project name, undefined if we are not sorting on project name

    • clientNameSort: FilterSort

      asc or desc if we want to sort on client name, undefined if we are not sorting on client name

    • userId: number

      the id of the user who searches

    Returns Promise<{ data: (project & { project_role: { positions: number; role: { name: string } }[]; project_user: { login_user: { is_coach: boolean; login_user_id: number } }[] })[]; pagination: { count: number; page: number } }>

    the filtered students with their person data and other filter fields in a promise

  • getAllProjects(): Promise<project[]>
  • getProjectById(projectId: number): Promise<null | (project & { osoc: osoc })>
  • returns:

    object with all the info about this project

    Parameters

    • projectId: number

    Returns Promise<null | (project & { osoc: osoc })>

  • getProjectByName(projectName: string): Promise<project[]>
  • returns:

    object with all the info about this project

    Parameters

    • projectName: string

    Returns Promise<project[]>

  • getProjectYear(projectId: number): Promise<number>
  • getProjectsByEndDate(endDate: Date): Promise<project[]>
  • Parameters

    • endDate: Date

    Returns Promise<project[]>

    all the projects with a matching end date in the database

  • getProjectsByOsocEdition(osocId: number): Promise<project[]>
  • getProjectsByPartner(partner: string): Promise<project[]>
  • getProjectsByStartDate(startDate: Date): Promise<project[]>
  • Parameters

    • startDate: Date

    Returns Promise<project[]>

    all the projects with a matching start date in the database

  • getProjectsEndedAfterDate(date: Date): Promise<project[]>
  • getProjectsEndedBeforeDate(date: Date): Promise<project[]>
  • getProjectsStartedAfterDate(date: Date): Promise<project[]>
  • getProjectsStartedBeforeDate(date: Date): Promise<project[]>
  • Parameters

    • date: Date

    Returns Promise<project[]>

    all the projects that started before the supplied date

Generated using TypeDoc