@dative-gpi/foundation-core-components 1.0.35 → 1.0.37-report-v1

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.
Files changed (84) hide show
  1. package/components/autocompletes/FSAutocompleteChart.vue +18 -8
  2. package/components/autocompletes/FSAutocompleteDashboard.vue +16 -6
  3. package/components/autocompletes/FSAutocompleteDashboardOrganisation.vue +7 -1
  4. package/components/autocompletes/FSAutocompleteDataCategory.vue +11 -5
  5. package/components/autocompletes/FSAutocompleteDataDefinition.vue +7 -1
  6. package/components/autocompletes/FSAutocompleteGroup.vue +7 -1
  7. package/components/autocompletes/FSAutocompleteLocation.vue +6 -0
  8. package/components/autocompletes/FSAutocompleteManufacturer.vue +8 -0
  9. package/components/autocompletes/FSAutocompleteModel.vue +9 -1
  10. package/components/autocompletes/FSAutocompleteOrganisationType.vue +7 -1
  11. package/components/autocompletes/FSAutocompleteRole.vue +17 -6
  12. package/components/autocompletes/FSAutocompleteServiceAccountRoleOrganisation.vue +7 -1
  13. package/components/autocompletes/FSAutocompleteUserOrganisation.vue +9 -1
  14. package/components/chips/FSChipGroupUserOrganisation.vue +61 -0
  15. package/components/chips/FSChipGroupUserOrganisationUI.vue +38 -0
  16. package/components/customProperties/FSMetaField.vue +31 -35
  17. package/components/customProperties/FSMetaHistory.vue +4 -4
  18. package/components/customProperties/FSMetaValue.vue +66 -33
  19. package/components/customProperties/helpers.ts +2 -1
  20. package/components/entities/FSBaseEntitiesList.vue +50 -0
  21. package/components/entities/FSDialogSelectEntities.vue +83 -0
  22. package/components/entities/FSEntityField.vue +203 -0
  23. package/components/entities/FSSelectEntitiesList.vue +209 -0
  24. package/components/entities/FSSimpleEntitiesList.vue +100 -0
  25. package/components/explorers/FSBaseDevicesExplorer.vue +310 -0
  26. package/components/explorers/FSBaseFoldersExplorer.vue +277 -0
  27. package/components/lists/FSDataTable.vue +23 -21
  28. package/components/lists/alerts/FSBaseAlertsList.vue +338 -0
  29. package/components/lists/alerts/FSButtonAcknowledgeAlert.vue +101 -0
  30. package/components/lists/authTokens/FSBaseAuthTokensList.vue +79 -0
  31. package/components/lists/chartOrganisationTypes/FSBaseChartOrganisationTypesList.vue +205 -0
  32. package/components/lists/chartOrganisations/FSBaseChartOrganisationsList.vue +206 -0
  33. package/components/lists/charts/FSBaseChartsList.vue +268 -0
  34. package/components/lists/comments/FSBaseCommentsList.vue +143 -0
  35. package/components/lists/connectivityScenarios/FSBaseConnectivityScenariosList.vue +128 -0
  36. package/components/lists/dashboardOrganisationTypes/FSBaseDashboardOrganisationTypesList.vue +179 -0
  37. package/components/lists/dashboards/FSBaseDashboardsList.vue +235 -0
  38. package/components/lists/dashboards/FSSimpleDashboardsList.vue +62 -0
  39. package/components/lists/dataCategories/FSBaseDataCategoriesList.vue +155 -0
  40. package/components/lists/dataDefinitions/FSBaseDataDefinitionsList.vue +130 -0
  41. package/components/lists/deviceOrganisations/FSBaseDeviceOrganisationsList.vue +378 -0
  42. package/components/lists/deviceOrganisations/FSSimpleDeviceOrganisationsList.vue +44 -0
  43. package/components/lists/folders/FSBaseFoldersList.vue +127 -0
  44. package/components/lists/folders/FSSimpleFoldersList.vue +44 -0
  45. package/components/lists/groups/FSBaseGroupsList.vue +136 -0
  46. package/components/lists/groups/FSSimpleGroupsList.vue +44 -0
  47. package/components/lists/locations/FSBaseLocationsList.vue +118 -0
  48. package/components/lists/locations/FSSimpleLocationsList.vue +44 -0
  49. package/components/lists/models/FSBaseModelsList.vue +155 -0
  50. package/components/lists/models/FSSimpleModelsList.vue +44 -0
  51. package/components/lists/reports/FSBaseReportExecutionsList.vue +137 -0
  52. package/components/lists/reports/FSBaseReportsList.vue +140 -0
  53. package/components/lists/roleOrganisationTypes/FSBaseRoleOrganisationTypesList.vue +128 -0
  54. package/components/lists/roleOrganisations/FSBaseRoleOrganisationsList.vue +128 -0
  55. package/components/lists/scenarioOrganisationTypes/FSBaseScenarioOrganisationTypesList.vue +157 -0
  56. package/components/lists/scenarioOrganisations/FSBaseScenarioOrganisationsList.vue +145 -0
  57. package/components/lists/scenarios/FSBaseScenariosList.vue +241 -0
  58. package/components/lists/serviceAccountOrganisations/FSBaseServiceAccountOrganisationsList.vue +155 -0
  59. package/components/lists/serviceAccountRoleOrganisations/FSBaseServiceAccountRoleOrganisationsList.vue +128 -0
  60. package/components/lists/userOrganisations/FSBaseUserOrganisationsList.vue +171 -0
  61. package/components/lists/userOrganisations/FSSimpleUserOrganisationsList.vue +45 -0
  62. package/components/tiles/FSChartTile.vue +70 -0
  63. package/components/tiles/FSDeviceOrganisationTile.vue +9 -2
  64. package/components/tiles/FSLocationTile.vue +66 -0
  65. package/components/treeviews/FSTreeViewFolder.vue +15 -3
  66. package/components/treeviews/FSTreeViewGroup.vue +22 -4
  67. package/package.json +9 -9
  68. package/utils/dashboards.ts +33 -5
  69. package/utils/index.ts +2 -2
  70. package/utils/permissions.ts +80 -0
  71. package/utils/roles.ts +4 -4
  72. package/utils/tables.ts +41 -0
  73. package/utils/users.ts +7 -4
  74. package/components/selects/FSAggregationSelector.vue +0 -51
  75. package/components/selects/FSAxisTypeSelector.vue +0 -48
  76. package/components/selects/FSDisplayAsSelector.vue +0 -52
  77. package/components/selects/FSFilterTypeSelector.vue +0 -53
  78. package/components/selects/FSHeatmapRuleSelector.vue +0 -52
  79. package/components/selects/FSOperationOnSelector.vue +0 -51
  80. package/components/selects/FSPlanningTypeSelector.vue +0 -51
  81. package/components/selects/FSPlotPerSelector.vue +0 -51
  82. package/components/selects/FSSelectSelectedEntities.vue +0 -59
  83. package/components/selects/FSSerieTypeSelector.vue +0 -51
  84. package/utils/charts.ts +0 -136
