bfg-common 1.4.701 → 1.4.704

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.
@@ -6,8 +6,11 @@
6
6
 
7
7
  <common-pages-tasks-table
8
8
  :table-data="tasksList?.items || []"
9
+ :total-pages="tasksList?.total_pages || 1"
10
+ :total-items="tasksList?.total_items || 0"
9
11
  :loading="isLoading"
10
12
  :project="props.project"
13
+ @pagination="onUpdatePagination"
11
14
  />
12
15
  </div>
13
16
  </template>
@@ -41,15 +44,6 @@ const pauseGlobalRefresh = (): void => {
41
44
 
42
45
  const tasksList = computed<UI_I_Task>(() => $store.getters['tasks/getTaskList'])
43
46
 
44
- // const onClickButton = (status: string): void => {
45
- // if (status === 'next') {
46
- // pagination.value.page += 1
47
- // return
48
- // }
49
- //
50
- // pagination.value.page -= 1
51
- // }
52
-
53
47
  const getTasks = async (): Promise<void> => {
54
48
  pauseGlobalRefresh()
55
49
 
@@ -61,10 +55,10 @@ const getTasks = async (): Promise<void> => {
61
55
  }
62
56
  getTasks()
63
57
 
64
- // const onUpdatePagination = (event: UI_I_Pagination): void => {
65
- // pagination.value = event
66
- // getTasks()
67
- // }
58
+ const onUpdatePagination = (event: UI_I_Pagination): void => {
59
+ pagination.value = event
60
+ getTasks()
61
+ }
68
62
 
69
63
  // const onSortTable = (event: string): void => {
70
64
  // sort.value = event
@@ -8,6 +8,7 @@
8
8
  :total-items="props.totalItems"
9
9
  class="task-table"
10
10
  @sorting="onSorting"
11
+ @pagination="onPagination"
11
12
  >
12
13
  <template #icon="{ item }">
13
14
  <span class="flex-align-center">
@@ -93,6 +94,7 @@ import type {
93
94
  UI_I_DataTable,
94
95
  UI_I_DataTableHeader,
95
96
  UI_I_DataTableBody,
97
+ UI_I_Pagination,
96
98
  } from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
97
99
  import type { UI_T_Project, UI_T_ProcuratorTypeNodes } from '~/lib/models/types'
98
100
  import type { UI_I_Localization } from '~/lib/models/interfaces'
@@ -113,6 +115,7 @@ const props = defineProps<{
113
115
  }>()
114
116
  const emits = defineEmits<{
115
117
  (event: 'sort', value: string): void
118
+ (event: 'pagination', value: UI_I_Pagination): void
116
119
  }>()
117
120
 
118
121
  const localization = computed<UI_I_Localization>(() => useLocal())
@@ -146,6 +149,9 @@ watch(
146
149
  const onSorting = (value: string): void => {
147
150
  emits('sort', value)
148
151
  }
152
+ const onPagination = (value: UI_I_Pagination): void => {
153
+ emits('pagination', value)
154
+ }
149
155
 
150
156
  const actions = computed<UI_I_Dropdown[]>(() =>
151
157
  getTargetActionsFunc(localization.value, props.project)
@@ -155,6 +155,7 @@ const onSelectNodeOfTree = (data: any): void => {
155
155
  }
156
156
  }
157
157
  &__status {
158
+ @include flex($align: center);
158
159
  .ui-chip {
159
160
  width: max-content;
160
161
  :deep(.ui-chip__label) {
@@ -19,7 +19,7 @@ export const getHeaderDataFunc = (
19
19
  localization: UI_I_Localization
20
20
  ): UI_I_DataTableHeader[] => [
21
21
  {
22
- col: 0,
22
+ col: 'col0',
23
23
  colName: 'task_name',
24
24
  text: localization.tasks.taskName,
25
25
  isSortable: true,
@@ -30,7 +30,7 @@ export const getHeaderDataFunc = (
30
30
  filter: true,
31
31
  },
32
32
  {
33
- col: 1,
33
+ col: 'col1',
34
34
  colName: 'target',
35
35
  text: localization.common.target,
36
36
  isSortable: true,
@@ -40,7 +40,7 @@ export const getHeaderDataFunc = (
40
40
  filter: true,
41
41
  },
42
42
  {
43
- col: 2,
43
+ col: 'col2',
44
44
  colName: 'status',
45
45
  text: localization.common.status,
46
46
  isSortable: true,
@@ -50,7 +50,7 @@ export const getHeaderDataFunc = (
50
50
  filter: true,
51
51
  },
52
52
  {
53
- col: 3,
53
+ col: 'col3',
54
54
  colName: 'details',
55
55
  text: localization.common.details,
56
56
  isSortable: true,
@@ -60,7 +60,7 @@ export const getHeaderDataFunc = (
60
60
  filter: true,
61
61
  },
62
62
  {
63
- col: 4,
63
+ col: 'col4',
64
64
  colName: 'initiator',
65
65
  text: localization.common.initiator,
66
66
  isSortable: true,
@@ -70,7 +70,7 @@ export const getHeaderDataFunc = (
70
70
  filter: true,
71
71
  },
72
72
  {
73
- col: 5,
73
+ col: 'col5',
74
74
  colName: 'queued_for',
75
75
  text: localization.common.queuedFor,
76
76
  isSortable: true,
@@ -80,7 +80,7 @@ export const getHeaderDataFunc = (
80
80
  filter: true,
81
81
  },
82
82
  {
83
- col: 6,
83
+ col: 'col6',
84
84
  colName: 'start_time',
85
85
  text: localization.common.startTime,
86
86
  isSortable: true,
@@ -90,7 +90,7 @@ export const getHeaderDataFunc = (
90
90
  filter: true,
91
91
  },
92
92
  {
93
- col: 7,
93
+ col: 'col7',
94
94
  colName: 'completion_time',
95
95
  text: localization.common.completionTime,
96
96
  isSortable: true,
@@ -100,7 +100,7 @@ export const getHeaderDataFunc = (
100
100
  filter: true,
101
101
  },
102
102
  {
103
- col: 8,
103
+ col: 'col8',
104
104
  colName: 'execution_time',
105
105
  text: localization.common.executionTime,
106
106
  isSortable: true,
@@ -110,7 +110,7 @@ export const getHeaderDataFunc = (
110
110
  filter: true,
111
111
  },
112
112
  {
113
- col: 9,
113
+ col: 'col9',
114
114
  colName: 'server',
115
115
  text: localization.common.server,
116
116
  isSortable: true,
@@ -120,7 +120,7 @@ export const getHeaderDataFunc = (
120
120
  filter: true,
121
121
  },
122
122
  {
123
- col: 10,
123
+ col: 'col10',
124
124
  colName: 'zone',
125
125
  text: localization.common.zone,
126
126
  isSortable: true,
@@ -129,12 +129,6 @@ export const getHeaderDataFunc = (
129
129
  show: true,
130
130
  filter: true,
131
131
  },
132
- {
133
- col: 11,
134
- colName: 'default-actions',
135
- text: '',
136
- show: true,
137
- },
138
132
  ]
139
133
 
140
134
  export const getTargetActionsFunc = (
@@ -166,20 +160,21 @@ export const options: UI_I_DataTableOptions = {
166
160
  perPageOptions: [
167
161
  { text: '10', value: 10 },
168
162
  { text: '50', value: 50 },
169
- { text: '100', value: 100 },
163
+ { text: '100', value: 100, default: true },
170
164
  ],
171
165
  isSelectable: true,
172
166
  isFocusable: false,
173
167
  showPagination: true,
168
+ showPaginationOnTop: true,
174
169
  showPageInfo: true,
175
170
  isSortable: true,
176
- server: false,
171
+ server: true,
177
172
  isResizable: true,
178
173
  showSearch: false,
179
174
  showSelectedRows: true,
180
175
  showColumnManager: true,
181
176
  withActions: true,
182
- inBlockOnlyLightMode: true,
177
+ inBlock: true,
183
178
  }
184
179
 
185
180
  export const getBodyDataFunc = (
@@ -235,35 +230,35 @@ export const getBodyDataFunc = (
235
230
  isHiddenCollapse: false,
236
231
  collapseToggle: false,
237
232
  data: [
238
- { col: 0, text: task.taskName },
233
+ { col: 'col0', text: task.taskName },
239
234
  {
240
235
  key: 'icon',
241
- col: 1,
236
+ col: 'col1',
242
237
  text: task.target,
243
238
  data: targetData,
244
239
  },
245
240
  {
246
241
  key: 'status',
247
- col: 2,
242
+ col: 'col2',
248
243
  text: localization.common[UI_E_RecentTaskStatus[task.status]],
249
244
  data: statusData,
250
245
  },
251
- { col: 3, text: task.details || '--' },
252
- { col: 4, text: task.initiator },
253
- { col: 5, text: `${task.queuedFor} ms` },
254
- { col: 6, text: formattedStartTime },
255
- { col: 7, text: formattedCompletionTime },
256
- { col: 8, text: `${task.execution} ms` },
257
- { col: 9, text: task.server },
246
+ { col: 'col3', text: task.details || '--' },
247
+ { col: 'col4', text: task.initiator },
248
+ { col: 'col5', text: `${task.queuedFor} ms` },
249
+ { col: 'col6', text: formattedStartTime },
250
+ { col: 'col7', text: formattedCompletionTime },
251
+ { col: 'col8', text: `${task.execution} ms` },
252
+ { col: 'col9', text: task.server },
258
253
  {
259
254
  key: 'icon',
260
- col: 10,
255
+ col: 'col10',
261
256
  text: task.zone,
262
257
  data: zoneData,
263
258
  },
264
259
  {
265
260
  key: 'default-actions',
266
- col: 11,
261
+ col: 'default-actions',
267
262
  text: '',
268
263
  data: { id: index, target: targetData },
269
264
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.4.701",
4
+ "version": "1.4.704",
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.288",
38
+ "bfg-uikit": "1.0.289",
39
39
  "html2canvas": "^1.4.1",
40
40
  "prettier-eslint": "^15.0.1"
41
41
  }