Members
(constant) dm_sans :Object
Loads DM Sans font with various weights and styles.
- Object
- Source
(constant) getStaticData
Fetches static data for the employees.
- Source
(constant) isDevelopment :boolean
Checks if the environment is development.
- boolean
- Source
(constant) metadata :Object
Metadata related to the ShowEmployees component.
- Object
- Source
(constant) metadata :Object
Object containing metadata for the application.
- Object
- Source
(constant) metadata :Object
Metadata information for the 'Not Found' component.
- Object
- Source
(constant) metadata :Object
Metadata related to the Home component.
- Object
- Source
(constant) metadataBase :string
Sets the base URL for metadata based on the environment.
- string
- Source
Methods
GET(request) → {Object}
Send a get request
Name | Type | Description |
---|---|---|
request | Object | Data to get |
- Response from API
- Type:
- Object
POST(request) → {Object}
Send a post request
Name | Type | Description |
---|---|---|
request | Object | Data to post |
- Response from API
- Type:
- Object
addEmployee(bodyData) → {Object}
Function to add an employee.
Name | Type | Description |
---|---|---|
bodyData | Object | Object containing employees data. |
- Source
- Object containing the response from API.
- Type:
- Object
formatDateUS(date) → {Date}
Function to format the date in US format.
Name | Type | Description |
---|---|---|
date | Date | Date to format. |
- Source
- Date formated.
- Type:
- Date
listEmployees() → {Object}
Function to list all employees.
- Source
- Object containing an array of all employees.
- Type:
- Object
showDataZone(isList, dataState, numberOfLines, setModalIsOpen, setUserToOpen) → {ReactElement}
Function to display the data zone.
Name | Type | Description |
---|---|---|
isList | boolean | Boolean to determine if the view mode is list. |
dataState | Array | Data to be displayed. |
numberOfLines | number | Number of lines to display. |
setModalIsOpen | function | Setter for modal open state. |
setUserToOpen | function | Setter for the user to open in modal. |
Rendered component.
- Type:
- ReactElement
showTitle(isList, handleToggleList, handleSearchChange, filteredData, handleChangeNbOfLines) → {ReactElement}
Function to display the title.
Name | Type | Description |
---|---|---|
isList | boolean | Boolean to determine if the view mode is list. |
handleToggleList | function | Handler for toggling list view. |
handleSearchChange | function | Handler for search change. |
filteredData | Array | Filtered data. |
handleChangeNbOfLines | function | Handler to change number of lines. |
Rendered component.
- Type:
- ReactElement
sortEmployees(objectData) → {Object}
Function to sort a list of employees.
Name | Type | Description |
---|---|---|
objectData | Object | List to be sorted |
- Source
- Object containing the data sorted.
- Type:
- Object