Skip to content

Commit

Permalink
BRS-652 updated CSV report (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
cameronpettit authored Sep 14, 2022
1 parent 4c7d808 commit 64cb94f
Show file tree
Hide file tree
Showing 3 changed files with 312 additions and 23 deletions.
163 changes: 155 additions & 8 deletions lambda/export/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,25 @@ const CSV_SYSADMIN_SCHEMA = [
width: 63,
value: (report) => report.otherRevenueGrossSani,
},
{
column: "Frontcountry Camping - Other - Net sani revenue",
type: Number,
width: 63,
backgroundColor: "#aee5ba",
value: (report) => report.calc_frontCountryCamping_other_sani_netRevenue,
},
{
column: "Frontcountry Camping - Other - Gross electrical fee revenue",
type: Number,
width: 63,
value: (report) => report.otherRevenueGrossSani,
value: (report) => report.otherRevenueElectrical,
},
{
column: "Frontcountry Camping - Other - Net electrical fee revenue",
type: Number,
width: 63,
backgroundColor: "#aee5ba",
value: (report) => report.calc_frontCountryCamping_other_electrical_netRevenue,
},
{
column: "Frontcountry Camping - Other - Gross shower revenue",
Expand All @@ -179,11 +193,11 @@ const CSV_SYSADMIN_SCHEMA = [
value: (report) => report.otherRevenueShower,
},
{
column: "Frontcountry Camping - Other - Net revenue",
column: "Frontcountry Camping - Other - Net shower revenue",
type: Number,
width: 63,
backgroundColor: "#aee5ba",
value: (report) => report.calc_frontCountryCamping_other_totalAttendance,
value: (report) => report.calc_frontCountryCamping_other_shower_netRevenue,
},
// Frontcountry Camping - Variance Notes
{
Expand Down Expand Up @@ -307,6 +321,48 @@ const CSV_SYSADMIN_SCHEMA = [
backgroundColor: "#fff3cd",
value: (report) => report.notes_groupCamping,
},
// Group Camping Totals
{
column: "Group Camping Total Attendance (People)",
type: Number,
width: 63,
backgroundColor: "#c7e3fd",
value: (report) => report.calc_groupCamping_totalPeople,
},
{
column: "Gross Total Group Camping Revenue",
type: Number,
width: 63,
value: (report) => report.calc_groupCamping_totalGrossRevenue,
},
{
column: "Net Total Group Camping Revenue",
type: Number,
width: 63,
backgroundColor: "#aee5ba",
value: (report) => report.calc_groupCamping_totalNetRevenue,
},
// Frontcountry Totals
{
column: "Total Frontcountry Attendance (People)",
type: Number,
width: 63,
backgroundColor: "#c7e3fd",
value: (report) => report.calc_frontcountry_totalAttendancePeople,
},
{
column: "Total Frontcountry Gross Revenue",
type: Number,
width: 63,
value: (report) => report.calc_frontcountry_totalGrossRevenue,
},
{
column: "Total Frontcountry Net Revenue",
type: Number,
width: 63,
backgroundColor: "#aee5ba",
value: (report) => report.calc_frontcountry_totalNetRevenue,
},
// Day Use - People and Vehicles
{
column: "Day Use - People and Vehicles - Trail count",
Expand All @@ -327,7 +383,7 @@ const CSV_SYSADMIN_SCHEMA = [
value: (report) => report.peopleAndVehiclesBus,
},
{
column: "Day Use - People and Vehicles - Vehicle attendance",
column: "Day Use - People and Vehicles - Total Attendance (People)",
type: Number,
width: 63,
backgroundColor: "#c7e3fd",
Expand All @@ -340,6 +396,13 @@ const CSV_SYSADMIN_SCHEMA = [
width: 63,
value: (report) => report.picnicRevenueShelter,
},
{
column: "Day Use - Picnic Shelters - Picnic shelter people",
type: Number,
width: 63,
backgroundColor: "#c7e3fd",
value: (report) => report.picnicShelterPeople,
},
{
column: "Day Use - Picnic Shelters - Gross picnic revenue",
type: Number,
Expand All @@ -355,16 +418,16 @@ const CSV_SYSADMIN_SCHEMA = [
},
// Day Use - Other Day Use
{
column: "Day Use - Other Day Use - Gross skiing revenue",
column: "Day Use - Hot Springs - Gross hot springs revenue",
type: Number,
width: 63,
value: (report) => report.otherDayUseRevenueSkii,
value: (report) => report.otherDayUseRevenueHotSprings,
},
{
column: "Day Use - Other Day Use - Gross hot springs revenue",
column: "Day Use - Hot Springs - Hot springs people",
type: Number,
width: 63,
value: (report) => report.otherDayUseRevenueHotSprings,
value: (report) => report.otherDayUsePeopleHotSprings,
},
{
column: "Day Use - Other Day Use - Net revenue",
Expand All @@ -381,6 +444,27 @@ const CSV_SYSADMIN_SCHEMA = [
backgroundColor: "#fff3cd",
value: (report) => report.notes_dayUse,
},
// Day Use Totals
{
column: "Day Use Total Attendance (People)",
type: Number,
width: 63,
backgroundColor: "#c7e3fd",
value: (report) => report.calc_dayUse_totalAttendancePeople,
},
{
column: "Day Use Gross Revenue",
type: Number,
width: 63,
value: (report) => report.calc_dayUse_totalGrossRevenue,
},
{
column: "Day Use Net Revenue",
type: Number,
width: 63,
backgroundColor: "#aee5ba",
value: (report) => report.calc_dayUse_totalNetRevenue,
},
// Backcountry Camping - People
{
column: "Backcountry Camping - People - People",
Expand Down Expand Up @@ -458,6 +542,48 @@ const CSV_SYSADMIN_SCHEMA = [
backgroundColor: "#fff3cd",
value: (report) => report.notes_backcountryCabins,
},
// Backcountry Totals
{
column: "Total Backcountry Attendance (People)",
type: Number,
width: 63,
backgroundColor: "#c7e3fd",
value: (report) => report.calc_backcountry_totalAttendancePeople,
},
{
column: "Total Backcountry Gross Revenue",
type: Number,
width: 63,
value: (report) => report.calc_backcountry_totalGrossRevenue,
},
{
column: "Total Backcountry Net Revenue",
type: Number,
width: 63,
backgroundColor: "#aee5ba",
value: (report) => report.calc_backcountry_totalNetRevenue,
},
// Camping totals
{
column: "Total Camping Attendance (People)",
type: Number,
width: 63,
backgroundColor: "#c7e3fd",
value: (report) => report.calc_totalCampingAttendancePeople,
},
{
column: "Total Camping Gross Revenue",
type: Number,
width: 63,
value: (report) => report.calc_totalCampingGrossRevenue,
},
{
column: "Total Camping Net Revenue",
type: Number,
width: 63,
backgroundColor: "#aee5ba",
value: (report) => report.calc_totalCampingNetRevenue,
},
// Boating - Boats
{
column: "Boating - Boats - Nights on dock",
Expand Down Expand Up @@ -505,6 +631,27 @@ const CSV_SYSADMIN_SCHEMA = [
backgroundColor: "#fff3cd",
value: (report) => report.notes_boating,
},
// Overall Totals
{
column: "Total Attendance",
type: Number,
width: 63,
backgroundColor: "#c7e3fd",
value: (report) => report.calc_totalAttendancePeople,
},
{
column: "Total Gross Revenue",
type: Number,
width: 63,
value: (report) => report.calc_totalGrossRevenue,
},
{
column: "Total Net Revenue",
type: Number,
width: 63,
backgroundColor: "#aee5ba",
value: (report) => report.calc_totalNetRevenue,
},
];

module.exports = {
Expand Down
Loading

0 comments on commit 64cb94f

Please sign in to comment.