Technical use-case library

Vendors | Rabbit Accounts Use-Case Library

Use this page for technical screen behavior, source references, and active Playwright coverage.

Rabbit Accounts This library is for reviewers, QA, and implementation traceability. Use the product manual for customer-facing guidance.
S05

Vendors

Vendor management with CRUD operations, filters, ratings, and vendor directory.

Route/vendors
Entry pathMain nav > Vendors
Product manualOpen user manual page
Playwright coverage

Screen smoke

Detailed source

05-UC-Vendors.md

UC-Vendors: Vendor Management Page Use Cases

Page: Vendors.razor Route: /vendors Menu Position: 5 (Vendors)


Overview

Vendor management with CRUD operations, filters, ratings, and vendor directory.


Section: Page Header & Actions

ID Section Action Expected Outcome Controls Affected
UC-VEND-001 Header Load page Title "Vendor Management - [BusinessName]", h2 shows "Vendor Management" with truck icon PageTitle, h2
UC-VEND-002 Header No business selected Alert "Please select a business to view vendors" alert alert-info
UC-VEND-003 Actions Click "Add Vendor" (top right) Modal opens with title "Add New Vendor", empty form vendorModal
UC-VEND-004 Actions Click "Add Vendor" (button bar) Same - modal opens vendorModal

Section: Vendor Filters

ID Section Action Expected Outcome Controls Affected
UC-VEND-005 Filter View filter row 4 dropdown filters: Type, Status, Rating, Location 4 select elements
UC-VEND-006 Filter Select "Supplier" from Type Shows only Supplier type vendors Type select, table rows
UC-VEND-007 Filter Select "Manufacturer" from Type Shows only Manufacturer type vendors Type select, table rows
UC-VEND-008 Filter Select "Distributor" from Type Shows only Distributor type vendors Type select, table rows
UC-VEND-009 Filter Select "Service Provider" from Type Shows only Service Provider type vendors Type select, table rows
UC-VEND-010 Filter Select "Active" from Status Shows only active vendors Status select, table rows
UC-VEND-011 Filter Select "Inactive" from Status Shows only inactive vendors Status select, table rows
UC-VEND-012 Filter Select "5 Star (Excellent)" Shows vendors with rating = 5.0 Rating select, table rows
UC-VEND-013 Filter Select "4+ Star (Very Good)" Shows vendors with rating >= 4.0 Rating select, table rows
UC-VEND-014 Filter Select "3+ Star (Good)" Shows vendors with rating >= 3.0 Rating select, table rows
UC-VEND-015 Filter Select "Below 3 Star" Shows vendors with rating < 3.0 Rating select, table rows
UC-VEND-016 Filter Select location (e.g., "Mumbai") Shows vendors from Mumbai only Location select, table rows
UC-VEND-017 Filter Location options Major Indian cities Location select options

Section: Summary Stats Row

ID Section Action Expected Outcome Controls Affected
UC-VEND-018 Summary Total count Shows "Total: X items" (total vendors) summary-count
UC-VEND-019 Summary Filtered count Shows "Filtered: X items" (after filter applied) summary-filtered
UC-VEND-020 Summary Average Rating Shows "Avg Rating: X.X" (average of all ratings) summary-rating
UC-VEND-021 Summary Active count Shows "Active: X vendors" (count of active) summary-active
UC-VEND-022 Summary Apply filter All summary stats recalculate for filtered data All 4 summary values

Section: Vendor Directory Table

