shared-ritm 1.2.62 → 1.2.64

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,7 +6,7 @@ export interface TableColumn {
6
6
  headerStyle?: string;
7
7
  field: string | ((row: any) => any);
8
8
  sortable?: boolean;
9
- filterType: 'single' | 'multi' | null;
9
+ filterType?: 'single' | 'multi' | null;
10
10
  align?: 'left' | 'center' | 'right';
11
11
  badge?: {
12
12
  true?: string;
@@ -44,3 +44,4 @@ export * from './api/types/Api_Tasks';
44
44
  export * from './api/types/Api_Repairs';
45
45
  export * from './api/types/Api_Projects';
46
46
  export * from './api/types/Api_Controls';
47
+ export * from './api/types/Api_Instruments';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shared-ritm",
3
- "version": "1.2.62",
3
+ "version": "1.2.64",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist",
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <q-page class="flex flex-col" style="min-height: 100%">
2
+ <q-page class="flex flex-col" style="height: 100%; min-height: 100%">
3
3
  <q-table
4
4
  v-model:selected="selected"
5
5
  :rows="rows.value"
@@ -11,6 +11,7 @@
11
11
  class="full-width"
12
12
  :rows-per-page-options="[0]"
13
13
  :selection="props.enableMultiSelect ? 'multiple' : 'none'"
14
+ style="height: 100%"
14
15
  @row-click="(_, row) => emit('row-click', row)"
15
16
  >
16
17
  <template #header-selection="scope">
@@ -22,7 +23,7 @@
22
23
  </template>
23
24
 
24
25
  <template #body-cell-index="props">
25
- <q-td :props="props" class="text-center">
26
+ <q-td :props="props" class="text-center" :class="{ 'q-td--no-hover': noHover }">
26
27
  {{ props.rowIndex + 1 + (meta.value.currentPage - 1) * meta.value.perPage }}
27
28
  </q-td>
28
29
  </template>
@@ -90,7 +91,7 @@
90
91
  </template>
91
92
 
92
93
  <template #body-cell="props">
93
- <q-td :props="props">
94
+ <q-td :props="props" :class="{ 'q-td--no-hover': noHover }">
94
95
  <q-badge
95
96
  v-if="props.col.badge && typeof props.value === 'boolean'"
96
97
  :color="
@@ -140,6 +141,7 @@ const props = defineProps<{
140
141
  filtersOptions: Record<string, FilterOption[]>
141
142
  meta: Ref<{ currentPage: number; perPage: number }>
142
143
  enableMultiSelect?: boolean
144
+ noHover?: boolean
143
145
  selectedRows: any[]
144
146
  }>()
145
147
  const emit = defineEmits<TableEmits>()
@@ -209,7 +211,10 @@ watch(
209
211
  }
210
212
 
211
213
  ::v-deep(.q-table thead) {
214
+ position: sticky;
215
+ top: 0;
212
216
  background: #f2f7fb;
217
+ z-index: 1;
213
218
  }
214
219
 
215
220
  ::v-deep(.q-table th) {
@@ -227,6 +232,10 @@ watch(
227
232
  font-size: 14px;
228
233
  }
229
234
 
235
+ .q-td--no-hover {
236
+ cursor: default;
237
+ }
238
+
230
239
  ::v-deep(.q-table tbody) {
231
240
  font-family: NunitoSansFont, sans-serif;
232
241
  border-color: #d7e0ef;
@@ -1,7 +1,8 @@
1
1
  <template>
2
- <div class="table-layout">
3
- <div class="table-controls">
2
+ <div class="table-layout" :class="{ 'hide-search': !actionsSlot && hideSearch }">
3
+ <div v-if="actionsSlot || !hideSearch" class="table-controls">
4
4
  <app-table-search
5
+ v-if="!hideSearch"
5
6
  :model-value="props.search"
6
7
  class="search-input"
7
8
  placeholder="Введите наименование"
@@ -14,6 +15,7 @@
14
15
  <app-table
15
16
  v-bind="props.tableProps"
16
17
  :selected-rows="props.selectedRows"
18
+ :no-hover="noHover"
17
19
  v-on="props.tableEvents"
18
20
  @update:selectedRows="rows => emit('update:selectedRows', rows)"
19
21
  />
@@ -48,6 +50,8 @@ const props = defineProps<{
48
50
  onPageChange: (page: number) => void
49
51
  actionsSlot?: boolean
50
52
  modalSlot?: boolean
53
+ hideSearch?: boolean
54
+ noHover?: boolean
51
55
  selectedRows: any[]
52
56
  }>()
53
57
  const emit = defineEmits<{
@@ -56,17 +60,22 @@ const emit = defineEmits<{
56
60
  </script>
57
61
  <style scoped lang="scss">
58
62
  .table-layout {
59
- height: calc(100vh - 100px);
60
- display: flex;
61
- flex-direction: column;
63
+ height: 100%;
64
+ display: grid;
65
+ grid-template-rows: auto 1fr auto;
66
+ gap: 1.25rem;
62
67
  box-sizing: border-box;
68
+ overflow: auto;
69
+
70
+ &.hide-search {
71
+ grid-template-rows: 1fr auto;
72
+ }
63
73
  }
64
74
  .table-controls {
65
75
  display: flex;
66
76
  align-items: center;
67
77
  justify-content: space-between;
68
- gap: 18px;
69
- margin-bottom: 20px;
78
+ gap: 1.25rem;
70
79
 
71
80
  .search-input {
72
81
  flex: 1;
@@ -105,10 +105,12 @@ function nextPage() {
105
105
  align-items: center;
106
106
  gap: 20px;
107
107
  flex-wrap: wrap;
108
- margin-top: 17px;
109
- margin-bottom: 15px;
108
+
110
109
  .arrow-button,
111
110
  .page-button {
111
+ display: flex;
112
+ justify-content: center;
113
+ align-items: center;
112
114
  width: 34px;
113
115
  height: 34px;
114
116
  border-radius: 4px;
@@ -7,7 +7,7 @@ export interface TableColumn {
7
7
  headerStyle?: string
8
8
  field: string | ((row: any) => any)
9
9
  sortable?: boolean
10
- filterType: 'single' | 'multi' | null
10
+ filterType?: 'single' | 'multi' | null
11
11
  align?: 'left' | 'center' | 'right'
12
12
  badge?: {
13
13
  true?: string
package/src/index.ts CHANGED
@@ -85,4 +85,5 @@ export * from './api/types/Api_Tasks'
85
85
  export * from './api/types/Api_Repairs'
86
86
  export * from './api/types/Api_Projects'
87
87
  export * from './api/types/Api_Controls'
88
+ export * from './api/types/Api_Instruments'
88
89
  // export * from '@/api/types/Api_Metrics'