Training Comparison List
URL: <base-url>/backend/hrc#/trainingcomparision
Directory: VaahCms/Modules/HRC/Vue/pages/trainingcomparision
Controller: VaahCms/Modules/HRC/Http/Controllers/Backend/TrainingComparisionController.php
Model: VaahCms/Modules/HRC/Models/EqTrainingRecord.php
Store: VaahCms/Modules/HRC/Vue/store/modules/store-trainingcomparision.jsDescription
Just like the Training Records List page this page also shows the list of all training records, but allows user to select two records and compare load comparison.

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 let user select two records for comparison.
How it works?
onLoadmethod is called as soon as the page is loadedonLoadcalls thegetAssetsmethodgetAssetscalls thegetListmethodgetListmethod fetches the list of training records from theeq_training_recordstable.- The list will have a status field that has three states
pending- When a record is created, but syncing job has not startedsyncing- When the records have values, therefore the syncing job has started for the record.synced- When all the collections from faunaDB has been synced
- All records will have a
comparebutton. - When compare is clicked,
addSelectionmethod is called which adds the record toselected_itemdata variable. - When a record is in
selected_itemsthat record will displayed at the top of the list withremovebutton. - When remove is clicked
removeSelectionmethod is called. - if
selected_itemshave 2 or more items, then load records popup will appear and all compare buttons will be disabled
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 compare, the item should be moved to the top and button should change to
remove - Max 2 items should be able to compare, when two items are selected all other items must be disabled for comparison
- Load Records popup should appear when max items for comparison are selected.
Table of Contents