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
59300f29
Commit
59300f29
authored
May 28, 2020
by
Marvin Karegyeya
Committed by
Kushal Pandya
May 28, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove destroy function logic from list model
parent
36845e07
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
7 deletions
+15
-7
app/assets/javascripts/boards/models/list.js
app/assets/javascripts/boards/models/list.js
+1
-7
app/assets/javascripts/boards/stores/boards_store.js
app/assets/javascripts/boards/stores/boards_store.js
+9
-0
changelogs/unreleased/Remove-destroy-function-logic-from-list-model.yml
...eleased/Remove-destroy-function-logic-from-list-model.yml
+5
-0
No files found.
app/assets/javascripts/boards/models/list.js
View file @
59300f29
...
@@ -83,13 +83,7 @@ class List {
...
@@ -83,13 +83,7 @@ class List {
}
}
destroy
()
{
destroy
()
{
const
index
=
boardsStore
.
state
.
lists
.
indexOf
(
this
);
boardsStore
.
destroy
(
this
);
boardsStore
.
state
.
lists
.
splice
(
index
,
1
);
boardsStore
.
updateNewListDropdown
(
this
.
id
);
boardsStore
.
destroyList
(
this
.
id
).
catch
(()
=>
{
// TODO: handle request error
});
}
}
update
()
{
update
()
{
...
...
app/assets/javascripts/boards/stores/boards_store.js
View file @
59300f29
...
@@ -519,6 +519,15 @@ const boardsStore = {
...
@@ -519,6 +519,15 @@ const boardsStore = {
destroyList
(
id
)
{
destroyList
(
id
)
{
return
axios
.
delete
(
`
${
this
.
state
.
endpoints
.
listsEndpoint
}
/
${
id
}
`
);
return
axios
.
delete
(
`
${
this
.
state
.
endpoints
.
listsEndpoint
}
/
${
id
}
`
);
},
},
destroy
(
list
)
{
const
index
=
this
.
state
.
lists
.
indexOf
(
list
);
this
.
state
.
lists
.
splice
(
index
,
1
);
this
.
updateNewListDropdown
(
list
.
id
);
this
.
destroyList
(
list
.
id
).
catch
(()
=>
{
// TODO: handle request error
});
},
saveList
(
list
)
{
saveList
(
list
)
{
const
entity
=
list
.
label
||
list
.
assignee
||
list
.
milestone
;
const
entity
=
list
.
label
||
list
.
assignee
||
list
.
milestone
;
...
...
changelogs/unreleased/Remove-destroy-function-logic-from-list-model.yml
0 → 100644
View file @
59300f29
---
title
:
Remove destroy function logic from list model
merge_request
:
32237
author
:
nuwe1
type
:
other
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