espaceperso

package
v0.0.0-...-151ce6e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Expose les fonctionnalités de la page de suivi personnelle

Index

Constants

View Source
const (
	EndPointPartageFicheSanitaire = "/partage_fiche_sanitaire"

	// Pas de modification directe après J-7 (début du camp).
	UpdateLimitation = 7 * 24 * time.Hour
)

Variables

This section is empty.

Functions

func Accueil

func Accueil(c echo.Context) error

Accueil renvoie l'appli statique

Types

type Aide

type Aide struct {
	ChampsAideEditables
	Valid          rd.Bool                  `json:"valid"`
	ValeurComputed rd.Euros                 `json:"valeur_computed"`
	Document       documents.PublicDocument `json:"document"`
}

type CampPlus

type CampPlus struct {
	shared.Camp
	Documents     []documents.PublicDocument `json:"documents"`
	MailDirecteur string                     `json:"mail_directeur"`
}

type ChampsAideEditables

type ChampsAideEditables struct {
	// L'id n'est pas éditable, mais est requis pour identifier les modifications
	IdCrypted string `json:"id_crypted"`

	Valeur               rd.Euros `json:"valeur"`
	ParJour              rd.Bool  `json:"par_jour"`
	NbJoursMax           rd.Int   `json:"nb_jours_max"`
	IdParticipantCrypted string   `json:"id_participant_crypted"`
	IdStructureCrypted   string   `json:"id_structure_crypted"`
}

type ContentEspacePerso

type ContentEspacePerso struct {
	Responsable  Responsable             `json:"responsable"`
	Personnes    map[string]Personne     `json:"personnes"`
	Participants []Participant           `json:"participants"`
	Camps        map[int64]CampPlus      `json:"camps"`
	Messages     []dm.PseudoMessage      `json:"messages"`
	Sondages     map[int64]PublicSondage `json:"sondages"`
}

Définit les types concernés dans les échanges navigateur/serveur

type ContenuAttestation

type ContenuAttestation = dm.ContenuAttestation

type ContenuDocument

type ContenuDocument = dm.ContenuDocument

type ContenuPerso

type ContenuPerso = dm.ContenuPerso

type concret implémentant MessageContenu

type ContenuPlaceLiberee

type ContenuPlaceLiberee = dm.ContenuPlaceLiberee

type ContenuSondage

type ContenuSondage = dm.ContenuSondage

type ContrainteWithOrigine

type ContrainteWithOrigine struct {
	documents.ContrainteDocuments
	Origine rd.Ids `json:"origine"`
}

ContrainteWithOrigine ajoute les séjours imposant la contrainte

type Controller

type Controller struct {
	shared.Controller
	// contains filtered or unexported fields
}

func NewController

func NewController(ct shared.Controller, joomeo logs.Joomeo, sondageNotifier SondageNotifier) (Controller, error)

NewController charge les données initiales

func (Controller) ConfirmePlaceliberee

func (ct Controller) ConfirmePlaceliberee(c echo.Context) error

ConfirmePlaceliberee passe le participant en liste principale et recharge les données.

func (Controller) CreateAide

func (ct Controller) CreateAide(c echo.Context) error

CreateAide ajoute une aide (non validée) au participant donné, et upload un document associé.

func (Controller) CreateDocument

func (ct Controller) CreateDocument(c echo.Context) error

CreateDocument crée les meta données d'un document répondant à la contrainte donnée pour la personne donnée, et upload le contenu du fichier

func (Controller) CreeMessage

func (ct Controller) CreeMessage(c echo.Context) error

CreeMessage envoie un nouveau message.

func (Controller) DeleteAide

func (ct Controller) DeleteAide(c echo.Context) error

DeleteAide supprime l'aide non validée et le document associé

func (Controller) DeleteMessage

func (ct Controller) DeleteMessage(c echo.Context) error

DeleteMessage supprime un message libre. Le message est marqué comme supprimé, et son contenu est réellement supprimé.

