cat list: add pdf build progress bars
This commit is contained in:
@ -54,6 +54,9 @@
|
|||||||
<td class="px-2 py-0">{{ cats.item.seasonCode }}</td>
|
<td class="px-2 py-0">{{ cats.item.seasonCode }}</td>
|
||||||
<td class="px-2 py-0">{{ cats.item.name }}</td>
|
<td class="px-2 py-0">{{ cats.item.name }}</td>
|
||||||
<td class="px-2 py-0">{{ cats.item.updatedPretty }}</td>
|
<td class="px-2 py-0">{{ cats.item.updatedPretty }}</td>
|
||||||
|
<td class="px-2 py-0">
|
||||||
|
<PDFProgress :percentDone="cats.item.build_progress" />
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -106,6 +109,9 @@
|
|||||||
<td class="px-2 py-0">{{ cats.item.ownerName }}</td>
|
<td class="px-2 py-0">{{ cats.item.ownerName }}</td>
|
||||||
<td class="px-2 py-0">{{ cats.item.name }}</td>
|
<td class="px-2 py-0">{{ cats.item.name }}</td>
|
||||||
<td class="px-2 py-0">{{ cats.item.updatedPretty }}</td>
|
<td class="px-2 py-0">{{ cats.item.updatedPretty }}</td>
|
||||||
|
<td class="px-2 py-0">
|
||||||
|
<PDFProgress :percentDone="cats.item.build_progress" />
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -180,6 +186,12 @@
|
|||||||
<td>
|
<td>
|
||||||
<span class="group"><v-icon color="green">monetization_on</v-icon></span></td>
|
<span class="group"><v-icon color="green">monetization_on</v-icon></span></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr v-if="selectedCatalog.build_progress < 100">
|
||||||
|
<td class="grey--text">PDF Build</td>
|
||||||
|
<td>
|
||||||
|
<PDFProgress :percentDone="selectedCatalog.build_progress" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<v-divider></v-divider>
|
<v-divider></v-divider>
|
||||||
@ -199,9 +211,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { mapActions } from 'vuex'
|
||||||
|
import PDFProgress from './PDFProgress'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
PDFProgress,
|
||||||
},
|
},
|
||||||
data: () => ({
|
data: () => ({
|
||||||
activeTab: null,
|
activeTab: null,
|
||||||
@ -231,6 +246,12 @@ export default {
|
|||||||
value: 'updated',
|
value: 'updated',
|
||||||
class: 'px-2 py-0',
|
class: 'px-2 py-0',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
text: '',
|
||||||
|
value: 'build_progress',
|
||||||
|
class: 'px-2 py-0',
|
||||||
|
width: '50px',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
pubHeaders: [
|
pubHeaders: [
|
||||||
{
|
{
|
||||||
@ -267,7 +288,14 @@ export default {
|
|||||||
width: '20%',
|
width: '20%',
|
||||||
class: 'px-2 py-0',
|
class: 'px-2 py-0',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
text: '',
|
||||||
|
value: 'build_progress',
|
||||||
|
class: 'px-2 py-0',
|
||||||
|
width: '50px',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
|
interval: null,
|
||||||
}),
|
}),
|
||||||
computed: {
|
computed: {
|
||||||
myCatalogs() {
|
myCatalogs() {
|
||||||
@ -287,13 +315,18 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
...mapActions([
|
||||||
|
'setSelectedCatalog',
|
||||||
|
'loadMyCatalogs',
|
||||||
|
'loadPublicCatalogs',
|
||||||
|
]),
|
||||||
selectCatalog: function(id) {
|
selectCatalog: function(id) {
|
||||||
this.$store.dispatch('setSelectedCatalog', id)
|
this.setSelectedCatalog(id)
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
mounted: function() {
|
mounted: function() {
|
||||||
this.$store.dispatch('loadMyCatalogs')
|
this.loadMyCatalogs()
|
||||||
this.$store.dispatch('loadPublicCatalogs')
|
this.loadPublicCatalogs()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
21
cateditor/src/components/PDFProgress.vue
Normal file
21
cateditor/src/components/PDFProgress.vue
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<template>
|
||||||
|
<v-tooltip top>
|
||||||
|
<template v-slot:activator="{ on }">
|
||||||
|
<v-progress-linear
|
||||||
|
v-if="percentDone < 100"
|
||||||
|
v-model="percentDone"
|
||||||
|
v-on="on"
|
||||||
|
color="accent"
|
||||||
|
></v-progress-linear>
|
||||||
|
</template>
|
||||||
|
<span>{{ percentDone }}% complete</span>
|
||||||
|
</v-tooltip>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
percentDone: Number,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
Reference in New Issue
Block a user