Skip to content

Add "New Client" page to allow client creation#21

Open
rafaelhgcarlos wants to merge 3 commits intostagefrom
feat/clients-module/new-client-page
Open

Add "New Client" page to allow client creation#21
rafaelhgcarlos wants to merge 3 commits intostagefrom
feat/clients-module/new-client-page

Conversation

@rafaelhgcarlos
Copy link
Copy Markdown
Member

This pull request introduces a new "Create Client" feature, allowing users to add new clients to the system through a dedicated page and form. It also integrates the new page into the application routing and updates the clients module exports so the page can be properly referenced throughout the application.

The most important changes include:

New Client Creation Feature:

  • Added a new page component NewClientPage with a form for creating clients. The form includes fields for name, email, phone, company, status, and notes, and handles submission, validation, and user feedback using toast notifications. (src/modules/clients/pages/NewClientPage.tsx)
  • Added navigation flow so users are redirected back to the clients list after successful client creation.

Routing Integration:

  • Registered a new protected route at /clients/new so authenticated users can access the client creation page. (src/router/components/AppRoute.tsx)
  • Updated the router to import and render NewClientPage within the existing ProtectedRoute wrapper to maintain authentication control.

Module Export Updates:

  • Updated the clients module exports to include NewClientPage, allowing it to be easily imported and registered in the router. (src/modules/clients/pages/index.tsx)

UI/UX Behavior:

  • Added loading state handling to prevent duplicate submissions while the client is being created.
  • Implemented success and error toast notifications to provide clear feedback to the user after form submission.
  • Added cancel and save actions with proper navigation and loading indicators to improve usability.

@rafaelhgcarlos rafaelhgcarlos self-assigned this Apr 1, 2026
@rafaelhgcarlos rafaelhgcarlos added the enhancement New feature or request label Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant