Documentation_Trainers_2 - revaturelabs/assignforce-force GitHub Wiki

This document is for detailing scripts related to Trainers.

Relevant Scripts

Classes

  • afAvailListContainerApexController.cls
    • Even though the name is slightly different, this Apex Controller is for the afAvailabilityListContainer Lightning Component.
  • afNewBatchFormApexController.cls
    • Controller did not have anything added to it, but there should be edits to this in later iterations.
  • afExtTrainersTabListViewApexController.cls
    • Controller used for querying all trainers and getting their skills.
  • afExtTrainerBatchesApexController.cls
    • class for dealing with batches. Right now it just displays, but functionality to delete or update the batches would be cool.

Lightning Components

  • afNewBatchAndAvailabilityComponents
    • afNewBatchAndAvailabilityComponents.cmp
  • afAvailabilityListContainer
    • afAvailabilitiyListContainer.cmp
    • afAvailabilityListContainer.css
    • afAvailabilityListContainerController.js
  • afNewBatchForm
    • afNewBatchForm.cmp
      • External Trainer field was added. Provides a value to the External_Trainer__c field in Trainings.
    • afNewBatchForm.css
    • afNewBatchFormController.js
      • Added the External_Trainer__c field to onSuccess for adding it to a new batch.
    • afNewBatchFormHelper.js
      • Added a line in the clear function to remove a value in the field when the 'x' button is selected.
  • afExtTrainersTabListView
    • afExtTrainersTabListView.cmp
      • Builds a container for displaying all of the External Trainers in a list.
    • afExtTrainersTabListView.css
    • afExtTrainersTabListViewController.js
      • Contains an action to call the apex controller to get the list of trainers
    • afExtTrainersTabListViewHelper.js
      • gets required data, similar to the list view item helper.
  • afExtTrainersTabBatches
    • afExtTrainerTabBatches.cmp
      • Component that displays current and ongoing batch information for an external trainer.
    • afExtTrainersTabBatches.css
    • afExtTrainersTabBatchesController.js
      • sets a recordset for fields
    • afExtTrainersTabBatchesHelper.js
      • Allows to get data, modify data, and add the data to the array.
  • afExtTrainersTabListViewItem
    • afExtTrainersTabListViewItem.cmp
      • Component to iteratively display external trainers in rows, calls a select button as well as displays data.
    • afExtTrainersTabListViewItem.css
    • afExtTrainersTabListViewItemController.js
      • Controller to display data, and include select button functionality.

Events

  • name=ExternalTrainerId: fired by afExternalTrainersTabListViewItem component to bring a specific Id to be handled in afExternalTrainerTabBatches

Details

afNewBatchAndAvailabilityComponents

This is the component that will be displayed on the Batch tab on the Org. This component calls afNewBatchForm and afAvailabilityListContainer.

afNewBatchForm

This component is the New Batch Form displayed on the left side of the Batch tab. This component is used in conjunction with afAvailabilityListContainer to allow Users to easily schedule a new Training__c record. Note that Batch and Training__c can be used interchangably; Batch is the term used by Revature while Training__c is the custom object used to represent it.

afAvailibilityListContainer

This component is a 2-tab component that displays a sorted list of Trainers (Users with Trainer Profile and Role) in 1 tab and a sorted list of Rooms__c in the other. The list of Trainers are sorted in order of Available, Experience, and Location. A Trainer is experienced if they have a Skill__c that matches the Training Track selected in the New Batch Form. The tiers are as follows:

  1. Available, Experienced, and At Location
  2. Available and Experienced
  3. Available and At Location
  4. Available
  5. Not Available

afExtTrainersTabListView

afExtTrainersTabBatches

afExtTrainersTabListViewItem

ExternalTrainerSelected Event