Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#92 Vendor and Admin order management #98

Merged
merged 1 commit into from
May 29, 2024

Conversation

aimedivin
Copy link
Contributor

@aimedivin aimedivin commented May 26, 2024

What does this PR do?

This PR adds functionality to facilitate efficient management of order status information, It adds features that vendors and admin get and update order statuses, additionally the system can now instantly tell the frontend about any changes in order status.

Description of Task to be completed?

  • Split the main buyer order into separate orders for each vendor, specifying the products and quantities they need to deliver.
  • Allow vendors to fetch details of their respective orders and update the status of each order as needed.
  • Allow admin to view buyer order details, specifying each vendor info and part he/she must supply to the buyer.
  • Allow admin to mark orders as completed once all vendor obligations are met and the buyer confirms he received the products.
  • After updating frontend (all connected clients) are informed about changes via Socket.IO

API EndPoints

Vendor order management
GET /vendor/orders
GET /vendor/orders/<order-id as id>
PUT /vendor/orders/<order-id as id>
Admin order management
GET /admin/orders
GET /admin/orders/<order-id as id>
PUT /admin/orders/<order-id as id>

How should this be manually tested?

git clone https://github.com/atlp-rwanda/knights-ecomm-be.git
cd knights-ecomm-be
git checkout ft-vendor-admin-order-management
npm i
npm run dev
  • After cloning the repo, you can use Postman to test endpoints above.

What are the relevant pivotal tracker/Trello stories?

#92

@aimedivin aimedivin self-assigned this May 26, 2024
@faid-terence faid-terence added backend Good for newcomers In Progress This Label will be added on pending task labels May 27, 2024
@faid-terence faid-terence added this to the Purchase process milestone May 27, 2024
@faid-terence faid-terence linked an issue May 27, 2024 that may be closed by this pull request
@aimedivin aimedivin force-pushed the ft-vendor-admin-order-management branch from bc9e998 to 5a7c123 Compare May 28, 2024 10:26
@coveralls
Copy link

coveralls commented May 28, 2024

Pull Request Test Coverage Report for Build 9273178525

Details

  • 392 of 522 (75.1%) changed or added relevant lines in 45 files are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.5%) to 77.239%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/services/adminOrderServices/updateOrder.ts 30 31 96.77%
src/services/couponServices/buyerApplyCoupon.ts 34 35 97.14%
src/services/productServices/searchProduct.ts 0 1 0.0%
src/services/vendorOrderServices/readVendorOrder.ts 23 24 95.83%
src/services/wishListServices/clearAll.ts 8 9 88.89%
src/services/wishListServices/getProducts.ts 12 13 92.31%
src/utils/socket.ts 7 8 87.5%
src/services/adminOrderServices/readOrder.ts 29 31 93.55%
src/utils/sendOrderMail.ts 0 2 0.0%
src/utils/sendOrderMailUpdated.ts 0 2 0.0%
Files with Coverage Reduction New Missed Lines %
src/routes/UserRoutes.ts 1 57.14%
src/services/orderServices/createOrder.ts 1 40.68%
Totals Coverage Status
Change from base Build 9252672342: 0.5%
Covered Lines: 1799
Relevant Lines: 2205

💛 - Coveralls

@faid-terence
Copy link
Collaborator

@aimedivin
Is this ready for reviews ? or still in progress?

implementing order tracking and order managment issue

implementing order tracking and order managment issue

implementing order tracking and order managment issue

adding documentation and tests

writing tests
@aimedivin aimedivin force-pushed the ft-vendor-admin-order-management branch from 1d9c7c4 to 31e7653 Compare May 28, 2024 16:40
@aimedivin
Copy link
Contributor Author

@aimedivin Is this ready for reviews ? or still in progress?

@faid-terence Now it is ready for reviews

@aimedivin aimedivin added Ready for reviews Pull request is ready for review and removed In Progress This Label will be added on pending task labels May 28, 2024
Copy link
Collaborator

@faid-terence faid-terence left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice Work @aimedivin !

@faid-terence faid-terence merged commit 5346a98 into develop May 29, 2024
3 checks passed
@faid-terence faid-terence deleted the ft-vendor-admin-order-management branch May 29, 2024 08:05
maxCastro1 pushed a commit that referenced this pull request May 31, 2024
maxCastro1 pushed a commit that referenced this pull request May 31, 2024
maxCastro1 pushed a commit that referenced this pull request May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Good for newcomers Ready for reviews Pull request is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vendor - Order Management
7 participants