-
Notifications
You must be signed in to change notification settings - Fork 0
Description
This is a fairly big feature. But similar work has been done in Task page.
This task consist of multiple parts.
-
Publication/subscription
In order for the frontend to receive data about "Team Member", "Managers" or "Subordinates" or even "All Employees" as the same data structure, server side need to publish them first. Then the frontend can subscribe to the selected one in the employee list page. Refer to "imports/api/task.js" on how to publish the data. Subscription will be explained in a later section. -
Routing
In order to have the same component to be used with different data, and at the same time, the data change can cause a rerender. We use special routes for tasks page. The same should be done for employee. Create an employee route just like the task route at "imports/ui/routes/TaskListRoute.jsx". Then add the route to "imports/ui/routes/index.jsx" with a path like "employeelist". -
Mimic the way tasklist/item is handled. Have a structure like employeeList, employeeItem, employeeDetail, employessMasterDetailView. The master detail view will be the container for both the list and the detail, and it's also where the subscription happens.
-
How to test it out
Mimic the way the configuration of task tab in nav bar is setup. Employee tab should also have it's own configuration and click handler.