mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-19 13:54:25 +01:00
export notifications
This commit is contained in:
parent
a7f68b59dd
commit
fa6a54a422
@ -905,11 +905,12 @@ Application.Controllers.controller('ClosePeriodModalController', ['$scope', '$ui
|
||||
}
|
||||
]);
|
||||
|
||||
Application.Controllers.controller('AccountingExportModalController', ['$scope', '$uibModalInstance', 'Invoice', 'AccountingExport', function ($scope, $uibModalInstance, Invoice, AccountingExport) {
|
||||
Application.Controllers.controller('AccountingExportModalController', ['$scope', '$uibModalInstance', 'Invoice', 'AccountingExport', 'growl', '_t',
|
||||
function ($scope, $uibModalInstance, Invoice, AccountingExport, growl, _t) {
|
||||
|
||||
const SETTINGS = {
|
||||
acd: {
|
||||
format: 'CSV',
|
||||
format: 'csv',
|
||||
encoding: 'ISO-8859-1',
|
||||
separator: ';',
|
||||
dateFormat: '%d/%m/%Y',
|
||||
@ -947,6 +948,7 @@ Application.Controllers.controller('AccountingExportModalController', ['$scope',
|
||||
*/
|
||||
$scope.ok = function () {
|
||||
AccountingExport.export($scope.exportTarget, function(res) {
|
||||
growl.info(_t('invoices.export_is_running'))
|
||||
$uibModalInstance.close(res);
|
||||
});
|
||||
};
|
||||
|
@ -16,9 +16,13 @@ class API::AccountingExportsController < API::ApiController
|
||||
category: 'accounting',
|
||||
export_type: 'accounting-software',
|
||||
user: current_user,
|
||||
extension: params[:extension],
|
||||
query: params[:query],
|
||||
key: params[:separator]
|
||||
extension: params[:settings][:format],
|
||||
query: {
|
||||
columns: params[:settings][:columns],
|
||||
encoding: params[:settings][:encoding],
|
||||
date_format: params[:settings][:dateFormat]
|
||||
}.to_json,
|
||||
key: params[:settings][:separator]
|
||||
)
|
||||
if @export.save
|
||||
render json: { export_id: @export.id }, status: :ok
|
||||
|
@ -5,6 +5,6 @@
|
||||
<%= t(".body.#{@attached_object.category}_#{@attached_object.export_type}") %>.
|
||||
</p>
|
||||
<p>
|
||||
<%= t('.body.click_to_download') %>
|
||||
<%= t('.body.click_to_download', TYPE: t(".body.file_type.#{@attached_object.extension}")) %>
|
||||
<%=link_to( t('.body.here'), "#{root_url}api/exports/#{@attached_object.id}/download", target: "_blank" )%>
|
||||
</p>
|
||||
</p>
|
||||
|
@ -474,6 +474,7 @@ en:
|
||||
customization_of_SETTING_successfully_saved: "Customization of the {{SETTING}} successfully saved." # angular interpolation
|
||||
export_accounting_data: "Export accounting data"
|
||||
export_to: "Export to the accounting software"
|
||||
export_is_running: "Export is running. You'll be notified when it's ready."
|
||||
acd: "ACD"
|
||||
export_form_date: "Export from"
|
||||
export_to_date: "Export until"
|
||||
|
@ -474,6 +474,7 @@ es:
|
||||
customization_of_SETTING_successfully_saved: "Customization of the {{SETTING}} successfully saved." # angular interpolation # translation_missing
|
||||
export_accounting_data: "Export accounting data" # translation_missing
|
||||
export_to: "Export to the accounting software" # translation_missing
|
||||
export_is_running: "Exportando, será notificado cuando esté listo."
|
||||
acd: "ACD" # translation_missing
|
||||
export_form_date: "Export from" # translation_missing
|
||||
export_to_date: "Export until" # translation_missing
|
||||
|
@ -474,6 +474,7 @@ fr:
|
||||
customization_of_SETTING_successfully_saved: "La personnalisation de {{SETTING}} a bien été enregistrée." # angular interpolation
|
||||
export_accounting_data: "Exporter les données comptables"
|
||||
export_to: "Exporter vers le logiciel comptable"
|
||||
export_is_running: "L'export est en cours. Vous serez notifié lorsqu'il sera prêt."
|
||||
acd: "ACD"
|
||||
export_form_date: "Exporter depuis le"
|
||||
export_to_date: "Exporter jusqu'au"
|
||||
|
@ -471,9 +471,10 @@ pt:
|
||||
general_coupon_code: "Accounting code for all coupons" # translation_missing
|
||||
accounting_coupon_label: "Coupons label" # translation_missing
|
||||
general_coupon_label: "Account label for all coupons" # translation_missing
|
||||
customization_of_SETTING_successfully_saved: "Customization of the {{SETTING}} successfully saved." # angular interpolation # translation_missing
|
||||
customization_of_SETTING_successfully_saved: "Customization of the {{SETTING}} successfully saved." # angular interpolation # translation_missing
|
||||
export_accounting_data: "Export accounting data" # translation_missing
|
||||
export_to: "Export to the accounting software" # translation_missing
|
||||
export_is_running: "A Exportação está em andamento. Você será notificado quando terminar."
|
||||
acd: "ACD" # translation_missing
|
||||
export_form_date: "Export from" # translation_missing
|
||||
export_to_date: "Export until" # translation_missing
|
||||
|
@ -113,8 +113,8 @@ en:
|
||||
by_cheque: "by cheque"
|
||||
by_transfer: "by transfer"
|
||||
by_cash: "by cash"
|
||||
no_refund: "No refund"
|
||||
by_wallet: "by wallet"
|
||||
no_refund: "No refund"
|
||||
settlement_by_debit_card: "Settlement by debit card"
|
||||
settlement_done_at_the_reception: "Settlement done at the reception"
|
||||
settlement_by_wallet: "Settlement by wallet"
|
||||
@ -126,6 +126,9 @@ en:
|
||||
subscription_of_NAME_extended_starting_from_STARTDATE_until_ENDDATE: "Subscription of %{NAME} extended (Free days) starting from %{STARTDATE} until %{ENDDATE}"
|
||||
and: 'and'
|
||||
|
||||
accounting_export:
|
||||
VAT: 'VAT'
|
||||
|
||||
trainings:
|
||||
# training availabilities
|
||||
i_ve_reserved: "I've reserved"
|
||||
@ -307,6 +310,7 @@ en:
|
||||
users_subscriptions: "of the subscriptions' list"
|
||||
users_reservations: "of the reservations' list"
|
||||
availabilities_index: "of the reservations availabilities"
|
||||
accounting_accounting-software: "of the accounting data"
|
||||
is_over: "is over."
|
||||
download_here: "Download here"
|
||||
notify_member_about_coupon:
|
||||
|
@ -126,6 +126,9 @@ es:
|
||||
subscription_of_NAME_extended_starting_from_STARTDATE_until_ENDDATE: "Subscripción de %{NAME} extendida (Free days) empezando desde %{STARTDATE} hasta %{ENDDATE}"
|
||||
and: 'y'
|
||||
|
||||
accounting_export:
|
||||
VAT: 'IVA'
|
||||
|
||||
trainings:
|
||||
# training availabilities
|
||||
i_ve_reserved: "he reservado"
|
||||
@ -307,6 +310,7 @@ es:
|
||||
users_subscriptions: "de la lista de suscripciones"
|
||||
users_reservations: "de la lista de reservas"
|
||||
availabilities_index: "de las reservas disponibles"
|
||||
accounting_accounting-software: "de los datos contables"
|
||||
is_over: "se ha acabado."
|
||||
download_here: "Descargar aquí"
|
||||
notify_member_about_coupon:
|
||||
|
@ -310,6 +310,7 @@ fr:
|
||||
users_subscriptions: "de la liste des abonnements"
|
||||
users_reservations: "de la liste des réservations"
|
||||
availabilities_index: "des disponibilités de réservations"
|
||||
accounting_accounting-software: "des données comptables"
|
||||
is_over: "est terminé."
|
||||
download_here: "Téléchargez ici"
|
||||
notify_member_about_coupon:
|
||||
|
@ -267,8 +267,12 @@ en:
|
||||
users_subscriptions: "of the subscriptions' list"
|
||||
users_reservations: "of the reservations' list"
|
||||
availabilities_index: "of the reservations availabilities"
|
||||
accounting_accounting-software: "of the accounting data"
|
||||
click_to_download: "Excel file generated successfully. To download it, click"
|
||||
here: "here"
|
||||
file_type:
|
||||
xlsx: "Excel"
|
||||
csv: "CSV"
|
||||
|
||||
notify_member_about_coupon:
|
||||
subject: "Coupon"
|
||||
|
@ -266,8 +266,12 @@ es:
|
||||
users_subscriptions: "de la lista de suscripciones"
|
||||
users_reservations: "de la lista de reservas"
|
||||
availabilities_index: "de las reservas disponibles"
|
||||
accounting_accounting-software: "de los datos contables"
|
||||
click_to_download: " archivo Excel generado correctamente. Para descargarlo, haga clic "
|
||||
here: "aquí"
|
||||
file_type:
|
||||
xlsx: "Excel"
|
||||
csv: "CSV"
|
||||
|
||||
notify_member_about_coupon:
|
||||
subject: "Cupón"
|
||||
|
@ -267,8 +267,12 @@ fr:
|
||||
users_subscriptions: "de la liste des abonnements"
|
||||
users_reservations: "de la liste des réservations"
|
||||
availabilities_index: "des disponibilités de réservations"
|
||||
click_to_download: "La génération est terminée. Pour télécharger le fichier Excel, cliquez"
|
||||
accounting_accounting-software: "des données comptables"
|
||||
click_to_download: "La génération est terminée. Pour télécharger le fichier %{TYPE}, cliquez"
|
||||
here: "ici"
|
||||
file_type:
|
||||
xlsx: "Excel"
|
||||
csv: "CSV"
|
||||
|
||||
notify_member_about_coupon:
|
||||
subject: "Code promo"
|
||||
|
@ -267,8 +267,12 @@ pt:
|
||||
users_subscriptions: "da lista de assinaturas"
|
||||
users_reservations: "da lista de reservas"
|
||||
availabilities_index: "as reservas disponíveis"
|
||||
accounting_accounting-software: "de dados contábeis"
|
||||
click_to_download: "Arquivo do Excel gerado com êxito. Para fazer o download, clique"
|
||||
here: "aqui"
|
||||
file_type:
|
||||
xlsx: "Excel"
|
||||
csv: "CSV"
|
||||
|
||||
notify_member_about_coupon:
|
||||
subject: "Cupom"
|
||||
|
@ -126,6 +126,9 @@ pt:
|
||||
subscription_of_NAME_extended_starting_from_STARTDATE_until_ENDDATE: "Assinatura de %{NAME} estendida (dias livres) a partir de% STARTDATE até %{ENDDATE}"
|
||||
and: 'e'
|
||||
|
||||
accounting_export:
|
||||
VAT: 'IVA'
|
||||
|
||||
trainings:
|
||||
# training availabilities
|
||||
i_ve_reserved: "Eu reservei"
|
||||
@ -307,6 +310,7 @@ pt:
|
||||
users_subscriptions: "da lista de assinaturas"
|
||||
users_reservations: "da lista de reservas"
|
||||
availabilities_index: "de reservas disponíveis"
|
||||
accounting_accounting-software: "de dados contábeis"
|
||||
is_over: "está finalizado."
|
||||
download_here: "Baixe aqui"
|
||||
notify_member_about_coupon:
|
||||
|
Loading…
x
Reference in New Issue
Block a user