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
f6fb01d3
Commit
f6fb01d3
authored
Jul 18, 2021
by
PDuarte
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
episodes UI series hamdle
parent
dba9a687
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
7 deletions
+36
-7
index.js
src/views/assets/episodes/card/index.js
+21
-3
data.js
src/views/assets/episodes/data.js
+2
-2
main.js
src/views/assets/episodes/edit/main.js
+2
-2
episodes.js
src/views/assets/store/actions/episodes.js
+9
-0
seasons.js
src/views/assets/store/actions/seasons.js
+2
-0
No files found.
src/views/assets/episodes/card/index.js
View file @
f6fb01d3
...
@@ -118,6 +118,16 @@ const handleError = (text) => {
...
@@ -118,6 +118,16 @@ const handleError = (text) => {
}
}
setElementData
(
newData
)
setElementData
(
newData
)
},
},
handleSeriesChange
=
(
value
)
=>
{
dispatch
(
getData_seasons
({
start
:
0
,
length
:
1000
,
idproject
:
selectedElement
.
projectid
,
idseries
:
value
,
q
:
null
}))
},
updateGenres
=
(
value
)
=>
{
updateGenres
=
(
value
)
=>
{
const
newValue
=
value
.
map
(
elm
=>
{
const
newValue
=
value
.
map
(
elm
=>
{
return
{
return
{
...
@@ -270,6 +280,13 @@ const handleError = (text) => {
...
@@ -270,6 +280,13 @@ const handleError = (text) => {
idproject
:
selectedElement
.
projectid
,
idproject
:
selectedElement
.
projectid
,
q
:
null
q
:
null
}))
}))
dispatch
(
getData_seasons
({
start
:
0
,
length
:
1000
,
idproject
:
selectedElement
.
projectid
,
idseries
:
selectedElement
.
seriesID
,
q
:
null
}))
},
[
settingStore
.
selectedProject
])
},
[
settingStore
.
selectedProject
])
...
@@ -282,12 +299,12 @@ const handleError = (text) => {
...
@@ -282,12 +299,12 @@ const handleError = (text) => {
q
:
null
q
:
null
}))
}))
}
}
if
(
dataElement
!==
null
&&
dataElement
.
series
id
!==
null
&&
(
!
projectAssets
.
allDataSeasons
||
projectAssets
.
allDataSeasons
.
length
<
1
))
{
if
(
dataElement
!==
null
&&
dataElement
.
series
ID
!==
null
&&
(
!
projectAssets
.
allDataSeasons
||
projectAssets
.
allDataSeasons
.
length
<
1
))
{
dispatch
(
getData_seasons
({
dispatch
(
getData_seasons
({
start
:
0
,
start
:
0
,
length
:
100
0
,
length
:
100
1
,
idproject
:
dataElement
.
idproject
,
idproject
:
dataElement
.
idproject
,
seriesid
:
dataElement
.
series
id
,
seriesid
:
dataElement
.
series
ID
,
q
:
null
q
:
null
}))
}))
}
}
...
@@ -397,6 +414,7 @@ return (
...
@@ -397,6 +414,7 @@ return (
placeholder
=
'seriesid'
placeholder
=
'seriesid'
defaultValue
=
{
dataElement
&&
dataElement
.
seriesid
}
defaultValue
=
{
dataElement
&&
dataElement
.
seriesid
}
className
=
{
classnames
({
'is-invalid'
:
errors
[
'seriesid'
]
})}
className
=
{
classnames
({
'is-invalid'
:
errors
[
'seriesid'
]
})}
onChange
=
{
e
=>
handleSeriesChange
(
e
.
target
.
value
)}
>
>
{
!!
projectAssets
.
allDataSeries
&&
!!
dataElement
?
projectAssets
.
allDataSeries
.
map
(
option
=>
{
{
!!
projectAssets
.
allDataSeries
&&
!!
dataElement
?
projectAssets
.
allDataSeries
.
map
(
option
=>
{
return
<
option
key
=
{
option
.
id
}
return
<
option
key
=
{
option
.
id
}
...
...
src/views/assets/episodes/data.js
View file @
f6fb01d3
// ** React Imports
// ** React Imports
import
{
Link
}
from
'react-router-dom'
import
{
Link
}
from
'react-router-dom'
import
{
clean
asset
}
from
'../store/actions'
import
{
clean
episode
}
from
'../store/actions'
import
{
store
}
from
'@store/storeConfig/store'
import
{
store
}
from
'@store/storeConfig/store'
// ** Custom Components
// ** Custom Components
...
@@ -228,7 +228,7 @@ export const serverSideColumns = [
...
@@ -228,7 +228,7 @@ export const serverSideColumns = [
<
Link
<
Link
to
=
{
`
${
moduleSettings
.
baseURL
}
/edit/
${
row
.
id
}
`
}
to
=
{
`
${
moduleSettings
.
baseURL
}
/edit/
${
row
.
id
}
`
}
className
=
'user-name text-truncate mb-0'
className
=
'user-name text-truncate mb-0'
onClick
=
{()
=>
store
.
dispatch
(
clean
asset
(
row
.
id
))}
onClick
=
{()
=>
store
.
dispatch
(
clean
episode
(
row
.
id
))}
>
>
<
span
className
=
'font-weight-bold'
>
{
row
.
title
}
<
/span
>
<
span
className
=
'font-weight-bold'
>
{
row
.
title
}
<
/span
>
<
/Link
>
<
/Link
>
...
...
src/views/assets/episodes/edit/main.js
View file @
f6fb01d3
...
@@ -30,8 +30,8 @@ const ElementEdit = () => {
...
@@ -30,8 +30,8 @@ const ElementEdit = () => {
...
dataElement
,
...
dataElement
,
idproject
:
values
.
idproject
,
idproject
:
values
.
idproject
,
title
:
values
.
title
,
title
:
values
.
title
,
series
id
:
values
.
seriesid
,
series
ID
:
values
.
seriesid
,
season
id
:
values
.
seasonid
,
season
ID
:
values
.
seasonid
,
parentid
:
values
.
parentid
,
parentid
:
values
.
parentid
,
parenttype
:
values
.
parenttype
,
parenttype
:
values
.
parenttype
,
external_id
:
values
.
external_id
,
external_id
:
values
.
external_id
,
...
...
src/views/assets/store/actions/episodes.js
View file @
f6fb01d3
...
@@ -75,6 +75,15 @@ export const getData_episodes = params => {
...
@@ -75,6 +75,15 @@ export const getData_episodes = params => {
}
}
}
}
export
const
cleanepisode
=
id
=>
{
return
async
dispatch
=>
{
dispatch
({
type
:
'GET_EPISODE'
,
data
:
null
})
}
}
export
const
addepisode
=
params
=>
{
export
const
addepisode
=
params
=>
{
return
(
dispatch
,
getState
)
=>
{
return
(
dispatch
,
getState
)
=>
{
axios
axios
...
...
src/views/assets/store/actions/seasons.js
View file @
f6fb01d3
...
@@ -22,10 +22,12 @@ const _getData_seasons = params => {
...
@@ -22,10 +22,12 @@ const _getData_seasons = params => {
export
const
getData_seasons
=
params
=>
{
export
const
getData_seasons
=
params
=>
{
if
(
!!
params
.
idproject
&&
params
.
idproject
!==
null
)
{
if
(
!!
params
.
idproject
&&
params
.
idproject
!==
null
)
{
const
newparams
=
{
const
newparams
=
{
...
params
,
...
params
,
type
:
'Seasons'
type
:
'Seasons'
}
}
console
.
log
(
newparams
,
params
)
return
_getData_seasons
(
newparams
)
return
_getData_seasons
(
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