Skip to content

Commit

Permalink
readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
emtiazzahid committed Sep 18, 2021
1 parent 57781f1 commit 1a76f01
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 181 deletions.
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
# QUIZ APP
https://squiz-app.netlify.app/

Tested with:

Node v12.13.1

Npm 6.12.1

## Project setup
```
yarn install
npm install
```

### Compiles and hot-reloads for development
```
yarn serve
npm run serve
```

### Compiles and minifies for production
```
yarn build
```

### Lints and fixes files
```
yarn lint
npm run build
```

### Customize configuration
Expand Down
141 changes: 0 additions & 141 deletions src/views/auth/user/Form.vue

This file was deleted.

1 change: 1 addition & 0 deletions src/views/dashboard/Dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
methods: {
getSummary() {
this.loader = true
ApiService.setHeader()
ApiService.get(`/dashboard-summary`)
.then((resp) => {
this.loading = false;
Expand Down
28 changes: 15 additions & 13 deletions src/views/dashboard/pages/MCQ/MCQs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,20 @@
</thead>

<tbody>
<tr v-for="mcq in list.data" :key="mcq.id">
<td>#{{ mcq.id }}</td>
<td>{{ mcq.question }}</td>
<td>{{ mcq.correct_answer }}</td>
<td>
{{moment(mcq.created_at).format('YYYY-MM-DD')}}
</td>
<td class="text-right">

</td>
</tr>


<template v-if="list.data && list.data.length > 0">
<tr v-for="mcq in list.data" :key="mcq.id">
<td>#{{ mcq.id }}</td>
<td>{{ mcq.question }}</td>
<td>{{ mcq.correct_answer }}</td>
<td>
{{moment(mcq.created_at).format('YYYY-MM-DD')}}
</td>
<td class="text-right"></td>
</tr>
</template>
<template v-else>
<tr><td colspan="5" class="text-center">No data found</td></tr>
</template>
</tbody>
</v-simple-table>
<v-row justify="center">
Expand Down Expand Up @@ -89,6 +90,7 @@ export default {
if(searchQuery) {
searchQuery = `&${searchQuery}`;
}
ApiService.setHeader()
ApiService.get(`/mcq?page=${page}${searchQuery}&limit=${this.pagination.per_page}`).then(res => {
this.list = res.data;
this.pagination.current = res.data.meta.current_page;
Expand Down
35 changes: 20 additions & 15 deletions src/views/dashboard/pages/Quiz/Attempts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,27 @@
</thead>

<tbody>
<tr v-for="attempt in list.data" :key="attempt.id">
<td>
<router-link :to="{name: 'TestResult', params: { id: attempt.id }}">#{{ attempt.id }}</router-link>
</td>
<td>{{ attempt.quiz.title }}</td>
<td>
{{ moment.utc(moment.duration(attempt.quiz.time_limit,'seconds').as('milliseconds')).format('HH:mm:ss') }}
</td>
<td>
{{ attempt.score + '%' }}
</td>
<td>{{moment(attempt.created_at).format('YYYY-MM-DD')}}</td>
<td class="text-right">
<template v-if="list.data && list.data.length > 0">
<tr v-for="attempt in list.data" :key="attempt.id">
<td>
<router-link :to="{name: 'TestResult', params: { id: attempt.id }}">#{{ attempt.id }}</router-link>
</td>
<td>{{ attempt.quiz.title }}</td>
<td>
{{ moment.utc(moment.duration(attempt.quiz.time_limit,'seconds').as('milliseconds')).format('HH:mm:ss') }}
</td>
<td>
{{ attempt.score + '%' }}
</td>
<td>{{moment(attempt.created_at).format('YYYY-MM-DD')}}</td>
<td class="text-right">

</td>
</tr>
</td>
</tr>
</template>
<template v-else>
<tr><td colspan="6" class="text-center">No data found</td></tr>
</template>
</tbody>
</v-simple-table>

Expand Down
5 changes: 5 additions & 0 deletions src/views/dashboard/pages/Quiz/Quizzes.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
</thead>

<tbody>
<template v-if="list.data && list.data.length > 0">
<tr v-for="quiz in list.data" :key="quiz.id">
<td>{{ quiz.id }}</td>
<td>
Expand All @@ -54,6 +55,10 @@
</td>
<td></td>
</tr>
</template>
<template v-else>
<tr><td colspan="6" class="text-center">No data found</td></tr>
</template>
</tbody>
</v-simple-table>

Expand Down
8 changes: 4 additions & 4 deletions src/views/guest/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,11 @@ export default {
this.$store.dispatch(LOGIN, {
email: this.loginEmail, password: this.loginPassword
}).then((resp) => {
// if (this.$route.query['redirect']) {
// this.$router.push({ path: '/' + this.$route.query['redirect'] })
// } else {
if (this.$route.query['redirect']) {
window.location.href = window.location.origin + this.$route.query['redirect'];
} else {
this.$router.push({ name: 'Dashboard' })
// }
}
}).catch((err) =>{
this.$toastr.e('Wrong email or password!');
Expand Down

0 comments on commit 1a76f01

Please sign in to comment.