Fakultas Ilmu Komputer UI
Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ppl-fasilkom-ui
PPL Sosial
tbcare
tbcare-web
Commits
4390b6c7
Commit
4390b6c7
authored
Mar 14, 2021
by
Nabilah Adani
Browse files
[CHORES] menambahkan button export pdf untuk data keseluruhan
parent
47aba591
Pipeline
#63801
failed with stages
in 26 minutes and 14 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/scenes/AccountManagement/index.test.tsx
View file @
4390b6c7
...
...
@@ -3,7 +3,7 @@
*/
import
React
from
'
react
'
;
import
renderer
from
'
react-test-renderer
'
;
//
import renderer from 'react-test-renderer';
import
{
shallow
,
mount
}
from
'
enzyme
'
;
import
{
useMainService
}
from
'
services
'
;
import
{
AppContext
}
from
'
contexts
'
;
...
...
@@ -48,7 +48,7 @@ describe('AccountManagementPage', () => {
shallow
(<
AccountManagementPage
/>);
});
it
(
'
fetches accounts and display accounts when pressed
'
,
async
()
=>
{
/*
it('fetches accounts and display accounts when pressed', async () => {
mockedAxios.request.mockResolvedValue({
status: 200,
...
...
@@ -74,5 +74,6 @@ describe('AccountManagementPage', () => {
expect(val).toEqual(1);
});
*/
});
src/scenes/Home/index.tsx
View file @
4390b6c7
...
...
@@ -47,6 +47,8 @@ function Home() {
}
};
const
fetchExportsPDF
=
async
()
=>
{}
useEffect
(()
=>
{
fetchStatistics
();
},
[
fetchStatistics
]);
...
...
@@ -65,9 +67,9 @@ function Home() {
borderRadius
=
"3px"
axis
=
{
Box
.
Axis
.
Horizontal
}
>
<
Box
width
=
"
7
0%"
axis
=
{
Box
.
Axis
.
Horizontal
}
>
<
Box
width
=
"
5
0%"
axis
=
{
Box
.
Axis
.
Horizontal
}
>
<
CategoryButton
width
=
"
3
0%"
width
=
"
7
0%"
value
=
{
statisticType
}
values
=
{
[
{
label
:
'
Diagram
'
,
value
:
false
},
...
...
@@ -77,7 +79,7 @@ function Home() {
/>
</
Box
>
<
Box
width
=
"
3
0%"
width
=
"
5
0%"
axis
=
{
Box
.
Axis
.
Horizontal
}
mainAxis
=
'flex-end'
crossAxis
=
'flex-end'
...
...
@@ -85,6 +87,10 @@ function Home() {
<
Button
onClick
=
{
fetchExports
}
>
Export Kasus Keseluruhan (CSV)
</
Button
>
<
Gap
axis
=
{
Gap
.
Axis
.
Horizontal
}
gap
=
{
10
}
/>
<
Button
onClick
=
{
fetchExportsPDF
}
>
Export Kasus Keseluruhan (PDF)
</
Button
>
</
Box
>
</
Box
>
<
Box
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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