Convert RewardsPage to TypeScript

What does this MR do and why?

Converts RewardsPage.vue and its spec RewardsPage.spec.js to TypeScript as part of the TypeScript migration epic (&33).

Closes #914

Changes

  1. Page:
    • Converted RewardsPage.vue to <script setup lang="ts">.
    • Properly typed table fields with TableField<Reward>[] from bootstrap-vue-next.
    • Updated admin permission check to const { isAdmin } = useVueData().
    • Strictly typed table cell slots using cell.item.
  2. Specs & Factories:
    • Renamed RewardsPage.spec.js to RewardsPage.spec.ts.
    • Created app/javascript/spec/factories/rewards.ts providing createReward and createPagedRewards factories following ADR 005.
    • Mocked client fetchRewards directly instead of mocking axios.get.
    • Compared generic BTable fields and items using .toHaveProperty(...).
  3. Behaviour changes:
    • Removed unused, invalid filterData reference in RewardsPage.vue which previously passed { currentPage: 1 } to UserWithGitLabProfileLink's { fromDate?: string; toDate?: string }.

MR Checklist

  • Follows the commit message guidelines.
  • Tests added / updated and passing (100% pass rate).
  • ESLint and vue-tsc typecheck pass cleanly with 0 errors.

Merge request reports

Loading
Loading