ID Section Action Expected Outcome Controls Affected
UC-VEND-023 Table View table headers 8 columns: Code, Vendor Name, Contact, Phone, Type, Rating, Status, Actions thead th × 8
UC-VEND-024 Table View vendor row Shows: bold code, name+email, contact person, phone, type badge, star rating, status badge, 3 buttons tr cells
UC-VEND-025 Table Code column Bold vendor code strong
UC-VEND-026 Table Vendor Name column Two lines: Vendor Name, Email (muted) d-flex flex-column
UC-VEND-027 Table Contact column Contact person name, or "Not Specified" italic Cell text
UC-VEND-028 Table Phone column Phone number, or "Not Specified" italic Cell text
UC-VEND-029 Table Type = Supplier Info badge "Supplier" badge bg-info
UC-VEND-030 Table Type = Manufacturer Info badge "Manufacturer" badge bg-info
UC-VEND-031 Table Type = Distributor Info badge "Distributor" badge bg-info
UC-VEND-032 Table Type = Not Specified Italic "Not Specified" text text-muted fst-italic
UC-VEND-033 Table Rating display Star icons (★ filled, ☆ empty) + numeric Rating cell
UC-VEND-034 Table Rating 4+ stars Shows filled stars appropriately Star rating display
UC-VEND-035 Table Rating 0.0 Shows "☆☆☆☆☆ 0.0" all empty stars 5 empty stars
UC-VEND-036 Table Status = Active Green badge "Active" badge bg-success
UC-VEND-037 Table Status = Inactive Gray badge "Inactive" badge bg-secondary
UC-VEND-038 Table No vendors Empty state with search icon, "No vendors found", "Try adjusting your filters" Empty state UI

Section: Vendor Actions

ID Section Action Expected Outcome Controls Affected
UC-VEND-039 Actions Click "View" Vendor details view/modal opens View modal
UC-VEND-040 Actions Click "Edit" Edit modal opens with vendor data pre-filled Edit modal
UC-VEND-041 Actions Click "Delete" Confirmation prompt, then vendor deleted Confirm dialog, table update

Section: Add/Edit Vendor Modal

ID Section Action Expected Outcome Controls Affected
UC-VEND-042 Modal View modal fields Fields: Vendor Code (auto-gen), Vendor Name*, Contact Person, Phone, Email, Vendor Type 6 form fields
UC-VEND-043 Modal Vendor Code Auto-generated if empty, placeholder text vendor-code-input
UC-VEND-044 Modal Type dropdown Options: Supplier, Manufacturer, Distributor, Service Provider InputSelect
UC-VEND-045 Modal Submit without name Validation error for required Vendor Name ValidationMessage
UC-VEND-046 Modal Email validation Validates email format on blur vendor-email-input
UC-VEND-047 Modal Validation errors Red alert box with error list alert alert-danger
UC-VEND-048 Modal Validation warnings Yellow alert box with warning list alert alert-warning
UC-VEND-049 Modal Validating state Save button disabled, shows "Validating" with spinner Button state
UC-VEND-050 Modal Save successfully Spinner, vendor saved, modal closes, table refreshes Modal close, table update

Section: Data Validation

ID Validation Requirement
UC-VEND-051 Vendor Count Must show vendors when data exists
UC-VEND-052 Average Rating Average of all vendor ratings
UC-VEND-053 Active Count Count of active vendors
UC-VEND-054 Type Distribution Correct vendor type badges
UC-VEND-055 Rating Range 0.0 to 5.0 range

Section: Unit Test Coverage

Test Class Test Count Coverage Areas Related Use Cases
VendorCalculationTests 53 Rating filters, average calculations, star display, type validation, summary stats UC-VEND-006 to UC-VEND-015, UC-VEND-018 to UC-VEND-022, UC-VEND-029 to UC-VEND-037, UC-VEND-043

Unit Tests Summary

Location: Rabbit.Accounts.Tests/Vendors/VendorCalculationTests.cs

Test Categories:

  1. Rating Filter Tests (13 tests) - 5-star/4+/3+/Below 3 categorization with boundary tests
  2. Average Rating Tests (5 tests) - Average calculation with precision handling
  3. Star Display Tests (5 tests) - ★/☆ display formatting with clamping for out-of-range values
  4. Vendor Type Validation Tests (8 tests) - Supplier/Manufacturer/Distributor/Service Provider validation
  5. Vendor Code Generation Tests (5 tests) - VND-XXXX format generation
  6. Summary Statistics Tests (3 tests) - Total/Filtered/Active/AvgRating calculations
  7. Type Badge Tests (6 tests) - Badge class assignment by vendor type
  8. Status Tests (3 tests) - Active/Inactive filtering and badge classes

Rating Filter Categories:

  • 5 Star (Excellent): rating = 5.0
  • 4+ Star (Very Good): rating ≥ 4.0
  • 3+ Star (Good): rating ≥ 3.0
  • Below 3 Star: rating < 3.0

Total Use Cases: 55