1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-17 11:54:22 +01:00

fixes accounting codes setting + improved error handling

This commit is contained in:
Sylvain 2019-09-17 13:00:25 +02:00
parent 3348539fdf
commit aef4cc49f2
7 changed files with 15 additions and 7 deletions

View File

@ -549,7 +549,10 @@ Application.Controllers.controller('InvoicesController', ['$scope', '$state', 'I
Setting.bulkUpdate(
{ settings: Object.values($scope.settings) },
function () { growl.success(_t('invoices.codes_customization_success')); },
function (error) { console.log(error); }
function (error) {
growl.error('unexpected_error_occurred');
console.error(error);
}
);
}

View File

@ -900,11 +900,12 @@ angular.module('application.router', ['ui.router'])
settings: ['Setting', function (Setting) {
return Setting.query({
names: `['invoice_legals', 'invoice_text', 'invoice_VAT-rate', 'invoice_VAT-active', 'invoice_order-nb', 'invoice_code-value', \
'invoice_code-active', 'invoice_reference', 'invoice_logo', 'accounting_journal_code', 'accounting_client_code', \
'accounting_client_label', 'accounting_wallet_code', 'accounting_wallet_label', 'accounting_VAT_code', 'accounting_VAT_label', \
'accounting_subscription_code', 'accounting_subscription_label', 'accounting_Machine_code', 'accounting_Machine_label', \
'accounting_Training_code', 'accounting_Training_label', 'accounting_Event_code', 'accounting_Event_label', \
'accounting_Space_code', 'accounting_Space_label', 'accounting_coupon_code', 'accounting_coupon_label']` }).$promise;
'invoice_code-active', 'invoice_reference', 'invoice_logo', 'accounting_journal_code', 'accounting_card_client_code', \
'accounting_card_client_label', 'accounting_site_client_code', 'accounting_site_client_label', 'accounting_wallet_code', \
'accounting_wallet_label', 'accounting_VAT_code', 'accounting_VAT_label', 'accounting_subscription_code', \
'accounting_subscription_label', 'accounting_Machine_code', 'accounting_Machine_label', 'accounting_Training_code', \
'accounting_Training_label', 'accounting_Event_code', 'accounting_Event_label', 'accounting_Space_code', \
'accounting_Space_label', 'accounting_coupon_code', 'accounting_coupon_label']` }).$promise;
}],
invoices: [ 'Invoice', function (Invoice) {
return Invoice.list({

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true
@settings.each do |setting|
json.settings @settings.each do |setting|
if setting[:errors]
json.error setting.errors.full_messages
json.id setting.id

View File

@ -101,6 +101,7 @@ en:
unlimited: "Unlimited"
payment_card_error: "A problem occurred with your payment card:"
online_payment_disabled: "Online payment is not available. Please contact the Fablab reception directly."
unexpected_error_occurred: "An unexpected error occurred"
messages:
you_will_lose_any_unsaved_modification_if_you_quit_this_page: "You will lose any unsaved modification if you quit this page"

View File

@ -101,6 +101,7 @@ es:
unlimited: "Ilimitado"
payment_card_error: "Hubo un problema con su tarjeta:"
online_payment_disabled: "El pago en línea no está disponible. Póngase en contacto directamente con la recepción de Fablab."
unexpected_error_occurred: "Ocurrió un error inesperado"
messages:
you_will_lose_any_unsaved_modification_if_you_quit_this_page: "Si cierra la página se perderán todas las modificaciones que no se hayan guardado"

View File

@ -101,6 +101,7 @@ fr:
unlimited: "Illimité"
payment_card_error: "Un problème est survenu avec votre carte bancaire :"
online_payment_disabled: "Le payment par carte bancaire n'est pas disponible. Merci de contacter directement l'accueil du Fablab."
unexpected_error_occurred: "Une erreur inattendue est survenue"
messages:
you_will_lose_any_unsaved_modification_if_you_quit_this_page: "Vous perdrez les modifications non enregistrées si vous quittez cette page"

View File

@ -101,6 +101,7 @@ pt:
unlimited: "Ilimitado"
payment_card_error: "A problem occurred with your payment card:" # translation_missing
online_payment_disabled: "El pago en línea no está disponible. Póngase en contacto directamente con la recepción de Fablab."
unexpected_error_occurred: "Um erro inesperado ocorreu"
messages:
you_will_lose_any_unsaved_modification_if_you_quit_this_page: "Você irá perder todas as modificações não salvas se sair desta página"