@dative-gpi/foundation-shared-components 1.0.137-reportv3 → 1.0.137-widgetextensions2
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.
- package/package.json +4 -4
- package/tools/index.ts +0 -1
- package/tools/reportsTools.ts +0 -38
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dative-gpi/foundation-shared-components",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "1.0.137-
|
|
4
|
+
"version": "1.0.137-widgetextensions2",
|
|
5
5
|
"description": "",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"author": "",
|
|
11
11
|
"license": "ISC",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@dative-gpi/foundation-shared-domain": "1.0.137-
|
|
14
|
-
"@dative-gpi/foundation-shared-services": "1.0.137-
|
|
13
|
+
"@dative-gpi/foundation-shared-domain": "1.0.137-widgetextensions2",
|
|
14
|
+
"@dative-gpi/foundation-shared-services": "1.0.137-widgetextensions2"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"@dative-gpi/bones-ui": "^1.0.0",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"sass": "1.71.1",
|
|
36
36
|
"sass-loader": "13.3.2"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "cad1342d5c937276bcb3f03f852f273e8a182a9b"
|
|
39
39
|
}
|
package/tools/index.ts
CHANGED
package/tools/reportsTools.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
|
|
2
|
-
import { ColorEnum } from "../models";
|
|
3
|
-
import { JobState } from "@dative-gpi/foundation-shared-domain/enums";
|
|
4
|
-
|
|
5
|
-
const { $tr } = useTranslationsProvider();
|
|
6
|
-
|
|
7
|
-
export const getColorByState = (state: number | JobState | undefined) => {
|
|
8
|
-
switch (state) {
|
|
9
|
-
case JobState.Succeeded:
|
|
10
|
-
return ColorEnum.Success;
|
|
11
|
-
case JobState.Failed:
|
|
12
|
-
return ColorEnum.Error;
|
|
13
|
-
default:
|
|
14
|
-
return ColorEnum.Primary;
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export const getIconByState = (state: number | JobState | undefined) => {
|
|
19
|
-
switch (state) {
|
|
20
|
-
case JobState.Succeeded:
|
|
21
|
-
return 'mdi-check-circle-outline';
|
|
22
|
-
case JobState.Failed:
|
|
23
|
-
return 'mdi-alert-circle-outline';
|
|
24
|
-
default:
|
|
25
|
-
return 'mdi-alert-circle-outline';
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export const getLabelByState = (state: number | JobState | undefined) => {
|
|
30
|
-
switch (state) {
|
|
31
|
-
case JobState.Succeeded:
|
|
32
|
-
return $tr('ui.common.success', 'Success');
|
|
33
|
-
case JobState.Failed:
|
|
34
|
-
return $tr('ui.common.error', 'Error');
|
|
35
|
-
default:
|
|
36
|
-
return $tr('ui.common.executed', 'Executed');
|
|
37
|
-
}
|
|
38
|
-
};
|