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
f9ab470a
Commit
f9ab470a
authored
Mar 22, 2024
by
Shiva Komirishetti
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://gitlab.mynisum.com/vsingamchetty/nisum-scorecard
into initailSetup
parents
8e2b99d0
9db2939d
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 @
f9ab470a
This diff is collapsed.
Click to expand it.
src/redux/reducers/exporttableslice.js
View file @
f9ab470a
import
{
createSlice
,
createAsyncThunk
}
from
"@reduxjs/toolkit"
;
import
{
base_url
}
from
"../../utils/constants"
;
import
axios
from
"axios"
;
const
initialState
=
{
activitiesData
:
null
,
// totalReporteesData: [],
activitiesData
:[],
loading
:
false
,
error
:
null
,
};
};
export
const
fetchReportesActivitiesData
=
createAsyncThunk
(
"getactivities"
,
async
(
data
)
=>
{
export
const
fetchReportesActivitiesData
=
createAsyncThunk
(
"gettotalactivities"
,
async
(
data
)
=>
{
return
await
axios
.
post
(
`
${
base_url
}
/getActivities`
,
data
)
.
then
((
response
)
=>
response
.
data
.
activities
);
.
then
((
response
)
=>
response
.
data
);
});
const
exporttableSlice
=
createSlice
({
name
:
"totalReportees"
,
initialState
,
...
...
@@ -21,16 +24,18 @@ const exporttableSlice = createSlice({
resetReporteesTableData
:()
=>
{
return
initialState
},
},
extraReducers
:
(
builder
)
=>
{
builder
.
addCase
(
fetchReportesActivitiesData
.
pending
,
(
state
)
=>
{
state
.
loading
=
true
;
state
.
error
=
"pending"
;
});
builder
.
addCase
(
fetchReportesActivitiesData
.
fulfilled
,
(
state
,
action
)
=>
{
console
.
log
(
action
.
payload
.
activities
)
state
.
loading
=
false
;
state
.
activitiesData
=
action
.
payload
;
state
.
activitiesData
=
action
.
payload
.
activities
;
state
.
error
=
""
;
});
builder
.
addCase
(
fetchReportesActivitiesData
.
rejected
,
(
state
,
action
)
=>
{
...
...
@@ -40,7 +45,7 @@ const exporttableSlice = createSlice({
});
},
});
export
const
{
resetReporteesTableData
}
=
exporttableSlice
.
actions
;
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