- Invoice sorting refactored

- Frontend build
This commit is contained in:
Peter Papp
2021-05-11 10:57:30 +02:00
parent a7a6ef9f0a
commit e8ca132a8b
99 changed files with 311 additions and 242 deletions
@@ -100,7 +100,7 @@ class SetupOasisEnvironment extends Command
['client_id' => $clients[3]->id],
['client_id' => $clients[4]->id],
['client_id' => $clients[5]->id],
))->count(2)
))->count(8)
->create([
'user_id' => $user->id,
'invoice_type' => 'regular-invoice',
@@ -109,7 +109,7 @@ class SetupOasisEnvironment extends Command
]);
$advance_invoices = Invoice::factory(Invoice::class)
->count(2)
->count(6)
->state(new Sequence(
['client_id' => $clients[0]->id],
['client_id' => $clients[1]->id],
@@ -20,7 +20,7 @@ class ClientController extends Controller
*/
public function index()
{
$clients = Client::sortable()
$clients = Client::sortable(['created_at', 'DESC'])
->whereUserId(Auth::id())
->get();
@@ -27,7 +27,7 @@ class InvoiceController extends Controller
*/
public function get_all_regular_invoices()
{
$invoices = Invoice::sortable()
$invoices = Invoice::sortable(['created_at', 'DESC'])
->whereUserId(Auth::id())
->whereInvoiceType('regular-invoice')
->get();
@@ -43,7 +43,7 @@ class InvoiceController extends Controller
*/
public function get_all_advance_invoices()
{
$invoices = Invoice::sortable()
$invoices = Invoice::sortable(['created_at', 'DESC'])
->whereUserId(Auth::id())
->whereInvoiceType('advance-invoice')
->get();