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
33d73756
Commit
33d73756
authored
May 08, 2021
by
PDuarte
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
menupages basic crud
parent
2de45044
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
152 additions
and
169 deletions
+152
-169
index.js
src/views/menupages/mainpages/add/index.js
+16
-16
index.js
src/views/menupages/mainpages/card/index.js
+126
-136
main.js
src/views/menupages/mainpages/edit/main.js
+9
-14
pages.js
src/views/menupages/store/actions/pages.js
+1
-3
No files found.
src/views/menupages/mainpages/add/index.js
View file @
33d73756
...
...
@@ -24,19 +24,14 @@ const Tables = () => {
const
onSubmitHandler
=
values
=>
{
dispatch
(
addmenupages
({
name
:
values
.
name
,
slug
:
values
.
slug
,
view_all
:
values
.
view_all
,
search
:
values
.
search
,
seasons_carousel
:
values
.
seasons_carousel
,
episodes_carousel
:
values
.
episodes_carousel
,
related_movies
:
values
.
related_movies
,
related_series
:
values
.
related_series
,
player_related
:
values
.
player_related
,
live_TV
:
values
.
live_TV
,
my_stuff
:
values
.
my_stuff
,
pages
:
values
.
pages
,
platforms
:
values
.
platforms
idproject
:
values
.
idproject
,
system_name
:
values
.
system_name
,
last_seen
:
values
.
last_seen
,
layout_page_id
:
values
.
layout_page_id
,
type
:
values
.
type
,
display
:
values
.
display
,
pagetypeid
:
values
.
pagetypeid
,
order
:
values
.
order
})
)
...
...
@@ -59,9 +54,14 @@ const Tables = () => {
<
div
className
=
"card-body"
>
<
ElementCard
selectedElement
=
{{
id
:
'<generate>'
,
name
:
''
,
slug
:
''
,
platforms
:
[]
idproject
:
'2'
,
system_name
:
''
,
last_seen
:
''
,
layout_page_id
:
''
,
type
:
''
,
display
:
''
,
pagetypeid
:
''
,
order
:
'0'
}}
onSubmitHandler
=
{
onSubmitHandler
}
/
>
...
...
src/views/menupages/mainpages/card/index.js
View file @
33d73756
This diff is collapsed.
Click to expand it.
src/views/menupages/mainpages/edit/main.js
View file @
33d73756
...
...
@@ -21,23 +21,18 @@ const ElementEdit = () => {
{
id
}
=
useParams
()
const
onSubmitHandler
=
values
=>
{
console
.
log
(
values
)
dispatch
(
updatemenupages
({
...
dataElement
,
id
:
values
.
id
,
name
:
values
.
name
,
slug
:
values
.
slug
,
platforms
:
values
.
platforms
,
view_all
:
values
.
view_all
,
search
:
values
.
search
,
seasons_carousel
:
values
.
seasons_carousel
,
episodes_carousel
:
values
.
episodes_carousel
,
related_movies
:
values
.
related_movies
,
related_series
:
values
.
related_series
,
player_related
:
values
.
player_related
,
live_TV
:
values
.
live_TV
,
my_stuff
:
values
.
my_stuff
,
pages
:
values
.
pages
idproject
:
values
.
idproject
,
system_name
:
values
.
system_name
,
last_seen
:
values
.
last_seen
,
layout_page_id
:
values
.
layout_page_id
,
type
:
values
.
type
,
display
:
values
.
display
,
pagetypeid
:
values
.
pagetypeid
,
order
:
values
.
order
})
)
...
...
src/views/menupages/store/actions/pages.js
View file @
33d73756
...
...
@@ -31,10 +31,8 @@ export const getData_menupages = params => {
export
const
addmenupages
=
params
=>
{
return
(
dispatch
,
getState
)
=>
{
const
newparam
=
addProject
(
params
)
console
.
log
(
newparams
)
axios
.
post
(
`
${
process
.
env
.
REACT_APP_API
}${
moduleSettings
.
apiBaseURL
}
`
,
new
params
)
.
post
(
`
${
process
.
env
.
REACT_APP_API
}${
moduleSettings
.
apiBaseURL
}
`
,
params
)
.
then
(
response
=>
{
dispatch
({
type
:
'ADD_MENUPAGE'
,
...
...
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