func (Controller) DownloadAttestationPresence

func (ct Controller) DownloadAttestationPresence(c echo.Context) error

DownloadAttestationPresence gènère le document et met à jour les messages (les données devraient être raffraichies)

func (Controller) DownloadFacture

func (ct Controller) DownloadFacture(c echo.Context) error

DownloadFacture gènère le document et met à jour les messages (les données devraient être raffraichies)

func (Controller) EditMessage

func (ct Controller) EditMessage(c echo.Context) error

EditMessage modifie le contenu d'un message existant.

func (Controller) GetData

func (ct Controller) GetData(c echo.Context) error

GetData charge les données nécessaire à l'espace perso.

func (Controller) GetFinances

func (ct Controller) GetFinances(c echo.Context) error

GetFinances charge les données financières à l'espace perso.

func (Controller) GetMetas

func (ct Controller) GetMetas(c echo.Context) error

GetMeta charge les données statiques à l'espace perso.

func (Controller) LoadJoomeo

func (ct Controller) LoadJoomeo(c echo.Context) error

LoadJoomeo renvoie les données permettant l'accès à Joomeo

func (Controller) MarkConnection

func (ct Controller) MarkConnection(c echo.Context) error

MarkConnection enregistre la connection sur l'espace de suivi, pour permettre la mise à jour de l'état des notifications.

func (Controller) SaveSondage

func (ct Controller) SaveSondage(c echo.Context) error

SaveSondage enregiste le retour sur un séjour. Un idCrypted vide crée un nouvel item

func (Controller) SendMailPartageFicheSanitaire

func (ct Controller) SendMailPartageFicheSanitaire(host, respoMail string, participant rd.Personne) ([]string, error)

SendMailPartageFicheSanitaire envoie un mail aux adresses autorisées par la fiche sanitaire, demandant d'inclure `respoMail`. Le mail contient une url relative à `host`.

func (Controller) TransfertFicheSanitaire

func (ct Controller) TransfertFicheSanitaire(c echo.Context) error

TransfertFicheSanitaire envoie un mail de demande de transfert

func (Controller) UpdateAide

func (ct Controller) UpdateAide(c echo.Context) error

UpdateAide met à jour une aide encore non validée.

func (Controller) UpdateFicheSanitaire

func (ct Controller) UpdateFicheSanitaire(c echo.Context) error

UpdateFicheSanitaire met à jour une fiche sanitaire

func (Controller) UpdateOptionsParticipants

func (ct Controller) UpdateOptionsParticipants(c echo.Context) error

UpdateOptionsParticipants met à jour les participants

func (Controller) ValideTransfertFicheSanitaire

func (ct Controller) ValideTransfertFicheSanitaire(c echo.Context) error

ValideTransfertFicheSanitaire accepte un transfert.

type Coordonnees

type Coordonnees struct {
	Mail       rd.String `json:"mail"`
	Tels       rd.Tels   `json:"tels"`
	Adresse    rd.String `json:"adresse"`
	CodePostal rd.String `json:"code_postal"`
	Ville      rd.String `json:"ville"`
	Pays       rd.String `json:"pays"`
}

type EditMessage

type EditMessage struct {
	Id      int64     `json:"id"`
	Contenu rd.String `json:"contenu"`
}

type Finances

type Finances struct {
	Aides          []Aide                   `json:"aides"`
	Structureaides map[string]Structureaide `json:"structure_aides"`
	Paiements      []Paiement               `json:"paiements"`
	EtatFinancier  etatFinancier            `json:"etat_financier"`
	LabelVirement  string                   `json:"label_virement"`
}

Finances regroupe les données liées à l'établissement d'une facture

type InCreateDocument

type InCreateDocument struct {
	IdPersonne   string `json:"id_personne"`
	IdContrainte string `json:"id_contrainte"`
}

InCreateDocument contient les ids cryptés

type InFicheSanitaire

