This commit is contained in:
2026-08-08 23:51:05 +02:00
commit bb7a17a874
73 changed files with 15038 additions and 0 deletions
+63
View File
@@ -0,0 +1,63 @@
<template>
<div v-if="this.day">
<template v-if="tomorrow.length > 0">
<h1>Ide kell menni éjfélkor inni:</h1>
<ul>
<li v-for="item in tomorrow">{{ item }}</li>
</ul>
</template>
<h1 v-else>Nem kötelező senkinél sem inni éjfélkor (de ajánlott)</h1>
</div>
<div v-else>
<template v-if="today.length > 0">
<h2>Ma itt kell inni:</h2>
<ul >
<li v-for="item in today">{{ item }}</li>
</ul>
</template>
<h2 v-else>Ma nem kell senkinél inni (de ajánlott)</h2>
</div>
</template>
<script>
import axios from 'axios';
let interval;
export default {
data() {
return {
today: [],
tomorrow: [],
};
},
props: {
day: {
type: Boolean,
default: true, //true -> tomorrow
}
},
mounted() {
const call = () =>
{
axios
.get('/api/fetch_rooms')
.then(response => {
this.tomorrow = response.data.tomorrow;
this.today = response.data.today;
});
}
call();
interval = setInterval( call , 3000 );
},
unmounted() {
clearInterval(interval)
}
};
</script>
<style scoped>
li {
font-size: 1.75rem;
}
</style>