Skip to content

Commit

Permalink
docs: improve jsdoc base on new v25 jsdoc eslint
Browse files Browse the repository at this point in the history
see #330
  • Loading branch information
BenMaruchu committed May 9, 2020
1 parent 452f848 commit 9b5a1af
Show file tree
Hide file tree
Showing 30 changed files with 183 additions and 52 deletions.
3 changes: 3 additions & 0 deletions src/Auth/components/ChangePassword/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ const formItemLayout = {

/**
* @function
* @param props.user
* @param props.posting
* @param props.onCancel
* @name ChangePasswordForm
* @description Change password form to allow current logged in user to update password
* @param {object} props Change Password form props
Expand Down
3 changes: 2 additions & 1 deletion src/Auth/components/SignIn/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ import './styles.css';

/**
* @function
* @param props.loading
* @param props.history
* @name SignInForm
* @description Sign In form component
*
* @param {object} props React props
* @returns {object} Sign In Form
* @version 0.1.0
Expand Down
2 changes: 2 additions & 0 deletions src/Dashboards/EventsOverview.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ const generateColumnsFor = (name, titles) => {

/**
* @function
* @param props.report
* @param props.loading
* @name EventsOverviewDashboard
* @description Events Overview Dashboard
* @param {object} props Event Overview dashboard props
Expand Down
2 changes: 2 additions & 0 deletions src/Dashboards/Overview.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ const { getOverviewsReport } = reduxActions;

/**
* @function
* @param props.report
* @param props.loading
* @name OverviewDashboard
* @description Dashboard which renders overviews reports from different dashboards
* i.e stakeholders, events
Expand Down
4 changes: 4 additions & 0 deletions src/Events/Events/ChangelogForm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ const formItemLayout = {

/**
* @function
* @param props.event
* @param props.posting
* @param props.onCancel
* @param props.action
* @name EventChangelogForm
* @description Render Event form for creating and updating stakeholder
* event details
Expand Down
59 changes: 47 additions & 12 deletions src/Events/Events/DetailsView/Body.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,14 @@ const { Paragraph, Text } = Typography;

/**
* @function
* @param props.event
* @param props.openForm
* @param props.onEdit
* @param props.onShare
* @param props.openIndicatorDashboard
* @param props.onContent
* @name EventToolbar
* @description List of actions user can perform on a particular event
*
* @param {object} props React props
* @returns {object} React component
* @version 0.1.0
Expand Down Expand Up @@ -218,10 +223,10 @@ const EventToolbar = ({

/**
* @function
* @param props.cause
* @name EventCause
* @description Display Event Cause
* @param {object} props React props
*
* @returns {object} React component
* @version 0.1.0
* @since 0.1.0
Expand All @@ -237,12 +242,12 @@ const EventCause = ({ cause }) => {

/**
* @function
* @param props.title
* @param props.actions
* @name EventDetailsSectionHeader
* @description Header section for event details drawer
*
* @param {object} props React props
* @returns {object} React component
*
* @version 0.1.0
* @since 0.1.0
*/
Expand All @@ -256,10 +261,12 @@ export const EventDetailsSectionHeader = ({ title, actions }) => {
};

/**
* @param root0
* @param root0.areas
* @param root0.openForm
* @function
* @name EventLocations
* @description Section which show event location(s) in hierarchy
*
* @returns {object} React component
* @version 0.1.0
* @since 0.1.0
Expand Down Expand Up @@ -288,10 +295,11 @@ export const EventLocations = ({ areas = [], openForm }) => {
};

/**
* @param root0
* @param root0.places
* @function
* @name EventPlaces
* @description Section which show event affected place(s) in hierarchy
*
* @returns {object} React component
* @version 0.1.0
* @since 0.1.0
Expand All @@ -308,6 +316,8 @@ export const EventPlaces = ({ places = '' }) => {

/**
* @function
* @param props.actions
* @param props.openForm
* @name EventActionsTaken
* @description Section which show actions taken per event
* @param {object} props Event action taken props
Expand Down Expand Up @@ -345,10 +355,12 @@ export const EventActionsTaken = ({ actions = [], openForm }) => {
};

/**
* @param root0
* @param root0.agencies
* @param root0.openForm
* @function
* @name EventRespondingAgencies
* @description Section which show event responding agencies
*
* @returns {object} React component
* @version 0.1.0
* @since 0.1.0
Expand Down Expand Up @@ -381,10 +393,12 @@ export const EventRespondingAgencies = ({ agencies = [], openForm }) => {
};

/**
* @param root0
* @param root0.focalPeople
* @param root0.openForm
* @function
* @name EventRespondingFocalPeople
* @description Section which show event responding agencies
*
* @returns {object} React component
* @version 0.1.0
* @since 0.1.0
Expand Down Expand Up @@ -422,6 +436,8 @@ export const EventRespondingFocalPeople = ({ focalPeople = [], openForm }) => {

/**
* @function
* @param props.initiator
* @param props.date
* @name EventFeedItemHeader
* @description Render Event feed item header
* @param {object} props Component props
Expand All @@ -439,10 +455,11 @@ const EventFeedItemHeader = ({ initiator, date }) => {
};

/**
* @param root0
* @param root0.openForm
* @function
* @name EventImpact
* @description Display Event impact based on indicators
*
* @returns {object} Event Impact Component
* @version 0.1.0
* @since 0.1.0
Expand Down Expand Up @@ -482,6 +499,8 @@ const EventImpact = ({ openForm }) => {

/**
* @function
* @param props.gaps
* @param props.openForm
* @name EventGaps
* @description Event Gaps and Constraints
* @param {object} props React components props
Expand Down Expand Up @@ -518,6 +537,8 @@ const EventGaps = ({ gaps = [], openForm }) => {

/**
* @function
* @param props.recommendations
* @param props.openForm
* @name EventRecommendations
* @description Event Recommendations and Remarks
* @param {object} props React components props
Expand Down Expand Up @@ -720,9 +741,11 @@ const renderFeed = (feed) => {

/**
* @function
* @param props.feeds
* @param props.loading
* @param props.hasMore
* @name EventFeed
* @description A list of activities(feeds) happening on a particular event
*
* @param {object} props React props
* @returns {object} React component
* @version 0.1.0
Expand Down Expand Up @@ -764,6 +787,10 @@ export const EventFeed = ({ feeds = [], loading, hasMore }) => {

/**
* @function
* @param props.type
* @param props.description
* @param props.number
* @param props.reportedDate
* @name PrintedEventDetails
* @description This is event details section which will be visible on printed
* report only
Expand Down Expand Up @@ -793,9 +820,17 @@ const PrintedEventDetails = ({ type, description, number, reportedDate }) => {

/**
* @function
* @name EventDetailsViewBody
* @param props.event
* @param props.showForm
* @param props.posting
* @param props.changelogs
* @param props.loading
* @param props.hasMore
* @param props.onEdit
* @param props.onShare
* @param props.eventPosting
* @name EventDetailsViewBody
* @description Event Details body view
*
* @param {object} props React props
* @returns {object} React component
* @version 0.1.0
Expand Down
7 changes: 4 additions & 3 deletions src/Events/Events/DetailsView/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ const { Text } = Typography;

/**
* @function
* @param props.number
* @param props.type
* @param props.description
* @param props.stage
* @name EventDetailsViewHeader
* @description Event Details header for drawer
*
* @param {object} props React props
*
* @returns {object} React component
*
* @version 0.1.0
* @since 0.1.0
*/
Expand Down
6 changes: 6 additions & 0 deletions src/Events/Events/Form/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ const formItemLayout = {

/**
* @function
* @param props.isEditForm
* @param props.defaultStage
* @param props.stages
* @param props.event
* @param props.posting
* @param props.onCancel
* @name EventForm
* @description Event Form component for creating and editing event
* @param {object} props React props
Expand Down
4 changes: 4 additions & 0 deletions src/GeographicalFeatures/AdministrativeLevels/Form/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ const formItemLayout = {

/**
* @function
* @param props.administrativeLevel
* @param props.isEditForm
* @param props.posting
* @param props.onCancel
* @name AdministrativeLevelForm
* @description Administrative Level Form
* @param {object} props React props
Expand Down
4 changes: 1 addition & 3 deletions src/GeographicalFeatures/EvacuationCenters/List/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@ import EvacuationCenterListItem from '../ListItem';
* @function
* @name EvacuationCenterList
* @description Render Evacuation Center list
*
* @param {object} props props object
* @param props.evacuationCenters
* @param {boolean} props.loading preload list of Evacuation Center
* @param {Array} props.districts array list of Evacuation Center
* @param {Function} props.onEdit function for editing Evacuation Center
*
* @returns {object} React component
*
* @version 0.1.0
* @since 0.1.0
*/
Expand Down
4 changes: 1 addition & 3 deletions src/GeographicalFeatures/Facilities/List/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@ import FacilityListItem from '../ListItem';
* @function
* @name FacilityList
* @description Render facilities list
*
* @param {object} props props object
* @param props.facilities
* @param {boolean} props.loading preload list of facilities
* @param {Array} props.districts array list of facilities
* @param {Function} props.onEdit function for editing facilities
*
* @returns {object} React Component
*
* @version 0.1.0
* @since 0.1.0
*/
Expand Down
4 changes: 4 additions & 0 deletions src/GeographicalFeatures/FeatureTypes/Form/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ const formItemLayout = {

/**
* @function
* @param props.featureType
* @param props.isEditForm
* @param props.posting
* @param props.onCancel
* @name FeatureTypeForm
* @description Feature Type Form
* @param {object} props React props
Expand Down
4 changes: 1 addition & 3 deletions src/GeographicalFeatures/Infrastructure/List/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@ import CriticalInfrastructureListItem from '../ListItem';
* @function
* @name CriticalInfrastructureList
* @description Render Critical Infrastructure list
*
* @param {object} props props object
* @param props.criticalInfrastructures
* @param {boolean} props.loading preload list of Critical Infrastructure
* @param {Array} props.districts array list of Critical Infrastructure
* @param {Function} props.onEdit function for editing Critical Infrastructure
*
* @returns {object} React component
*
* @version 0.1.0
* @since 0.1.0
*/
Expand Down
6 changes: 3 additions & 3 deletions src/GeographicalFeatures/Warehouses/List/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import WarehouseListItem from '../ListItem';

/**
* @function
* @param props.warehouses
* @param props.loading
* @param props.onEdit
* @name WarehouseList
* @description Render warehouse list which have search box and actions
*
* @param {object} props props object
*
* @returns {object} React Compnent
*
* @version 0.1.0
* @since 0.1.0
*/
Expand Down
4 changes: 4 additions & 0 deletions src/Stakeholders/AgenciesOwnerships/Form/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ const formItemLayout = {

/**
* @function
* @param props.partyOwnership
* @param props.isEditForm
* @param props.posting
* @param props.onCancel
* @name PartyOwnershipForm
* @description Render form for creating and editing party ownerships
* @param {object} props PartyOwnershipForm props
Expand Down
4 changes: 4 additions & 0 deletions src/VehicleDispatches/VehicleMakes/Form/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ const formItemLayout = {

/**
* @function
* @param props.vehicleMake
* @param props.isEditForm
* @param props.posting
* @param props.onCancel
* @name VehicleMakeForm
* @description Render form for creating and editing vehicle makes
* @param {object} props VehicleMakeForm props
Expand Down
4 changes: 4 additions & 0 deletions src/VehicleDispatches/VehicleModels/Form/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ const formItemLayout = {

/**
* @function
* @param props.vehicleModel
* @param props.isEditForm
* @param props.posting
* @param props.onCancel
* @name VehicleModelForm
* @description Render form for creating and editing party ownerships
* @param {object} props VehicleModelForm props
Expand Down
Loading

0 comments on commit 9b5a1af

Please sign in to comment.