bfg-common 1.4.700 → 1.4.701
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
:data="data"
|
|
5
5
|
:options="options"
|
|
6
6
|
:loading="props.loading"
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
:total-pages="props.totalPages"
|
|
8
|
+
:total-items="props.totalItems"
|
|
9
9
|
class="task-table"
|
|
10
10
|
@sorting="onSorting"
|
|
11
11
|
>
|
|
@@ -107,6 +107,8 @@ import {
|
|
|
107
107
|
const props = defineProps<{
|
|
108
108
|
project: UI_T_Project
|
|
109
109
|
tableData: UI_I_TaskItem<UI_T_ProcuratorTypeNodes>[]
|
|
110
|
+
totalPages: number
|
|
111
|
+
totalItems: number
|
|
110
112
|
loading: boolean
|
|
111
113
|
}>()
|
|
112
114
|
const emits = defineEmits<{
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bfg-common",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.4.
|
|
4
|
+
"version": "1.4.701",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "nuxt build",
|
|
7
7
|
"dev": "nuxt dev --port=3002",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@vueuse/components": "^10.1.2",
|
|
36
36
|
"date-fns": "^2.29.3",
|
|
37
37
|
"bfg-nuxt-3-graph": "1.0.15",
|
|
38
|
-
"bfg-uikit": "1.0.
|
|
38
|
+
"bfg-uikit": "1.0.288",
|
|
39
39
|
"html2canvas": "^1.4.1",
|
|
40
40
|
"prettier-eslint": "^15.0.1"
|
|
41
41
|
}
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="tasks">
|
|
3
|
-
<common-headline
|
|
4
|
-
:headline="localization.common.tasksConsole"
|
|
5
|
-
class="tasks__headline"
|
|
6
|
-
/>
|
|
7
|
-
|
|
8
|
-
<div class="btn-group">
|
|
9
|
-
<button
|
|
10
|
-
id="task-previous-button"
|
|
11
|
-
data-id="task-previous-button"
|
|
12
|
-
class="btn btn-sm btn-link nav-link"
|
|
13
|
-
:disabled="pagination.page === 1"
|
|
14
|
-
@click="onClickButton('previous')"
|
|
15
|
-
>
|
|
16
|
-
{{ localization.common.previous }}
|
|
17
|
-
</button>
|
|
18
|
-
|
|
19
|
-
<button
|
|
20
|
-
id="task-next-button"
|
|
21
|
-
data-id="task-next-button"
|
|
22
|
-
class="btn btn-sm btn-link nav-link"
|
|
23
|
-
:disabled="pagination.page === tasksList?.total_pages"
|
|
24
|
-
@click="onClickButton('next')"
|
|
25
|
-
>
|
|
26
|
-
{{ localization.common.next }}
|
|
27
|
-
</button>
|
|
28
|
-
</div>
|
|
29
|
-
|
|
30
|
-
<templates-tasks-table-view
|
|
31
|
-
:data-table="tasksList?.items || []"
|
|
32
|
-
:total-items="tasksList?.total_items || 0"
|
|
33
|
-
:total-pages="tasksList?.total_pages || 1"
|
|
34
|
-
:pagination="pagination"
|
|
35
|
-
:loading="isLoading"
|
|
36
|
-
@pagination="onUpdatePagination"
|
|
37
|
-
@sort="onSortTable"
|
|
38
|
-
/>
|
|
39
|
-
</div>
|
|
40
|
-
</template>
|
|
41
|
-
|
|
42
|
-
<script lang="ts" setup>
|
|
43
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
44
|
-
import type {
|
|
45
|
-
UI_I_Pagination,
|
|
46
|
-
UI_I_DataTableQuery,
|
|
47
|
-
} from '~/lib/models/table/interfaces'
|
|
48
|
-
import type { UI_I_Task } from '~/lib/models/store/tasks/interfaces'
|
|
49
|
-
|
|
50
|
-
definePageMeta({
|
|
51
|
-
middleware: ['auth'],
|
|
52
|
-
})
|
|
53
|
-
|
|
54
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
55
|
-
const { $store }: any = useNuxtApp()
|
|
56
|
-
|
|
57
|
-
const pagination = ref<UI_I_Pagination>({
|
|
58
|
-
page: 1,
|
|
59
|
-
pageSize: 100,
|
|
60
|
-
})
|
|
61
|
-
const sort = ref<string | null>(null)
|
|
62
|
-
|
|
63
|
-
const tasksList = computed<UI_I_Task>(() => $store.getters['tasks/getTaskList'])
|
|
64
|
-
|
|
65
|
-
const onClickButton = (status: string): void => {
|
|
66
|
-
if (status === 'next') {
|
|
67
|
-
pagination.value.page += 1
|
|
68
|
-
return
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
pagination.value.page -= 1
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
const getTasks = async (): Promise<void> => {
|
|
75
|
-
pauseGlobalRefresh()
|
|
76
|
-
|
|
77
|
-
const payload: UI_I_DataTableQuery = {
|
|
78
|
-
...pagination.value,
|
|
79
|
-
sortBy: sort.value || '',
|
|
80
|
-
}
|
|
81
|
-
await $store.dispatch('tasks/A_GET_TASKS', payload)
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
const onUpdatePagination = (event: UI_I_Pagination): void => {
|
|
85
|
-
pagination.value = event
|
|
86
|
-
getTasks()
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
const onSortTable = (event: string): void => {
|
|
90
|
-
sort.value = event
|
|
91
|
-
getTasks()
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
const isLoading = computed<boolean>(() =>
|
|
95
|
-
$store.getters['tasks/getLoading']('tasks')
|
|
96
|
-
)
|
|
97
|
-
const pauseGlobalRefresh = (): void => {
|
|
98
|
-
const tasksLastRequestType = $store.getters['tasks/getTasksLastRequestType']
|
|
99
|
-
$store.dispatch('main/A_PAUSE_GLOBAL_REFRESH', tasksLastRequestType)
|
|
100
|
-
}
|
|
101
|
-
onUnmounted(() => {
|
|
102
|
-
pauseGlobalRefresh()
|
|
103
|
-
})
|
|
104
|
-
</script>
|
|
105
|
-
|
|
106
|
-
<style lang="scss">
|
|
107
|
-
@import '~/node_modules/bfg-common/assets/scss/common/mixins';
|
|
108
|
-
.tasks {
|
|
109
|
-
@include flex($dir: column);
|
|
110
|
-
height: 100%;
|
|
111
|
-
padding-left: 10px;
|
|
112
|
-
&__headline {
|
|
113
|
-
padding-left: 10px;
|
|
114
|
-
margin-bottom: 0.6rem;
|
|
115
|
-
}
|
|
116
|
-
.btn {
|
|
117
|
-
text-transform: uppercase;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
</style>
|