Skip to content

[Clients]: Create a quote for a specific client from the client list #191

Closed

Description

@nielsdrost7

Context

Currently a user must navigate into a client's detail page (which doesn't exist yet) or go to the Quotes module and manually select the client. A one-click "Create quote" action on the client list saves navigation steps when starting work from the client context.


User story

As a user, when I see a client in the clients list, I want to click an action and be taken directly to the quote creation form with that client pre-selected.


Acceptance criteria

  • A Create quote action exists in the client row action group in the clients list.
  • Clicking it navigates to the quote creation form with prospect_id / customer_id pre-filled to the selected client.
  • The action is visible for all client types (prospect and customer).

Arrange / Act / Assert

Arrange — Client Acme Corp exists.

Act — Click "Create quote" in Acme Corp's row dropdown.

Assert

  • User lands on the quote creation form.
  • Client field is pre-filled with Acme Corp.
  • No other fields are altered.

Activity

  1. changed the title [-]As a user, viewing all the clients, i want to click on a dropdown and directly create a invoice for that specific client[/-] [+]As a user, viewing all the clients, i want to click on a dropdown and directly create an invoice for that specific client[/+] on Dec 28, 2025
  2. changed the title [-]As a user, viewing all the clients, i want to click on a dropdown and directly create an invoice for that specific client[/-] [+]As a user, viewing all the clients, i want to click on a dropdown and directly create a quote for that specific client[/+] on Dec 28, 2025
  3. added this to the v2.0.0-alpha milestone on Dec 28, 2025
  4. changed the title [-]As a user, viewing all the clients, i want to click on a dropdown and directly create a quote for that specific client[/-] [+]As a user, viewing all clients, I want to create a quote for a specific client directly from the list[/+] on Jun 12, 2026
  5. changed the title [-]As a user, viewing all clients, I want to create a quote for a specific client directly from the list[/-] [+][Clients]: Create a quote for a specific client from the client list[/+] on Jun 13, 2026
  6. nielsdrost7 commented on Jun 14, 2026

    @nielsdrost7
    CollaboratorAuthor

    Sprint 5 — Test Status Check ❌ Not ready to close

    Same situation as #192 — RelationsTable.php has no "Create quote" action.

    Implementation: (identical pattern to #192)

    Action::make('create-quote')
        ->label(trans('ip.create_quote'))
        ->icon('heroicon-o-document-text')
        ->url(fn (Relation $record): string => route(
            'filament.company.resources.quotes.create',
            [
                'tenant'      => Str::lower(filament()->getTenant()->search_code),
                'prospect_id' => $record->id,
            ]
        )),

    Note: The quote create form must read prospect_id from the query string and pre-fill the client selector. Check CreateQuote.php for a ->default(fn () => request('prospect_id')) hook.

    Implement together with #192 — they're both in RelationsTable.php and both follow the same pattern.

    Cannot close. Feature and tests are missing.


    Generated by Claude Code

  7. nielsdrost7 commented on Jun 14, 2026

    @nielsdrost7
    CollaboratorAuthor

    Implementation — done on claude/invoiceplane-sprint-5-plan-cbgzgh

    What was needed:

    • A "Create Invoice" action on each row of the client list that opens the invoice create form with the client pre-selected

    What was missing:

    1. InvoiceResource had no create page registered in getPages() — CreateInvoice.php existed but wasn't accessible via URL
    2. No row action in RelationsTable pointing to it
    3. No mechanism to pre-fill customer_id from the URL

    Changes made:

    Modules/Invoices/Filament/Company/Resources/Invoices/InvoiceResource.php:

    • Registered 'create' => CreateInvoice::route('/create')

    Modules/Invoices/Filament/Company/Resources/Invoices/Pages/CreateInvoice.php:

    • Added mount() override: reads ?customer_id=X query param and calls $this->form->fill(['customer_id' => X])
    • Added mutateFormDataBeforeCreate(): ensures customer_id from URL is included in submitted data

    Modules/Clients/Filament/Company/Resources/Relations/Tables/RelationsTable.php:

    • Added Action::make('create_invoice') using ->url(fn($record) => InvoiceResource::getUrl('create', ['customer_id' => $record->id]))

    Result: Clicking "Create Invoice" from the client list opens a fresh invoice form with the client's company already selected in the Customer dropdown.


    Generated by Claude Code

  8. added a commit that references this issue on Jun 14, 2026
  9. added 3 commits that reference this issue on Jul 3, 2026
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

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions