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
f2d705dd
Commit
f2d705dd
authored
Jun 07, 2021
by
Vitaly Slobodin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix OrderSummary cmp
parent
23cdfdc1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
10 deletions
+14
-10
ee/app/assets/javascripts/subscriptions/buy_minutes/components/order_summary.vue
...ts/subscriptions/buy_minutes/components/order_summary.vue
+5
-5
ee/spec/frontend/subscriptions/buy_minutes/components/checkout/order_summary_spec.js
...ons/buy_minutes/components/checkout/order_summary_spec.js
+9
-5
No files found.
ee/app/assets/javascripts/subscriptions/buy_minutes/components/order_summary.vue
View file @
f2d705dd
...
...
@@ -21,15 +21,14 @@ export default {
apollo
:
{
state
:
{
query
:
STATE_QUERY
,
update
(
data
)
{
return
data
;
},
manual
:
true
,
result
({
data
})
{
this
.
subscription
=
data
.
subscription
;
this
.
namespaces
=
data
.
namespaces
;
this
.
isSetupForCompany
=
data
.
isSetupForCompany
;
this
.
fullName
=
data
.
fullName
;
this
.
customer
=
data
.
customer
;
this
.
selectedPlanId
=
data
.
selectedPlanId
;
},
},
},
...
...
@@ -41,11 +40,12 @@ export default {
collapsed
:
true
,
fullName
:
null
,
customer
:
{},
selectedPlanId
:
null
,
};
},
computed
:
{
selectedPlan
()
{
return
this
.
plans
.
find
((
plan
)
=>
plan
.
code
===
this
.
s
ubscription
.
p
lanId
);
return
this
.
plans
.
find
((
plan
)
=>
plan
.
code
===
this
.
s
electedP
lanId
);
},
selectedPlanPrice
()
{
return
this
.
selectedPlan
.
pricePerYear
;
...
...
@@ -106,7 +106,7 @@ export default {
</
script
>
<
template
>
<div
v-if=
"!$apollo.loading && (!isGroupSelected || isSelectedGroupPresent)"
v-if=
"!$apollo.loading && (!isGroupSelected || isSelectedGroupPresent)
&& selectedPlan
"
class=
"order-summary gl-display-flex gl-flex-direction-column gl-flex-grow-1 gl-mt-2 mt-lg-5"
>
<div
class=
"d-lg-none"
>
...
...
ee/spec/frontend/subscriptions/buy_minutes/components/checkout/order_summary_spec.js
View file @
f2d705dd
...
...
@@ -17,7 +17,7 @@ localVue.use(VueApollo);
describe
(
'
Order Summary
'
,
()
=>
{
const
resolvers
=
{
...
purchaseFlowResolvers
,
...
subscriptionsResolvers
};
const
initialStateData
=
{
s
ubscription
:
{
planId
:
'
silver
'
}
,
s
electedPlanId
:
'
silver
'
,
};
let
wrapper
;
...
...
@@ -105,7 +105,8 @@ describe('Order Summary', () => {
describe
(
'
the default plan
'
,
()
=>
{
beforeEach
(()
=>
{
createComponent
({
subscription
:
{
planId
:
'
bronze
'
,
quantity
:
1
},
subscription
:
{
quantity
:
1
},
selectedPlanId
:
'
bronze
'
,
});
});
...
...
@@ -126,7 +127,8 @@ describe('Order Summary', () => {
describe
(
'
Changing the number of users
'
,
()
=>
{
beforeEach
(()
=>
{
createComponent
({
subscription
:
{
planId
:
'
silver
'
,
quantity
:
1
},
subscription
:
{
quantity
:
1
},
selectedPlanId
:
'
silver
'
,
});
});
...
...
@@ -151,7 +153,8 @@ describe('Order Summary', () => {
describe
(
'
3 selected users
'
,
()
=>
{
beforeEach
(()
=>
{
createComponent
({
subscription
:
{
planId
:
'
silver
'
,
quantity
:
3
},
subscription
:
{
quantity
:
3
},
selectedPlanId
:
'
silver
'
,
});
});
...
...
@@ -175,7 +178,8 @@ describe('Order Summary', () => {
describe
(
'
no selected users
'
,
()
=>
{
beforeEach
(()
=>
{
createComponent
({
subscription
:
{
planId
:
'
silver
'
,
quantity
:
0
},
subscription
:
{
quantity
:
0
},
selectedPlanId
:
'
silver
'
,
});
});
...
...
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