Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
C
cms
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Pedro-dev_2
cms
Commits
ac19ac50
Commit
ac19ac50
authored
Apr 24, 2021
by
PDuarte
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clear selected project
parent
e79c85e0
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
7 deletions
+15
-7
data.js
src/views/settings/projects/data.js
+2
-2
main.js
src/views/settings/projects/edit/main.js
+2
-2
projectCard.js
src/views/settings/projects/edit/projectCard.js
+1
-1
index.js
src/views/settings/store/actions/index.js
+9
-0
index.js
src/views/settings/store/reducer/index.js
+1
-2
No files found.
src/views/settings/projects/data.js
View file @
ac19ac50
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
import
{
Link
}
from
'react-router-dom'
import
{
Link
}
from
'react-router-dom'
// ** Store & Actions
// ** Store & Actions
import
{
getProject
}
from
'../store/actions'
import
{
getProject
,
cleanProject
}
from
'../store/actions'
import
{
store
}
from
'@store/storeConfig/store'
import
{
store
}
from
'@store/storeConfig/store'
// ** Custom Components
// ** Custom Components
...
@@ -259,7 +259,7 @@ export const serverSideColumns = [
...
@@ -259,7 +259,7 @@ export const serverSideColumns = [
<
Link
<
Link
to
=
{
`/settings/projects/edit/
${
row
.
id
}
`
}
to
=
{
`/settings/projects/edit/
${
row
.
id
}
`
}
className
=
'user-name text-truncate mb-0'
className
=
'user-name text-truncate mb-0'
// onClick={() => store.dispatch(get
Project(row.id))}
onClick
=
{()
=>
store
.
dispatch
(
clean
Project
(
row
.
id
))}
>
>
<
span
className
=
'font-weight-bold'
>
{
row
.
app_name
}
<
/span
>
<
span
className
=
'font-weight-bold'
>
{
row
.
app_name
}
<
/span
>
<
/Link
>
<
/Link
>
...
...
src/views/settings/projects/edit/main.js
View file @
ac19ac50
...
@@ -34,8 +34,8 @@ const ProjectsEdit = () => {
...
@@ -34,8 +34,8 @@ const ProjectsEdit = () => {
return
store
.
selectedProject
!==
null
&&
store
.
selectedProject
!==
undefined
?
(
return
store
.
selectedProject
!==
null
&&
store
.
selectedProject
!==
undefined
?
(
<
ProjectCard
selectedProject
=
{
store
.
selectedProject
}
/>
<
ProjectCard
selectedProject
=
{
store
.
selectedProject
}
/>
)
:
(
)
:
(
<
Alert
color
=
'
danger
'
>
<
Alert
color
=
'
info
'
>
<
h4
className
=
'alert-heading'
>
Project
not
found
<
/h4
>
<
h4
className
=
'alert-heading'
>
Loading
Project
<
/h4
>
<
div
className
=
'alert-body'
>
<
div
className
=
'alert-body'
>
User
with
id
:
{
id
}
doesn
't exist. Check list of all Projects: <Link to='
/
settings
/
projects
'>Projects List</Link>
User
with
id
:
{
id
}
doesn
't exist. Check list of all Projects: <Link to='
/
settings
/
projects
'>Projects List</Link>
</div>
</div>
...
...
src/views/settings/projects/edit/projectCard.js
View file @
ac19ac50
...
@@ -30,7 +30,7 @@ const SuccessProgressToast = () => (
...
@@ -30,7 +30,7 @@ const SuccessProgressToast = () => (
<
Avatar
size
=
'sm'
color
=
'success'
icon
=
{
<
Check
size
=
{
12
}
/>} /
>
<
Avatar
size
=
'sm'
color
=
'success'
icon
=
{
<
Check
size
=
{
12
}
/>} /
>
<
h6
className
=
'toast-title'
>
Saving
Project
!<
/h6
>
<
h6
className
=
'toast-title'
>
Saving
Project
!<
/h6
>
<
/div
>
<
/div
>
<
small
className
=
'text-muted'
>
now
<
/small
>
<
small
className
=
'text-muted'
><
/small
>
<
/div
>
<
/div
>
<
div
className
=
'toastify-body'
>
<
div
className
=
'toastify-body'
>
<
span
role
=
'img'
aria
-
label
=
'toast-text'
>
<
span
role
=
'img'
aria
-
label
=
'toast-text'
>
...
...
src/views/settings/store/actions/index.js
View file @
ac19ac50
...
@@ -71,6 +71,15 @@ export const getProject = id => {
...
@@ -71,6 +71,15 @@ export const getProject = id => {
}
}
}
}
export
const
cleanProject
=
id
=>
{
return
async
dispatch
=>
{
dispatch
({
type
:
'GET_PROJECT'
,
data
:
null
})
}
}
// ** Add new project
// ** Add new project
export
const
updateProject
=
project
=>
{
export
const
updateProject
=
project
=>
{
return
(
dispatch
,
getState
)
=>
{
return
(
dispatch
,
getState
)
=>
{
...
...
src/views/settings/store/reducer/index.js
View file @
ac19ac50
...
@@ -50,12 +50,11 @@ const settings = (state = initialState, action) => {
...
@@ -50,12 +50,11 @@ const settings = (state = initialState, action) => {
allDataProjects
:
action
.
allData
,
allDataProjects
:
action
.
allData
,
dataProjects
:
action
.
data
,
dataProjects
:
action
.
data
,
totalProjects
:
action
.
totalPages
,
totalProjects
:
action
.
totalPages
,
selectedProject
:
null
,
//
selectedProject: null,
paramsProjects
:
action
.
params
paramsProjects
:
action
.
params
}
}
case
'GET_PROJECT'
:
case
'GET_PROJECT'
:
return
{
...
state
,
return
{
...
state
,
selectedProject
:
action
.
data
selectedProject
:
action
.
data
}
}
...
...
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