@@ -0,0 +1,171 @@
1
+ <template>
2
+ <FSDataTable
3
+ :items="userOrganisations"
4
+ :itemTo="$props.itemTo"
5
+ :loading="fetchingUserOrganisations"
6
+ :showSelect="$props.editable"
7
+ :tableCode="$props.tableCode"
8
+ :modelValue="$props.modelValue"
9
+ @update:modelValue="$emit('update:modelValue', $event)"
10
+ v-bind="$attrs"
11
+ >
12
+ <template
13
+ v-for="(_, name) in $slots"
14
+ v-slot:[name]="slotData"
15
+ >
16
+ <slot
17
+ :name="name"
18
+ v-bind="slotData"
19
+ />
20
+ </template>
21
+ <template
22
+ #header.imageId-title
23
+ >
24
+ <FSIcon>
25
+ mdi-panorama-variant-outline
26
+ </FSIcon>
27
+ </template>
28
+ <template
29
+ #item.imageId="{ item }"
30
+ >
31
+ <FSImage
32
+ v-if="item.imageId"
33
+ height="32px"
34
+ width="32px"
35
+ :imageId="item.imageId"
36
+ :thumbnail="true"
37
+ />
38
+ </template>
39
+ <template
40
+ #item.allowEmails="{ item }"
41
+ >
42
+ <FSIconCheck
43
+ :value="item.allowEmails"
44
+ />
45
+ </template>
46
+ <template
47
+ #item.allowSms="{ item }"
48
+ >
49
+ <FSIconCheck
50
+ :value="item.allowSms"
51
+ />
52
+ </template>
53
+ <template
54
+ #item.tags="{ item }"
55
+ >
56
+ <FSTagGroup
57
+ variant="slide"
58
+ :editable="false"
59
+ :tags="item.tags"
60
+ />
61
+ </template>
62
+ <template
63
+ #item.validity="{ item }"
64
+ >
65
+ <FSSpan
66
+ font="text-overline"
67
+ >
68
+ {{ userValidityLabel(item.validity) }}
69
+ </FSSpan>
70
+ </template>
71
+ <template
72
+ #item.userType="{ item }"
73
+ >
74
+ <FSSpan
75
+ font="text-overline"
76
+ >
77
+ {{ userTypeLabel(item.userType) }}
78
+ </FSSpan>
79
+ </template>
80
+ <template
81
+ #item.tile="{ item, toggleSelect }"
82
+ >
83
+ <FSUserOrganisationTileUI
84
+ :to="$props.itemTo && $props.itemTo(item)"
85
+ :editable="$props.editable"
86
+ :modelValue="isSelected(item.id)"
87
+ @update:modelValue="toggleSelect(item)"
88
+ v-bind="item"
89
+ />
90
+ </template>
91
+ </FSDataTable>
92
+ </template>
93
+
94
+ <script lang="ts">
95
+ import { defineComponent, type PropType, watch } from "vue";
96
+ import { type RouteLocation } from "vue-router";
97
+ import _ from "lodash";
98
+
99
+ import type { UserOrganisationFilters, UserOrganisationInfos } from "@dative-gpi/foundation-core-domain/models";
100
+ import { userTypeLabel, userValidityLabel } from "@dative-gpi/foundation-core-components/utils";
101
+ import { useUserOrganisations } from "@dative-gpi/foundation-core-services/composables";
102
+
103
+ import FSDataTable from "../FSDataTable.vue";
104
+
105
+ import FSSpan from "@dative-gpi/foundation-shared-components/components/FSSpan.vue";
106
+ import FSImage from "@dative-gpi/foundation-shared-components/components/FSImage.vue";
107
+ import FSTagGroup from "@dative-gpi/foundation-shared-components/components/FSTagGroup.vue";
108
+ import FSIconCheck from "@dative-gpi/foundation-shared-components/components/FSIconCheck.vue";
109
+ import FSUserOrganisationTileUI from "@dative-gpi/foundation-shared-components/components/tiles/FSUserOrganisationTileUI.vue";
110
+
111
+ export default defineComponent({
112
+ name: "FSBaseUserOrganisationsList",
113
+ components: {
114
+ FSDataTable,
115
+ FSImage,
116
+ FSUserOrganisationTileUI,
117
+ FSSpan,
118
+ FSTagGroup,
119
+ FSIconCheck
120
+
121
+ },
122
+ props: {
123
+ tableCode: {
124
+ type: String as PropType<string | null>,
125
+ required: false,
126
+ default: null
127
+ },
128
+ userOrganisationsFilters: {
129
+ type: Object as PropType<UserOrganisationFilters | null>,
130
+ required: false,
131
+ default: null
132
+ },
133
+ itemTo: {
134
+ type: Function as PropType<(item: UserOrganisationInfos) => Partial<RouteLocation>>,
135
+ required: false
136
+ },
137
+ editable: {
138
+ type: Boolean,
139
+ required: false,
140
+ default: true
141
+ },
142
+ modelValue: {
143
+ type: Array as PropType<string[]>,
144
+ required: false,
145
+ default: () => []
146
+ }
147
+ },
148
+ emits: ["update:modelValue"],
149
+ setup(props) {
150
+ const { getMany: fetchUserOrganisations, entities: userOrganisations, fetching: fetchingUserOrganisations } = useUserOrganisations();
151
+
152
+ const isSelected = (id: string): boolean => {
153
+ return props.modelValue.includes(id);
154
+ };
155
+
156
+ watch(() => props.userOrganisationsFilters, (next, previous) => {
157
+ if ((!next && !previous) || !_.isEqual(next, previous)) {
158
+ fetchUserOrganisations(props.userOrganisationsFilters ?? undefined);
159
+ }
160
+ }, { immediate: true });
161
+
162
+ return {
163
+ fetchingUserOrganisations,
164
+ userOrganisations,
165
+ userValidityLabel,
166
+ userTypeLabel,
167
+ isSelected
168
+ };
169
+ }
170
+ });
171
+ </script>
@@ -0,0 +1,45 @@
1
+ <template>
2
+ <FSSimpleList
3
+ :items="userOrganisations"
4
+ itemLabel="name"
5
+ :loading="fetching"
6
+ v-bind="$attrs"
7
+ />
8
+ </template>
9
+
10
+ <script lang="ts">
11
+ import { defineComponent, type PropType, watch } from "vue";
12
+
13
+ import type { UserOrganisationFilters } from "@dative-gpi/foundation-core-domain/models";
14
+ import { useUserOrganisations } from "@dative-gpi/foundation-core-services/composables";
15
+
16
+ import FSSimpleList from "@dative-gpi/foundation-shared-components/components/lists/FSSimpleList.vue";
17
+
18
+ export default defineComponent({
19
+ name: "FSSimpleUserOrganisationsList",
20
+ components: {
21
+ FSSimpleList,
22
+ },
23
+ props: {
24
+ userOrganisationFilters: {
25
+ type: Object as PropType<UserOrganisationFilters>,
26
+ required: false,
27
+ default: () => ({})
28
+ }
29
+ },
30
+ setup(props){
31
+ const { entities: userOrganisations, getMany, fetching } = useUserOrganisations();
32
+
33
+ const fetch = () => {
34
+ getMany(props.userOrganisationFilters);
35
+ }
36
+
37
+ watch(() => props.userOrganisationFilters, fetch, { immediate: true });
38
+
39
+ return {
40
+ userOrganisations,
41
+ fetching
42
+ }
43
+ }
44
+ });
45
+ </script>
@@ -0,0 +1,70 @@
1
+ <template>
2
+ <FSChartTileUI
3
+ v-if="chart"
4
+ :label="chart.label"
5
+ :icon="chart.icon"
6
+ :type="chart.chartType"
7
+ :imageId="chart.imageId"
8
+ v-bind="$attrs"
9
+ />
10
+ </template>
11
+
12
+ <script lang="ts">
13
+ import { computed, defineComponent, type PropType, watch } from "vue";
14
+
15
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
16
+ import { chartIcon } from "@dative-gpi/foundation-shared-components/tools";
17
+
18
+ import { useChartOrganisation, useChartOrganisationType } from "@dative-gpi/foundation-core-services/composables";
19
+ import { ApplicationScope } from "@dative-gpi/foundation-shared-domain/enums";
20
+
21
+ import FSChartTileUI from "@dative-gpi/foundation-shared-components/components/tiles/FSChartTileUI.vue";
22
+
23
+ export default defineComponent({
24
+ name: "FSChartTile",
25
+ components: {
26
+ FSChartTileUI
27
+ },
28
+ props: {
29
+ chartId: {
30
+ type: String,
31
+ required: true
32
+ },
33
+ scope: {
34
+ type: Object as PropType<ApplicationScope | number>,
35
+ required : true
36
+ }
37
+ },
38
+ setup(props) {
39
+ const { get : fetchChartOrganisationType, entity : chartOrganisationType } = useChartOrganisationType();
40
+ const { get : fetchChartOrganisation, entity : chartOrganisation } = useChartOrganisation();
41
+
42
+ const chart = computed(() => {
43
+ if (props.scope == ApplicationScope.Organisation) {
44
+ return chartOrganisation.value;
45
+ }
46
+ else if (props.scope == ApplicationScope.OrganisationType) {
47
+ return chartOrganisationType.value;
48
+ }
49
+ else {
50
+ return null
51
+ }
52
+ });
53
+
54
+ watch(() => [props.chartId, props.scope], () => {
55
+ if (props.scope == ApplicationScope.Organisation) {
56
+ fetchChartOrganisation(props.chartId);
57
+ }
58
+ else if (props.scope == ApplicationScope.OrganisationType) {
59
+ fetchChartOrganisationType(props.chartId)
60
+ }
61
+ }, {immediate : true})
62
+
63
+ return {
64
+ ColorEnum,
65
+ chart,
66
+ chartIcon
67
+ };
68
+ }
69
+ });
70
+ </script>
@@ -3,7 +3,7 @@
3
3
  v-if="getting"
