Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const urlListaHorario = $('#listaHorario').val() + '.json';
- new Vue({
- el: '#app',
- data: {
- agendas: [],
- classObject: {
- 'red': true,
- 'white-text': true
- }
- },
- created: async function() {
- const response = await fetch(urlListaHorario);
- const { agendas } = await response.json();
- const all = [
- '06:00', '07:00', '08:00', '09:00',
- '10:00', '11:00', '12:00', '13:00',
- '14:00', '15:00', '16:00', '17:00',
- '18:00', '19:00', '20:00', '21:00'
- ]
- agendas.map(numeroSala => {
- if(numeroSala.horarioSala !== ['']){
- isButtonDisabled = true;
- }
- numeroSala.horarioSala = all.filter(t => !numeroSala.horarioSala.includes(t)).concat(numeroSala.horarioSala);
- numeroSala.horarioSala.sort();
- });
- this.agendas = agendas
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement