Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

121
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda