Project

General

Profile

Actions

ClientProject #2382

open

ClientProject #2376: [Module] Sprint-06 (06.05.2025-16.05.2025)

ClientProject #2379: Reports

Sales Executives Report (Individual)

Added by Najmul Hasan 11 months ago. Updated 8 months ago.

Status:
Pending
Priority:
High
Assignee:
-
Category:
-
Target version:
-
Start date:
05/06/2025
Due date:
% Done:

0%

Estimated time:
Spent time:

Description

PR Description
What’s Changed

Warehouse Permissions : Added support for the read_all-warehouse permission. If a user has this permission, the /report-dependent-data endpoint now returns all warehouses; otherwise, it returns only the warehouses assigned to the user.
User Selection Enhancement : The user selection service now returns users along with an array of their assigned warehouse IDs (warehouses field).
Refactoring : Moved warehouse-fetching logic to a dedicated service file for better separation of concerns.
Endpoint Update : The /report-dependent-data endpoint now sends users with their warehouse assignments and returns warehouses based on the user's permissions.
How to Test (Postman)
Test /report-dependent-data endpoint:
With read_all-warehouse permission:
Use a user/token with this permission.
You should receive all warehouses in the response.
Without read_all-warehouse permission:
Use a user/token without this permission.
You should receive only the warehouses assigned to that user.
Check Users in Response:
Each user object should include a warehouses array containing their assigned warehouse IDs.

Actions

Also available in: Atom PDF