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
4fc95be4
Commit
4fc95be4
authored
Oct 07, 2021
by
Janis Altherr
Committed by
Brandon Labuschagne
Oct 07, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show toast when deleting an iteration
parent
13d29305
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
1 deletion
+14
-1
ee/app/assets/javascripts/iterations/components/iteration_report.vue
...ts/javascripts/iterations/components/iteration_report.vue
+1
-0
ee/app/assets/javascripts/iterations/components/iteration_report_without_vue_router.vue
...ations/components/iteration_report_without_vue_router.vue
+3
-1
ee/app/assets/javascripts/iterations/index.js
ee/app/assets/javascripts/iterations/index.js
+2
-0
ee/spec/frontend/iterations/components/iteration_report_spec.js
...c/frontend/iterations/components/iteration_report_spec.js
+5
-0
locale/gitlab.pot
locale/gitlab.pot
+3
-0
No files found.
ee/app/assets/javascripts/iterations/components/iteration_report.vue
View file @
4fc95be4
...
...
@@ -115,6 +115,7 @@ export default {
}
this
.
$router
.
push
(
'
/
'
);
this
.
$toast
.
show
(
s__
(
'
Iterations|The iteration has been deleted.
'
));
})
.
catch
((
err
)
=>
{
this
.
error
=
err
;
...
...
ee/app/assets/javascripts/iterations/components/iteration_report_without_vue_router.vue
View file @
4fc95be4
...
...
@@ -15,7 +15,7 @@ import { TYPE_ITERATION } from '~/graphql_shared/constants';
import
{
convertToGraphQLId
}
from
'
~/graphql_shared/utils
'
;
import
{
formatDate
}
from
'
~/lib/utils/datetime_utility
'
;
import
{
visitUrl
}
from
'
~/lib/utils/url_utility
'
;
import
{
__
}
from
'
~/locale
'
;
import
{
__
,
s__
}
from
'
~/locale
'
;
import
glFeatureFlagsMixin
from
'
~/vue_shared/mixins/gl_feature_flags_mixin
'
;
import
{
Namespace
}
from
'
../constants
'
;
import
deleteIteration
from
'
../queries/destroy_iteration.mutation.graphql
'
;
...
...
@@ -202,6 +202,8 @@ export default {
}
this
.
isEditing
=
false
;
this
.
$toast
.
show
(
s__
(
'
Iterations|The iteration has been deleted.
'
));
visitUrl
(
this
.
iterationsListPath
);
})
.
catch
((
err
)
=>
{
...
...
ee/app/assets/javascripts/iterations/index.js
View file @
4fc95be4
import
{
GlToast
}
from
'
@gitlab/ui
'
;
import
Vue
from
'
vue
'
;
import
VueApollo
from
'
vue-apollo
'
;
import
createDefaultClient
from
'
~/lib/graphql
'
;
...
...
@@ -10,6 +11,7 @@ import Iterations from './components/iterations.vue';
import
{
Namespace
}
from
'
./constants
'
;
import
createRouter
from
'
./router
'
;
Vue
.
use
(
GlToast
);
Vue
.
use
(
VueApollo
);
const
apolloProvider
=
new
VueApollo
({
...
...
ee/spec/frontend/iterations/components/iteration_report_spec.js
View file @
4fc95be4
...
...
@@ -21,6 +21,9 @@ const $router = {
},
},
};
const
$toast
=
{
show
:
jest
.
fn
(),
};
describe
(
'
Iterations report
'
,
()
=>
{
let
wrapper
;
...
...
@@ -72,6 +75,7 @@ describe('Iterations report', () => {
},
mocks
:
{
$router
,
$toast
,
},
stubs
:
{
GlLoadingIcon
,
...
...
@@ -148,6 +152,7 @@ describe('Iterations report', () => {
await
waitForPromises
();
expect
(
$router
.
push
).
toHaveBeenCalledWith
(
'
/
'
);
expect
(
$toast
.
show
).
toHaveBeenCalledWith
(
'
The iteration has been deleted.
'
);
});
it
(
'
shows error when delete fails
'
,
async
()
=>
{
...
...
locale/gitlab.pot
View file @
4fc95be4
...
...
@@ -19192,6 +19192,9 @@ msgstr ""
msgid "Iterations|The duration for each iteration (in weeks)"
msgstr ""
msgid "Iterations|The iteration has been deleted."
msgstr ""
msgid "Iterations|The start date of your first iteration"
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