1.0.2 • Published 14 days ago

@cityssm/avanti-time-data-parser v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
14 days ago

node-avanti-time-data-parser

npm (scoped) DeepSource Maintainability codecov Coverage Testing

Parses the time data Excel report from Avanti into a JavaScript object.

Helpful when building an external process for supervisors to approve time entered by time entry clerks.

Time Data in Excel

Installation

npm install @cityssm/avanti-time-data-parser

Usage

import { parseTimeData } from '@cityssm/avanti-time-data-parser'

const timeData = parseTimeData('timesheet.xlsx')

console.log(timeData)

/*
{
  "dateMin": "2024/01/07",
  "dateMax": "2024/01/20",
  "timeData": {
    "12345": {
      "employeeNumber": "12345",
      "employeeName": "MARIO, MARIO",
      "payCodes": {
        "REG": {
          "payCode": "REG",
          "payCodeDescription": "Regular Earnings",
          "hours": {
            "2024/01/08": 7,
            "2024/01/09": 5,
            "2024/01/10": 4,
            "2024/01/11": 7,
            "2024/01/12": 7,
            "2024/01/15": 8.5,
            "2024/01/16": 7,
            "2024/01/17": 4,
            "2024/01/18": 7,
            "2024/01/19": 7
          }
        },
        "SK": {
          ...
        },
        "SB": {
          ...
        },
        "VAC": {
          ...
        }
      }
    },
    "12346": {
      ...
    }
  },
  "approvedTimeData": {
    "12345": {
      ...
    },
    "12346": {
      ...
    }
  }
}
*/
1.0.2

14 days ago

1.0.1

14 days ago

1.0.0

15 days ago

0.2.0

3 months ago

0.1.0

3 months ago