1
- import * as React from 'react' ;
2
1
import { Helmet } from 'react-helmet' ;
3
2
import { Col , Row , Button } from 'antd' ;
4
3
import { Link } from 'react-router-dom' ;
5
4
import './Home.css' ;
6
5
import { useTranslation } from '../../../mls' ;
6
+ import { URL_USER , URL_LOCATION_UNIT , URL_TEAM_ASSIGNMENT , URL_TEAMS } from '../../../constants' ;
7
+ import { ENABLE_TEAMS_ASSIGNMENT_MODULE } from '../../../configs/env' ;
8
+ import React from 'react' ;
7
9
import {
8
- URL_USER ,
9
- URL_LOCATION_UNIT ,
10
- URL_LOCATION_UNIT_GROUP ,
11
- URL_TEAM_ASSIGNMENT ,
12
- URL_TEAMS ,
13
- } from '../../../constants' ;
14
- import {
15
- ENABLE_LOCATIONS ,
16
- ENABLE_TEAMS ,
17
- ENABLE_TEAMS_ASSIGNMENT_MODULE ,
18
- ENABLE_USER_MANAGEMENT ,
19
- } from '../../../configs/env' ;
10
+ COMPOSITE_ENABLE_LOCATIONS_MANAGEMENT ,
11
+ COMPOSITE_ENABLE_TEAM_MANAGEMENT ,
12
+ COMPOSITE_ENABLE_USER_MANAGEMENT ,
13
+ } from '../../../configs/settings' ;
20
14
21
15
export const Home = ( ) => {
22
16
const { t } = useTranslation ( ) ;
@@ -32,7 +26,7 @@ export const Home = () => {
32
26
</ Col >
33
27
</ Row >
34
28
< Row gutter = { 16 } className = "links-box" >
35
- { ENABLE_USER_MANAGEMENT && (
29
+ { COMPOSITE_ENABLE_USER_MANAGEMENT && (
36
30
< Col className = "gutter-row" span = { 12 } >
37
31
< Link to = { URL_USER } className = "admin-link" >
38
32
< Button color = "outline" className = "btn-links" >
@@ -41,7 +35,7 @@ export const Home = () => {
41
35
</ Link >
42
36
</ Col >
43
37
) }
44
- { ENABLE_TEAMS && (
38
+ { COMPOSITE_ENABLE_TEAM_MANAGEMENT && (
45
39
< Col className = "gutter-row" span = { 12 } >
46
40
< Link to = { URL_TEAMS } className = "admin-link" >
47
41
< Button color = "outline" className = "btn-links" >
@@ -52,7 +46,7 @@ export const Home = () => {
52
46
) }
53
47
</ Row >
54
48
< Row gutter = { 16 } className = "links-box" >
55
- { ENABLE_LOCATIONS && (
49
+ { COMPOSITE_ENABLE_LOCATIONS_MANAGEMENT && (
56
50
< >
57
51
< Col className = "gutter-row" span = { 12 } >
58
52
< Link to = { URL_LOCATION_UNIT } className = "admin-link" >
@@ -61,14 +55,6 @@ export const Home = () => {
61
55
</ Button >
62
56
</ Link >
63
57
</ Col >
64
-
65
- < Col className = "gutter-row" span = { 12 } >
66
- < Link to = { URL_LOCATION_UNIT_GROUP } className = "admin-link" >
67
- < Button color = "outline" className = "btn-links" >
68
- { t ( 'Location Unit Group' ) }
69
- </ Button >
70
- </ Link >
71
- </ Col >
72
58
</ >
73
59
) }
74
60
</ Row >
0 commit comments