Skip to content

[Core]: While creating a quote, if a client is not already in the system allow the user via the search box to add a client on the go #64

Closed

Description

@nielsdrost7

Context


Especially in busy environments adding a client instantly would be time efficient

spacecabbie: also currently no error when trying this. (clients field empty application crashes)


Specific:

As a user, I want to be able to add a client quickly and reliably, without the application crashing when client fields are empty.

Measurable:

The time taken to add a client will be reduced by 50% and the application will no longer crash when client fields are empty.

Achievable:

The development team has the resources and skills to implement input validation and optimize the client creation process.

Relevant:

This feature directly improves user efficiency and prevents application crashes, thus enhancing user satisfaction and data integrity.

Time-bound:

This user story must be completed within the next two development sprints, ending in four weeks.


Arrange:

// 1. Create a user and authenticate them
// 2. Define an array of client data with some empty fields (e.g., 'name' => '', 'email' => 'test@example.com')
// 3. Define a route for creating clients (assuming it's named 'clients.store')

Act:

// 1. Make a POST request to the 'clients.store' route with the client data array

Assert:

// 1. Assert that the response has a 302 status code (redirect) indicating validation failure
// 2. Assert that the session has validation errors (using assertSessionHasErrors) for the empty fields (e.g., 'name')
// 3. Assert that the database does not contain a new client record with the attempted data.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions