mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-13 06:32:40 +01:00
Show 'No quotes avialable for download' instead of blank page
This commit is contained in:
parent
7f7120af6b
commit
033e74da7d
@ -85,7 +85,9 @@ class QuoteController extends Controller
|
||||
->get();
|
||||
|
||||
if (! $quotes || $quotes->count() == 0) {
|
||||
return;
|
||||
return redirect()
|
||||
->route('client.quotes.index')
|
||||
->with('message', ctrans('texts.no_quotes_available_for_download'));
|
||||
}
|
||||
|
||||
if ($quotes->count() == 1) {
|
||||
|
@ -4279,6 +4279,7 @@ $LANG = array(
|
||||
'recurring_purchases' => 'Recurring purchases',
|
||||
'you_might_be_interested_in_following' => 'You might be interested in following',
|
||||
'quotes_with_status_sent_can_be_approved' => 'Only quotes with "Sent" status can be approved.',
|
||||
'no_quotes_available_for_download' => 'No quotes available for download.',
|
||||
);
|
||||
|
||||
return $LANG;
|
||||
|
@ -93,4 +93,14 @@ class QuotesTest extends DuskTestCase
|
||||
->visitRoute('client.logout');
|
||||
});
|
||||
}
|
||||
|
||||
public function testNoQuotesAvailableForDownloadMessage()
|
||||
{
|
||||
$this->browse(function (Browser $browser) {
|
||||
$browser
|
||||
->visitRoute('client.quotes.index')
|
||||
->press('Download')
|
||||
->assertSee('No quotes available for download.');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user