Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nisum-scorecard
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
Venkaiah Naidu Singamchetty
nisum-scorecard
Commits
9db2939d
Commit
9db2939d
authored
Mar 22, 2024
by
Venkaiah Naidu Singamchetty
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'apiserver' into 'master'
Apiserver See merge request
!82
parents
aac0c44a
f0d7c01d
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
258 additions
and
120 deletions
+258
-120
index.jsx
src/pages/reportexport/index.jsx
+243
-110
exporttableslice.js
src/redux/reducers/exporttableslice.js
+15
-10
No files found.
src/pages/reportexport/index.jsx
View file @
9db2939d
This diff is collapsed.
Click to expand it.
src/redux/reducers/exporttableslice.js
View file @
9db2939d
import
{
createSlice
,
createAsyncThunk
}
from
"@reduxjs/toolkit"
;
import
{
createSlice
,
createAsyncThunk
}
from
"@reduxjs/toolkit"
;
import
{
base_url
}
from
"../../utils/constants"
;
import
{
base_url
}
from
"../../utils/constants"
;
import
axios
from
"axios"
;
import
axios
from
"axios"
;
const
initialState
=
{
const
initialState
=
{
activitiesData
:
null
,
// totalReporteesData: [],
activitiesData
:[],
loading
:
false
,
loading
:
false
,
error
:
null
,
error
:
null
,
};
};
export
const
fetchReportesActivitiesData
=
createAsyncThunk
(
"getactivities"
,
async
(
data
)
=>
{
export
const
fetchReportesActivitiesData
=
createAsyncThunk
(
"gettotalactivities"
,
async
(
data
)
=>
{
return
await
axios
.
post
(
`
${
base_url
}
/getActivities`
,
data
)
return
await
axios
.
post
(
`
${
base_url
}
/getActivities`
,
data
)
.
then
((
response
)
=>
response
.
data
.
activities
);
.
then
((
response
)
=>
response
.
data
);
});
});
const
exporttableSlice
=
createSlice
({
const
exporttableSlice
=
createSlice
({
name
:
"totalReportees"
,
name
:
"totalReportees"
,
initialState
,
initialState
,
...
@@ -21,16 +24,18 @@ const exporttableSlice = createSlice({
...
@@ -21,16 +24,18 @@ const exporttableSlice = createSlice({
resetReporteesTableData
:()
=>
{
resetReporteesTableData
:()
=>
{
return
initialState
return
initialState
},
},
},
},
extraReducers
:
(
builder
)
=>
{
extraReducers
:
(
builder
)
=>
{
builder
.
addCase
(
fetchReportesActivitiesData
.
pending
,
(
state
)
=>
{
builder
.
addCase
(
fetchReportesActivitiesData
.
pending
,
(
state
)
=>
{
state
.
loading
=
true
;
state
.
loading
=
true
;
state
.
error
=
"pending"
;
state
.
error
=
"pending"
;
});
});
builder
.
addCase
(
fetchReportesActivitiesData
.
fulfilled
,
(
state
,
action
)
=>
{
builder
.
addCase
(
fetchReportesActivitiesData
.
fulfilled
,
(
state
,
action
)
=>
{
console
.
log
(
action
.
payload
.
activities
)
state
.
loading
=
false
;
state
.
loading
=
false
;
state
.
activitiesData
=
action
.
payload
;
state
.
activitiesData
=
action
.
payload
.
activities
;
state
.
error
=
""
;
state
.
error
=
""
;
});
});
builder
.
addCase
(
fetchReportesActivitiesData
.
rejected
,
(
state
,
action
)
=>
{
builder
.
addCase
(
fetchReportesActivitiesData
.
rejected
,
(
state
,
action
)
=>
{
...
@@ -40,7 +45,7 @@ const exporttableSlice = createSlice({
...
@@ -40,7 +45,7 @@ const exporttableSlice = createSlice({
});
});
},
},
});
});
export
const
{
resetReporteesTableData
}
=
exporttableSlice
.
actions
;
export
const
{
resetReporteesTableData
}
=
exporttableSlice
.
actions
;
export
default
exporttableSlice
.
reducer
;
export
default
exporttableSlice
.
reducer
;
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