Skip to content
This repository has been archived by the owner on Mar 26, 2023. It is now read-only.

Commit

Permalink
Починены некоторые баги (#37)
Browse files Browse the repository at this point in the history
Co-authored-by: Andrey Marakulin <[email protected]>
  • Loading branch information
ilya101master and annndruha authored Sep 6, 2022
1 parent 64448a7 commit 85973d0
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 36 deletions.
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<NavBar />
<router-view/>
<router-view />
</template>

<script>
Expand Down
2 changes: 1 addition & 1 deletion src/components/EventRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default{
align-items: center;
padding: 11px 11Spx;
gap: 24px;
height: 80px;
height: min-content;
background: #F8F8F8;
/* Inside auto layout */
Expand Down
5 changes: 3 additions & 2 deletions src/components/NavBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ export default {
},
watch: {
date() {
this.$store.commit("changeDate", this.date);
if(this.date)
this.$store.commit("changeDate", this.date);
},
},
methods: {
Expand Down Expand Up @@ -135,7 +136,7 @@ header {
right: 0;
margin-top: 56px;
height: min-content;
z-index: 1;
z-index: 100;
}
.date {
Expand Down
7 changes: 4 additions & 3 deletions src/views/Init.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
class="form-select form-select-sm mb-3 group-selector"
v-model="groupId"
>
<option selected value=null>Не выбрано</option>
<option selected value=-1>Не выбрано</option>
<option
v-for="group in groupList.items"
:key="group.id"
Expand All @@ -38,7 +38,8 @@
export default {
methods: {
saveGroup() {
if (this.groupId) {
console.log("groupId:", this.groupId);
if (this.groupId && this.groupId != "-1") {
localStorage.setItem("timetable-group-id", this.groupId);
this.$router.push("/timetable");
} else {
Expand Down Expand Up @@ -149,4 +150,4 @@ img {
height: auto;
max-width: 200px;
}
</style>
</style>
29 changes: 0 additions & 29 deletions src/views/Timetable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,9 @@ export default {
methods: {
loadGroupInfo(){
var url = new URL(`${process.env.VUE_APP_API_TIMETABLE}/timetable/group/${this.groupId}`);
this.loaded = false;
fetch(url).then(response => response.json())
.then(json => {
this.groupInfo = json;
this.loaded = true;
})
},
loadTimetableOnDate(date) {
Expand Down Expand Up @@ -139,31 +137,4 @@ ul {
flex-grow: 0;
}
.lds-dual-ring {
display: inline-block;
width: 80px;
height: 80px;
}
.lds-dual-ring:after {
content: " ";
display: block;
width: 64px;
height: 64px;
margin: 8px;
border-radius: 50%;
border: 6px solid lightgray;
border-color: lightgray transparent lightgray transparent;
animation: lds-dual-ring 1.2s linear infinite;
}
@keyframes lds-dual-ring {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
</style>

0 comments on commit 85973d0

Please sign in to comment.