Commit 5078e8d7 authored by Edu Trevisan's avatar Edu Trevisan

Merge branch 'development' into small_changes

parents 0b788d79 552a2feb
......@@ -19,6 +19,82 @@ along with Portal-SMPPIR-React. If not, see <https://www.gnu.org/licenses/>.
*/
// import CommunitiesJson from '../CommunitiesMap/1.json';
const MapCommunitiesNotFound = [9, 72, 74, 75, 76, 77, 89, 97, 107, 108, 114, 115, 122, 130, 147, 151, 174, 180, 208, 225, 246, 248, 261, 303,
320, 321, 338, 340, 342, 345, 346, 350, 351, 354, 355, 357, 358, 359, 360, 361, 367, 368, 372, 437, 761, 985, 994, 1044, 1586, 2124,
2265, 2291, 2341, 2342, 2448, 2449, 2463, 2470, 2474, 2480, 2489, 2490, 2525, 1000, 1001, 1002, 1003, 1004, 1005, 1008, 1009, 1010,
1011, 1012, 1013, 1015, 1017, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1030, 1031, 1034, 1035, 1036, 1037, 1038, 1039, 1040,
1041, 1042, 1043, 1045, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1056, 1057, 1058, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1070,
1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1092, 1093, 1094,
1095, 1098, 1099, 1100, 1102, 1103, 1104, 1105, 1107, 1108, 1109, 1110, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1124, 1125, 1126,
1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140, 1141, 1142, 1143, 1144, 1145, 1146, 1147, 1148, 1149,
1150, 1151, 1152, 1154, 1155, 1156, 1157, 1158, 1159, 1160, 1161, 1162, 1163, 1165, 1166, 1167, 1168, 1169, 1170, 1171, 1172, 1175,
1176, 1178, 1179, 1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, 1190, 1191, 1192, 1193, 1194, 1195, 1196, 1197, 1198, 1199,
1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 1220, 1221, 1222,
1223, 1224, 1225, 1226, 1227, 1228, 1229, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1239, 1240, 1241, 1242, 1243, 1244,
1245, 1246, 1247, 1248, 1249, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 1259, 1260, 1261, 1262, 1263, 1264, 1265, 1266,
1267, 1268, 1269, 1270, 1271, 1272, 1273, 1274, 1275, 1276, 1277, 1278, 1279, 1280, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288,
1289, 1290, 1291, 1293, 1294, 1295, 1296, 1297, 1298, 1299, 1300, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 1310, 1311,
1312, 1313, 1318, 1319, 1320, 1321, 1322, 1323, 1324, 1325, 1326, 1327, 1328, 1329, 1330, 1331, 1332, 1333, 1334, 1335, 1336, 1337,
1338, 1340, 1341, 1342, 1343, 1344, 1345, 1346, 1347, 1348, 1349, 1350, 1351, 1352, 1353, 1354, 1355, 1356, 1357, 1358, 1359, 1360,
1361, 1362, 1363, 1364, 1365, 1366, 1367, 1368, 1369, 1370, 1371, 1372, 1376, 1380, 1382, 1383, 1384, 1385, 1387, 1388, 1389, 1390,
1391, 1392, 1393, 1394, 1395, 1396, 1403, 1410, 1417, 1419, 1424, 1425, 1426, 1427, 1428, 1429, 1430, 1431, 1434, 1436, 1437, 1438,
1440, 1441, 1447, 1448, 1449, 1451, 1456, 1457, 1460, 1461, 1462, 1463, 1464, 1467, 1471, 1474, 1477, 1478, 1479, 1481, 1482, 1484,
1485, 1486, 1487, 1492, 1496, 1497, 1498, 1500, 1501, 1504, 1505, 1506, 1508, 1509, 1511, 1512, 1513, 1514, 1515, 1516, 1517, 1519,
152, 1521, 1523, 1524, 1525, 1527, 1528, 1529, 1530, 1531, 1570, 1587, 1588, 1589, 1590, 1591, 1593, 1594, 1595, 1596, 1597, 1598,
1599, 1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 1611, 1612, 1613, 1614, 1615, 1616, 1617, 1618, 1619, 1620, 1621,
1622, 1623, 1624, 1626, 1627, 1628, 1629, 1631, 1634, 1636, 1637, 1638, 1640, 1641, 1642, 1644, 1645, 1646, 1647, 1650, 1651, 1652,
1653, 1656, 1657, 1658, 1659, 1661, 1662, 1663, 1664, 1665, 1666, 1667, 1668, 1669, 1670, 1671, 1672, 1673, 1674, 1675, 1676, 1677,
1679, 1680, 1682, 1683, 1685, 1686, 1687, 1688, 1690, 1691, 1693, 1695, 1698, 1699, 1700, 1701, 1702, 1703, 1704, 1705, 1706, 1709,
1710, 1712, 1713, 1714, 1715, 1717, 1720, 1721, 1722, 1726, 1728, 1730, 1731, 1732, 1733, 1737, 1738, 1739, 1740, 1742, 1743, 1744,
1746, 1747, 1748, 1749, 1750, 1751, 1753, 1754, 1755, 1756, 1757, 1758, 1759, 1760, 1761, 1762, 1763, 1764, 1765, 1766, 1767, 1769,
1770, 1771, 1772, 1773, 1777, 1780, 1782, 1783, 1784, 1785, 1786, 1787, 1788, 1789, 1790, 1791, 1792, 1793, 1794, 1795, 1796, 1797,
1798, 1799, 1802, 1803, 1804, 1805, 1806, 1807, 1809, 1810, 1811, 1812, 1813, 1814, 1815, 1817, 1818, 1819, 1820, 1822, 1824, 1825,
1827, 1828, 1829, 1830, 1831, 1832, 1833, 1834, 1835, 1836, 1839, 1840, 1841, 1843, 1845, 1847, 1848, 1849, 185, 1850, 1853, 1854,
1855, 1856, 1857, 1860, 1862, 1863, 1867, 1868, 1869, 1870, 1871, 1872, 1873, 1874, 1876, 1877, 1880, 1882, 1883, 1884, 1885, 1886,
1889, 1890, 1891, 1892, 1894, 1895, 1896, 1897, 1898, 1900, 1901, 1902, 1903, 1906, 1907, 1908, 1909, 1910, 1916, 1917, 192, 1920,
1922, 1923, 1927, 1928, 1929, 1930, 1932, 1933, 1936, 1937, 1938, 1939, 1940, 1941, 1943, 1947, 1948, 1949, 195, 1950, 1951, 1953,
1954, 1955, 1956, 1957, 1958, 1959, 196, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968, 1971, 1972, 1974, 1975, 1976, 1977, 1978,
1979, 198, 1980, 1981, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 199, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2017, 2018, 2019, 2020, 2021, 2023,
2024, 2026, 2027, 2028, 2029, 2030, 2031, 2032, 2033, 2034, 2035, 2036, 2037, 2038, 2039, 2040, 2041, 2042, 2043, 2044, 2045,
2046, 2047, 2048, 2049, 205, 2050, 2051, 2052, 2053, 2054, 2055, 2056, 2057, 2058, 2059, 2060, 2061, 2062, 2063, 2064, 2065,
2066, 2067, 2068, 2069, 2070, 2071, 2072, 2073, 2074, 2075, 2076, 2077, 2078, 2079, 2080, 2081, 2082, 2083, 2084, 2085, 2086,
2087, 2088, 2089, 2090, 2091, 2092, 2093, 2094, 2095, 2096, 2097, 2098, 2099, 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107,
2108, 2109, 2110, 2111, 2112, 2113, 2114, 2115, 2116, 2117, 2118, 2119, 2120, 2121, 2122, 2123, 2125, 2126, 2127, 2128, 2129,
2130, 2131, 2132, 2133, 2134, 2135, 2136, 2137, 2138, 2139, 2140, 2141, 2142, 2143, 2144, 2145, 2146, 2147, 2148, 2149, 2150,
2152, 2153, 2154, 2155, 2156, 2157, 2158, 2159, 2160, 2161, 2162, 2163, 2164, 2165, 2166, 2167, 2168, 2169, 2170, 2171, 2172,
2173, 2174, 2175, 2176, 2177, 2178, 2179, 2180, 2181, 2182, 2183, 2184, 2185, 2186, 2187, 2188, 2189, 2190, 2191, 2192, 2193,
2194, 2195, 2196, 2197, 2198, 2199, 2200, 2201, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2210, 2211, 2212, 2213, 2214, 2215,
2222, 2223, 2224, 2225, 2226, 2227, 2230, 2231, 2232, 2234, 2235, 2237, 2238, 2239, 2240, 2241, 2242, 2243, 2245, 2246, 2247,
2249, 2250, 2251, 2252, 2253, 2254, 2255, 2256, 2257, 2258, 2259, 2260, 2261, 2262, 2263, 2266, 2267, 2268, 2269, 2270, 2271,
2272, 2273, 2274, 2275, 2276, 2277, 2278, 2279, 2280, 2282, 2283, 2285, 2286, 2287, 2288, 2289, 2290, 2292, 2293, 2294, 2295,
2296, 2297, 2298, 2299, 2300, 2301, 2302, 2303, 2305, 2306, 2307, 2308, 2309, 2310, 2311, 2312, 2313, 2314, 2315, 2316, 2317,
2318, 2320, 2321, 2322, 2324, 2325, 2327, 2331, 2332, 2333, 2334, 2346, 2354, 2356, 2360, 2365, 2366, 2367, 2368, 2369, 2370,
2371, 2372, 2374, 2375, 2376, 2377, 2378, 2379, 2381, 2382, 2383, 2389, 2396, 2397, 2398, 2415, 2422, 2423, 2424, 2425, 2426,
2427, 2428, 2429, 2430, 2431, 2432, 2433, 2434, 2435, 2436, 2437, 2438, 2439, 2440, 2441, 2442, 2443, 2445, 2446, 2453, 2462,
2481, 2488, 2491, 2492, 2493, 2494, 2495, 2496, 2497, 2498, 2499, 2500, 2501, 2502, 2503, 2504, 2505, 2506, 2507, 2508, 2509,
2510, 2511, 2512, 2513, 2514, 2515, 2516, 2517, 2518, 2519, 2520, 2521, 2522, 2523, 2524, 307, 308, 309, 310, 311, 312, 314,
333, 444, 45, 451, 452, 453, 454, 455, 456, 457, 458, 459, 46, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 47, 470, 471,
472, 473, 474, 475, 476, 477, 478, 479, 48, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 49, 490, 491, 492, 493, 494, 495,
496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520,
521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 537, 538, 539, 540, 542, 543, 544, 545, 546, 547,
548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 559, 560, 561, 562, 563, 564, 566, 567, 568, 569, 570, 571, 572, 573, 574,
575, 576, 577, 578, 579, 580, 582, 583, 584, 59, 591, 592, 593, 594, 596, 597, 599, 60, 600, 601, 602, 603, 604, 605, 606, 609,
61, 610, 611, 613, 614, 615, 616, 617, 618, 619, 62, 620, 621, 622, 626, 627, 628, 629, 630, 631, 632, 633, 634, 636, 637, 640,
641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 655, 656, 657, 658, 660, 661, 662, 663, 664, 665, 666, 667, 669,
670, 672, 673, 674, 676, 677, 678, 679, 680, 681, 682, 683, 684, 687, 688, 689, 690, 691, 692, 693, 695, 697, 698, 699, 701, 702,
703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 723, 724, 726, 727, 728, 730, 731, 732,
733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759,
760, 762, 763, 765, 766, 767, 768, 769, 770, 771, 772, 773, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 788, 789, 790, 791,
792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 810, 812, 814, 815, 816, 818, 819, 820, 822,
824, 825, 826, 827, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 843, 844, 845, 846, 848, 849, 851, 854, 857, 858,
859, 860, 862, 863, 864, 865, 866, 867, 869, 870, 871, 872, 873, 874, 875, 877, 878, 879, 880, 881, 883, 884, 885, 886, 887, 888,
890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 906, 907, 909, 911, 914, 915, 916, 918, 919, 921, 922,
923, 924, 925, 926, 927, 928, 929, 931, 936, 937, 938, 939, 940, 942, 943, 945, 946, 947, 949, 950, 951, 952, 953, 955, 956, 957,
958, 959, 960, 961, 964, 965, 966, 967, 968, 970, 971, 976, 977, 978, 980, 982, 984, 986, 988, 989, 990, 991, 992, 993, 995, 996,
997, 998, 999];
const CommunitiesJson = {
1: require('../CommunitiesMap/1.json'),
2: require('../CommunitiesMap/2.json'),
......@@ -2486,4 +2562,8 @@ const CommunitiesJson = {
export function findFileById(id) {
return(CommunitiesJson[id]);
}
export function mapNotExists(id) {
return MapCommunitiesNotFound.includes(id);
}
\ No newline at end of file
......@@ -33,7 +33,7 @@ import BuildPie from '../Charts/BuildPie'
import BrasilMap from '../Components/Map';
import { Map, TileLayer, Polygon } from 'react-leaflet';
import PageTable from '../Components/PageTable'
import { findFileById } from '../Components/Communities';
import { findFileById, mapNotExists } from '../Components/Communities';
import './Styles/Eixo1.css'
import './Styles/Pannel.css'
import { Store } from '../Store';
......@@ -94,6 +94,11 @@ class Eixo1 extends Component {
tempObj['Status INCRA'] = original[key][i]['STATUS_INCRA']
tempObj['Etapa FCP'] = original[key][i]['ETAPA_FCP']
tempObj['UF'] = key
if(mapNotExists(tempObj['ID'])){
tempObj['Mapa'] = 'Indisponível'
} else {
tempObj['Mapa'] = 'Disponível'
}
if(clickedInMap != null){
if(tempObj['UF'] === getStateExtendedName(clickedInMap).currentState) final.push(tempObj);
} else {
......@@ -254,7 +259,7 @@ class Eixo1 extends Component {
<Card id="e1pannel-3" className={`${contrastString}pannel hoverable`} title="Lista de Comunidades Reconhecidas Oficialmente pelo estado">
<p>Clique na comunidade para ter acesso ao mapa com informações detalhadas sobre ela</p>
<PageTable columns={['ID', 'Comunidade', 'Território', 'Status INCRA', 'Etapa FCP', 'UF']}
<PageTable columns={['ID', 'Comunidade', 'Território', 'Status INCRA', 'Etapa FCP', 'UF', 'Mapa']}
data={this.state.data} pageSize={15} defaultSorted={[{ id: "ID", desc: false }]}
mode='normal'
onClick={this.openModal}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment