Skip to content

[Quotes]: Download the PDF for a quote from the quote list #196

Description

@nielsdrost7

Context

Downloading a quote PDF currently requires opening the quote edit view and finding the export option. A one-click PDF download from the quotes list makes it faster to retrieve PDFs without navigating away.

Related: the same PDF generation service used by invoice download (#200) should be reusable here.


User story

As a user, I want to click Download PDF in the quote row dropdown so I can get the PDF without opening the full edit form.


Acceptance criteria

  • A Download PDF action exists in the quote row action group.
  • Clicking it triggers a PDF download of that quote.
  • The action is visible for all quote statuses.
  • If no PDF can be generated, the user sees a meaningful error notification.

Arrange · Act · Assert

// Modules/Quotes/Tests/Feature/QuotesTest.php

#[Test]
public function it_downloads_pdf_from_quote_list(): void
{
    /* Arrange */
    $quote = Quote::factory()->for($this->company)->create([
        'quote_number' => 'QUO-2026-001',
    ]);

    /* Act */
    $component = Livewire::actingAs($this->user)
        ->test(ListQuotes::class, ['tenant' => Str::lower($this->company->search_code)])
        ->callTableAction('download-pdf', $quote);

    /* Assert */
    $component->assertSuccessful();
    $component->assertFileDownloaded('QUO-2026-001.pdf');
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    refinedRefined with SMART plan / test suggestions

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions