Closed EgbieAndersonUku1 closed 2 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
fullstack-fruit-and-veg | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Aug 18, 2024 3:29am |
feat: Add
PricingAndInventoryForm
to handlepricing-inventory.html
.forms.py
in theaccount
app to manage form definitions.PricingAndInventoryForm
to handlepricing-inventory.html
.Template Modifications:
basic-product-information.html
to use a loop for rendering form fields instead of manual rendering, as the data doesn't require grouping like indetailed-description-specs.html
.detailed-description-specs.html
to<h4>
for each section.Form Definitions:
forms.py
now includes: -BasicFormDescription
: Initial data collection form. -DetailedFormDescription
: Enhanced form with improved attributes and validation. -PricingAndInventoryForm
: For managing pricing and inventory inputs.JavaScript Updates:
add-product.js
to clarify function calls:javascript const PRODUCT_SELECT_OPTION_VALUE = "new"; const DISCOUNT_SELECT_OPTION_VALUE = "yes";
forms.py
insideaccounts
match these constants to correctly trigger form input fields.DISCOUNT_OPTIONS = [ ("", "Select a category"), --> ("yes", "Yes"), ("no", "No") ]
product_category_utils.py
and called to theform.py
throughget_product_category_choices
function('', 'Select a category'), # Placeholder option ----> ('new', 'New Category'), ('Fruits & Vegetables', [ ('fresh_fruits', 'Fresh Fruits'), ('fresh_vegetables', 'Fresh Vegetables'), ('organic_greens', 'Organic Greens'), ]),
TODO:
TODO