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>
|
</v-row>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import login from '../../api/login';
|
import login from '../../api/login';
|
||||||
import diary from '../../assets/data/diary.json';
|
import diary from '../../assets/data/diary.json';
|
||||||
|
@ -28,7 +28,9 @@ interface Login {
|
||||||
login: string
|
login: string
|
||||||
password: string
|
password: string
|
||||||
diaryNames: Array<string>
|
diaryNames: Array<string>
|
||||||
selectedDiary: string
|
selectedDiary: string,
|
||||||
|
selectedSymbol: string,
|
||||||
|
symbol: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
|
@ -38,8 +40,8 @@ export default Vue.extend({
|
||||||
inputDisabled: false,
|
inputDisabled: false,
|
||||||
login: '',
|
login: '',
|
||||||
password: '',
|
password: '',
|
||||||
selectedSymbols: '',
|
selectedSymbol: '',
|
||||||
symbols: '',
|
symbol: '',
|
||||||
item: [
|
item: [
|
||||||
'Vulcan',
|
'Vulcan',
|
||||||
'Fakelog',
|
'Fakelog',
|
||||||
|
@ -50,7 +52,7 @@ export default Vue.extend({
|
||||||
async loginUser() {
|
async loginUser() {
|
||||||
this.inputDisabled = true;
|
this.inputDisabled = true;
|
||||||
Vue.set(this.$store.state, 'isLoading', 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,
|
const response = await login.login(this.login, this.password,
|
||||||
'powiatwulkanowy', diary.diaries[index].url);
|
'powiatwulkanowy', diary.diaries[index].url);
|
||||||
this.$store.state.loginData = response.data;
|
this.$store.state.loginData = response.data;
|
||||||
|
|
|
@ -11,8 +11,9 @@ interface IndexState {
|
||||||
selectedStudent: number
|
selectedStudent: number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export default new Vuex.Store({
|
export default new Vuex.Store({
|
||||||
state: (): IndexState => ({
|
state: {
|
||||||
drawer: true,
|
drawer: true,
|
||||||
group: null,
|
group: null,
|
||||||
mini: true,
|
mini: true,
|
||||||
|
|
|
@ -10,7 +10,7 @@ interface LoginState {
|
||||||
}
|
}
|
||||||
|
|
||||||
export default new Vuex.Store({
|
export default new Vuex.Store({
|
||||||
state: (): LoginState => ({
|
state: {
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
loginData: null,
|
loginData: null,
|
||||||
showStudentsList: true,
|
showStudentsList: true,
|
||||||
|
|
Loading…
Reference in a new issue