4
4
  :editable="$props.editable"
5
5
  :modelValue="$props.modelValue"
6
- @update:modelValue="(value) => $emit('update:modelValue', value)"
6
+ @update:modelValue="$emit('update:modelValue', $event)"
7
7
  />
8
8
  <FSDeviceOrganisationTileUI
9
9
  v-else-if="entity"
@@ -16,8 +16,9 @@
16
16
  :modelStatuses="entity.modelStatuses"
17
17
  :deviceStatuses="entity.status?.statuses"
18
18
  :editable="$props.editable"
19
+ :alertTo="$props.alertTo"
19
20
  :modelValue="$props.modelValue"
20
- @update:modelValue="(value) => $emit('update:modelValue', value)"
21
+ @update:modelValue="$emit('update:modelValue', $event)"
21
22
  v-bind="$attrs"
22
23
  />
23
24
  </template>
@@ -50,8 +51,14 @@ export default defineComponent({
50
51
  type: Boolean,
51
52
  required: false,
52
53
  default: true
54
+ },
55
+ alertTo: {
56
+ type: Function,
57
+ required: false,
58
+ default: null
53
59
  }
54
60
  },
61
+ emits: ["update:modelValue"],
55
62
  setup(props) {
56
63
  const { get, getting, entity } = useDeviceOrganisation();
57
64
 
@@ -0,0 +1,66 @@
1
+ <template>
2
+ <FSLoadTile
3
+ v-if="getting"
4
+ :editable="$props.editable"
5
+ :modelValue="modelValue"
6
+ @update:modelValue="(value) => $emit('update:modelValue', value)"
7
+ />
8
+ <FSLocationTileUI
9
+ v-else-if="entity"
10
+ :icon="entity.icon"
11
+ :label="entity.label"
12
+ :code="entity.code"
13
+ :color="entity.color"
14
+ :address="entity.address.placeLabel"
15
+ :deviceCount="entity.deviceOrganisationsCount"
16
+ :editable="$props.editable"
17
+ :modelValue="modelValue"
18
+ @update:modelValue="(value) => $emit('update:modelValue', value)"
19
+ v-bind="$attrs"
20
+ />
21
+ </template>
22
+
23
+ <script lang="ts">
24
+ import { defineComponent, watch } from "vue";
25
+
26
+ import { useLocation } from "@dative-gpi/foundation-core-services/composables";
27
+
28
+ import FSLocationTileUI from "@dative-gpi/foundation-shared-components/components/tiles/FSLocationTileUI.vue";
29
+ import FSLoadTile from "@dative-gpi/foundation-shared-components/components/tiles/FSLoadTile.vue";
30
+
31
+ export default defineComponent({
32
+ name: "FSLocationTile",
33
+ components: {
34
+ FSLocationTileUI,
35
+ FSLoadTile
36
+ },
37
+ props: {
38
+ locationId: {
39
+ type: String,
40
+ required: true
41
+ },
42
+ modelValue: {
43
+ type: Boolean,
44
+ required: false,
45
+ default: false
46
+ },
47
+ editable: {
48
+ type: Boolean,
49
+ required: false,
50
+ default: true
51
+ }
52
+ },
53
+ setup(props) {
54
+ const { get, getting, entity } = useLocation();
55
+
56
+ watch(() => props.locationId, () => {
57
+ get(props.locationId);
58
+ }, { immediate: true });
59
+
60
+ return {
61
+ getting,
62
+ entity
63
+ };
64
+ }
65
+ });
66
+ </script>
@@ -20,10 +20,10 @@
20
20
  </template>
21
21
 
22
22
  <script lang="ts">
23
- import { defineComponent, type PropType } from "vue";
23
+ import { computed, defineComponent, type PropType } from "vue";
24
24
 
25
+ import { type FolderFilters, type FolderInfos } from "@dative-gpi/foundation-core-domain/models";
25
26
  import { useTreeView } from "@dative-gpi/foundation-shared-components/composables";
26
- import { type FolderFilters } from "@dative-gpi/foundation-core-domain/models";
27
27
  import { useFolders } from "@dative-gpi/foundation-core-services/composables";
28
28
 
29
29
  import FSTreeViewField from "@dative-gpi/foundation-shared-components/components/fields/FSTreeViewField.vue";
@@ -41,6 +41,11 @@ export default defineComponent({
41
41
  required: false,
42
42
  default: null
43
43
  },
44
+ exclude: {
45
+ type: String as PropType<string | null>,
46
+ required: false,
47
+ default: null
48
+ },
44
49
  modelValue: {
45
50
  type: [Array, String] as PropType<string[] | string | null>,
46
51
  required: false,
@@ -54,7 +59,14 @@ export default defineComponent({
54
59
  },
55
60
  emits: ["update:modelValue"],
56
61
  setup(props, { emit }) {
57
- const { getMany: getManyFolders, fetching: fetchingFolders, entities: folders } = useFolders();
62
+ const { getMany: getManyFolders, fetching: fetchingFolders, entities } = useFolders();
63
+
64
+ const folders = computed((): FolderInfos[] => {
65
+ if (!props.exclude) {
66
+ return entities.value;
67
+ }
68
+ return entities.value.filter(g => g.id !== props.exclude && !g.path.some(p => p.id === props.exclude));
69
+ });
58
70
 
59
71
  const fetch = () => {
60
72
  return getManyFolders({ ...props.folderFilters });
@@ -1,5 +1,6 @@
1
1
  <template>
2
2
  <FSTreeViewField
3
+ :label="$props.label ?? $tr('ui.common.group', 'Group')"
3
4
  :multiple="$props.multiple"
4
5
  :loading="fetchingGroups"
5
6
  :items="groups"
@@ -20,10 +21,10 @@
20
21
  </template>
21
22
 
22
23
  <script lang="ts">
23
- import { defineComponent, type PropType } from "vue";
24
+ import { computed, defineComponent, type PropType } from "vue";
24
25
 
26
+ import { type GroupFilters, type GroupInfos } from "@dative-gpi/foundation-core-domain/models";
25
27
  import { useTreeView } from "@dative-gpi/foundation-shared-components/composables";
26
- import { type GroupFilters } from "@dative-gpi/foundation-core-domain/models";
27
28
  import { useGroups } from "@dative-gpi/foundation-core-services/composables";
28
29
 
29
30
  import FSTreeViewField from "@dative-gpi/foundation-shared-components/components/fields/FSTreeViewField.vue";
@@ -41,6 +42,11 @@ export default defineComponent({
41
42
  required: false,
42
43
  default: null
43
44
  },
45
+ exclude: {
46
+ type: String as PropType<string | null>,
47
+ required: false,
48
+ default: null
49
+ },
44
50
  modelValue: {
45
51
  type: [Array, String] as PropType<string[] | string | null>,
46
52
  required: false,
@@ -50,11 +56,23 @@ export default defineComponent({
50
56
  type: Boolean,
51
57
  required: false,
52
58
  default: false
53
- }
59
+ },
60
+ label: {
61
+ type: String as PropType<string | null>,
62
+ required: false,
63
+ default: null
64
+ }
54
65
  },
55
66
  emits: ["update:modelValue"],
56
67
  setup(props, { emit }) {
57
- const { getMany: getManyGroups, fetching: fetchingGroups, entities: groups } = useGroups();
68
+ const { getMany: getManyGroups, fetching: fetchingGroups, entities } = useGroups();
69
+
70
+ const groups = computed((): GroupInfos[] => {
71
+ if (!props.exclude) {
72
+ return entities.value;
73
+ }
74
+ return entities.value.filter(g => g.id !== props.exclude && !g.path.some(p => p.id === props.exclude));
75
+ });
58
76
 
59
77
  const fetch = () => {
60
78
  return getManyGroups({ ...props.groupFilters });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dative-gpi/foundation-core-components",
3
3
  "sideEffects": false,
4
- "version": "1.0.35",
4
+ "version": "1.0.37-report-v1",
5
5
  "description": "",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -10,21 +10,21 @@
10
10
  "author": "",
11
11
  "license": "ISC",
12
12
  "dependencies": {
13
- "@dative-gpi/foundation-core-domain": "1.0.35",
14
- "@dative-gpi/foundation-core-services": "1.0.35",
15
- "@dative-gpi/foundation-shared-components": "1.0.35",
16
- "@dative-gpi/foundation-shared-domain": "1.0.35",
17
- "@dative-gpi/foundation-shared-services": "1.0.35"
13
+ "@dative-gpi/foundation-core-domain": "1.0.37-report-v1",
14
+ "@dative-gpi/foundation-core-services": "1.0.37-report-v1",
15
+ "@dative-gpi/foundation-shared-components": "1.0.37-report-v1",
16
+ "@dative-gpi/foundation-shared-domain": "1.0.37-report-v1",
17
+ "@dative-gpi/foundation-shared-services": "1.0.37-report-v1"
18
18
  },
19
19
  "peerDependencies": {
20
- "@dative-gpi/bones-ui": "^0.0.75",
20
+ "@dative-gpi/bones-ui": "^1.0.0",
21
21
  "color": "^4.2.3",
22
- "vue": "^3.4.29"
22
+ "vue": "^3.4.38"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@types/color": "3.0.6",
26
26
  "sass": "1.71.1",
27
27
  "sass-loader": "13.3.2"
28
28
  },
29
- "gitHead": "10111fadbf8f2207213a9d5f13ae4c3c4f71f0bc"
29
+ "gitHead": "f3aa27c947cc218b530726383113af17bf59a133"
30
30
  }
@@ -1,15 +1,16 @@
1
+ import type { DashboardOrganisationInfos, DashboardOrganisationTypeInfos, DashboardShallowInfos, FolderInfos } from "@dative-gpi/foundation-core-domain/models";
1
2
  import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
2
3
  import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
3
- import { DashboardType } from "@dative-gpi/foundation-shared-domain/models"
4
+ import { DashboardType } from "@dative-gpi/foundation-shared-domain/enums";
4
5
 
5
6
  const { $tr } = useTranslationsProvider();
6
7
 
7
8
  export const dashboardTypeLabel = (type: DashboardType): string => {
8
9
  switch (type) {
9
- case DashboardType.None: return $tr("ui.dashboard-type.none", "None");
10
+ case DashboardType.None: return $tr("ui.common.none", "None");
10
11
  case DashboardType.Organisation:
11
- case DashboardType.Shallow: return $tr("ui.dashboard-type.organisation", "Custom");
12
- case DashboardType.OrganisationType: return $tr("ui.dashboard-type.organisation-type", "Shared");
12
+ case DashboardType.Shallow: return $tr("ui.common.custom", "Custom");
13
+ case DashboardType.OrganisationType: return $tr("ui.common.shared", "Shared");
13
14
  }
14
15
  };
15
16
 
@@ -20,4 +21,31 @@ export const dashboardTypeColor = (type: DashboardType): ColorBase => {
20
21
  case DashboardType.Shallow: return ColorEnum.Primary;
21
22
  case DashboardType.OrganisationType: return ColorEnum.Warning;
22
23
  }
23
- };
24
+ };
25
+
26
+ export interface DashboardShallowListItem extends DashboardShallowInfos {
27
+ dashboardType: DashboardType.Shallow
28
+ type: FoldersListType.Dashboard
29
+ }
30
+
31
+ export interface DashboardOrganisationListItem extends DashboardOrganisationInfos {
32
+ dashboardType: DashboardType.Organisation
33
+ type: FoldersListType.Dashboard
34
+ }
35
+
36
+ export interface OrganisationTypeDashboardListItem extends DashboardOrganisationTypeInfos {
37
+ dashboardType: DashboardType.OrganisationType
38
+ }
39
+
40
+ export interface FolderListItem extends FolderInfos {
41
+ dashboardType: DashboardType.None
42
+ type: FoldersListType.Folder
43
+ }
44
+
45
+ export enum FoldersListType {
46
+ Dashboard = "dashboard",
47
+ Folder = "folder"
48
+ }
49
+
50
+ export type DashboardsListItem = DashboardShallowListItem | DashboardOrganisationListItem | OrganisationTypeDashboardListItem;
51
+ export type FoldersListItem = DashboardShallowListItem | DashboardOrganisationListItem | FolderListItem;
package/utils/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- export * from "./charts";
2
1
  export * from "./dashboards";
3
2
  export * from "./roles";
4
- export * from "./users";
3
+ export * from "./users";
4
+ export * as TABLES from "./tables";
@@ -0,0 +1,80 @@
1
+ export const ALERT_READ = "app.alert.infos";
2
+ export const ALERT_ACKNOWLEDGE = "app.alert.acknowledge";
3
+ export const ALERT_COMMENT = "app.alert.comment";
4
+ export const ALERT_REMOVE = "app.alert.remove";
5
+
6
+ export const CHARTORGANISATION_READ = "app.chartorganisation.read";
7
+ export const CHARTORGANISATION_CREATE = "app.chartorganisation.create";
8
+ export const CHARTORGANISATION_UPDATE = "app.chartorganisation.update";
9
+ export const CHARTORGANISATION_REMOVE = "app.chartorganisation.remove";
10
+
11
+ export const CHARTORGANISATIONTYPE_READ = "app.chartorganisationtype.read";
12
+ export const CHARTORGANISATIONTYPE_CREATE = "app.chartorganisationtype.create";
13
+ export const CHARTORGANISATIONTYPE_UPDATE = "app.chartorganisationtype.update";
14
+ export const CHARTORGANISATIONTYPE_REMOVE = "app.chartorganisationtype.remove";
15
+ export const CHARTORGANISATIONTYPE_SHARE = "app.chartorganisationtype.share";
16
+
17
+ export const DASHBOARDORGANISATION_READ = "app.dashboardorganisation.read";
18
+ export const DASHBOARDORGANISATION_CREATE = "app.dashboardorganisation.create";
19
+ export const DASHBOARDORGANISATION_UPDATE = "app.dashboardorganisation.update";
20
+ export const DASHBOARDORGANISATION_REMOVE = "app.dashboardorganisation.remove";
21
+ export const DASHBOARDORGANISATION_LOCK = "app.dashboardorganisation.lock";
22
+
23
+ export const DASHBOARDORGANISATIONTYPE_READ = "app.dashboardorganisationtype.read";
24
+ export const DASHBOARDORGANISATIONTYPE_CREATE = "app.dashboardorganisationtype.create";
25
+ export const DASHBOARDORGANISATIONTYPE_UPDATE = "app.dashboardorganisationtype.update";
26
+ export const DASHBOARDORGANISATIONTYPE_REMOVE = "app.dashboardorganisationtype.remove";
27
+ export const DASHBOARDORGANISATIONTYPE_SHARE = "app.dashboardorganisationtype.share";
28
+ export const DASHBOARDORGANISATIONTYPE_LOCK = "app.dashboardorganisationtype.lock";
29
+
30
+ export const DATAMODEL_READ = "app.datamodel.read";
31
+
32
+ export const DEVICEORGANISATION_READ = "app.deviceorganisation.read";
33
+ export const DEVICEORGANISATION_CREATE = "app.deviceorganisation.create";
34
+ export const DEVICEORGANISATION_UPDATE = "app.deviceorganisation.update";
35
+ export const DEVICEORGANISATION_REMOVE = "app.deviceorganisation.remove";
36
+
37
+ export const GROUP_READ = "app.group.read";
38
+ export const GROUP_CREATE = "app.group.create";
39
+ export const GROUP_UPDATE = "app.group.update";
40
+ export const GROUP_REMOVE = "app.group.remove";
41
+
42
+ export const LOCATION_READ = "app.location.read";
43
+ export const LOCATION_CREATE = "app.location.create";
44
+ export const LOCATION_UPDATE = "app.location.update";
45
+ export const LOCATION_REMOVE = "app.location.remove";
46
+
47
+ export const ORGANISATION_UPDATE = "app.organisation.update";
48
+ export const ORGANISATION_DASHBOARD = "app.organisation.dashboard";
49
+
50
+ export const ORGANISATIONTYPE_DASHBOARD = "app.organisationtype.dashboard";
51
+
52
+ export const ROLEORGANISATION_READ = "app.roleorganisation.read";
53
+ export const ROLEORGANISATION_CREATE = "app.roleorganisation.create";
54
+ export const ROLEORGANISATION_UPDATE = "app.roleorganisation.update";
55
+ export const ROLEORGANISATION_REMOVE = "app.roleorganisation.remove";
56
+
57
+ export const ROLEORGANISATIONTYPE_READ = "app.roleorganisationtype.read";
58
+
59
+ export const SCENARIO_MANAGE = "app.scenario.manage";
60
+
61
+ export const SCENARIOORGANISATION_READ = "app.scenarioorganisation.read";
62
+ export const SCENARIOORGANISATION_CREATE = "app.scenarioorganisation.create";
63
+ export const SCENARIOORGANISATION_UPDATE = "app.scenarioorganisation.update";
64
+ export const SCENARIOORGANISATION_REMOVE = "app.scenarioorganisation.remove";
65
+
66
+ export const SCENARIOORGANISATIONTYPE_READ = "app.scenarioorganisationtype.read";
67
+ export const SCENARIOORGANISATIONTYPE_CREATE = "app.scenarioorganisationtype.create";
68
+ export const SCENARIOORGANISATIONTYPE_UPDATE = "app.scenarioorganisationtype.update";
69
+ export const SCENARIOORGANISATIONTYPE_REMOVE = "app.scenarioorganisationtype.remove";
70
+ export const SCENARIOORGANISATIONTYPE_SHARE = "app.scenarioorganisationtype.share";
71
+
72
+ export const SERVICEACCOUNTORGANISATION_READ = "app.serviceaccountorganisation.read";
73
+ export const SERVICEACCOUNTORGANISATION_CREATE = "app.serviceaccountorganisation.create";
74
+ export const SERVICEACCOUNTORGANISATION_UPDATE = "app.serviceaccountorganisation.update";
75
+ export const SERVICEACCOUNTORGANISATION_REMOVE = "app.serviceaccountorganisation.remove";
76
+
77
+ export const USERORGANISATION_READ = "app.userorganisation.read";
78
+ export const USERORGANISATION_CREATE = "app.userorganisation.create";
79
+ export const USERORGANISATION_UPDATE = "app.userorganisation.update";
80
+ export const USERORGANISATION_REMOVE = "app.userorganisation.remove";