Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
cfed288b
Commit
cfed288b
authored
May 10, 2021
by
Vijay Hawoldar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a new badge for billable membership types
parent
2393b1eb
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
4 deletions
+27
-4
ee/app/assets/javascripts/billings/seat_usage/components/subscription_seats.vue
...pts/billings/seat_usage/components/subscription_seats.vue
+7
-1
ee/app/assets/javascripts/billings/seat_usage/store/getters.js
...p/assets/javascripts/billings/seat_usage/store/getters.js
+2
-1
ee/changelogs/unreleased/vij-add-membership-type-badges.yml
ee/changelogs/unreleased/vij-add-membership-type-badges.yml
+5
-0
ee/spec/frontend/billings/mock_data.js
ee/spec/frontend/billings/mock_data.js
+6
-0
ee/spec/frontend/billings/seat_usage/components/__snapshots__/subscription_seats_spec.js.snap
.../components/__snapshots__/subscription_seats_spec.js.snap
+3
-1
ee/spec/frontend/billings/seat_usage/store/getters_spec.js
ee/spec/frontend/billings/seat_usage/store/getters_spec.js
+1
-1
locale/gitlab.pot
locale/gitlab.pot
+3
-0
No files found.
ee/app/assets/javascripts/billings/seat_usage/components/subscription_seats.vue
View file @
cfed288b
...
@@ -183,7 +183,13 @@ export default {
...
@@ -183,7 +183,13 @@ export default {
:size=
"$options.avatarSize"
:size=
"$options.avatarSize"
:label=
"item.user.name"
:label=
"item.user.name"
:sub-label=
"item.user.username"
:sub-label=
"item.user.username"
/>
>
<template
v-if=
"item.user.membership_type === 'group_invite'"
#meta
>
<gl-badge
size=
"sm"
variant=
"muted"
>
{{
s__
(
'
Billing|Group invite
'
)
}}
</gl-badge>
</
template
>
</gl-avatar-labeled>
</gl-avatar-link>
</gl-avatar-link>
</div>
</div>
</template>
</template>
...
...
ee/app/assets/javascripts/billings/seat_usage/store/getters.js
View file @
cfed288b
export
const
tableItems
=
(
state
)
=>
{
export
const
tableItems
=
(
state
)
=>
{
if
(
state
.
members
.
length
)
{
if
(
state
.
members
.
length
)
{
return
state
.
members
.
map
(
return
state
.
members
.
map
(
({
id
,
name
,
username
,
avatar_url
,
web_url
,
email
,
last_activity_on
})
=>
{
({
id
,
name
,
username
,
avatar_url
,
web_url
,
email
,
last_activity_on
,
membership_type
})
=>
{
const
formattedUserName
=
`@
${
username
}
`
;
const
formattedUserName
=
`@
${
username
}
`
;
return
{
return
{
...
@@ -12,6 +12,7 @@ export const tableItems = (state) => {
...
@@ -12,6 +12,7 @@ export const tableItems = (state) => {
avatar_url
,
avatar_url
,
web_url
,
web_url
,
last_activity_on
,
last_activity_on
,
membership_type
,
},
},
email
,
email
,
};
};
...
...
ee/changelogs/unreleased/vij-add-membership-type-badges.yml
0 → 100644
View file @
cfed288b
---
title
:
Add a new badge for billable membership types
merge_request
:
61366
author
:
type
:
changed
ee/spec/frontend/billings/mock_data.js
View file @
cfed288b
...
@@ -75,6 +75,7 @@ export const mockDataSeats = {
...
@@ -75,6 +75,7 @@ export const mockDataSeats = {
web_url
:
'
path/to/administrator
'
,
web_url
:
'
path/to/administrator
'
,
email
:
'
administrator@email.com
'
,
email
:
'
administrator@email.com
'
,
last_activity_on
:
'
2020-03-01
'
,
last_activity_on
:
'
2020-03-01
'
,
membership_type
:
'
group_member
'
,
},
},
{
{
id
:
3
,
id
:
3
,
...
@@ -84,6 +85,7 @@ export const mockDataSeats = {
...
@@ -84,6 +85,7 @@ export const mockDataSeats = {
web_url
:
'
path/to/agustin_walker
'
,
web_url
:
'
path/to/agustin_walker
'
,
email
:
'
agustin_walker@email.com
'
,
email
:
'
agustin_walker@email.com
'
,
last_activity_on
:
'
2020-03-01
'
,
last_activity_on
:
'
2020-03-01
'
,
membership_type
:
'
group_member
'
,
},
},
{
{
id
:
4
,
id
:
4
,
...
@@ -93,6 +95,7 @@ export const mockDataSeats = {
...
@@ -93,6 +95,7 @@ export const mockDataSeats = {
web_url
:
'
path/to/joella_miller
'
,
web_url
:
'
path/to/joella_miller
'
,
last_activity_on
:
null
,
last_activity_on
:
null
,
email
:
null
,
email
:
null
,
membership_type
:
'
group_invite
'
,
},
},
],
],
headers
:
{
headers
:
{
...
@@ -123,6 +126,7 @@ export const mockTableItems = [
...
@@ -123,6 +126,7 @@ export const mockTableItems = [
username
:
'
@root
'
,
username
:
'
@root
'
,
web_url
:
'
path/to/administrator
'
,
web_url
:
'
path/to/administrator
'
,
last_activity_on
:
'
2020-03-01
'
,
last_activity_on
:
'
2020-03-01
'
,
membership_type
:
'
group_member
'
,
},
},
},
},
{
{
...
@@ -134,6 +138,7 @@ export const mockTableItems = [
...
@@ -134,6 +138,7 @@ export const mockTableItems = [
username
:
'
@lester.orn
'
,
username
:
'
@lester.orn
'
,
web_url
:
'
path/to/agustin_walker
'
,
web_url
:
'
path/to/agustin_walker
'
,
last_activity_on
:
'
2020-03-01
'
,
last_activity_on
:
'
2020-03-01
'
,
membership_type
:
'
group_member
'
,
},
},
},
},
{
{
...
@@ -145,6 +150,7 @@ export const mockTableItems = [
...
@@ -145,6 +150,7 @@ export const mockTableItems = [
username
:
'
@era
'
,
username
:
'
@era
'
,
web_url
:
'
path/to/joella_miller
'
,
web_url
:
'
path/to/joella_miller
'
,
last_activity_on
:
null
,
last_activity_on
:
null
,
membership_type
:
'
group_invite
'
,
},
},
},
},
];
];
ee/spec/frontend/billings/seat_usage/components/__snapshots__/subscription_seats_spec.js.snap
View file @
cfed288b
...
@@ -42,7 +42,9 @@ Array [
...
@@ -42,7 +42,9 @@ Array [
"avatarLabeled": Object {
"avatarLabeled": Object {
"size": "32",
"size": "32",
"src": "path/to/img_joella_miller",
"src": "path/to/img_joella_miller",
"text": "Joella Miller @era",
"text": "Joella Miller
Group invite
@era",
},
},
"avatarLink": Object {
"avatarLink": Object {
"alt": "Joella Miller",
"alt": "Joella Miller",
...
...
ee/spec/frontend/billings/seat_usage/store/getters_spec.js
View file @
cfed288b
...
@@ -34,7 +34,7 @@ describe('Seat usage table getters', () => {
...
@@ -34,7 +34,7 @@ describe('Seat usage table getters', () => {
});
});
describe
(
'
when data is available
'
,
()
=>
{
describe
(
'
when data is available
'
,
()
=>
{
it
(
'
returns user details state
p
'
,
()
=>
{
it
(
'
returns user details state
'
,
()
=>
{
state
.
userDetails
[
0
]
=
{
state
.
userDetails
[
0
]
=
{
isLoading
:
false
,
isLoading
:
false
,
items
:
mockMemberDetails
,
items
:
mockMemberDetails
,
...
...
locale/gitlab.pot
View file @
cfed288b
...
@@ -5085,6 +5085,9 @@ msgstr ""
...
@@ -5085,6 +5085,9 @@ msgstr ""
msgid "Billing|Group"
msgid "Billing|Group"
msgstr ""
msgstr ""
msgid "Billing|Group invite"
msgstr ""
msgid "Billing|No users to display."
msgid "Billing|No users to display."
msgstr ""
msgstr ""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment