Training Records List

URL: <base-url>/backend/hrc#/trainingrecords
Directory: VaahCms/Modules/HRC/Vue/pages/trainingrecords
Controller: VaahCms/Modules/HRC/Http/Controllers/Backend/TrainingRecordsController.php
Model: VaahCms/Modules/HRC/Models/EqTrainingRecord.php
Store: VaahCms/Modules/HRC/Vue/store/modules/store-trainingrecords.js

Description

The training Records list page lists all training records. As soon as a live training session is started a Job is created that starts syncing the ehm data stored in Fauna DB to the database in the eq_training_records table. This page shows the list of training records that are in the database and will also show the status of the syncing process.

Once the data is synced, whenever a user will select the race course as the data stored in Fauna DB does not contain the racecourse information. The first selection will be set as default for that particular record. Users will be able to change the racecourse afterwards.

Training Records

Purpose

  • To display the list of training records
  • To let users search and filter training records
  • To display the status of the training records
  • To let users select a default racecourse for the training record
  • To show unregistered records (for horses which do not have any training centers)

How it works?

  • onLoad method is called as soon as the page is loaded
  • onLoad calls the getAssets method
  • getAssets calls the getList method
  • getList method fetches the list of training records from the eq_training_records table.
  • The list will have a status field that has three states
    1. pending - When a record is created, but syncing job has not started
    2. syncing - When the records have values, therefore the syncing job has started for the record.
    3. synced - When all the collections from faunaDB has been synced
  • In the top right corner there will be a button named unregisterd records. If it is clicked, it will show the list of records that does not have any training center assoicated with it. Unregisterd Records

Assumptions

  • API is functional
  • The Vaah CMS queues are set

Acceptance Criteria

  • Should display the list of all training records
  • Should correctly display status
  • Should let users choose the racecourse if it is not already selected
  • If the training center only has one racecourse, that will be set as default and users don't have to choose.
  • On clicking unregistered records the list should only show records with no associated Training Centers.