@dhiraj0720/report1chart 2.2.5 → 2.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import axios from 'axios';
|
|
2
2
|
|
|
3
|
-
export const
|
|
3
|
+
export const getDivisions = async (endpoint, token) => {
|
|
4
4
|
const res = await axios.get(endpoint, {
|
|
5
5
|
headers: { Authorization: token },
|
|
6
6
|
});
|
|
7
7
|
return res.data.data || [];
|
|
8
8
|
};
|
|
9
9
|
|
|
10
|
-
export const
|
|
10
|
+
export const getTable = async (endpoint, division, token) => {
|
|
11
11
|
const res = await axios.get(`${endpoint}?division=${division}`, {
|
|
12
12
|
headers: { Authorization: token },
|
|
13
13
|
});
|
|
14
14
|
return res.data;
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
export const
|
|
17
|
+
export const getLine = async (endpoint, division, token) => {
|
|
18
18
|
const res = await axios.get(`${endpoint}?division=${division}`, {
|
|
19
19
|
headers: { Authorization: token },
|
|
20
20
|
});
|
|
21
21
|
return res.data;
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
export const
|
|
24
|
+
export const getBar = async (endpoint, division, token) => {
|
|
25
25
|
const res = await axios.get(`${endpoint}?division=${division}`, {
|
|
26
26
|
headers: { Authorization: token },
|
|
27
27
|
});
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
2
|
import { ScrollView, Text, ActivityIndicator } from 'react-native';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
getDivisions,
|
|
5
|
+
getTable,
|
|
6
|
+
getLine,
|
|
7
|
+
getBar,
|
|
8
|
+
} from '../api/report2Fetcher';
|
|
4
9
|
import MonthSelector from '../components/MonthSelector';
|
|
5
10
|
import DivisionSelector from '../components/DivisionSelector';
|
|
6
11
|
import FrozenTable from '../components/FrozenTable';
|