github.com/benoitkugler/goacve@v0.0.0-20201217100549-151ce6e55dc8/server/frontend/bv/src/pages/accueil/App.vue (about)

     1  <template>
     2    <base-app :title="title" :isAccueil="true">
     3      <error v-if="output" :output="output"></error>
     4  
     5      <b-modal
     6        v-model="showDialog"
     7        title="Recherche de votre espace de suivi"
     8        ok-only
     9      >
    10        <div v-if="mailFound">
    11          Votre adresse mail a bien été utilisée dans une inscription. <br />
    12          Un mail de notification vient de vous y être envoyé.
    13        </div>
    14        <div v-else>
    15          Votre adresse mail ne fait pas partie des inscriptions enregitrées dans
    16          notre base de données. <br />
    17          Veuillez nous contacter par <b-link :href="mailLien">email</b-link>.
    18        </div>
    19      </b-modal>
    20  
    21      <b-container class="mt-2 mb-4">
    22        <h4 class="text-center my-3">Bienvenue sur le portail de l'ACVE !</h4>
    23  
    24        <b-card>
    25          <b-card-title class="bg-accent d-inline rounded p-2">
    26            Inscriptions
    27          </b-card-title>
    28          <b-card-text>
    29            <b-row class="m-3">
    30              <b-col md="9" xs="6">
    31                Vous souhaitez vous <b>inscrire</b> à un camp proposé par l'ACVE ?
    32                C'est par là !
    33              </b-col>
    34              <b-col md="3" xs="6" class="text-right">
    35                <b-button variant="secondary" href="/inscription">
    36                  INSCRIPTION
    37                </b-button>
    38              </b-col>
    39            </b-row>
    40            <b-row class="m-3">
    41              <b-col md="7" xs="12">
    42                Vous souhaitez accéder à votre <b>espace de suivi</b> ? Recevez à
    43                nouveau votre lien de connection par email.
    44              </b-col>
    45              <b-col md="5" xs="12" class="text-right">
    46                <b-row no-gutters>
    47                  <b-col class="align-self-center pr-1">
    48                    <b-form-group class="mb-0">
    49                      <b-form-input
    50                        v-model="mail"
    51                        placeholder="Mail..."
    52                      ></b-form-input>
    53                    </b-form-group>
    54                  </b-col>
    55                  <b-col class="align-self-center">
    56                    <btn
    57                      variant="secondary"
    58                      @click="searchMail"
    59                      :disabled="!mail"
    60                    >
    61                      RETROUVER MON LIEN
    62                    </btn>
    63                  </b-col>
    64                </b-row>
    65              </b-col>
    66            </b-row>
    67            <b-row class="m-3">
    68              <b-col md="9" xs="6">
    69                Vous cherchez plus d'informations ? Le site de l'ACVE est ici !
    70              </b-col>
    71              <b-col md="3" xs="6" class="text-right">
    72                <b-button variant="secondary" href="http://acve.asso.fr">
    73                  SITE ACVE
    74                </b-button>
    75              </b-col>
    76            </b-row>
    77          </b-card-text>
    78        </b-card>
    79        <b-card class="mt-2">
    80          <b-card-title class="bg-accent d-inline rounded p-2">
    81            Directeurs
    82          </b-card-title>
    83          <b-card-text>
    84            <b-row class="m-3">
    85              <b-col md="9" xs="6">
    86                Vous êtes un <b>directeur de séjour</b> ? C'est par ici !
    87              </b-col>
    88              <b-col md="3" xs="6" class="text-right">
    89                <b-button variant="secondary" href="/directeurs/home">
    90                  PORTAIL des DIRECTEURS
    91                </b-button>
    92              </b-col>
    93            </b-row>
    94          </b-card-text>
    95        </b-card>
    96      </b-container>
    97    </base-app>
    98  </template>
    99  
   100  <script lang="ts">
   101  import Vue from "vue";
   102  import Component from "vue-class-component";
   103  import BaseApp from "@/BaseApp.vue";
   104  import Error from "@/shared/notifications/Error.vue";
   105  import Btn from "@/shared/Btn.vue";
   106  
   107  import { C } from "./controller";
   108  import { ValidEvent } from "@/shared/utils";
   109  
   110  @Component({
   111    components: { BaseApp, Error, Btn }
   112  })
   113  export default class App extends Vue {
   114    title = "Portail ACVE";
   115    mailLien = "mailto:contact@acve.asso.fr?subject=[Lien Espace Personnel]";
   116  
   117    mail = "";
   118  
   119    showDialog = false;
   120    mailFound = false;
   121  
   122    C = C;
   123    output = C.notifications;
   124  
   125    async searchMail(event: ValidEvent) {
   126      event.spinning = true;
   127      const rep = await C.searchMail(this.mail);
   128      event.spinning = false;
   129      if (rep == undefined) return;
   130      this.mailFound = rep.Found;
   131      this.showDialog = true;
   132    }
   133  }
   134  </script>
   135  
   136  <style></style>