Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@byu-oit/admissions-report-class

Package Overview
Dependencies
Maintainers
13
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@byu-oit/admissions-report-class

Two class definitions used to help format the code in various report handlers

  • 0.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
208
increased by40.54%
Maintainers
13
Weekly downloads
 
Created
Source

@byu-oit/admissions-report-class

Two class definitions used to help format metadata in various report handlers

Installation

npm install @byu-oit/admissions-report-class

Usage

const { Report } = require('@byu-oit/admissions-report-class')
// ...
exports.getMetaData = () => {
  return new Report('pathwayFieldSupportMissionaries')
    .description('Field Support Missionaries Contacts')
    .longDescription('Student contact information for field support missionaries.')
    .category('reports')
    .institutions('PW')
    .contentTypes('text/csv')
    .parameters('admitPeriod')
    .column('Application ID', '/detail-new/:value', 'link_app')
    .column('Pathway ID')
    .column('First Name', '', 'sort')
    .column('Surname', '', 'sort')
    .column('Phone Number')
    .column('Email Address')
    .column('Applicant Type', '', 'sort', 'filter')
    .column('Certificate Selected', '', 'sort', 'filter')
    .column('Application Start Date', '', 'sort', 'timestamp')
    .column('Application Submit Date', '', 'sort', 'timestamp')
    .column('Application Complete Date', '', 'sort', 'timestamp')
    .column('Admit Decision Date', '', 'sort', 'timestamp')
    .column('Admit Decision Details', '', 'sort', 'filter')
    .column('Application Status', '', 'sort', 'filter')
    .column('Admit Period', '', 'sort', 'filter')
    .column('Endorsement Status')
    .column('Transcripts')
    .column('Application Status Progress')
    .toJSON() // needed in some cases
}

Notes

  • The return value for 'institutions' is variablized, and will only be returned in the JSON if there is at least one value
  • In the member functions that accept a list of values, the (...values) syntax is used so pass in elements one at a time as separate parameters and not as a list/array (e.g. .institutions('PW', 'BYUH', 'BYUI') not .institutions(['PW', 'BYUH', 'BYUI']))
  • Columns in the report class, when transformed to JSON, will be auto assigned an ordinal value based on the order they are added to the class. The first value will be 1, the second 2, etc.
  • Be careful to use the member functions that accept multiple parameters (e.g. contentTypes() instead of contentType()). The former will accept multiple parameters, the latter will only accept one. If you try to add multiple parameters to a function that only accepts one, it won't throw an error, but it will only use the first parameter. which is probably not what you want. You can pass only one parameter into a function that accepts multiple parameters with no problems, so it's safe to use the plural version of the function even if you only have one parameter to pass in.

FAQs

Package last updated on 19 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc