I was serious at WeWriteCode about making a PR to append the timesheet table widget with an ICS file so it could be saved to the user's phone calendar.
Should be adding or modifying with ics-js .
Min snippet to expose/wrap would be:
function(e) {
var t = o.default.tz(e.scheduleDay.StartTimestamp, "x", "America/Chicago"),
n = o.default.tz(e.scheduleDay.EndTimestamp, "x", "America/Chicago");
return r.default.createElement("tr", null, r.default.createElement("td", null, r.default.createElement("label", null, t.format("dddd")), t.format("M/DD") + " - " + t.format("h:mm"), r.default.createElement("span", {
className: "timesheetMeridiem"
}, " ", t.format("a"))), r.default.createElement("td", null, r.default.createElement("label", null, n.format("dddd")), n.format("M/DD") + " - " + n.format("h:mm"), r.default.createElement("span", {
className: "timesheetMeridiem"
}, " ", n.format("a"))))
}
Then inject the ICS file link at the bottom here:
function(e) {
return r.default.createElement(o.Table, {
className: "scheduleTable"
}, r.default.createElement("thead", null, r.default.createElement("tr", null, r.default.createElement("th", null, "Start"), r.default.createElement("th", null, "End"))), r.default.createElement("tbody", null, function(e) {
return e.employeeSchedule.ScheduledShifts.map(function(e) {
return r.default.createElement(a.default, {
key: e.StartTimestamp,
scheduleDay: e
})
})
}(e), r.default.createElement("tr", {
className: "rowTotal"
}, r.default.createElement("td", {
colSpan: "4"
}, e.employeeSchedule.GrandTotal, " ", r.default.createElement("span", {
className: "labelTotal"
}, "Total Hours")))))
}