Closed chris-dare closed 1 year ago
Great thanks.
Why do we need to fetch the list of clients from a google sheet? Why not directly from the database?
@Rejoice Hormeku
@lewis here's the link to the list of corporate clients. Please use the values under the Name column.
https://drive.google.com/file/d/1rpoQzxxDu9iJdZcPzj2O4noYQxEhmXDh/view?usp=drivesdk
Done, please have a review
@Rejoice Hormeku please update this issue with a description of what we want to achieve
Issue description
HR administrators should be able to view a summary of their corporate spend with insights into utilization
Loom video: N/A
Integration Code @lewis
// you will need to install via 'npm install jsonwebtoken' or in your package.json
var jwt = require("jsonwebtoken");
var METABASE_SITE_URL = "https://serenity.metabaseapp.com";
var METABASE_SECRET_KEY = "ea34aba3f1c92e1e203cedf362e8d3b86f236124cc27fa1854d4d0e24a29946f";
var payload = {
resource: { dashboard: 36 },
params: {
},
exp: Math.round(Date.now() / 1000) + (10 * 60) // 10 minute expiration
};
var token = jwt.sign(payload, METABASE_SECRET_KEY);
var iframeUrl = METABASE_SITE_URL + "/embed/dashboard/" + token + "#bordered=true&titled=true";
In Frontend:
<iframe
/>
Acceptance criteria / Steps to verify
How to resolve (Proposition)
Given a sample company, we calculate the total amount spent by its employees so far against the what is allocated as premium.
Formula to calculate premium:
Product (AVG number of visits by employees, Max spend per visit, total number of registered employees)
Utilisation Formula
Sum(total amount spent on all employee visits)
External / 3rd Party dependencies identified
This may depend on metabase being available
From SyncLinear.com | SER-266