@dative-gpi/foundation-core-components 1.1.14-fix-last2 → 1.1.15
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.
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
<FSSpan
|
|
91
91
|
font="text-overline"
|
|
92
92
|
>
|
|
93
|
-
{{
|
|
93
|
+
{{ epochToLongTimeFormat(item.lastActivity) }}
|
|
94
94
|
</FSSpan>
|
|
95
95
|
</template>
|
|
96
96
|
<template
|
|
@@ -113,8 +113,10 @@ import { defineComponent, type PropType, watch } from "vue";
|
|
|
113
113
|
import { type RouteLocation } from "vue-router";
|
|
114
114
|
import _ from "lodash";
|
|
115
115
|
|
|
116
|
+
import { useDateFormat } from "@dative-gpi/foundation-shared-services/composables";
|
|
117
|
+
|
|
116
118
|
import type { UserOrganisationFilters, UserOrganisationInfos } from "@dative-gpi/foundation-core-domain/models";
|
|
117
|
-
import { userTypeLabel, userValidityLabel
|
|
119
|
+
import { userTypeLabel, userValidityLabel } from "@dative-gpi/foundation-core-components/utils";
|
|
118
120
|
import { useUserOrganisations } from "@dative-gpi/foundation-core-services/composables";
|
|
119
121
|
|
|
120
122
|
import FSDataTable from "../FSDataTable.vue";
|
|
@@ -165,6 +167,7 @@ export default defineComponent({
|
|
|
165
167
|
emits: ["update:modelValue"],
|
|
166
168
|
setup(props) {
|
|
167
169
|
const { getMany: fetchUserOrganisations, entities: userOrganisations, fetching: fetchingUserOrganisations } = useUserOrganisations();
|
|
170
|
+
const { epochToLongTimeFormat } = useDateFormat();
|
|
168
171
|
|
|
169
172
|
const isSelected = (id: string): boolean => {
|
|
170
173
|
return props.modelValue.includes(id);
|
|
@@ -182,7 +185,7 @@ export default defineComponent({
|
|
|
182
185
|
userValidityLabel,
|
|
183
186
|
userTypeLabel,
|
|
184
187
|
isSelected,
|
|
185
|
-
|
|
188
|
+
epochToLongTimeFormat,
|
|
186
189
|
};
|
|
187
190
|
}
|
|
188
191
|
});
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"url": "https://github.com/Dative-GPI/foundation-shared-ui.git"
|
|
5
5
|
},
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"version": "1.1.
|
|
7
|
+
"version": "1.1.15",
|
|
8
8
|
"description": "",
|
|
9
9
|
"publishConfig": {
|
|
10
10
|
"access": "public"
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
"author": "",
|
|
14
14
|
"license": "ISC",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@dative-gpi/foundation-core-domain": "1.1.
|
|
17
|
-
"@dative-gpi/foundation-core-services": "1.1.
|
|
18
|
-
"@dative-gpi/foundation-shared-components": "1.1.
|
|
19
|
-
"@dative-gpi/foundation-shared-domain": "1.1.
|
|
20
|
-
"@dative-gpi/foundation-shared-services": "1.1.
|
|
16
|
+
"@dative-gpi/foundation-core-domain": "1.1.15",
|
|
17
|
+
"@dative-gpi/foundation-core-services": "1.1.15",
|
|
18
|
+
"@dative-gpi/foundation-shared-components": "1.1.15",
|
|
19
|
+
"@dative-gpi/foundation-shared-domain": "1.1.15",
|
|
20
|
+
"@dative-gpi/foundation-shared-services": "1.1.15"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"@dative-gpi/bones-ui": "^1.0.0",
|
|
@@ -29,5 +29,5 @@
|
|
|
29
29
|
"sass": "1.71.1",
|
|
30
30
|
"sass-loader": "13.3.2"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "2ede680103cbec86d21636377bb03c9c300cb8c8"
|
|
33
33
|
}
|
package/utils/users.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import { useDateFormat } from "@dative-gpi/foundation-shared-services/composables";
|
|
2
1
|
import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
|
|
3
2
|
import { UserType, UserValidityState } from "@dative-gpi/foundation-shared-domain/enums";
|
|
4
|
-
import { isoToEpoch } from "@dative-gpi/foundation-shared-domain/tools";
|
|
5
3
|
|
|
6
4
|
const { $tr } = useTranslationsProvider();
|
|
7
|
-
const { epochToShortTimeFormat } = useDateFormat();
|
|
8
5
|
|
|
9
6
|
export const userTypeLabel = (type: UserType): string => {
|
|
10
7
|
switch (type) {
|
|
@@ -33,11 +30,3 @@ export const userValidityLabel = (validity: UserValidityState): string => {
|
|
|
33
30
|
default: return "";
|
|
34
31
|
}
|
|
35
32
|
}
|
|
36
|
-
|
|
37
|
-
export const formatLastActivity = (value?: string | null): string => {
|
|
38
|
-
if (!value) {
|
|
39
|
-
return "";
|
|
40
|
-
}
|
|
41
|
-
const timestamp = isoToEpoch(value);
|
|
42
|
-
return epochToShortTimeFormat(timestamp);
|
|
43
|
-
};
|