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.27k stars 1.89k forks source link

Product Category can be recreated with the same name, description & color tag. #1074

Open MehdiMsa opened 5 months ago

MehdiMsa commented 5 months ago

Describe the bug This problem is whenever a certain product category is created. Eventually the same product category could be recreated with same name, description & tag. In which, it will lead to a confusion when creating a new product.

To Reproduce Steps to reproduce the behavior:

  1. Login to https://cloud.idurarapp.com/
  2. Go to 'Products Category Section'
  3. Click on 'Add New Product Category'
  4. Fill in the information & create the Product Category
  5. Click on 'Add New Product Category'
  6. Recreate another Product Category with the same data

Expected behavior A Message Suggesting that Product Category Already Exists

Screenshots image image

Desktop (please complete the following information):

Smartphone (please complete the following information):

MehdiMsa commented 5 months ago

Same goes for the Product Section, the Products could be duplicated too. image

yashashvi007 commented 5 months ago

Hey @MehdiMsa I replicated the issue, and I would like to work on it, can you please assign it to me.

Houssemdaoud commented 5 months ago

Hey @MehdiMsa I replicated the issue, and I would like to work on it, can you please assign it to me.

i also replicated the issue and i would like to work on it if u haven't started @yashashvi007 or we could work on it together if you would like

yashashvi007 commented 5 months ago

Okay, @Houssemdaoud let's do this together, i looked into the code it doesn't seems to be a complex one, but already started working on it.

yashashvi007 commented 5 months ago

One question @MehdiMsa, on what parameters the uniqueness should be based on. Like should i consider name only because that will also work.

Houssemdaoud commented 5 months ago

One question @MehdiMsa, on what parameters the uniqueness should be based on. Like should i consider name only because that will also work.

I think the uniqueness should be based on the color Because we can have multiple food but different colors

MehdiMsa commented 5 months ago

@yashashvi007 @Houssemdaoud hello, feel free to take part of this work. I already started working on this issue 2 days ago & I would be happy to share the work with you. And as @Houssemdaoud, the product category is classified through color selection as you mentions. By which I think could be considered as a parameter of uniqueness.

MehdiMsa commented 5 months ago

Hey @MehdiMsa I replicated the issue, and I would like to work on it, can you please assign it to me.

Hey @yashashvi007, I do believe that only contributors with writers privilege can assign tasks for the issues. Nonetheless, feel free to take part on this task.

yashashvi007 commented 5 months ago

Hey @MehdiMsa

@yashashvi007 @Houssemdaoud hello, feel free to take part of this work. I already started working on this issue 2 days ago & I would be happy to share the work with you. And as @Houssemdaoud, the product category is classified through color selection as you mentions. By which I think could be considered as a parameter of uniqueness.

Yes i would love to see your work on this one, I also done some work on it, I too love to share my work.

marammahfoudhi commented 5 months ago

hello @yashashvi007 @MehdiMsa is this issue worked on ?

MehdiMsa commented 5 months ago

@marammahfoudhi yes maram, I already fixed this issue. Nonetheless, I'm facing some issues pushing the code. Will be fixed by this week atmost.

Ouchi-Ranim commented 4 months ago

Hello Mhedi, I reproduced the issue and I'm facing the same problem, thanks for highlighting it.

Ouchi-Ranim commented 4 months ago

Did you push it yet?

MehdiMsa commented 4 months ago

Hello Mehdi, I reproduced the issue and I'm facing the same problem, thanks for highlighting it.

Thank you for testing it out. I already pushed a fix for the solution in the following pull request: https://github.com/idurar/idurar-erp-crm/pull/1094/commits/d3b10928d0884116ad8d85ef9c25f57be2763073

Did you push it yet?

Yes indeed, you will find attached above the link to the changes made. Feel free to leave a code review. It will be very helpful. Thank you & have a nice weekend.