As a user who is an employee, I need access to an administrative dashboard that is not available to customers
A/C
Given A user is an employee
When the employee authenticates
Then they will have access to a dashboard page with their
Dev Notes
[x] Adjust data structure to remove name fields from employee and add a userId. The employee table will be supplemental to the user table
[x] In UsersController & UserRepository write an HttpGet & related method to return employee data by user id
[x] In InvoiceController & InvoiceRepository write an HttpGet & related method to return InvoicesBySalesRepId
[x] In InvoiceController & InvoiceRepository write an HttpGet & related method to return totalSalesBySalesRepId
[x] In InvoiceController & InvoiceRepository write an HttpGet & related method to return monthlySalesBySalesRepId
[x] On App.js, create a state of isEmployee and set to false and a state for employee: { }
[x] create a new employee page & a route which is only visible to/accessible by employees
[x] Employee page will look similar to the profile page, with dashboard info at the top and sales history below
[x] under data, add employeeData.js and write getEmployeeByUserId to pull data from the back end
[x] in App componentDidMount, after the userDetails is returned in the .then() call getEmployeeByUserId(userDetails.userId)
-- if an employee is returned, set isEmployee to true & and set the results to employee: { }
-- pass employee object as props to the employee route
[x] in employeeData, write InvoicesBySalesRepId , totalSalesBySalesRepId & monthlySalesBySalesRepId to pull data from the back end
[x] in the employee page, print total sales, monthly sales, employee name, title, & hire date to the dashboard section
[x] in the employee page, print InvoicesBySalesRepId to the Sales History section below the dashboard. This should use the same InvoiceCard component as the user page
User Story
As a user who is an employee, I need access to an administrative dashboard that is not available to customers
A/C
Given A user is an employee When the employee authenticates Then they will have access to a dashboard page with their
Dev Notes
Notion Tickets covered