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
9797b0aa
Commit
9797b0aa
authored
May 17, 2021
by
PDuarte
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*add menu page fix
* datable components fix
parent
1ea2548f
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
24 additions
and
11 deletions
+24
-11
index.js
src/@core/components/datatable/index.js
+2
-2
tableHeader.js
src/@core/components/datatable/tableHeader.js
+1
-1
index.js
src/views/menupages/mainpages/add/index.js
+7
-1
index.js
src/views/menupages/mainpages/card/index.js
+4
-4
manageplaylist.js
src/views/menupages/mainpages/card/manageplaylist.js
+1
-1
tablayoutplaylists.js
src/views/menupages/mainpages/card/tablayoutplaylists.js
+4
-1
module.js
src/views/menupages/mainpages/module.js
+5
-1
No files found.
src/@core/components/datatable/index.js
View file @
9797b0aa
...
@@ -20,7 +20,7 @@ const DataTableServerSide = ({cardTitle, allData, total, getData, serverSideColu
...
@@ -20,7 +20,7 @@ const DataTableServerSide = ({cardTitle, allData, total, getData, serverSideColu
// ** States
// ** States
const
[
currentPage
,
setCurrentPage
]
=
useState
(
1
)
const
[
currentPage
,
setCurrentPage
]
=
useState
(
1
)
const
[
rowsPerPage
,
setRowsPerPage
]
=
useState
(
7
)
const
[
rowsPerPage
,
setRowsPerPage
]
=
useState
(
10
)
const
[
searchValue
,
setSearchValue
]
=
useState
(
''
)
const
[
searchValue
,
setSearchValue
]
=
useState
(
''
)
const
[
searchTerm
,
setSearchTerm
]
=
useState
(
''
)
const
[
searchTerm
,
setSearchTerm
]
=
useState
(
''
)
...
@@ -77,7 +77,7 @@ const DataTableServerSide = ({cardTitle, allData, total, getData, serverSideColu
...
@@ -77,7 +77,7 @@ const DataTableServerSide = ({cardTitle, allData, total, getData, serverSideColu
// ** Custom Pagination
// ** Custom Pagination
const
CustomPagination
=
()
=>
{
const
CustomPagination
=
()
=>
{
const
count
=
Number
((
total
/
rowsPerPage
).
toFixed
(
0
))
const
count
=
Number
((
total
/
rowsPerPage
).
toFixed
(
0
))
+
1
return
(
return
(
<
ReactPaginate
<
ReactPaginate
previousLabel
=
{
''
}
previousLabel
=
{
''
}
...
...
src/@core/components/datatable/tableHeader.js
View file @
9797b0aa
...
@@ -21,7 +21,7 @@ const CustomHeader = ({ linkAddButton, handlePerPage, rowsPerPage, handleFilter,
...
@@ -21,7 +21,7 @@ const CustomHeader = ({ linkAddButton, handlePerPage, rowsPerPage, handleFilter,
backgroundPosition
:
'calc(100% - 3px) 11px, calc(100% - 20px) 13px, 100% 0'
backgroundPosition
:
'calc(100% - 3px) 11px, calc(100% - 20px) 13px, 100% 0'
}}
}}
>
>
<
option
value
=
'10'
>
10
<
/option
>
<
option
value
=
'10'
defaultValue
>
10
<
/option
>
<
option
value
=
'25'
>
25
<
/option
>
<
option
value
=
'25'
>
25
<
/option
>
<
option
value
=
'50'
>
50
<
/option
>
<
option
value
=
'50'
>
50
<
/option
>
<
/CustomInput
>
<
/CustomInput
>
...
...
src/views/menupages/mainpages/add/index.js
View file @
9797b0aa
...
@@ -63,7 +63,13 @@ const Tables = () => {
...
@@ -63,7 +63,13 @@ const Tables = () => {
display
:
''
,
display
:
''
,
pagetypeid
:
''
,
pagetypeid
:
''
,
order
:
'0'
,
order
:
'0'
,
menu_page_layouts
:
[]
menu_page_layouts
:
[
{
order
:
1
,
layout_id
:
null
,
playlists
:
[]
}
]
}}
}}
onSubmitHandler
=
{
onSubmitHandler
}
onSubmitHandler
=
{
onSubmitHandler
}
/
>
/
>
...
...
src/views/menupages/mainpages/card/index.js
View file @
9797b0aa
...
@@ -139,7 +139,7 @@ const handleError = (text) => {
...
@@ -139,7 +139,7 @@ const handleError = (text) => {
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
!
settingStore
.
allDataPagetypes
||
settingStore
.
allDataPagetypes
.
length
<
1
)
{
if
(
!
settingStore
.
allDataPagetypes
||
settingStore
.
allDataPagetypes
.
length
<
1
)
{
dispatch
(
getData_pagetypes
({
dispatch
(
getData_pagetypes
({
start
:
1
,
start
:
0
,
length
:
1000
,
length
:
1000
,
q
:
null
q
:
null
}))
}))
...
@@ -160,7 +160,7 @@ const handleError = (text) => {
...
@@ -160,7 +160,7 @@ const handleError = (text) => {
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
!
screensStore
.
allDataLayoutMenus
||
screensStore
.
allDataLayoutMenus
.
length
<
1
)
{
if
(
!
screensStore
.
allDataLayoutMenus
||
screensStore
.
allDataLayoutMenus
.
length
<
1
)
{
dispatch
(
getData_layoutmenus
({
dispatch
(
getData_layoutmenus
({
start
:
1
,
start
:
0
,
length
:
1000
,
length
:
1000
,
q
:
null
q
:
null
}))
}))
...
@@ -334,7 +334,7 @@ return (
...
@@ -334,7 +334,7 @@ return (
<
Nav
pills
>
<
Nav
pills
>
{
dataElement
&&
dataElement
.
menu_page_layouts
.
map
((
block
,
index
)
=>
{
{
dataElement
&&
dataElement
.
menu_page_layouts
.
map
((
block
,
index
)
=>
{
return
<
NavItem
>
return
<
NavItem
key
=
{
index
}
>
<
NavLink
key
=
{
index
}
<
NavLink
key
=
{
index
}
active
=
{
activeTab
===
index
}
active
=
{
activeTab
===
index
}
onClick
=
{()
=>
toggle
(
index
)}
onClick
=
{()
=>
toggle
(
index
)}
...
@@ -356,7 +356,7 @@ return (
...
@@ -356,7 +356,7 @@ return (
activeTab
=
{
activeTab
}
activeTab
=
{
activeTab
}
>
>
{
!!
dataElement
&&
dataElement
.
menu_page_layouts
.
map
((
block
,
index
)
=>
{
{
!!
dataElement
&&
dataElement
.
menu_page_layouts
.
map
((
block
,
index
)
=>
{
return
<
TabPane
tabId
=
{
index
}
>
return
<
TabPane
tabId
=
{
index
}
key
=
{
index
}
>
<
TabLayoutPlaylist
block
=
{
block
}
selectedDataElement
=
{
dataElement
}
setElementData
=
{
setElementData
}
/
>
<
TabLayoutPlaylist
block
=
{
block
}
selectedDataElement
=
{
dataElement
}
setElementData
=
{
setElementData
}
/
>
<
/TabPane
>
<
/TabPane
>
}
}
...
...
src/views/menupages/mainpages/card/manageplaylist.js
View file @
9797b0aa
...
@@ -140,7 +140,7 @@ const ManagePlaylist = ({dataElement, selectedDataElement, handleChange}) => {
...
@@ -140,7 +140,7 @@ const ManagePlaylist = ({dataElement, selectedDataElement, handleChange}) => {
return
<
div
className
=
"card"
>
return
<
div
className
=
"card"
>
<
div
className
=
"card-header"
>
<
div
className
=
"card-header"
>
<
h4
className
=
"card-title"
>
playlist
<
/h4
>
<
h4
className
=
"card-title"
>
Playlists
<
/h4
>
<
/div
>
<
/div
>
<
div
className
=
"card-body"
>
<
div
className
=
"card-body"
>
<
Row
>
<
Row
>
...
...
src/views/menupages/mainpages/card/tablayoutplaylists.js
View file @
9797b0aa
...
@@ -67,7 +67,7 @@ const TabLayoutPlaylist = ({block, selectedDataElement, setElementData}) => {
...
@@ -67,7 +67,7 @@ const TabLayoutPlaylist = ({block, selectedDataElement, setElementData}) => {
<
Col
sm
=
'12'
>
<
Col
sm
=
'12'
>
<
div
className
=
"card"
>
<
div
className
=
"card"
>
<
div
className
=
"card-header"
>
<
div
className
=
"card-header"
>
<
h4
className
=
"card-title"
>
ElementCard
{
dataElement
&&
dataElement
.
id
}
<
/h4
>
{
/* <h4 className="card-title">ElementCard {dataElement && dataElement.id} </h4> */
}
<
/div
>
<
/div
>
<
div
className
=
"card-body"
>
<
div
className
=
"card-body"
>
<
Row
>
<
Row
>
...
@@ -99,6 +99,9 @@ const TabLayoutPlaylist = ({block, selectedDataElement, setElementData}) => {
...
@@ -99,6 +99,9 @@ const TabLayoutPlaylist = ({block, selectedDataElement, setElementData}) => {
>
>
{
!!
layoutPlaylists
?
layoutPlaylists
.
map
(
option
=>
{
{
!!
layoutPlaylists
?
layoutPlaylists
.
map
(
option
=>
{
if
(
dataElement
.
layout_id
===
null
)
{
dataElement
.
layout_id
=
option
.
id
}
return
<
option
key
=
{
option
.
id
}
return
<
option
key
=
{
option
.
id
}
selected
=
{
option
.
id
===
dataElement
.
layout_id
?
option
.
id
:
''
}
selected
=
{
option
.
id
===
dataElement
.
layout_id
?
option
.
id
:
''
}
value
=
{
option
.
id
}
>
{
option
.
name
}
<
/option
>
value
=
{
option
.
id
}
>
{
option
.
name
}
<
/option
>
...
...
src/views/menupages/mainpages/module.js
View file @
9797b0aa
...
@@ -5,9 +5,13 @@ const moduleSettings = {
...
@@ -5,9 +5,13 @@ const moduleSettings = {
baseURL
:
'/menupages/mainpages'
,
baseURL
:
'/menupages/mainpages'
,
newElement
:
{
newElement
:
{
slug
:
0
,
slug
:
0
,
type
:
0
type
:
0
,
menu_page_layouts
:
{
playlists
:
[]
}
},
},
elementsOption
:
{
elementsOption
:
{
playlists
:
[]
}
}
}
}
...
...
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