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 [
children
:
[
{
id
:
'assetsDash'
,
title
:
'Project
Asset
s'
,
title
:
'Project
Movie
s'
,
icon
:
<
Briefcase
/>
,
navLink
:
'/assets/projectassets'
},
...
...
src/views/assets/projectassets/add/index.js
View file @
64c86bf0
...
...
@@ -43,7 +43,7 @@ const Tables = () => {
return
(
<
Fragment
>
<
Breadcrumbs
breadCrumbTitle
=
'
Assets'
breadCrumbParent
=
'Asset
s'
breadCrumbActive
=
{
moduleSettings
.
mainTitle
}
/
>
<
Breadcrumbs
breadCrumbTitle
=
'
Movies'
breadCrumbParent
=
'Movie
s'
breadCrumbActive
=
{
moduleSettings
.
mainTitle
}
/
>
<
Row
>
<
Col
sm
=
'12'
>
<
Link
to
=
{
moduleSettings
.
baseURL
}
>
Back
to
{
moduleSettings
.
mainTitle
}
<
/Link
>
...
...
src/views/assets/projectassets/card/index.js
View file @
64c86bf0
...
...
@@ -331,6 +331,7 @@ return (
<
FormGroup
>
<
Label
for
=
'parenttype'
>
Parent
Type
<
/Label
>
<
Input
readOnly
=
{
true
}
type
=
'text'
name
=
'parenttype'
id
=
'parenttype'
...
...
@@ -345,6 +346,7 @@ return (
<
FormGroup
>
<
Label
for
=
'parentid'
>
Parent
Id
<
/Label
>
<
Input
readOnly
=
{
true
}
type
=
'text'
name
=
'parentid'
id
=
'parentid'
...
...
src/views/assets/projectassets/edit/index.js
View file @
64c86bf0
...
...
@@ -18,7 +18,7 @@ import moduleSettings from '../module'
const
Tables
=
()
=>
{
return
(
<
Fragment
>
<
Breadcrumbs
breadCrumbTitle
=
'
Assets'
breadCrumbParent
=
'Asset
s'
breadCrumbActive
=
{
moduleSettings
.
mainTitle
}
/
>
<
Breadcrumbs
breadCrumbTitle
=
'
Movies'
breadCrumbParent
=
'Movie
s'
breadCrumbActive
=
{
moduleSettings
.
mainTitle
}
/
>
<
Row
>
<
Col
sm
=
'12'
>
<
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'
const
Tables
=
()
=>
{
return
(
<
Fragment
>
<
Breadcrumbs
breadCrumbTitle
=
'
Assets'
breadCrumbParent
=
'Asset
s'
breadCrumbActive
=
{
moduleSettings
.
mainTitle
}
/
>
<
Breadcrumbs
breadCrumbTitle
=
'
Movies'
breadCrumbParent
=
'Movie
s'
breadCrumbActive
=
{
moduleSettings
.
mainTitle
}
/
>
<
Row
>
<
Col
sm
=
'12'
>
<
DataTable
/>
...
...
src/views/assets/projectassets/module.js
View file @
64c86bf0
const
moduleSettings
=
{
mainTitle
:
'
Asset
s'
,
mainTitleSingle
:
'
Asset
'
,
mainTitle
:
'
Movie
s'
,
mainTitleSingle
:
'
Movie
'
,
apiBaseURL
:
'/api/assets'
,
baseURL
:
'/assets/projectassets'
,
newElement
:
{
...
...
src/views/assets/projectassets/table.js
View file @
64c86bf0
...
...
@@ -3,7 +3,7 @@ import { Fragment, useState, useEffect, memo } from 'react'
// ** Table Columns
import
{
serverSideColumns
}
from
'./data'
// ** Store & Actions
import
{
getData_
asset
s
}
from
'../store/actions'
import
{
getData_
movie
s
}
from
'../store/actions'
import
{
useSelector
,
useDispatch
}
from
'react-redux'
import
DataTableServerSide
from
'@components/datatable'
...
...
@@ -16,7 +16,7 @@ const DataTable = () => {
const
storeNavbar
=
useSelector
(
state
=>
state
.
navbar
)
useEffect
(()
=>
{
dispatch
(
getData_
asset
s
({
dispatch
(
getData_
movie
s
({
start
:
0
,
length
:
1000
}))
...
...
@@ -26,11 +26,11 @@ const DataTable = () => {
return
(
<
DataTableServerSide
cardTitle
=
{
moduleSettings
.
mainTitle
}
allData
=
{
store
.
allData
Asset
s
}
getData
=
{
getData_
asset
s
}
allData
=
{
store
.
allData
Movie
s
}
getData
=
{
getData_
movie
s
}
serverSideColumns
=
{
serverSideColumns
}
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
'./movies'
export
*
from
'./lives'
export
*
from
'./series'
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 = {
allDataLives
:
[],
selectedLive
:
null
,
dataMovies
:
[],
totalMovies
:
1
,
paramsMovies
:
{},
allDataMovies
:
[],
selectedMovies
:
null
,
dataSeries
:
[],
totalSeries
:
1
,
paramsSeries
:
{},
...
...
@@ -75,6 +81,15 @@ const assets = (state = initialState, action) => {
case
'ADD_ASSET'
:
return
{
...
state
}
// Movie
case
'GET_DATA_MOVIES'
:
return
{
...
state
,
allDataMovies
:
action
.
allData
,
dataMovies
:
action
.
data
,
totalMovies
:
action
.
totalPages
,
paramsMovies
:
action
.
params
}
// serie
case
'GET_DATA_SERIES'
:
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