Skip to content

Commit

Permalink
type ProcessMeasurementsListContent
Browse files Browse the repository at this point in the history
  • Loading branch information
nafiz1001 committed Dec 20, 2024
1 parent 890310c commit 87e4a6f
Showing 1 changed file with 35 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,35 @@ const getTableColumns = (protocols) => [
},
];

/**
* @typedef {import("../../store").RootState} RootState
* @typedef {{
* token: RootState['auth']['tokens']['access']
* processMeasurementsByID: RootState['processMeasurements']['itemsByID']
* processMeasurements: RootState['processMeasurements']['items']
* protocols: RootState['protocols']
* actions: RootState['processMeasurementTemplateActions']
* page: RootState['processMeasurements']['page']
* totalCount: RootState['processMeasurements']['totalCount']
* isFetching: RootState['processMeasurements']['isFetching']
* filters: RootState['processMeasurements']['filters']
* sortBy: RootState['processMeasurements']['sortBy']
* }} ProcessMeasurementsListContentStateProps
* @typedef {{
* listTable: typeof listTable
* setFilter: typeof setFilter
* setFilterOption: typeof setFilterOption
* clearFilters: typeof clearFilters
* setSortBy: typeof setSortBy
* }} ProcessMeasurementsListContentDispatchedProps
* @typedef {ProcessMeasurementsListContentStateProps & ProcessMeasurementsListContentDispatchedProps} ProcessMeasurementsListContentProps
*/

/**
*
* @param {RootState} state
* @returns {ProcessMeasurementsListContentStateProps}
*/
const mapStateToProps = state => ({
token: state.auth.tokens.access,
processMeasurementsByID: state.processMeasurements.itemsByID,
Expand All @@ -97,8 +126,14 @@ const mapStateToProps = state => ({
sortBy: state.processMeasurements.sortBy,
});

/**
* @type {ProcessMeasurementsListContentDispatchedProps}
*/
const actionCreators = {listTable, setFilter, setFilterOption, clearFilters, setSortBy};

/**
* @param {ProcessMeasurementsListContentProps} props
*/
const ProcessMeasurementsListContent = ({
token,
processMeasurements,
Expand Down

0 comments on commit 87e4a6f

Please sign in to comment.