mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-18 07:52:23 +01:00
[bug] unable to delete an admin who has changed a setting
This commit is contained in:
parent
0cd841da33
commit
d2c4773ac9
@ -4,6 +4,8 @@
|
||||
- Fix a bug: error handling on machine attachment upload
|
||||
- Fix a bug: first day of week is ignored in statistics custom filter
|
||||
- Fix a bug: rails DSB locale is invalid
|
||||
- Fix a bug: unable to delete an admin who has changed a setting
|
||||
- Fix a bug: unable to create/edit a plan of 12 months or 52 weeks
|
||||
- Removed ability to disable invoicing for an user
|
||||
- Refactored frontend invoices translations
|
||||
- Updated RailRoady 1.4.0 to 1.5.3
|
||||
|
@ -179,3 +179,8 @@
|
||||
font-size: small;
|
||||
}
|
||||
}
|
||||
|
||||
.no-user-label {
|
||||
font-style: italic;
|
||||
color: #5a5a5a;
|
||||
}
|
||||
|
@ -399,7 +399,7 @@
|
||||
<tr ng-repeat="value in history">
|
||||
<td>{{value.value}} %</td>
|
||||
<td>{{value.created_at | amDateFormat:'L LT'}}</td>
|
||||
<td>{{value.user.name}}</td>
|
||||
<td>{{value.user.name}}<span class="no-user-label" ng-hide="value.user" translate>{{ 'invoices.deleted_user' }}</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -54,6 +54,8 @@ class User < ActiveRecord::Base
|
||||
|
||||
has_many :exports, dependent: :destroy
|
||||
|
||||
has_many :history_values, dependent: :nullify
|
||||
|
||||
# fix for create admin user
|
||||
before_save do
|
||||
email&.downcase!
|
||||
|
@ -3,10 +3,12 @@ json.setting do
|
||||
if @show_history
|
||||
json.history @setting.history_values do |value|
|
||||
json.extract! value, :value, :created_at
|
||||
unless value.user_id.nil?
|
||||
json.user do
|
||||
json.id value.user_id
|
||||
json.name "#{value.user.first_name} #{value.user.last_name}"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -367,6 +367,7 @@ en:
|
||||
VAT_history: "VAT rates history"
|
||||
changed_at: "Changed at"
|
||||
changed_by: "By"
|
||||
deleted_user: "Deleted user"
|
||||
refund_invoice_successfully_created: "Refund invoice successfully created."
|
||||
create_a_refund_on_this_invoice: "Create a refund on this invoice"
|
||||
creation_date_for_the_refund: "Creation date for the refund"
|
||||
|
@ -367,6 +367,7 @@ es:
|
||||
VAT_history: "Historial de ratios de IVA"
|
||||
changed_at: "Cambiado en"
|
||||
changed_by: "Por"
|
||||
deleted_user: "Usario eliminado"
|
||||
refund_invoice_successfully_created: "Factura de reembolso creada correctamente."
|
||||
create_a_refund_on_this_invoice: "Crear un reembolso en esta factura"
|
||||
creation_date_for_the_refund: "Fecha de creación del reembolso"
|
||||
|
@ -367,6 +367,7 @@ fr:
|
||||
VAT_history: "Historique des taux de TVA"
|
||||
changed_at: "Changé le"
|
||||
changed_by: "Par"
|
||||
deleted_user: "Utilisateur supprimé"
|
||||
refund_invoice_successfully_created: "La facture d'avoir a bien été créée."
|
||||
create_a_refund_on_this_invoice: "Générer un avoir sur cette facture"
|
||||
creation_date_for_the_refund: "Date d'émission de l'avoir"
|
||||
|
@ -367,6 +367,7 @@ pt:
|
||||
VAT_history: "VAT rates history" #translation_missing
|
||||
changed_at: "Changed at" #translation_missing
|
||||
changed_by: "By" #translation_missing
|
||||
deleted_user: "Deleted user" #translation_missing
|
||||
refund_invoice_successfully_created: "Restituição de fatura criada com sucesso."
|
||||
create_a_refund_on_this_invoice: "Criar restituição de fatura"
|
||||
creation_date_for_the_refund: "Criação de data de restituição"
|
||||
|
Loading…
x
Reference in New Issue
Block a user