Skip to content

Commit

Permalink
Merge branch 'master' into grioux/fixWingmanCredit
Browse files Browse the repository at this point in the history
  • Loading branch information
grioux-neo committed Jan 2, 2024
2 parents 4fec189 + 37c8853 commit 10d1b83
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions packages/client/src/pages/admin/pluggables/Reports.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -331,10 +331,10 @@ export const ReportsWidget = withFetchApi(
const wb = XLSX.utils.book_new();

let wsName = 'UnitInfo';
const wsDataEvent = spreadsheets.sqr6020XL();
const wsDataEvent = spreadsheets.sqr601XL();
let ws = XLSX.utils.aoa_to_sheet(wsDataEvent);
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
let sheet = spreadsheets.Formatsqr6020XL(ws);
let sheet = spreadsheets.Formatsqr601XL(ws);
XLSX.utils.book_append_sheet(wb, sheet, wsName);

wsName = 'CadetInfo';
Expand All @@ -344,7 +344,7 @@ export const ReportsWidget = withFetchApi(
// this.props.registry,
);
ws = XLSX.utils.aoa_to_sheet(wsDataAttendance);
sheet = spreadsheets.Formatsqr6020MembersXL(ws, widths, wsDataAttendance.length);
sheet = spreadsheets.Formatsqr601MembersXL(ws, widths, wsDataAttendance.length);
XLSX.utils.book_append_sheet(wb, sheet, wsName);

const now = new Date();
Expand Down
6 changes: 3 additions & 3 deletions packages/common-lib/src/renderers/spreadsheets/sqr601.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ const getHFZExpire = (reqs: CadetPromotionStatus): string =>
pipe(
get<CadetPromotionStatus, 'HFZRecord'>('HFZRecord'),
Maybe.filter(({ IsPassed }) => IsPassed || reqs.CurrentCadetAchv.CadetAchvID < 4),
Maybe.map(({ DateTaken }) => DateTaken.substr(0, 10)),
Maybe.map(s => +new Date(s) + 182 * 24 * 60 * 60 * 1000),
Maybe.map(s => new Date(s).toLocaleDateString('en-US')),
Maybe.map(({ DateTaken, IsPassed }) => [DateTaken.substr(0, 10), IsPassed] as const),
Maybe.map(([s, f]) => [+new Date(s) + 182 * 24 * 60 * 60 * 1000, f] as const),
Maybe.map(([s, f]) => new Date(s).toLocaleDateString('en-US') + (!f ? ' F' : '')),
Maybe.orSome(''),
)(reqs);

Expand Down

0 comments on commit 10d1b83

Please sign in to comment.