arena-plugin-reports

1.0.1 • Public • Published

arena-plugin-reports

Installation

npm i arena-plugin-reports

Example

import Reports from 'arena-plugin-reports'
 
return (
  <div>
    <Reports
      bannerRows={bannerRows}
      hostCountry={hostCountry}
      reportTemplate={reportTemplate}
      tableRows={tableRows}
    />
  </div>
)

Component

arena-plugin-reports consists of one component.

<Reports />

bannerRows: array

required

Example:

[
  {
    "id": 1,
    "name": "Compensation_TotalAllowances",
    "title": "Total Allowances",
    "values": {
      "2017": 10768,
      "2018": 10768
    },
    "total": 21536,
    "currencyCode": "CAD"
  }
]

tableRows: array

required

Example:

[
  {
    "id": 1,
    "name": "Compensation_BaseSalary",
    "title": "Base Salary",
    "values": {
      "2017": 161520,
      "2018": 161520
    },
    "total": 323040,
    "currencyCode": "CAD"
  }
]

reportTemplate: object

required

Example:

{
  "summary": [
    {
      "id": "Summary",
      "name": "Summary",
      "rows": [
        {
          "rowName": "Compensation_TotalAllowances",
          "collapsed": false
        }
      ]
    }
  ],
  "detail": [
    {
      "id": "Base_Compensation",
      "name": "Base Compensation",
      "rows": [
        {
          "rowName": "Compensation_BaseSalary",
          "collapsed": false
        }
      ]
    }
  ]
}

hostCountry: string

required

The ISO code used to display the country banner image at the top of the Report.

links: array

default: []

Displays links in the top right hand corner of report.

Example:

[
  {
    action: () => downloadReport('Details'),
    icon: 'download',
    text: 'Details',
  },
  {
    action: () => downloadReport('Summary'),
    icon: 'download',
    text: 'Summary',
  },
]
 

buttons: array

default: []

Displays buttons on the bottom of report.

Example:

[
  {
    action: () => edit(),
    text: 'Edit',
  },
  {
    action: () => startNewMove(),
    text: 'Start new move',
  },
]
 

Readme

Keywords

none

Package Sidebar

Install

npm i arena-plugin-reports

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

9.34 MB

Total Files

146

Last publish

Collaborators

  • jennaprovazek
  • mibgs
  • vangelis.b