From 528e6f5e55569568da8e44f38c52023de4ec6c55 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Mon, 21 Oct 2019 15:24:27 +0200 Subject: [PATCH] admin invoices interface: default selected tab depending on FABLAB_WITHOUT_INVOICES value --- app/assets/javascripts/controllers/admin/invoices.js.erb | 6 ++++++ app/assets/templates/admin/invoices/index.html.erb | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/controllers/admin/invoices.js.erb b/app/assets/javascripts/controllers/admin/invoices.js.erb index 8f62f7081..1fa010392 100644 --- a/app/assets/javascripts/controllers/admin/invoices.js.erb +++ b/app/assets/javascripts/controllers/admin/invoices.js.erb @@ -26,6 +26,12 @@ Application.Controllers.controller('InvoicesController', ['$scope', '$state', 'I /* PUBLIC SCOPE */ + // default active tab + $scope.tabs = { + listing: { active: !Fablab.withoutInvoices }, + settings: { active: Fablab.withoutInvoices } + }; + // List of all users invoices $scope.invoices = invoices; diff --git a/app/assets/templates/admin/invoices/index.html.erb b/app/assets/templates/admin/invoices/index.html.erb index 0d1546452..9ca28e005 100644 --- a/app/assets/templates/admin/invoices/index.html.erb +++ b/app/assets/templates/admin/invoices/index.html.erb @@ -24,7 +24,7 @@
- +

{{ 'invoices.filter_invoices' | translate }}

@@ -116,7 +116,7 @@ - +