devika icon indicating copy to clipboard operation
devika copied to clipboard

Add pop up for create new project option beside the project selection drop down

Open Ravindranath2511 opened this issue 1 year ago • 3 comments

Use case and problem description:

  • To create a project, user has to click on create project option in the dropdown and weird alert is being displayed to ask the project name and while creating the projects, system is not checking if the project with the same name exists or not. This could be a huge issue in terms of data storage and data duplication.

Solution:

  • Give users an input option next to the select project dropdown that will be used to input the project name and create button to verify if the project is not already existing and create it.

  • Removed the Create Project option as a drop down in the project list

  • Added new template to creating a project. New file named: CreateProjectPopup.svelete image

  • Updated api.js file's createProject() function to return message instead of null

  • Updated devika.py file's create_project() to check if the project already exists with the given name.

    • If the project with the given name already exists, User will be notified that the Project already exists
    • If the project with the given is not present, System will create one and notify user accordingly
  • Updated ControlPanel.svelte file to remove the Create Project option from the dropdown and to add an input bar beside the dropdown.

Here the full working path:

Project Creation:

Initial Screen: image

Enter the Project Name: image

Click on Create image

Project Created Notification image

Project Selected image

Testing with the same project name:

Enter the same name as before image

Project already exists notification image

Ravindranath2511 avatar Mar 31 '24 03:03 Ravindranath2511

#24

darrassi1 avatar Mar 31 '24 03:03 darrassi1

#24 merged!

@rajakumar05032000 current system allows duplicate projects to be created in the backend although duplicates are hidden in the project selector. I've verified #24 pull request and it's also allowing duplicates. This pull request contains a logic to check the duplicate projects while creating.

Ravindranath2511 avatar Apr 01 '24 14:04 Ravindranath2511

Why would you do in create project a new search on what projects there are and go through them all, Is there no function or db request to see what all current project are?

KenAijmNight avatar Apr 04 '24 09:04 KenAijmNight

you can create a project with the same name not a problem currently. also, your PR doesn't align with the current main. currently closing it cause newUI is coming

ARajgor avatar Apr 06 '24 07:04 ARajgor