Life-Pill / pharmacy-pos-main-backend

The Pharmacy POS System Backend is the server-side component of our comprehensive pharmacy management software. It is developed using Spring Boot, Java, Spring Security ,and Microservices Architecture
Apache License 2.0
5 stars 3 forks source link

Implement Fetch Items by Branch ID, Fix Get All Employees Branch ID, and Implement User Active Status #119

Closed PramithaMJ closed 5 months ago

PramithaMJ commented 5 months ago

Pull Request: Implement Fetch Items by Branch ID, Fix Get All Employees Branch ID, and Implement User Active Status

Title

Implement Fetch Items by Branch ID, Fix Get All Employees Branch ID, and Implement User Active Status

Description

This pull request introduces new functionality for fetching items by branch ID, fixes an issue where the branch ID for employees was previously returned as 0, and implements a mechanism to track user active status based on their login state.

Changes Made

1. New Endpoint for Fetching Items by Branch ID

2. Fix for Get All Employees Branch ID

3. User Active Status Implementation

Test Plan

Test Scenarios:

  1. Fetch Items by Branch ID:
    • Make a GET request to /lifepill/v1/item/branched/get-item/{branchId} with a valid branch ID and verify the structure and content of the response.
  2. Get All Employees with Correct Branch ID:
    • Ensure the branch ID is correctly returned for all employees.
  3. User Active Status:
    • Log in as a cashier and verify that the active status is set to true.
    • Temporarily or permanently log out as a cashier and verify that the active status is set to false.

Related Issues

Checklist

Conclusion

This pull request introduces a new endpoint for fetching items by branch ID, fixes the issue with getting the correct branch ID for employees, and implements user active status tracking based on their login state. Please review the changes and ensure they meet the project's requirements and quality standards.

Best regards,
Pramitha Jayasooriya, Backend Developer at LifePill, https://pramithamj.me

sonarcloud[bot] commented 5 months ago

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud