Feature #5320
openCreate product UI form
60%
Description
As an Admin/Manager
I want to create a new product through a form that includes basic product details, pricing, stock configuration, and dynamic fields based on the selected category
So that I can accurately add all product information into the system.
Acceptance Criteria
AC01: Display Product Form
The system must display a product creation form with the following fields:
Basic Fields
Product Name (mandatory)
Category (mandatory)
Description (optional)
Product Image (optional)
Vendor (optional)
Pricing Fields
Sale Price (mandatory)
Purchase Price (mandatory)
Stock & Measuring Fields
Measuring Unit (dropdown: kg, g, litre, ml, pcs, etc.)
Unit Value (numeric)
Restock Level (minimum stock)
Restore Value (quantity to auto-suggest when stock is low)
AC02: Dynamic Fields Based on Category
When the user selects a category, the system must load category-specific dynamic fields.
Dynamic fields must appear immediately without page reload.
Validation must apply according to the field type.
Examples:
Category = Electrical → “Voltage”, “Current”
Category = Panels → “Watt Rating”, “Panel Type”
Category = Inverter → “Capacity”, “Phase Type”
AC03: Form Validations
Product Name, Category, Sale Price, Purchase Price are mandatory.
Sale Price must be > 0.
Purchase Price must be > 0.
If Measuring Unit = weight (kg/g), value must be numeric only.
If image is uploaded, accept only: .jpg, .jpeg, .png.
Restock Level + Restore Value must be >= 0.
AC04: Submit Product Form
On clicking Create Product, the form must validate all fields.
If validation fails → show inline error messages.
If all inputs are valid → API call must be triggered.
AC05: Show Success Toaster
After a successful product creation, show a green success toaster:
“Product created successfully!”
The form must reset automatically OR redirect based on product settings.
AC06: Show Error Toaster
If API returns an error:
Show a red error toaster with proper message:
Validation error → “Please check the form fields.”
Server error → “Unable to create product. Please try again later.”
Duplicate product → “Product name already exists.”
Related issues