Module: report-generator

This module provides function for reports generation.
Version:
  • 1.0
Author:
  • Luka Kralj

Methods


<inner> getDate(month)

Transforms string into a valid date in that month.
Parameters:
Name Type Description
month string
Returns:
Type
Date

<inner> getMonthlyReport(data)

Generate HTML for a monthly report with the given data.
Parameters:
Name Type Description
data JSON Report specific data.
Returns:
HTML formatted string.
Type
string

<async, inner> getReport(month, actionUsername)

Generate monthly report for a particular month.
Parameters:
Name Type Description
month string
actionUsername string User who requested the report
Returns:
{success:Boolean, html: string}
Type
JSON

<inner> getYearlyReport(data)

Generate HTML for a yearly report with the given data.
Parameters:
Name Type Description
data JSON Report specific data.
Returns:
HTML formatted string.
Type
string