bldambtn / WhoDoYouWorkFor

A command-line application from scratch to manage a company's employee database, using Node.js, Inquirer, and PostgreSQL.
MIT License
0 stars 0 forks source link

AC-3: Roles #3

Open bldambtn opened 2 months ago

bldambtn commented 2 months ago

AC-3: Roles

User Story

AS A business owner I WANT to be able to view and manage the departments, roles, and employees in my company SO THAT I can organize and plan my business

Acceptance Criteria

GIVEN a command-line application that accepts user input WHEN I choose to view all roles THEN I am presented with the job title, role id, the department that role belongs to, and the salary for that role

bldambtn commented 1 month ago

To fulfill the acceptance criteria for the viewAllRoles function in your command-line application, you need to retrieve the necessary information from your database and present it to the user in a formatted manner. Here's a step-by-step guide on how you can achieve this:

Retrieve Roles Data: Query your database to fetch all roles along with their associated information such as job title, role ID, department ID, and salary.

Format Data: Once you have the roles data, format it in a way that displays the job title, role ID, department name (instead of ID), and salary for each role.

Display Data: Present the formatted roles data to the user in a clear and organized manner, such as printing it in a table format.