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
21a61d7e
Commit
21a61d7e
authored
Jul 05, 2021
by
PDuarte
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove blovk ui
parent
23ae754a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
3 deletions
+20
-3
index.js
src/views/menupages/mainpages/card/index.js
+13
-2
tablayoutplaylists.js
src/views/menupages/mainpages/card/tablayoutplaylists.js
+7
-1
No files found.
src/views/menupages/mainpages/card/index.js
View file @
21a61d7e
...
@@ -112,6 +112,17 @@ const handleError = (text) => {
...
@@ -112,6 +112,17 @@ const handleError = (text) => {
setElementData
(
newData
)
setElementData
(
newData
)
setActiveTab
(
newData
.
menu_page_layouts
.
length
-
1
)
setActiveTab
(
newData
.
menu_page_layouts
.
length
-
1
)
// console.log(newData)
// console.log(newData)
},
handleRMBlock
=
(
value
)
=>
{
console
.
log
(
`Removing Block
${
value
}
`
)
const
data
=
[...
dataElement
.
menu_page_layouts
]
const
newData
=
data
.
filter
((
item
,
index
)
=>
index
!==
value
)
setActiveTab
(
0
)
setElementData
({
...
dataElement
,
menu_page_layouts
:
newData
})
}
}
...
@@ -357,7 +368,7 @@ return (
...
@@ -357,7 +368,7 @@ return (
>
>
{
!!
dataElement
&&
dataElement
.
menu_page_layouts
.
map
((
block
,
index
)
=>
{
{
!!
dataElement
&&
dataElement
.
menu_page_layouts
.
map
((
block
,
index
)
=>
{
return
<
TabPane
tabId
=
{
index
}
key
=
{
index
}
>
return
<
TabPane
tabId
=
{
index
}
key
=
{
index
}
>
<
TabLayoutPlaylist
block
=
{
block
}
selectedDataElement
=
{
dataElement
}
setElementData
=
{
setElementData
}
/
>
<
TabLayoutPlaylist
block
=
{
block
}
tabId
=
{
index
}
handleRMBlock
=
{
dataElement
.
menu_page_layouts
.
length
>
1
?
handleRMBlock
:
null
}
selectedDataElement
=
{
dataElement
}
setElementData
=
{
setElementData
}
/
>
<
/TabPane
>
<
/TabPane
>
}
}
)
)
...
...
src/views/menupages/mainpages/card/tablayoutplaylists.js
View file @
21a61d7e
...
@@ -12,7 +12,7 @@ import { DivideCircle } from 'react-feather'
...
@@ -12,7 +12,7 @@ import { DivideCircle } from 'react-feather'
// import { Button } from 'bootstrap'
// import { Button } from 'bootstrap'
import
ManagePlaylist
from
'./manageplaylist'
import
ManagePlaylist
from
'./manageplaylist'
const
TabLayoutPlaylist
=
({
block
,
selectedDataElement
,
setElementData
})
=>
{
const
TabLayoutPlaylist
=
({
block
,
selectedDataElement
,
setElementData
,
tabId
,
handleRMBlock
})
=>
{
const
[
dataElement
,
setDataElement
]
=
useState
(
null
),
const
[
dataElement
,
setDataElement
]
=
useState
(
null
),
[
layoutPlaylists
,
setLayoutPlaylists
]
=
useState
(
null
),
[
layoutPlaylists
,
setLayoutPlaylists
]
=
useState
(
null
),
dispatch
=
useDispatch
(),
dispatch
=
useDispatch
(),
...
@@ -68,8 +68,14 @@ const TabLayoutPlaylist = ({block, selectedDataElement, setElementData}) => {
...
@@ -68,8 +68,14 @@ const TabLayoutPlaylist = ({block, selectedDataElement, setElementData}) => {
<
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> */
}
{
!!
handleRMBlock
&&
<
div
style
=
{{
marginLeft
:
'auto'
,
textDecoration
:
'underline'
,
cursor
:
'pointer'
}}
onClick
=
{
()
=>
confirm
(
`Remove block
${
tabId
+
1
}
`
)
&&
handleRMBlock
(
tabId
)}
>
Remove
block
{
tabId
+
1
}
<
/div>
}
<
/div
>
<
/div
>
<
div
className
=
"card-body"
>
<
div
className
=
"card-body"
>
<
Row
>
<
Row
>
<
Col
md
=
'4'
sm
=
'12'
>
<
Col
md
=
'4'
sm
=
'12'
>
<
FormGroup
>
<
FormGroup
>
...
...
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