atlp-rwanda / knights-ecomm-be

Knights ecommerce backend APIs
https://knights-ecomm-be-lcdh.onrender.com
0 stars 0 forks source link

#92 Vendor and Admin order management #98

Closed aimedivin closed 5 months ago

aimedivin commented 5 months ago

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?

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

What are the relevant pivotal tracker/Trello stories?

92

coveralls commented 5 months ago

Pull Request Test Coverage Report for Build 9273178525

Details


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%
<!-- Total: 392 522 75.1% -->
Files with Coverage Reduction New Missed Lines %
src/routes/UserRoutes.ts 1 57.14%
src/services/orderServices/createOrder.ts 1 40.68%
<!-- Total: 2 -->
Totals Coverage Status
Change from base Build 9252672342: 0.5%
Covered Lines: 1799
Relevant Lines: 2205

💛 - Coveralls
faid-terence commented 5 months ago

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

aimedivin commented 5 months ago

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

@faid-terence Now it is ready for reviews