Ajout d'un champ permettant de rédiger le rapport de vote #28
|
@ -172,6 +172,16 @@ func NewDefault() *Config {
|
|||
{{ end }}
|
||||
{{- end}}
|
||||
|
||||
{{- with .Voted }}
|
||||
|
||||
Récemment votés
|
||||
---------------
|
||||
|
||||
{{range . -}}
|
||||
- "{{ .Title }}" - {{ $root.BaseURL }}/decisions/{{ .ID }} - voté le {{ .VotedAt.Format "02/01/2006" }}
|
||||
{{ end }}
|
||||
{{- end}}
|
||||
|
||||
{{- with .NewDecisionSupportFiles }}
|
||||
|
||||
Nouveaux dossiers d'aide à la décision
|
||||
|
|
|
@ -73,6 +73,7 @@ func (t *Newsletter) Run() {
|
|||
newWorkgroups := make([]*model.Workgroup, 0)
|
||||
newDecisionSupportFiles := make([]*model.DecisionSupportFile, 0)
|
||||
readyToVote := make([]*model.DecisionSupportFile, 0)
|
||||
voted := make([]*model.DecisionSupportFile, 0)
|
||||
|
||||
workgroupRepo := model.NewWorkgroupRepository(db)
|
||||
dsfRepo := model.NewDSFRepository(db)
|
||||
|
@ -122,6 +123,10 @@ func (t *Newsletter) Run() {
|
|||
if dsf.Status == model.StatusReady {
|
||||
readyToVote = append(readyToVote, dsf)
|
||||
}
|
||||
|
||||
if dsf.Status == model.StatusVoted {
|
||||
voted = append(voted, dsf)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -147,6 +152,7 @@ func (t *Newsletter) Run() {
|
|||
NewWorkgroups []*model.Workgroup
|
||||
NewDecisionSupportFiles []*model.DecisionSupportFile
|
||||
ReadyToVote []*model.DecisionSupportFile
|
||||
Voted []*model.DecisionSupportFile
|
||||
BaseURL string
|
||||
From time.Time
|
||||
To time.Time
|
||||
|
@ -157,6 +163,7 @@ func (t *Newsletter) Run() {
|
|||
NewWorkgroups: newWorkgroups,
|
||||
NewDecisionSupportFiles: newDecisionSupportFiles,
|
||||
ReadyToVote: readyToVote,
|
||||
Voted: voted,
|
||||
From: from.Local(),
|
||||
To: to.Local(),
|
||||
HasEvents: hasEvents,
|
||||
|
|
Loading…
Reference in New Issue