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
cc32d425
Commit
cc32d425
authored
Apr 22, 2021
by
Kev
Committed by
Vitaly Slobodin
Apr 22, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hide "Renew" button for trial subscription on group billing page
parent
2b932374
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
7 deletions
+17
-7
ee/app/assets/javascripts/billings/subscriptions/components/subscription_table.vue
.../billings/subscriptions/components/subscription_table.vue
+4
-1
ee/changelogs/unreleased/323181-hide-renew-button-for-trail-subscriptions.yml
...ased/323181-hide-renew-button-for-trail-subscriptions.yml
+5
-0
ee/spec/frontend/billings/subscriptions/components/subscription_table_spec.js
...lings/subscriptions/components/subscription_table_spec.js
+8
-6
No files found.
ee/app/assets/javascripts/billings/subscriptions/components/subscription_table.vue
View file @
cc32d425
...
@@ -50,6 +50,9 @@ export default {
...
@@ -50,6 +50,9 @@ export default {
return
`
${
this
.
namespaceName
}
:
${
planName
}
${
suffix
}
`
;
return
`
${
this
.
namespaceName
}
:
${
planName
}
${
suffix
}
`
;
},
},
canRenew
()
{
return
this
.
isSubscription
&&
!
this
.
plan
.
trial
;
},
canUpgrade
()
{
canUpgrade
()
{
return
this
.
isFreePlan
||
this
.
plan
.
upgradable
;
return
this
.
isFreePlan
||
this
.
plan
.
upgradable
;
},
},
...
@@ -78,7 +81,7 @@ export default {
...
@@ -78,7 +81,7 @@ export default {
return
this
.
canUpgradeEEPlan
?
this
.
planUpgradeHref
:
this
.
customerPortalUrl
;
return
this
.
canUpgradeEEPlan
?
this
.
planUpgradeHref
:
this
.
customerPortalUrl
;
},
},
renewButton
()
{
renewButton
()
{
return
this
.
isSubscription
return
this
.
canRenew
?
createButtonProps
(
s__
(
'
SubscriptionTable|Renew
'
),
this
.
planRenewHref
,
'
renew-button
'
)
?
createButtonProps
(
s__
(
'
SubscriptionTable|Renew
'
),
this
.
planRenewHref
,
'
renew-button
'
)
:
null
;
:
null
;
},
},
...
...
ee/changelogs/unreleased/323181-hide-renew-button-for-trail-subscriptions.yml
0 → 100644
View file @
cc32d425
---
title
:
Hide "Renew" button for trial subscription on group billing page
merge_request
:
55796
author
:
Kev @KevSlashNull
type
:
fixed
ee/spec/frontend/billings/subscriptions/components/subscription_table_spec.js
View file @
cc32d425
...
@@ -132,19 +132,21 @@ describe('SubscriptionTable component', () => {
...
@@ -132,19 +132,21 @@ describe('SubscriptionTable component', () => {
describe
(
'
Renew button
'
,
()
=>
{
describe
(
'
Renew button
'
,
()
=>
{
describe
.
each
`
describe
.
each
`
planCode | expected | testDescription
planCode | trial | expected | testDescription
${
'
silver
'
}
|
${
true
}
|
${
'
renders the button
'
}
${
'
silver
'
}
|
${
false
}
|
${
true
}
|
${
'
renders the button
'
}
${
null
}
|
${
false
}
|
${
'
does not render the button
'
}
${
'
silver
'
}
|
${
true
}
|
${
false
}
|
${
'
does not render the button
'
}
${
'
free
'
}
|
${
false
}
|
${
'
does not render the button
'
}
${
null
}
|
${
false
}
|
${
false
}
|
${
'
does not render the button
'
}
${
'
free
'
}
|
${
false
}
|
${
false
}
|
${
'
does not render the button
'
}
`
(
`
(
'
given a plan with state: planCode = $planCode
'
,
'
given a plan with state: planCode = $planCode
, trial = $trial
'
,
({
planCode
,
expected
,
testDescription
})
=>
{
({
planCode
,
trial
,
expected
,
testDescription
})
=>
{
beforeEach
(()
=>
{
beforeEach
(()
=>
{
createComponentWithStore
({
createComponentWithStore
({
state
:
{
state
:
{
isLoadingSubscription
:
false
,
isLoadingSubscription
:
false
,
plan
:
{
plan
:
{
code
:
planCode
,
code
:
planCode
,
trial
,
},
},
},
},
});
});
...
...
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