Code Documentation

MainApp()

This is the main entry point after index.js The store and default route path are

Returns

App – - Directs to App component which based on authentication decides wheter to direct to login or authentication’;

ActivityBox(props)

Wraps provided components in a nice box

Arguments
  • props (props()) – visit, newVisit, lastWeekVisit, styleName

Returns

ActivityBoxComponent – returns a well styled div component

CardBox(props)

Uses the provided style, and data to present a nice card box

Arguments
  • props (props()) – heading, children, styleName, cardStyle, childrenStyle, headerOutside, headingStyle

Returns

CardBox – returns a well styled card

InfoCard()

This is the main entry point after index.js The store and default route path are

Returns

App – - Directs to App component which based on authentication decides wheter to direct to login or authentication’;

CheckList(props:)

CheckList component to choose an item from multiple options. For instance to choose different drones in drone control

Arguments
  • props: (props()) – abort function to take action on menu abortions

Returns

CheckList – - A checklist component to choose items;

CheckListItem(props)

A single item in a checklist containing a label with a checkbox

Arguments
  • props.name (string()) – name of the check parameter

  • props.onChange (function()) – function to change the state of checkbox ticked or unticked

Returns

Checkbox – - It returns a checkbox with a label

DroneListItem(props)

A single drone in the drone list containing a label with a radio

Arguments
  • props.drone.droneId (AlphaNumeric()) – a unique ID of a drone

  • props.drone.name (string()) – name of a drone

  • props.drone.type (string()) – type of drone such as quadcopter, vtol etc

Returns

DroneListItem – - It returns a checkbox with a label

DroneList(props)

A List of checks to be done before a drone is ready to fly

Arguments
  • props.abort (function()) – onclick function to abort the checks.

  • props.select (function()) – function to select a drone

  • props.drones (List()) – a list of drones

Returns

DroneList – - returns DroneListItem and buttons

ImsCard(props)

A single drone in the drone list containing a label with a radio

Arguments
  • props.type.type (string()) – category of medicine

  • props.type.name- (string()) – name of category

  • props.type.image (string()) – image of category

Returns

ImsCard – - It returns a card with text and image

MedicineDetails(props)

Details of a medicine and can be edited

Arguments
  • props.medicineName (string()) – name of medicine

  • props.medicineType- (string()) – type of medicine

  • props.medicineQuantity (string()) – quantity of medicines

Returns

MedicineDetails – - It returns an image, text and button

MissionListItem(props)

A single drone in the drone list containing a label with a radio

Arguments
  • props.mission._id (AlphaNumeric()) – a unique ID of a mission

  • props.mission.name (string()) – name of the mission

  • props.mission.wb (Integer()) – number of waypoints in the mission

  • props.mission.estimated_time (Integer()) – estimated time of completion of mission in a given speed

  • props.mission.distance (string()) – estimated time of completion of mission in a given speed

Returns

MissionListItem – - It returns a radio with a label

MissionList(props)

A List of missions to be selected to upload to a drone

Arguments
  • props.abort (function()) – onclick function to abort the selection of mission.

  • props.select (function()) – function to select a mission

Returns

MissionList – - returns MissionListItem and buttons