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
64c86bf0
Commit
64c86bf0
authored
Jul 17, 2021
by
PDuarte
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
movies refactory
parent
1b4cec82
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
71 additions
and
13 deletions
+71
-13
assets.js
src/navigation/global/assets.js
+1
-1
index.js
src/views/assets/projectassets/add/index.js
+1
-1
index.js
src/views/assets/projectassets/card/index.js
+3
-1
index.js
src/views/assets/projectassets/edit/index.js
+1
-1
index.js
src/views/assets/projectassets/index.js
+1
-1
module.js
src/views/assets/projectassets/module.js
+2
-2
table.js
src/views/assets/projectassets/table.js
+5
-5
index.js
src/views/assets/store/actions/index.js
+1
-0
movies.js
src/views/assets/store/actions/movies.js
+40
-0
index.js
src/views/assets/store/reducer/index.js
+16
-1
No files found.
src/navigation/global/assets.js
View file @
64c86bf0
...
@@ -8,7 +8,7 @@ export default [
...
@@ -8,7 +8,7 @@ export default [
children
:
[
children
:
[
{
{
id
:
'assetsDash'
,
id
:
'assetsDash'
,
title
:
'Project
Asset
s'
,
title
:
'Project
Movie
s'
,
icon
:
<
Briefcase
/>
,
icon
:
<
Briefcase
/>
,
navLink
:
'/assets/projectassets'
navLink
:
'/assets/projectassets'
},
},
...
...
src/views/assets/projectassets/add/index.js
View file @
64c86bf0
...
@@ -43,7 +43,7 @@ const Tables = () => {
...
@@ -43,7 +43,7 @@ const Tables = () => {
return
(
return
(
<
Fragment
>
<
Fragment
>
<
Breadcrumbs
breadCrumbTitle
=
'
Assets'
breadCrumbParent
=
'Asset
s'
breadCrumbActive
=
{
moduleSettings
.
mainTitle
}
/
>
<
Breadcrumbs
breadCrumbTitle
=
'
Movies'
breadCrumbParent
=
'Movie
s'
breadCrumbActive
=
{
moduleSettings
.
mainTitle
}
/
>
<
Row
>
<
Row
>
<
Col
sm
=
'12'
>
<
Col
sm
=
'12'
>
<
Link
to
=
{
moduleSettings
.
baseURL
}
>
Back
to
{
moduleSettings
.
mainTitle
}
<
/Link
>
<
Link
to
=
{
moduleSettings
.
baseURL
}
>
Back
to
{
moduleSettings
.
mainTitle
}
<
/Link
>
...
...
src/views/assets/projectassets/card/index.js
View file @
64c86bf0
...
@@ -331,6 +331,7 @@ return (
...
@@ -331,6 +331,7 @@ return (
<
FormGroup
>
<
FormGroup
>
<
Label
for
=
'parenttype'
>
Parent
Type
<
/Label
>
<
Label
for
=
'parenttype'
>
Parent
Type
<
/Label
>
<
Input
<
Input
readOnly
=
{
true
}
type
=
'text'
type
=
'text'
name
=
'parenttype'
name
=
'parenttype'
id
=
'parenttype'
id
=
'parenttype'
...
@@ -345,6 +346,7 @@ return (
...
@@ -345,6 +346,7 @@ return (
<
FormGroup
>
<
FormGroup
>
<
Label
for
=
'parentid'
>
Parent
Id
<
/Label
>
<
Label
for
=
'parentid'
>
Parent
Id
<
/Label
>
<
Input
<
Input
readOnly
=
{
true
}
type
=
'text'
type
=
'text'
name
=
'parentid'
name
=
'parentid'
id
=
'parentid'
id
=
'parentid'
...
...
src/views/assets/projectassets/edit/index.js
View file @
64c86bf0
...
@@ -18,7 +18,7 @@ import moduleSettings from '../module'
...
@@ -18,7 +18,7 @@ import moduleSettings from '../module'
const
Tables
=
()
=>
{
const
Tables
=
()
=>
{
return
(
return
(
<
Fragment
>
<
Fragment
>
<
Breadcrumbs
breadCrumbTitle
=
'
Assets'
breadCrumbParent
=
'Asset
s'
breadCrumbActive
=
{
moduleSettings
.
mainTitle
}
/
>
<
Breadcrumbs
breadCrumbTitle
=
'
Movies'
breadCrumbParent
=
'Movie
s'
breadCrumbActive
=
{
moduleSettings
.
mainTitle
}
/
>
<
Row
>
<
Row
>
<
Col
sm
=
'12'
>
<
Col
sm
=
'12'
>
<
Link
to
=
{
moduleSettings
.
baseURL
}
>
Back
to
{
moduleSettings
.
mainTitleSingle
}
<
/Link
>
<
Link
to
=
{
moduleSettings
.
baseURL
}
>
Back
to
{
moduleSettings
.
mainTitleSingle
}
<
/Link
>
...
...
src/views/assets/projectassets/index.js
View file @
64c86bf0
...
@@ -17,7 +17,7 @@ import moduleSettings from './module'
...
@@ -17,7 +17,7 @@ import moduleSettings from './module'
const
Tables
=
()
=>
{
const
Tables
=
()
=>
{
return
(
return
(
<
Fragment
>
<
Fragment
>
<
Breadcrumbs
breadCrumbTitle
=
'
Assets'
breadCrumbParent
=
'Asset
s'
breadCrumbActive
=
{
moduleSettings
.
mainTitle
}
/
>
<
Breadcrumbs
breadCrumbTitle
=
'
Movies'
breadCrumbParent
=
'Movie
s'
breadCrumbActive
=
{
moduleSettings
.
mainTitle
}
/
>
<
Row
>
<
Row
>
<
Col
sm
=
'12'
>
<
Col
sm
=
'12'
>
<
DataTable
/>
<
DataTable
/>
...
...
src/views/assets/projectassets/module.js
View file @
64c86bf0
const
moduleSettings
=
{
const
moduleSettings
=
{
mainTitle
:
'
Asset
s'
,
mainTitle
:
'
Movie
s'
,
mainTitleSingle
:
'
Asset
'
,
mainTitleSingle
:
'
Movie
'
,
apiBaseURL
:
'/api/assets'
,
apiBaseURL
:
'/api/assets'
,
baseURL
:
'/assets/projectassets'
,
baseURL
:
'/assets/projectassets'
,
newElement
:
{
newElement
:
{
...
...
src/views/assets/projectassets/table.js
View file @
64c86bf0
...
@@ -3,7 +3,7 @@ import { Fragment, useState, useEffect, memo } from 'react'
...
@@ -3,7 +3,7 @@ import { Fragment, useState, useEffect, memo } from 'react'
// ** Table Columns
// ** Table Columns
import
{
serverSideColumns
}
from
'./data'
import
{
serverSideColumns
}
from
'./data'
// ** Store & Actions
// ** Store & Actions
import
{
getData_
asset
s
}
from
'../store/actions'
import
{
getData_
movie
s
}
from
'../store/actions'
import
{
useSelector
,
useDispatch
}
from
'react-redux'
import
{
useSelector
,
useDispatch
}
from
'react-redux'
import
DataTableServerSide
from
'@components/datatable'
import
DataTableServerSide
from
'@components/datatable'
...
@@ -16,7 +16,7 @@ const DataTable = () => {
...
@@ -16,7 +16,7 @@ const DataTable = () => {
const
storeNavbar
=
useSelector
(
state
=>
state
.
navbar
)
const
storeNavbar
=
useSelector
(
state
=>
state
.
navbar
)
useEffect
(()
=>
{
useEffect
(()
=>
{
dispatch
(
getData_
asset
s
({
dispatch
(
getData_
movie
s
({
start
:
0
,
start
:
0
,
length
:
1000
length
:
1000
}))
}))
...
@@ -26,11 +26,11 @@ const DataTable = () => {
...
@@ -26,11 +26,11 @@ const DataTable = () => {
return
(
return
(
<
DataTableServerSide
<
DataTableServerSide
cardTitle
=
{
moduleSettings
.
mainTitle
}
cardTitle
=
{
moduleSettings
.
mainTitle
}
allData
=
{
store
.
allData
Asset
s
}
allData
=
{
store
.
allData
Movie
s
}
getData
=
{
getData_
asset
s
}
getData
=
{
getData_
movie
s
}
serverSideColumns
=
{
serverSideColumns
}
serverSideColumns
=
{
serverSideColumns
}
linkAddButton
=
{
`
${
moduleSettings
.
baseURL
}
/add`
}
linkAddButton
=
{
`
${
moduleSettings
.
baseURL
}
/add`
}
total
=
{
store
.
total
Asset
s
}
total
=
{
store
.
total
Movie
s
}
/
>
/
>
)
)
...
...
src/views/assets/store/actions/index.js
View file @
64c86bf0
export
*
from
'./assets'
export
*
from
'./assets'
export
*
from
'./movies'
export
*
from
'./lives'
export
*
from
'./lives'
export
*
from
'./series'
export
*
from
'./series'
export
*
from
'./seasons'
export
*
from
'./seasons'
...
...
src/views/assets/store/actions/movies.js
0 → 100644
View file @
64c86bf0
import
{
store
}
from
'@store/storeConfig/store'
import
axios
from
'axios'
import
moduleSettings
from
'../../projectassets/module'
const
_getData_movies
=
params
=>
{
return
async
dispatch
=>
{
await
axios
.
get
(
`
${
process
.
env
.
REACT_APP_API
}${
moduleSettings
.
apiBaseURL
}
`
,
{
params
}
).
then
(
response
=>
{
dispatch
({
type
:
'GET_DATA_MOVIES'
,
allData
:
response
.
data
.
data
,
// datalayoumenus: response.data.invoices,
totalPages
:
response
.
data
.
recordsTotal
,
params
:
response
.
data
.
params
})
})
}
}
export
const
getData_movies
=
params
=>
{
if
(
!!
params
.
idproject
&&
params
.
idproject
!==
null
)
{
const
newparams
=
{
...
params
,
type
:
'Movies'
}
return
_getData_movies
(
newparams
)
}
const
currentProject
=
store
.
getState
().
navbar
.
projectCurrent
const
newparams
=
{
...
params
,
idproject
:
!
currentProject
?
'%'
:
currentProject
.
value
,
type
:
'Movies'
}
return
_getData_movies
(
newparams
)
}
src/views/assets/store/reducer/index.js
View file @
64c86bf0
...
@@ -19,6 +19,12 @@ const initialState = {
...
@@ -19,6 +19,12 @@ const initialState = {
allDataLives
:
[],
allDataLives
:
[],
selectedLive
:
null
,
selectedLive
:
null
,
dataMovies
:
[],
totalMovies
:
1
,
paramsMovies
:
{},
allDataMovies
:
[],
selectedMovies
:
null
,
dataSeries
:
[],
dataSeries
:
[],
totalSeries
:
1
,
totalSeries
:
1
,
paramsSeries
:
{},
paramsSeries
:
{},
...
@@ -75,6 +81,15 @@ const assets = (state = initialState, action) => {
...
@@ -75,6 +81,15 @@ const assets = (state = initialState, action) => {
case
'ADD_ASSET'
:
case
'ADD_ASSET'
:
return
{
...
state
}
return
{
...
state
}
// Movie
case
'GET_DATA_MOVIES'
:
return
{
...
state
,
allDataMovies
:
action
.
allData
,
dataMovies
:
action
.
data
,
totalMovies
:
action
.
totalPages
,
paramsMovies
:
action
.
params
}
// serie
// serie
case
'GET_DATA_SERIES'
:
case
'GET_DATA_SERIES'
:
return
{
return
{
...
...
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