idurar / idurar-erp-crm

Free Open Source ERP CRM Accounting Invoicing Software | Node Js React
https://cloud.idurarapp.com
GNU Affero General Public License v3.0
6.57k stars 2.03k forks source link

Fix issue #1101: "Please enter enabled" error was resolved #1119

Open Sujan14728 opened 6 months ago

Sujan14728 commented 6 months ago

Description

When the admin wants to add new product category, the enabled switch was initially undefined. Due to which the enabled switch had to be pressed twice to make it true otherwise it shows error while submitting the form. I resolved it by assigning initial values of enabled so that admin does not get validation error while submitting the form.

Related Issues

The form displayed an error message saying "Please enter enabled" when initially rendered. This was due to the 'enabled' field not having a initial value set, causing validation to fail on initial page load.

Steps to Test

  1. Go to productCategory
  2. Click on Add new and add the name ,description ,color
  3. Submit and the error "Please enter Enabled" is gone.(Previously you have to click the switch twice to make the enabled value to be true)

Testing