Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

122
Vistas
Vue/Firebase date voting

Im working on a voting app with Vue and Firebase. So far you can add new dates to the Firebase Realtime Database. I want to build a voting system so the users can vote "yes", "no" and "maybe" for every available date.

The realtime db should look something like this:

dates {
date-one {
    day: 12,
    month: 5,
    year: 2022,
    id: "12345678",
    votes: {
        "yes": ["userId1", "userId2"],
        "no": ["userId1", "userId3"],
        "maybe" ["userId2", "userId4"]
    }
}
date-two {...}

Now I want to make a dynamic form where you can select your vote for every date:

<form @submit.prevent="handleSubmit">
        <div v-for="event in events" :key="event.id">
            <label :for="event.name">{{ event.day }}.{{ event.month }}.{{ event.year }}</label>
            <select :name="event.name" type="select" >
                <option value="yes">YES</option>
                <option value="maybe">MAYBE</option>
                <option value="no">NO</option>
            </select>
        </div>
        <button type="submit">Senden</button>
    </form>

My problem is how I can handle the input values so I can push the user id into the respective array (yes, maybe, no) for every date?

Can someone help me or do you have an idea to do this better?

Thank you very much!

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda