make tests passing
This commit is contained in:
parent
81fc8771c0
commit
8385db7b51
4 changed files with 19622 additions and 17 deletions
19622
frontend/package-lock.json
generated
19622
frontend/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -19,7 +19,7 @@
|
|||
</v-row>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import login from '../../api/login';
|
||||
import diary from '../../assets/data/diary.json';
|
||||
|
@ -28,7 +28,9 @@ interface Login {
|
|||
login: string
|
||||
password: string
|
||||
diaryNames: Array<string>
|
||||
selectedDiary: string
|
||||
selectedDiary: string,
|
||||
selectedSymbol: string,
|
||||
symbol: string
|
||||
}
|
||||
|
||||
export default Vue.extend({
|
||||
|
@ -38,8 +40,8 @@ export default Vue.extend({
|
|||
inputDisabled: false,
|
||||
login: '',
|
||||
password: '',
|
||||
selectedSymbols: '',
|
||||
symbols: '',
|
||||
selectedSymbol: '',
|
||||
symbol: '',
|
||||
item: [
|
||||
'Vulcan',
|
||||
'Fakelog',
|
||||
|
@ -50,7 +52,7 @@ export default Vue.extend({
|
|||
async loginUser() {
|
||||
this.inputDisabled = true;
|
||||
Vue.set(this.$store.state, 'isLoading', true);
|
||||
const index = diary.diaries.findIndex((item) => item.name === this.selectedDiary);
|
||||
const index = diary.diaries.findIndex((item) => item.name === this.selectedSymbol);
|
||||
const response = await login.login(this.login, this.password,
|
||||
'powiatwulkanowy', diary.diaries[index].url);
|
||||
this.$store.state.loginData = response.data;
|
||||
|
|
|
@ -11,8 +11,9 @@ interface IndexState {
|
|||
selectedStudent: number
|
||||
}
|
||||
|
||||
|
||||
export default new Vuex.Store({
|
||||
state: (): IndexState => ({
|
||||
state: {
|
||||
drawer: true,
|
||||
group: null,
|
||||
mini: true,
|
||||
|
|
|
@ -10,7 +10,7 @@ interface LoginState {
|
|||
}
|
||||
|
||||
export default new Vuex.Store({
|
||||
state: (): LoginState => ({
|
||||
state: {
|
||||
isLoading: false,
|
||||
loginData: null,
|
||||
showStudentsList: true,
|
||||
|
|
Loading…
Reference in a new issue