@@ -2,9 +2,9 @@ import React, { useContext } from 'react';
2
2
import { Helmet } from 'react-helmet' ;
3
3
import { useIntl , FormattedMessage } from '@edx/frontend-platform/i18n' ;
4
4
import {
5
- ActionRow , Button , Card , Icon , IconButtonWithTooltip , useToggle ,
5
+ ActionRow , Button , Card , useToggle ,
6
6
} from '@openedx/paragon' ;
7
- import { Add , InfoOutline } from '@openedx/paragon/icons' ;
7
+ import { Add } from '@openedx/paragon/icons' ;
8
8
9
9
import cardImage from './images/ZeroStateImage.svg' ;
10
10
import Hero from '../Hero' ;
@@ -19,60 +19,47 @@ const PeopleManagementPage = () => {
19
19
description : 'Title for the people management page.' ,
20
20
} ) ;
21
21
22
- const {
23
- enterpriseSubsidyTypes,
24
- } = useContext ( EnterpriseSubsidiesContext ) ;
22
+ const { enterpriseSubsidyTypes } = useContext ( EnterpriseSubsidiesContext ) ;
25
23
26
- const hasLearnerCredit = enterpriseSubsidyTypes . includes ( SUBSIDY_TYPES . budget ) ;
24
+ const hasLearnerCredit = enterpriseSubsidyTypes . includes (
25
+ SUBSIDY_TYPES . budget ,
26
+ ) ;
27
27
const hasOtherSubsidyTypes = enterpriseSubsidyTypes . includes ( SUBSIDY_TYPES . license )
28
28
|| enterpriseSubsidyTypes . includes ( SUBSIDY_TYPES . coupon ) ;
29
29
30
30
// eslint-disable-next-line @typescript-eslint/no-unused-vars
31
31
const [ isModalOpen , openModal , closeModal ] = useToggle ( false ) ;
32
32
33
- const tooltipContent = (
34
- < FormattedMessage
35
- id = "admin.portal.people.management.page.tooltip.content"
36
- defaultMessage = "Only available for Learner Credit"
37
- description = "Tooltip to say this is only available for Learner Credit (not codes or subscriptions)."
38
- />
39
- ) ;
40
-
41
33
return (
42
34
< >
43
35
< Helmet title = { PAGE_TITLE } />
44
36
< Hero title = { PAGE_TITLE } />
45
- { hasLearnerCredit && (
46
37
< div className = "mx-3 mt-4" >
47
38
< ActionRow className = "mb-4" >
48
39
< span className = "flex-column" >
49
40
< span className = "d-flex" >
50
41
< h3 className = "mt-2" >
51
42
< FormattedMessage
52
43
id = "admin.portal.people.management.page.title"
53
- defaultMessage = "Your Learner Credit groups"
44
+ defaultMessage = "Your organization's groups"
54
45
description = "Title for people management zero state."
55
46
/>
56
47
</ h3 >
57
- { hasLearnerCredit && hasOtherSubsidyTypes && (
58
- < IconButtonWithTooltip
59
- key = "primary"
60
- tooltipPlacement = "top"
61
- tooltipContent = { tooltipContent }
62
- src = { InfoOutline }
63
- iconAs = { Icon }
64
- alt = "Info Popup"
65
- onClick = { ( ) => { } }
66
- variant = "primary"
67
- className = "ml-1"
68
- />
69
- ) }
70
48
</ span >
71
- < FormattedMessage
72
- id = "admin.portal.people.management.page.subtitle"
73
- defaultMessage = "Monitor group learning progress, assign more courses, and invite members to new Learner Credit budgets."
74
- description = "Subtitle for people management zero state."
75
- />
49
+ { hasLearnerCredit && (
50
+ < FormattedMessage
51
+ id = "admin.portal.people.management.page.subtitle.lc"
52
+ defaultMessage = "Monitor group learning progress, assign more courses, and invite members to new Learner Credit budgets."
53
+ description = "Subtitle for people management with learner credit."
54
+ />
55
+ ) }
56
+ { ! hasLearnerCredit && hasOtherSubsidyTypes && (
57
+ < FormattedMessage
58
+ id = "admin.portal.people.management.page.subtitle.noLc"
59
+ defaultMessage = "Monitor group learning progress."
60
+ description = "Subtitle for people management without learner credit."
61
+ />
62
+ ) }
76
63
</ span >
77
64
< ActionRow . Spacer />
78
65
< Button iconBefore = { Add } onClick = { openModal } >
@@ -98,16 +85,24 @@ const PeopleManagementPage = () => {
98
85
/>
99
86
</ h2 >
100
87
< p className = "mx-2" >
101
- < FormattedMessage
102
- id = "admin.portal.people.management.page.zerostate.card.subtitle"
103
- defaultMessage = "Once a group is created, you can track members' progress, assign extra courses, and invite them to additional budgets."
104
- description = "Detail message shown to admin benefits of creating a group."
105
- />
88
+ { hasLearnerCredit && (
89
+ < FormattedMessage
90
+ id = "admin.portal.people.management.page.zerostate.card.subtitle.lc"
91
+ defaultMessage = "Once a group is created, you can track members' progress, assign extra courses, and invite them to additional budgets."
92
+ description = "Detail message shown to admin benefits of creating a group with learner credit."
93
+ />
94
+ ) }
95
+ { ! hasLearnerCredit && hasOtherSubsidyTypes && (
96
+ < FormattedMessage
97
+ id = "admin.portal.people.management.page.zerostate.card.subtitle.noLc"
98
+ defaultMessage = "Once a group is created, you can track members' progress."
99
+ description = "Detail message shown to admin benefits of creating a group without learner credit."
100
+ />
101
+ ) }
106
102
</ p >
107
103
</ span >
108
104
</ Card >
109
105
</ div >
110
- ) }
111
106
</ >
112
107
) ;
113
108
} ;
0 commit comments