feat: Inventory management, admin audit log backend, and promo code checkout integration#1255
Open
Thommyy7 wants to merge 1 commit into
Open
Conversation
…(BE-29), and promo code checkout integration (FE-24) Closes DistinctCodes#1203 Closes DistinctCodes#1204 Closes DistinctCodes#1205 Closes DistinctCodes#1202
|
@Thommyy7 is attempting to deploy a commit to the naijabuz's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@Thommyy7 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements four features assigned to Thommyy7:
[BE-28] Inventory Management: Backend (#1203)
InventoryItementity:name,category,serialNumber(nullable, unique),location,condition(GOOD/FAIR/NEEDS_REPAIR/RETIRED),assignedToUserId(nullable FK),assignedAt,purchasedAt,notes,isDeleted(soft delete)POST /inventory— add item (admin only)PATCH /inventory/:id— update details, condition, or location (admin only)DELETE /inventory/:id— soft-delete / retire item (admin only; only if unassigned)GET /inventory— list items (admin/staff, filterable by category, condition, location, assignedToUserId)POST /inventory/:id/assign— assign to member (admin only)POST /inventory/:id/unassign— release from member (admin only)InventoryModuleregistered inAppModule[FE-25] Inventory Management: Frontend (#1204)
/admin/inventorypage with data table: Name, Category, Serial No., Location, Condition badge (colour-coded), Assigned TouseGetInventory,useCreateInventoryItem,useUpdateInventoryItem,useAssignInventoryItemReact Query hooks[BE-29] Admin Audit Log: Backend (#1205)
AuditLogentity:actorUserId,action,resourceType,resourceId,metadata(JSONB),ipAddress,createdAt(immutable records — no update/delete endpoints)AuditLogService.log()method for use by other servicesGET /audit-log— paginated, filterable by actorId, resourceType, startDate, endDate (super_admin only)AuditLogModuleregistered inAppModuleand exported for use by other modules[FE-24] Discount / Promo Codes: Frontend - Checkout Integration (#1202)
BookingFormbelow the price estimatePOST /promo-codes/validate; on success shows discount line (Discount: -₦X) and updates displayed final amountpromoCodestate tracked in form for futurePOST /bookingsbody integrationCloses #1203
Closes #1204
Closes #1205
Closes #1202