remove localtime as it uses server timezone
This commit is contained in:
parent
9475795143
commit
3dad743d56
11 changed files with 15 additions and 15 deletions
|
@ -5,11 +5,11 @@ class DossierDecorator < Draper::Decorator
|
||||||
delegate_all
|
delegate_all
|
||||||
|
|
||||||
def first_creation
|
def first_creation
|
||||||
created_at.localtime.strftime('%d/%m/%Y %H:%M')
|
created_at.strftime('%d/%m/%Y %H:%M')
|
||||||
end
|
end
|
||||||
|
|
||||||
def last_update
|
def last_update
|
||||||
updated_at.localtime.strftime('%d/%m/%Y %H:%M')
|
updated_at.strftime('%d/%m/%Y %H:%M')
|
||||||
end
|
end
|
||||||
|
|
||||||
def display_state
|
def display_state
|
||||||
|
|
|
@ -2,12 +2,12 @@ class ProcedureDecorator < Draper::Decorator
|
||||||
delegate_all
|
delegate_all
|
||||||
|
|
||||||
def created_at_fr
|
def created_at_fr
|
||||||
created_at.localtime.strftime('%d/%m/%Y %H:%M')
|
created_at.strftime('%d/%m/%Y %H:%M')
|
||||||
end
|
end
|
||||||
|
|
||||||
def published_at_fr
|
def published_at_fr
|
||||||
if published_at.present?
|
if published_at.present?
|
||||||
published_at.localtime.strftime('%d/%m/%Y %H:%M')
|
published_at.strftime('%d/%m/%Y %H:%M')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ module CommentaireHelper
|
||||||
def commentaire_date(commentaire)
|
def commentaire_date(commentaire)
|
||||||
is_current_year = (commentaire.created_at.year == Date.current.year)
|
is_current_year = (commentaire.created_at.year == Date.current.year)
|
||||||
template = is_current_year ? :message_date : :message_date_with_year
|
template = is_current_year ? :message_date : :message_date_with_year
|
||||||
I18n.l(commentaire.created_at.localtime, format: template)
|
I18n.l(commentaire.created_at, format: template)
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
|
@ -14,7 +14,7 @@ class Commentaire < ApplicationRecord
|
||||||
after_create :notify
|
after_create :notify
|
||||||
|
|
||||||
def header
|
def header
|
||||||
"#{sender}, #{I18n.l(created_at.localtime, format: '%d %b %Y %H:%M')}"
|
"#{sender}, #{I18n.l(created_at, format: '%d %b %Y %H:%M')}"
|
||||||
end
|
end
|
||||||
|
|
||||||
def sender
|
def sender
|
||||||
|
|
|
@ -126,7 +126,7 @@ module TagsSubstitutionConcern
|
||||||
|
|
||||||
def format_date(date)
|
def format_date(date)
|
||||||
if date.present?
|
if date.present?
|
||||||
date.localtime.strftime('%d/%m/%Y')
|
date.strftime('%d/%m/%Y')
|
||||||
else
|
else
|
||||||
''
|
''
|
||||||
end
|
end
|
||||||
|
|
|
@ -194,7 +194,7 @@ class Dossier < ApplicationRecord
|
||||||
else
|
else
|
||||||
parts = [
|
parts = [
|
||||||
"Dossier déposé le ",
|
"Dossier déposé le ",
|
||||||
en_construction_at.localtime.strftime("%d/%m/%Y"),
|
en_construction_at.strftime("%d/%m/%Y"),
|
||||||
" sur la démarche ",
|
" sur la démarche ",
|
||||||
procedure.libelle,
|
procedure.libelle,
|
||||||
" gérée par l'organisme ",
|
" gérée par l'organisme ",
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
%h2.claimant
|
%h2.claimant
|
||||||
Demandeur :
|
Demandeur :
|
||||||
%span.email= @avis.claimant.email
|
%span.email= @avis.claimant.email
|
||||||
%span.date Demande d'avis envoyée le #{I18n.l(@avis.created_at.localtime, format: '%d/%m/%y')}
|
%span.date Demande d'avis envoyée le #{I18n.l(@avis.created_at, format: '%d/%m/%y')}
|
||||||
%p.introduction= @avis.introduction
|
%p.introduction= @avis.introduction
|
||||||
|
|
||||||
= form_for @avis, url: gestionnaire_avis_path(@avis), html: { class: 'form' } do |f|
|
= form_for @avis, url: gestionnaire_avis_path(@avis), html: { class: 'form' } do |f|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
confidentiel
|
confidentiel
|
||||||
%span.icon.lock{ title: "Cet avis n'est pas affiché avec les autres experts consultés" }
|
%span.icon.lock{ title: "Cet avis n'est pas affiché avec les autres experts consultés" }
|
||||||
%span.date{ class: highlight_if_unseen_class(avis_seen_at, avis.created_at) }
|
%span.date{ class: highlight_if_unseen_class(avis_seen_at, avis.created_at) }
|
||||||
Demande d'avis envoyée le #{I18n.l(avis.created_at.localtime, format: '%d/%m/%y à %H:%M')}
|
Demande d'avis envoyée le #{I18n.l(avis.created_at, format: '%d/%m/%y à %H:%M')}
|
||||||
%p= avis.introduction
|
%p= avis.introduction
|
||||||
|
|
||||||
.answer.flex.align-start
|
.answer.flex.align-start
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
= (avis.email_to_display == current_gestionnaire.email) ? 'Vous' : avis.email_to_display
|
= (avis.email_to_display == current_gestionnaire.email) ? 'Vous' : avis.email_to_display
|
||||||
- if avis.answer.present?
|
- if avis.answer.present?
|
||||||
%span.date{ class: highlight_if_unseen_class(avis_seen_at, avis.updated_at) }
|
%span.date{ class: highlight_if_unseen_class(avis_seen_at, avis.updated_at) }
|
||||||
Réponse donnée le #{I18n.l(avis.updated_at.localtime, format: '%d/%m/%y à %H:%M')}
|
Réponse donnée le #{I18n.l(avis.updated_at, format: '%d/%m/%y à %H:%M')}
|
||||||
- else
|
- else
|
||||||
%span.waiting En attente de réponse
|
%span.waiting En attente de réponse
|
||||||
%p= avis.answer
|
%p= avis.answer
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
= render partial: 'shared/dossiers/status_badge', locals: { dossier: dossier }
|
= render partial: 'shared/dossiers/status_badge', locals: { dossier: dossier }
|
||||||
%td.updated-at-col
|
%td.updated-at-col
|
||||||
= link_to(url_for_dossier(dossier), class: 'cell-link') do
|
= link_to(url_for_dossier(dossier), class: 'cell-link') do
|
||||||
= dossier.updated_at.localtime.strftime("%d/%m/%Y")
|
= dossier.updated_at.strftime("%d/%m/%Y")
|
||||||
= paginate(@dossiers)
|
= paginate(@dossiers)
|
||||||
|
|
||||||
- if current_user.feedbacks.empty? || current_user.feedbacks.last.created_at < 1.month.ago
|
- if current_user.feedbacks.empty? || current_user.feedbacks.last.created_at < 1.month.ago
|
||||||
|
|
|
@ -73,4 +73,4 @@
|
||||||
%td.updated-at
|
%td.updated-at
|
||||||
%span{ class: highlight_if_unseen_class(demande_seen_at, c.updated_at) }
|
%span{ class: highlight_if_unseen_class(demande_seen_at, c.updated_at) }
|
||||||
modifié le
|
modifié le
|
||||||
= c.updated_at.localtime.strftime("%d/%m/%Y à %H:%M")
|
= c.updated_at.strftime("%d/%m/%Y à %H:%M")
|
||||||
|
|
|
@ -23,11 +23,11 @@
|
||||||
= link_to pj.content_url, { target: :blank } do
|
= link_to pj.content_url, { target: :blank } do
|
||||||
%span.filename= display_pj_filename(pj)
|
%span.filename= display_pj_filename(pj)
|
||||||
%span
|
%span
|
||||||
ajoutée le #{pj.created_at.localtime.strftime('%d/%m/%Y à %H:%M')}
|
ajoutée le #{pj.created_at.strftime('%d/%m/%Y à %H:%M')}
|
||||||
- else
|
- else
|
||||||
%td Pièce non fournie
|
%td Pièce non fournie
|
||||||
%td.updated-at
|
%td.updated-at
|
||||||
- if pj
|
- if pj
|
||||||
%span{ class: highlight_if_unseen_class(demande_seen_at, pj.updated_at) }
|
%span{ class: highlight_if_unseen_class(demande_seen_at, pj.updated_at) }
|
||||||
modifié le
|
modifié le
|
||||||
= pj.updated_at.localtime.strftime("%d/%m/%Y à %H:%M")
|
= pj.updated_at.strftime("%d/%m/%Y à %H:%M")
|
||||||
|
|
Loading…
Add table
Reference in a new issue