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
78b82b37
Commit
78b82b37
authored
Jun 05, 2021
by
PDuarte
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
menupages project select
parent
dcc55563
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
6 deletions
+18
-6
index.js
src/views/menupages/mainpages/add/index.js
+7
-3
table.js
src/views/menupages/mainpages/table.js
+8
-1
pages.js
src/views/menupages/store/actions/pages.js
+3
-2
No files found.
src/views/menupages/mainpages/add/index.js
View file @
78b82b37
...
@@ -4,7 +4,7 @@ import { Link } from 'react-router-dom'
...
@@ -4,7 +4,7 @@ import { Link } from 'react-router-dom'
// ** Store & Actions
// ** Store & Actions
import
{
addmenupages
}
from
'../../store/actions'
import
{
addmenupages
}
from
'../../store/actions'
import
{
useDispatch
}
from
'react-redux'
import
{
useDispatch
,
useSelector
}
from
'react-redux'
// ** Custom Components
// ** Custom Components
import
Breadcrumbs
from
'@components/breadcrumbs'
import
Breadcrumbs
from
'@components/breadcrumbs'
...
@@ -21,6 +21,7 @@ import '@styles/react/libs/tables/react-dataTable-component.scss'
...
@@ -21,6 +21,7 @@ import '@styles/react/libs/tables/react-dataTable-component.scss'
const
Tables
=
()
=>
{
const
Tables
=
()
=>
{
const
dispatch
=
useDispatch
()
const
dispatch
=
useDispatch
()
const
storeNavbar
=
useSelector
(
state
=>
state
.
navbar
)
const
onSubmitHandler
=
values
=>
{
const
onSubmitHandler
=
values
=>
{
dispatch
(
dispatch
(
addmenupages
({
addmenupages
({
...
@@ -53,9 +54,11 @@ const Tables = () => {
...
@@ -53,9 +54,11 @@ const Tables = () => {
<
h4
className
=
"card-title"
>
New
{
moduleSettings
.
mainTitleSingle
}
<
/h4
>
<
h4
className
=
"card-title"
>
New
{
moduleSettings
.
mainTitleSingle
}
<
/h4
>
<
/div
>
<
/div
>
<
div
className
=
"card-body"
>
<
div
className
=
"card-body"
>
<
ElementCard
selectedElement
=
{{
{
storeNavbar
.
projectCurrent
===
null
?
<
div
>
Select
Project
<
/div> : <ElementCard selectedElement={
{
id
:
'<generate>'
,
id
:
'<generate>'
,
idproject
:
'2'
,
idproject
:
storeNavbar
.
projectCurrent
.
value
,
system_name
:
''
,
system_name
:
''
,
last_seen
:
''
,
last_seen
:
''
,
layout_page_id
:
''
,
layout_page_id
:
''
,
...
@@ -73,6 +76,7 @@ const Tables = () => {
...
@@ -73,6 +76,7 @@ const Tables = () => {
}}
}}
onSubmitHandler
=
{
onSubmitHandler
}
onSubmitHandler
=
{
onSubmitHandler
}
/
>
/
>
}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
...
src/views/menupages/mainpages/table.js
View file @
78b82b37
...
@@ -13,7 +13,14 @@ const DataTable = () => {
...
@@ -13,7 +13,14 @@ const DataTable = () => {
// ** Store Vars
// ** Store Vars
const
dispatch
=
useDispatch
()
const
dispatch
=
useDispatch
()
const
store
=
useSelector
(
state
=>
state
.
menupages
)
const
store
=
useSelector
(
state
=>
state
.
menupages
)
const
storeNavbar
=
useSelector
(
state
=>
state
.
navbar
)
useEffect
(()
=>
{
dispatch
(
getData_menupages
({
start
:
0
,
length
:
1000
}))
},
[
storeNavbar
.
projectCurrent
])
return
(
return
(
<
DataTableServerSide
<
DataTableServerSide
cardTitle
=
{
moduleSettings
.
mainTitle
}
cardTitle
=
{
moduleSettings
.
mainTitle
}
...
...
src/views/menupages/store/actions/pages.js
View file @
78b82b37
...
@@ -2,7 +2,7 @@ import axios from 'axios'
...
@@ -2,7 +2,7 @@ import axios from 'axios'
import
{
setSaveSatus
,
setErrorMsg
}
from
'../../../../redux/actions/api'
import
{
setSaveSatus
,
setErrorMsg
}
from
'../../../../redux/actions/api'
import
moduleSettings
from
'../../mainpages/module'
import
moduleSettings
from
'../../mainpages/module'
import
{
store
}
from
'@store/storeConfig/store'
// ** Get table Data ///api/datatables/data
// ** Get table Data ///api/datatables/data
...
@@ -22,9 +22,10 @@ const _getData_menupages = params => {
...
@@ -22,9 +22,10 @@ const _getData_menupages = params => {
}
}
}
}
export
const
getData_menupages
=
params
=>
{
export
const
getData_menupages
=
params
=>
{
const
currentProject
=
store
.
getState
().
navbar
.
projectCurrent
const
newparams
=
{
const
newparams
=
{
...
params
,
...
params
,
idproject
:
2
idproject
:
!
currentProject
?
'%'
:
currentProject
.
value
}
}
return
_getData_menupages
(
newparams
)
return
_getData_menupages
(
newparams
)
}
}
...
...
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