mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-04 15:24:23 +01:00
11 lines
560 B
Ruby
11 lines
560 B
Ruby
json.title notification.notification_type
|
|
if notification.attached_object.type == 'percent_off'
|
|
json.description t('.enjoy_a_discount_of_PERCENT_with_code_CODE',
|
|
PERCENT: notification.attached_object.percent_off,
|
|
CODE: notification.attached_object.code)
|
|
else
|
|
json.description t('.enjoy_a_discount_of_AMOUNT_with_code_CODE',
|
|
AMOUNT: number_to_currency(notification.attached_object.amount_off / 100.00, locale: CURRENCY_LOCALE),
|
|
CODE: notification.attached_object.code)
|
|
end
|