type InFicheSanitaire struct {
	IdCrypted       string            `json:"id_crypted"`
	FicheSanitaire  rd.FicheSanitaire `json:"fiche_sanitaire"`
	SecuriteSociale string            `json:"securite_sociale"`
}

type JoomeoOutput

type JoomeoOutput struct {
	UrlSpace string         `json:"url_space"`
	Loggin   string         `json:"loggin"`
	Password string         `json:"password"`
	Albums   []joomeo.Album `json:"albums"`
}

type LockableFicheSanitaire

type LockableFicheSanitaire struct {
	rd.FicheSanitaire
	Locked bool `json:"locked"`
}

type MetaEspacePerso

type MetaEspacePerso struct {
	ContrainteVaccin      documents.PublicContrainte `json:"contrainte_vaccin"`
	UpdateLimitation      int                        `json:"update_limitation"` // en heures
	MailCentreInscription string                     `json:"mail_centre_inscription"`
}

MetaEspacePerso expose les données statiques

type OutFicheSanitaire

type OutFicheSanitaire struct {
	FicheSanitaire  LockableFicheSanitaire `json:"fiche_sanitaire"`
	SecuriteSociale rd.String              `json:"securite_sociale"`
}

type Paiement

type Paiement struct {
	LabelPayeur     rd.String      `json:"label_payeur"`
	Valeur          rd.Euros       `json:"valeur"`
	IsInvalide      rd.Bool        `json:"is_invalide"`
	DateReglement   rd.Time        `json:"date_reglement"`
	ModePaiement    rd.ModePaiment `json:"mode_paiement"`
	IsRemboursement rd.Bool        `json:"is_remboursement"`
}

type Participant

type Participant struct {
	Id                       int64                 `json:"id,omitempty"` // en lecture seulement, les modifications sont sécurisées avec IdCrypted
	IdCrypted                string                `json:"id_crypted,omitempty"`
	IdPersonneCrypted        string                `json:"id_personne_crypted,omitempty"`
	IdCamp                   int64                 `json:"id_camp,omitempty"`
	ListeAttente             rd.ListeAttente       `json:"liste_attente,omitempty"`
	HintsAttente             rd.HintsAttente       `json:"hints_attente,omitempty"`
	IsFicheSanitaireUpToDate bool                  `json:"is_fiche_sanitaire_up_to_date,omitempty"`
	Options                  rd.OptionsParticipant `json:"options,omitempty"`
}

type Personne

type Personne struct {
	IdCrypted      string                     `json:"id_crypted"`
	Prenom         string                     `json:"prenom"`
	NomPrenom      string                     `json:"nom_prenom"`
	Sexe           rd.Sexe                    `json:"sexe"`
	DateNaissance  rd.Date                    `json:"date_naissance"`
	FicheSanitaire LockableFicheSanitaire     `json:"fiche_sanitaire"`
	Vaccins        []documents.PublicDocument `json:"vaccins"`
	Documents      []ContrainteWithOrigine    `json:"documents"`
	IsTemporaire   rd.Bool                    `json:"is_temporaire"`
}

type PublicSondage

type PublicSondage struct {
	IdCrypted string    `json:"id_crypted"`
	IdCamp    int64     `json:"id_camp"`
	Modified  time.Time `json:"modified"`
	rd.RepSondage
}

type Responsable

type Responsable struct {
	Coordonnees
	Prenom          string    `json:"prenom"`
	Sexe            rd.Sexe   `json:"sexe"`
	NomPrenom       string    `json:"nom_prenom"`
	CopiesMails     []string  `json:"copies_mails"`
	SecuriteSociale rd.String `json:"securite_sociale"`
	// y compris le responsable
	DestinatairesOptionnels rd.DestinatairesOptionnels `json:"destinataires_optionnels"`
}

type SondageNotifier

type SondageNotifier interface {
	Notifie(host string, sondage rd.Sondage) error
}

type Structureaide

type Structureaide struct {
	IdCrypted string    `json:"id_crypted"`
	Nom       rd.String `json:"nom"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL