How to use eligible method in pact-foundation-pact

Best JavaScript code snippet using pact-foundation-pact

data.ts

Source:data.ts Github

copy

Full Screen

1import { EligibilityType } from "app/components/Charts/Eligibility/Scatterplot/data";2export interface DotChartProps {3 data: DotChartModel[];4 selectedYear: string;5 aggregateBy: "componentName" | "geographicAreaName";6}7export interface DotChartModel {8 name: string;9 items: {10 name: string;11 status: EligibilityType;12 }[];13}14export const mockdata: DotChartModel[] = [15 {16 name: "HIV",17 items: [18 {19 name: "Afghanistan",20 status: "Eligible",21 },22 {23 name: "Albania",24 status: "Not Eligible",25 },26 {27 name: "Algeria",28 status: "Not Eligible",29 },30 {31 name: "Angola",32 status: "Eligible",33 },34 {35 name: "Armenia",36 status: "Transition Funding",37 },38 {39 name: "Azerbaijan",40 status: "Eligible",41 },42 {43 name: "Bangladesh",44 status: "Eligible",45 },46 {47 name: "Belarus",48 status: "Eligible",49 },50 {51 name: "Belize",52 status: "Eligible",53 },54 {55 name: "Benin",56 status: "Eligible",57 },58 {59 name: "Bhutan",60 status: "Eligible",61 },62 {63 name: "Bolivia (Plurinational State)",64 status: "Eligible",65 },66 {67 name: "Botswana",68 status: "Eligible",69 },70 {71 name: "Bulgaria",72 status: "Not Eligible",73 },74 {75 name: "Burkina Faso",76 status: "Eligible",77 },78 {79 name: "Burundi",80 status: "Eligible",81 },82 {83 name: "Cabo Verde",84 status: "Eligible",85 },86 {87 name: "Cambodia",88 status: "Eligible",89 },90 {91 name: "Cameroon",92 status: "Eligible",93 },94 {95 name: "Central African Republic",96 status: "Eligible",97 },98 {99 name: "Chad",100 status: "Eligible",101 },102 {103 name: "Colombia",104 status: "Eligible",105 },106 {107 name: "Comoros",108 status: "Eligible",109 },110 {111 name: "Congo",112 status: "Eligible",113 },114 {115 name: "Congo (Democratic Republic)",116 status: "Eligible",117 },118 {119 name: "Costa Rica",120 status: "Eligible",121 },122 {123 name: "Cuba",124 status: "Eligible",125 },126 {127 name: "Côte d'Ivoire",128 status: "Eligible",129 },130 {131 name: "Djibouti",132 status: "Eligible",133 },134 {135 name: "Dominica",136 status: "Eligible",137 },138 {139 name: "Dominican Republic",140 status: "Eligible",141 },142 {143 name: "Ecuador",144 status: "Eligible",145 },146 {147 name: "Egypt",148 status: "Eligible",149 },150 {151 name: "El Salvador",152 status: "Eligible",153 },154 {155 name: "Equatorial Guinea",156 status: "Eligible",157 },158 {159 name: "Eritrea",160 status: "Eligible",161 },162 {163 name: "Eswatini",164 status: "Eligible",165 },166 {167 name: "Ethiopia",168 status: "Eligible",169 },170 {171 name: "Fiji",172 status: "Not Eligible",173 },174 {175 name: "Gabon",176 status: "Eligible",177 },178 {179 name: "Gambia",180 status: "Eligible",181 },182 {183 name: "Georgia",184 status: "Eligible",185 },186 {187 name: "Ghana",188 status: "Eligible",189 },190 {191 name: "Grenada",192 status: "Eligible",193 },194 {195 name: "Guatemala",196 status: "Eligible",197 },198 {199 name: "Guinea",200 status: "Eligible",201 },202 {203 name: "Guinea-Bissau",204 status: "Eligible",205 },206 {207 name: "Guyana",208 status: "Eligible",209 },210 {211 name: "Haiti",212 status: "Eligible",213 },214 {215 name: "Honduras",216 status: "Eligible",217 },218 {219 name: "India",220 status: "Eligible",221 },222 {223 name: "Indonesia",224 status: "Eligible",225 },226 {227 name: "Iran (Islamic Republic)",228 status: "Eligible",229 },230 {231 name: "Iraq",232 status: "Not Eligible",233 },234 {235 name: "Jamaica",236 status: "Eligible",237 },238 {239 name: "Jordan",240 status: "Not Eligible",241 },242 {243 name: "Kazakhstan",244 status: "Eligible",245 },246 {247 name: "Kenya",248 status: "Eligible",249 },250 {251 name: "Kiribati",252 status: "Eligible",253 },254 {255 name: "Korea (Democratic Peoples Republic)",256 status: "Eligible",257 },258 {259 name: "Kosovo",260 status: "Transition Funding",261 },262 {263 name: "Kyrgyzstan",264 status: "Eligible",265 },266 {267 name: "Lao (Peoples Democratic Republic)",268 status: "Eligible",269 },270 {271 name: "Lebanon",272 status: "Eligible",273 },274 {275 name: "Lesotho",276 status: "Eligible",277 },278 {279 name: "Liberia",280 status: "Eligible",281 },282 {283 name: "Madagascar",284 status: "Eligible",285 },286 {287 name: "Malawi",288 status: "Eligible",289 },290 {291 name: "Malaysia",292 status: "Eligible",293 },294 {295 name: "Maldives",296 status: "Eligible",297 },298 {299 name: "Mali",300 status: "Eligible",301 },302 {303 name: "Marshall Islands",304 status: "Eligible",305 },306 {307 name: "Mauritania",308 status: "Eligible",309 },310 {311 name: "Mauritius",312 status: "Eligible",313 },314 {315 name: "Micronesia (Federated States)",316 status: "Eligible",317 },318 {319 name: "Moldova",320 status: "Eligible",321 },322 {323 name: "Mongolia",324 status: "Eligible",325 },326 {327 name: "Montenegro",328 status: "Eligible",329 },330 {331 name: "Morocco",332 status: "Eligible",333 },334 {335 name: "Mozambique",336 status: "Eligible",337 },338 {339 name: "Myanmar",340 status: "Eligible",341 },342 {343 name: "Namibia",344 status: "Eligible",345 },346 {347 name: "Nauru",348 status: "Not Eligible",349 },350 {351 name: "Nepal",352 status: "Eligible",353 },354 {355 name: "Nicaragua",356 status: "Eligible",357 },358 {359 name: "Niger",360 status: "Eligible",361 },362 {363 name: "Nigeria",364 status: "Eligible",365 },366 {367 name: "North Macedonia",368 status: "Eligible",369 },370 {371 name: "Pakistan",372 status: "Eligible",373 },374 {375 name: "Palau",376 status: "Not Eligible",377 },378 {379 name: "Palestine",380 status: "Eligible",381 },382 {383 name: "Panama",384 status: "Not Eligible",385 },386 {387 name: "Papua New Guinea",388 status: "Eligible",389 },390 {391 name: "Paraguay",392 status: "Eligible",393 },394 {395 name: "Peru",396 status: "Eligible",397 },398 {399 name: "Philippines",400 status: "Eligible",401 },402 {403 name: "Romania",404 status: "Not Eligible",405 },406 {407 name: "Russian Federation",408 status: "Eligible",409 },410 {411 name: "Rwanda",412 status: "Eligible",413 },414 {415 name: "Saint Lucia",416 status: "Eligible",417 },418 {419 name: "Saint Vincent and Grenadines",420 status: "Eligible",421 },422 {423 name: "Samoa",424 status: "Eligible",425 },426 {427 name: "Sao Tome and Principe",428 status: "Eligible",429 },430 {431 name: "Senegal",432 status: "Eligible",433 },434 {435 name: "Serbia",436 status: "Eligible",437 },438 {439 name: "Sierra Leone",440 status: "Eligible",441 },442 {443 name: "Solomon Islands",444 status: "Eligible",445 },446 {447 name: "Somalia",448 status: "Eligible",449 },450 {451 name: "South Africa",452 status: "Eligible",453 },454 {455 name: "South Sudan",456 status: "Eligible",457 },458 {459 name: "Sri Lanka",460 status: "Eligible",461 },462 {463 name: "Sudan",464 status: "Eligible",465 },466 {467 name: "Suriname",468 status: "Eligible",469 },470 {471 name: "Syrian Arab Republic",472 status: "Eligible",473 },474 {475 name: "Tajikistan",476 status: "Eligible",477 },478 {479 name: "Tanzania (United Republic)",480 status: "Eligible",481 },482 {483 name: "Thailand",484 status: "Eligible",485 },486 {487 name: "Timor-Leste",488 status: "Eligible",489 },490 {491 name: "Togo",492 status: "Eligible",493 },494 {495 name: "Tonga",496 status: "Eligible",497 },498 {499 name: "Tunisia",500 status: "Eligible",501 },502 {503 name: "Turkmenistan",504 status: "Not Eligible",505 },506 {507 name: "Tuvalu",508 status: "Eligible",509 },510 {511 name: "Uganda",512 status: "Eligible",513 },514 {515 name: "Ukraine",516 status: "Eligible",517 },518 {519 name: "Uzbekistan",520 status: "Eligible",521 },522 {523 name: "Vanuatu",524 status: "Eligible",525 },526 {527 name: "Venezuela",528 status: "Not Eligible",529 },530 {531 name: "Viet Nam",532 status: "Eligible",533 },534 {535 name: "Yemen",536 status: "Eligible",537 },538 {539 name: "Zambia",540 status: "Eligible",541 },542 {543 name: "Zanzibar",544 status: "Eligible",545 },546 {547 name: "Zimbabwe",548 status: "Eligible",549 },550 ],551 },552 {553 name: "Malaria",554 items: [555 {556 name: "Afghanistan",557 status: "Eligible",558 },559 {560 name: "Albania",561 status: "Not Eligible",562 },563 {564 name: "Algeria",565 status: "Not Eligible",566 },567 {568 name: "Angola",569 status: "Eligible",570 },571 {572 name: "Armenia",573 status: "Not Eligible",574 },575 {576 name: "Azerbaijan",577 status: "Not Eligible",578 },579 {580 name: "Bangladesh",581 status: "Eligible",582 },583 {584 name: "Belarus",585 status: "Not Eligible",586 },587 {588 name: "Belize",589 status: "Not Eligible",590 },591 {592 name: "Benin",593 status: "Eligible",594 },595 {596 name: "Bhutan",597 status: "Eligible",598 },599 {600 name: "Bolivia (Plurinational State)",601 status: "Eligible",602 },603 {604 name: "Botswana",605 status: "Not Eligible",606 },607 {608 name: "Bulgaria",609 status: "Not Eligible",610 },611 {612 name: "Burkina Faso",613 status: "Eligible",614 },615 {616 name: "Burundi",617 status: "Eligible",618 },619 {620 name: "Cabo Verde",621 status: "Eligible",622 },623 {624 name: "Cambodia",625 status: "Eligible",626 },627 {628 name: "Cameroon",629 status: "Eligible",630 },631 {632 name: "Central African Republic",633 status: "Eligible",634 },635 {636 name: "Chad",637 status: "Eligible",638 },639 {640 name: "Colombia",641 status: "Not Eligible",642 },643 {644 name: "Comoros",645 status: "Eligible",646 },647 {648 name: "Congo",649 status: "Eligible",650 },651 {652 name: "Congo (Democratic Republic)",653 status: "Eligible",654 },655 {656 name: "Costa Rica",657 status: "Not Eligible",658 },659 {660 name: "Cuba",661 status: "Not Eligible",662 },663 {664 name: "Côte d'Ivoire",665 status: "Eligible",666 },667 {668 name: "Djibouti",669 status: "Eligible",670 },671 {672 name: "Dominica",673 status: "Not Eligible",674 },675 {676 name: "Dominican Republic",677 status: "Not Eligible",678 },679 {680 name: "Ecuador",681 status: "Eligible",682 },683 {684 name: "Egypt",685 status: "Not Eligible",686 },687 {688 name: "El Salvador",689 status: "Eligible",690 },691 {692 name: "Equatorial Guinea",693 status: "Eligible",694 },695 {696 name: "Eritrea",697 status: "Eligible",698 },699 {700 name: "Eswatini",701 status: "Eligible",702 },703 {704 name: "Ethiopia",705 status: "Eligible",706 },707 {708 name: "Fiji",709 status: "Not Eligible",710 },711 {712 name: "Gabon",713 status: "Eligible",714 },715 {716 name: "Gambia",717 status: "Eligible",718 },719 {720 name: "Georgia",721 status: "Not Eligible",722 },723 {724 name: "Ghana",725 status: "Eligible",726 },727 {728 name: "Grenada",729 status: "Not Eligible",730 },731 {732 name: "Guatemala",733 status: "Transition Funding",734 },735 {736 name: "Guinea",737 status: "Eligible",738 },739 {740 name: "Guinea-Bissau",741 status: "Eligible",742 },743 {744 name: "Guyana",745 status: "Transition Funding",746 },747 {748 name: "Haiti",749 status: "Eligible",750 },751 {752 name: "Honduras",753 status: "Eligible",754 },755 {756 name: "India",757 status: "Eligible",758 },759 {760 name: "Indonesia",761 status: "Eligible",762 },763 {764 name: "Iran (Islamic Republic)",765 status: "Not Eligible",766 },767 {768 name: "Iraq",769 status: "Not Eligible",770 },771 {772 name: "Jamaica",773 status: "Not Eligible",774 },775 {776 name: "Jordan",777 status: "Not Eligible",778 },779 {780 name: "Kazakhstan",781 status: "Not Eligible",782 },783 {784 name: "Kenya",785 status: "Eligible",786 },787 {788 name: "Kiribati",789 status: "Not Eligible",790 },791 {792 name: "Korea (Democratic Peoples Republic)",793 status: "Eligible",794 },795 {796 name: "Kosovo",797 status: "Not Eligible",798 },799 {800 name: "Kyrgyzstan",801 status: "Not Eligible",802 },803 {804 name: "Lao (Peoples Democratic Republic)",805 status: "Eligible",806 },807 {808 name: "Lebanon",809 status: "Not Eligible",810 },811 {812 name: "Lesotho",813 status: "Not Eligible",814 },815 {816 name: "Liberia",817 status: "Eligible",818 },819 {820 name: "Madagascar",821 status: "Eligible",822 },823 {824 name: "Malawi",825 status: "Eligible",826 },827 {828 name: "Malaysia",829 status: "Not Eligible",830 },831 {832 name: "Maldives",833 status: "Not Eligible",834 },835 {836 name: "Mali",837 status: "Eligible",838 },839 {840 name: "Marshall Islands",841 status: "Not Eligible",842 },843 {844 name: "Mauritania",845 status: "Eligible",846 },847 {848 name: "Mauritius",849 status: "Not Eligible",850 },851 {852 name: "Micronesia (Federated States)",853 status: "Not Eligible",854 },855 {856 name: "Moldova",857 status: "Not Eligible",858 },859 {860 name: "Mongolia",861 status: "Not Eligible",862 },863 {864 name: "Montenegro",865 status: "Not Eligible",866 },867 {868 name: "Morocco",869 status: "Not Eligible",870 },871 {872 name: "Mozambique",873 status: "Eligible",874 },875 {876 name: "Myanmar",877 status: "Eligible",878 },879 {880 name: "Namibia",881 status: "Eligible",882 },883 {884 name: "Nauru",885 status: "Not Eligible",886 },887 {888 name: "Nepal",889 status: "Eligible",890 },891 {892 name: "Nicaragua",893 status: "Eligible",894 },895 {896 name: "Niger",897 status: "Eligible",898 },899 {900 name: "Nigeria",901 status: "Eligible",902 },903 {904 name: "North Macedonia",905 status: "Not Eligible",906 },907 {908 name: "Pakistan",909 status: "Eligible",910 },911 {912 name: "Palau",913 status: "Not Eligible",914 },915 {916 name: "Palestine",917 status: "Not Eligible",918 },919 {920 name: "Panama",921 status: "Not Eligible",922 },923 {924 name: "Papua New Guinea",925 status: "Eligible",926 },927 {928 name: "Paraguay",929 status: "Not Eligible",930 },931 {932 name: "Peru",933 status: "Not Eligible",934 },935 {936 name: "Philippines",937 status: "Eligible",938 },939 {940 name: "Romania",941 status: "Not Eligible",942 },943 {944 name: "Russian Federation",945 status: "Not Eligible",946 },947 {948 name: "Rwanda",949 status: "Eligible",950 },951 {952 name: "Saint Lucia",953 status: "Not Eligible",954 },955 {956 name: "Saint Vincent and Grenadines",957 status: "Not Eligible",958 },959 {960 name: "Samoa",961 status: "Not Eligible",962 },963 {964 name: "Sao Tome and Principe",965 status: "Eligible",966 },967 {968 name: "Senegal",969 status: "Eligible",970 },971 {972 name: "Serbia",973 status: "Not Eligible",974 },975 {976 name: "Sierra Leone",977 status: "Eligible",978 },979 {980 name: "Solomon Islands",981 status: "Eligible",982 },983 {984 name: "Somalia",985 status: "Eligible",986 },987 {988 name: "South Africa",989 status: "Not Eligible",990 },991 {992 name: "South Sudan",993 status: "Eligible",994 },995 {996 name: "Sri Lanka",997 status: "Not Eligible",998 },999 {1000 name: "Sudan",1001 status: "Eligible",1002 },1003 {1004 name: "Suriname",1005 status: "Eligible",1006 },1007 {1008 name: "Syrian Arab Republic",1009 status: "Not Eligible",1010 },1011 {1012 name: "Tajikistan",1013 status: "Not Eligible",1014 },1015 {1016 name: "Tanzania (United Republic)",1017 status: "Eligible",1018 },1019 {1020 name: "Thailand",1021 status: "Eligible",1022 },1023 {1024 name: "Timor-Leste",1025 status: "Eligible",1026 },1027 {1028 name: "Togo",1029 status: "Eligible",1030 },1031 {1032 name: "Tonga",1033 status: "Not Eligible",1034 },1035 {1036 name: "Tunisia",1037 status: "Not Eligible",1038 },1039 {1040 name: "Turkmenistan",1041 status: "Not Eligible",1042 },1043 {1044 name: "Tuvalu",1045 status: "Not Eligible",1046 },1047 {1048 name: "Uganda",1049 status: "Eligible",1050 },1051 {1052 name: "Ukraine",1053 status: "Not Eligible",1054 },1055 {1056 name: "Uzbekistan",1057 status: "Not Eligible",1058 },1059 {1060 name: "Vanuatu",1061 status: "Eligible",1062 },1063 {1064 name: "Venezuela",1065 status: "Eligible",1066 },1067 {1068 name: "Viet Nam",1069 status: "Eligible",1070 },1071 {1072 name: "Yemen",1073 status: "Eligible",1074 },1075 {1076 name: "Zambia",1077 status: "Eligible",1078 },1079 {1080 name: "Zanzibar",1081 status: "Eligible",1082 },1083 {1084 name: "Zimbabwe",1085 status: "Eligible",1086 },1087 ],1088 },1089 {1090 name: "Tuberculosis",1091 items: [1092 {1093 name: "Afghanistan",1094 status: "Eligible",1095 },1096 {1097 name: "Albania",1098 status: "Not Eligible",1099 },1100 {1101 name: "Algeria",1102 status: "Eligible",1103 },1104 {1105 name: "Angola",1106 status: "Eligible",1107 },1108 {1109 name: "Armenia",1110 status: "Eligible",1111 },1112 {1113 name: "Azerbaijan",1114 status: "Eligible",1115 },1116 {1117 name: "Bangladesh",1118 status: "Eligible",1119 },1120 {1121 name: "Belarus",1122 status: "Eligible",1123 },1124 {1125 name: "Belize",1126 status: "Not Eligible",1127 },1128 {1129 name: "Benin",1130 status: "Eligible",1131 },1132 {1133 name: "Bhutan",1134 status: "Eligible",1135 },1136 {1137 name: "Bolivia (Plurinational State)",1138 status: "Eligible",1139 },1140 {1141 name: "Botswana",1142 status: "Eligible",1143 },1144 {1145 name: "Bulgaria",1146 status: "Not Eligible",1147 },1148 {1149 name: "Burkina Faso",1150 status: "Eligible",1151 },1152 {1153 name: "Burundi",1154 status: "Eligible",1155 },1156 {1157 name: "Cabo Verde",1158 status: "Eligible",1159 },1160 {1161 name: "Cambodia",1162 status: "Eligible",1163 },1164 {1165 name: "Cameroon",1166 status: "Eligible",1167 },1168 {1169 name: "Central African Republic",1170 status: "Eligible",1171 },1172 {1173 name: "Chad",1174 status: "Eligible",1175 },1176 {1177 name: "Colombia",1178 status: "Not Eligible",1179 },1180 {1181 name: "Comoros",1182 status: "Eligible",1183 },1184 {1185 name: "Congo",1186 status: "Eligible",1187 },1188 {1189 name: "Congo (Democratic Republic)",1190 status: "Eligible",1191 },1192 {1193 name: "Costa Rica",1194 status: "Not Eligible",1195 },1196 {1197 name: "Cuba",1198 status: "Not Eligible",1199 },1200 {1201 name: "Côte d'Ivoire",1202 status: "Eligible",1203 },1204 {1205 name: "Djibouti",1206 status: "Eligible",1207 },1208 {1209 name: "Dominica",1210 status: "Eligible",1211 },1212 {1213 name: "Dominican Republic",1214 status: "Not Eligible",1215 },1216 {1217 name: "Ecuador",1218 status: "Not Eligible",1219 },1220 {1221 name: "Egypt",1222 status: "Eligible",1223 },1224 {1225 name: "El Salvador",1226 status: "Eligible",1227 },1228 {1229 name: "Equatorial Guinea",1230 status: "Eligible",1231 },1232 {1233 name: "Eritrea",1234 status: "Eligible",1235 },1236 {1237 name: "Eswatini",1238 status: "Eligible",1239 },1240 {1241 name: "Ethiopia",1242 status: "Eligible",1243 },1244 {1245 name: "Fiji",1246 status: "Not Eligible",1247 },1248 {1249 name: "Gabon",1250 status: "Eligible",1251 },1252 {1253 name: "Gambia",1254 status: "Eligible",1255 },1256 {1257 name: "Georgia",1258 status: "Eligible",1259 },1260 {1261 name: "Ghana",1262 status: "Eligible",1263 },1264 {1265 name: "Grenada",1266 status: "Eligible",1267 },1268 {1269 name: "Guatemala",1270 status: "Transition Funding",1271 },1272 {1273 name: "Guinea",1274 status: "Eligible",1275 },1276 {1277 name: "Guinea-Bissau",1278 status: "Eligible",1279 },1280 {1281 name: "Guyana",1282 status: "Eligible",1283 },1284 {1285 name: "Haiti",1286 status: "Eligible",1287 },1288 {1289 name: "Honduras",1290 status: "Eligible",1291 },1292 {1293 name: "India",1294 status: "Eligible",1295 },1296 {1297 name: "Indonesia",1298 status: "Eligible",1299 },1300 {1301 name: "Iran (Islamic Republic)",1302 status: "Not Eligible",1303 },1304 {1305 name: "Iraq",1306 status: "Eligible",1307 },1308 {1309 name: "Jamaica",1310 status: "Not Eligible",1311 },1312 {1313 name: "Jordan",1314 status: "Eligible",1315 },1316 {1317 name: "Kazakhstan",1318 status: "Eligible",1319 },1320 {1321 name: "Kenya",1322 status: "Eligible",1323 },1324 {1325 name: "Kiribati",1326 status: "Eligible",1327 },1328 {1329 name: "Korea (Democratic Peoples Republic)",1330 status: "Eligible",1331 },1332 {1333 name: "Kosovo",1334 status: "Transition Funding",1335 },1336 {1337 name: "Kyrgyzstan",1338 status: "Eligible",1339 },1340 {1341 name: "Lao (Peoples Democratic Republic)",1342 status: "Eligible",1343 },1344 {1345 name: "Lebanon",1346 status: "Not Eligible",1347 },1348 {1349 name: "Lesotho",1350 status: "Eligible",1351 },1352 {1353 name: "Liberia",1354 status: "Eligible",1355 },1356 {1357 name: "Madagascar",1358 status: "Eligible",1359 },1360 {1361 name: "Malawi",1362 status: "Eligible",1363 },1364 {1365 name: "Malaysia",1366 status: "Eligible",1367 },1368 {1369 name: "Maldives",1370 status: "Eligible",1371 },1372 {1373 name: "Mali",1374 status: "Eligible",1375 },1376 {1377 name: "Marshall Islands",1378 status: "Eligible",1379 },1380 {1381 name: "Mauritania",1382 status: "Eligible",1383 },1384 {1385 name: "Mauritius",1386 status: "Not Eligible",1387 },1388 {1389 name: "Micronesia (Federated States)",1390 status: "Eligible",1391 },1392 {1393 name: "Moldova",1394 status: "Eligible",1395 },1396 {1397 name: "Mongolia",1398 status: "Eligible",1399 },1400 {1401 name: "Montenegro",1402 status: "Not Eligible",1403 },1404 {1405 name: "Morocco",1406 status: "Eligible",1407 },1408 {1409 name: "Mozambique",1410 status: "Eligible",1411 },1412 {1413 name: "Myanmar",1414 status: "Eligible",1415 },1416 {1417 name: "Namibia",1418 status: "Eligible",1419 },1420 {1421 name: "Nauru",1422 status: "Eligible",1423 },1424 {1425 name: "Nepal",1426 status: "Eligible",1427 },1428 {1429 name: "Nicaragua",1430 status: "Eligible",1431 },1432 {1433 name: "Niger",1434 status: "Eligible",1435 },1436 {1437 name: "Nigeria",1438 status: "Eligible",1439 },1440 {1441 name: "North Macedonia",1442 status: "Not Eligible",1443 },1444 {1445 name: "Pakistan",1446 status: "Eligible",1447 },1448 {1449 name: "Palau",1450 status: "Not Eligible",1451 },1452 {1453 name: "Palestine",1454 status: "Eligible",1455 },1456 {1457 name: "Panama",1458 status: "Not Eligible",1459 },1460 {1461 name: "Papua New Guinea",1462 status: "Eligible",1463 },1464 {1465 name: "Paraguay",1466 status: "Not Eligible",1467 },1468 {1469 name: "Peru",1470 status: "Eligible",1471 },1472 {1473 name: "Philippines",1474 status: "Eligible",1475 },1476 {1477 name: "Romania",1478 status: "Eligible",1479 },1480 {1481 name: "Russian Federation",1482 status: "Not Eligible",1483 },1484 {1485 name: "Rwanda",1486 status: "Eligible",1487 },1488 {1489 name: "Saint Lucia",1490 status: "Eligible",1491 },1492 {1493 name: "Saint Vincent and Grenadines",1494 status: "Eligible",1495 },1496 {1497 name: "Samoa",1498 status: "Eligible",1499 },1500 {1501 name: "Sao Tome and Principe",1502 status: "Eligible",1503 },1504 {1505 name: "Senegal",1506 status: "Eligible",1507 },1508 {1509 name: "Serbia",1510 status: "Not Eligible",1511 },1512 {1513 name: "Sierra Leone",1514 status: "Eligible",1515 },1516 {1517 name: "Solomon Islands",1518 status: "Eligible",1519 },1520 {1521 name: "Somalia",1522 status: "Eligible",1523 },1524 {1525 name: "South Africa",1526 status: "Eligible",1527 },1528 {1529 name: "South Sudan",1530 status: "Eligible",1531 },1532 {1533 name: "Sri Lanka",1534 status: "Eligible",1535 },1536 {1537 name: "Sudan",1538 status: "Eligible",1539 },1540 {1541 name: "Suriname",1542 status: "Eligible",1543 },1544 {1545 name: "Syrian Arab Republic",1546 status: "Eligible",1547 },1548 {1549 name: "Tajikistan",1550 status: "Eligible",1551 },1552 {1553 name: "Tanzania (United Republic)",1554 status: "Eligible",1555 },1556 {1557 name: "Thailand",1558 status: "Eligible",1559 },1560 {1561 name: "Timor-Leste",1562 status: "Eligible",1563 },1564 {1565 name: "Togo",1566 status: "Eligible",1567 },1568 {1569 name: "Tonga",1570 status: "Eligible",1571 },1572 {1573 name: "Tunisia",1574 status: "Eligible",1575 },1576 {1577 name: "Turkmenistan",1578 status: "Eligible",1579 },1580 {1581 name: "Tuvalu",1582 status: "Eligible",1583 },1584 {1585 name: "Uganda",1586 status: "Eligible",1587 },1588 {1589 name: "Ukraine",1590 status: "Eligible",1591 },1592 {1593 name: "Uzbekistan",1594 status: "Eligible",1595 },1596 {1597 name: "Vanuatu",1598 status: "Eligible",1599 },1600 {1601 name: "Venezuela",1602 status: "Not Eligible",1603 },1604 {1605 name: "Viet Nam",1606 status: "Eligible",1607 },1608 {1609 name: "Yemen",1610 status: "Eligible",1611 },1612 {1613 name: "Zambia",1614 status: "Eligible",1615 },1616 {1617 name: "Zanzibar",1618 status: "Eligible",1619 },1620 {1621 name: "Zimbabwe",1622 status: "Eligible",1623 },1624 ],1625 },1626];1627export const mockdata2: DotChartModel[] = [1628 {1629 name: "Afghanistan",1630 items: [1631 {1632 name: "HIV",1633 status: "Eligible",1634 },1635 {1636 name: "Malaria",1637 status: "Eligible",1638 },1639 {1640 name: "Tuberculosis",1641 status: "Eligible",1642 },1643 ],1644 },1645 {1646 name: "Albania",1647 items: [1648 {1649 name: "HIV",1650 status: "Not Eligible",1651 },1652 {1653 name: "Malaria",1654 status: "Not Eligible",1655 },1656 {1657 name: "Tuberculosis",1658 status: "Not Eligible",1659 },1660 ],1661 },1662 {1663 name: "Algeria",1664 items: [1665 {1666 name: "HIV",1667 status: "Not Eligible",1668 },1669 {1670 name: "Malaria",1671 status: "Not Eligible",1672 },1673 {1674 name: "Tuberculosis",1675 status: "Eligible",1676 },1677 ],1678 },1679 {1680 name: "Angola",1681 items: [1682 {1683 name: "HIV",1684 status: "Eligible",1685 },1686 {1687 name: "Malaria",1688 status: "Eligible",1689 },1690 {1691 name: "Tuberculosis",1692 status: "Eligible",1693 },1694 ],1695 },1696 {1697 name: "Armenia",1698 items: [1699 {1700 name: "HIV",1701 status: "Transition Funding",1702 },1703 {1704 name: "Malaria",1705 status: "Not Eligible",1706 },1707 {1708 name: "Tuberculosis",1709 status: "Eligible",1710 },1711 ],1712 },1713 {1714 name: "Azerbaijan",1715 items: [1716 {1717 name: "HIV",1718 status: "Eligible",1719 },1720 {1721 name: "Malaria",1722 status: "Not Eligible",1723 },1724 {1725 name: "Tuberculosis",1726 status: "Eligible",1727 },1728 ],1729 },1730 {1731 name: "Bangladesh",1732 items: [1733 {1734 name: "HIV",1735 status: "Eligible",1736 },1737 {1738 name: "Malaria",1739 status: "Eligible",1740 },1741 {1742 name: "Tuberculosis",1743 status: "Eligible",1744 },1745 ],1746 },1747 {1748 name: "Belarus",1749 items: [1750 {1751 name: "HIV",1752 status: "Eligible",1753 },1754 {1755 name: "Malaria",1756 status: "Not Eligible",1757 },1758 {1759 name: "Tuberculosis",1760 status: "Eligible",1761 },1762 ],1763 },1764 {1765 name: "Belize",1766 items: [1767 {1768 name: "HIV",1769 status: "Eligible",1770 },1771 {1772 name: "Malaria",1773 status: "Not Eligible",1774 },1775 {1776 name: "Tuberculosis",1777 status: "Not Eligible",1778 },1779 ],1780 },1781 {1782 name: "Benin",1783 items: [1784 {1785 name: "HIV",1786 status: "Eligible",1787 },1788 {1789 name: "Malaria",1790 status: "Eligible",1791 },1792 {1793 name: "Tuberculosis",1794 status: "Eligible",1795 },1796 ],1797 },1798 {1799 name: "Bhutan",1800 items: [1801 {1802 name: "HIV",1803 status: "Eligible",1804 },1805 {1806 name: "Malaria",1807 status: "Eligible",1808 },1809 {1810 name: "Tuberculosis",1811 status: "Eligible",1812 },1813 ],1814 },1815 {1816 name: "Bolivia (Plurinational State)",1817 items: [1818 {1819 name: "HIV",1820 status: "Eligible",1821 },1822 {1823 name: "Malaria",1824 status: "Eligible",1825 },1826 {1827 name: "Tuberculosis",1828 status: "Eligible",1829 },1830 ],1831 },1832 {1833 name: "Botswana",1834 items: [1835 {1836 name: "HIV",1837 status: "Eligible",1838 },1839 {1840 name: "Malaria",1841 status: "Not Eligible",1842 },1843 {1844 name: "Tuberculosis",1845 status: "Eligible",1846 },1847 ],1848 },1849 {1850 name: "Bulgaria",1851 items: [1852 {1853 name: "HIV",1854 status: "Not Eligible",1855 },1856 {1857 name: "Malaria",1858 status: "Not Eligible",1859 },1860 {1861 name: "Tuberculosis",1862 status: "Not Eligible",1863 },1864 ],1865 },1866 {1867 name: "Burkina Faso",1868 items: [1869 {1870 name: "HIV",1871 status: "Eligible",1872 },1873 {1874 name: "Malaria",1875 status: "Eligible",1876 },1877 {1878 name: "Tuberculosis",1879 status: "Eligible",1880 },1881 ],1882 },1883 {1884 name: "Burundi",1885 items: [1886 {1887 name: "HIV",1888 status: "Eligible",1889 },1890 {1891 name: "Malaria",1892 status: "Eligible",1893 },1894 {1895 name: "Tuberculosis",1896 status: "Eligible",1897 },1898 ],1899 },1900 {1901 name: "Cabo Verde",1902 items: [1903 {1904 name: "HIV",1905 status: "Eligible",1906 },1907 {1908 name: "Malaria",1909 status: "Eligible",1910 },1911 {1912 name: "Tuberculosis",1913 status: "Eligible",1914 },1915 ],1916 },1917 {1918 name: "Cambodia",1919 items: [1920 {1921 name: "HIV",1922 status: "Eligible",1923 },1924 {1925 name: "Malaria",1926 status: "Eligible",1927 },1928 {1929 name: "Tuberculosis",1930 status: "Eligible",1931 },1932 ],1933 },1934 {1935 name: "Cameroon",1936 items: [1937 {1938 name: "HIV",1939 status: "Eligible",1940 },1941 {1942 name: "Malaria",1943 status: "Eligible",1944 },1945 {1946 name: "Tuberculosis",1947 status: "Eligible",1948 },1949 ],1950 },1951 {1952 name: "Central African Republic",1953 items: [1954 {1955 name: "HIV",1956 status: "Eligible",1957 },1958 {1959 name: "Malaria",1960 status: "Eligible",1961 },1962 {1963 name: "Tuberculosis",1964 status: "Eligible",1965 },1966 ],1967 },1968 {1969 name: "Chad",1970 items: [1971 {1972 name: "HIV",1973 status: "Eligible",1974 },1975 {1976 name: "Malaria",1977 status: "Eligible",1978 },1979 {1980 name: "Tuberculosis",1981 status: "Eligible",1982 },1983 ],1984 },1985 {1986 name: "Colombia",1987 items: [1988 {1989 name: "HIV",1990 status: "Eligible",1991 },1992 {1993 name: "Malaria",1994 status: "Not Eligible",1995 },1996 {1997 name: "Tuberculosis",1998 status: "Not Eligible",1999 },2000 ],2001 },2002 {2003 name: "Comoros",2004 items: [2005 {2006 name: "HIV",2007 status: "Eligible",2008 },2009 {2010 name: "Malaria",2011 status: "Eligible",2012 },2013 {2014 name: "Tuberculosis",2015 status: "Eligible",2016 },2017 ],2018 },2019 {2020 name: "Congo",2021 items: [2022 {2023 name: "HIV",2024 status: "Eligible",2025 },2026 {2027 name: "Malaria",2028 status: "Eligible",2029 },2030 {2031 name: "Tuberculosis",2032 status: "Eligible",2033 },2034 ],2035 },2036 {2037 name: "Congo (Democratic Republic)",2038 items: [2039 {2040 name: "HIV",2041 status: "Eligible",2042 },2043 {2044 name: "Malaria",2045 status: "Eligible",2046 },2047 {2048 name: "Tuberculosis",2049 status: "Eligible",2050 },2051 ],2052 },2053 {2054 name: "Costa Rica",2055 items: [2056 {2057 name: "HIV",2058 status: "Eligible",2059 },2060 {2061 name: "Malaria",2062 status: "Not Eligible",2063 },2064 {2065 name: "Tuberculosis",2066 status: "Not Eligible",2067 },2068 ],2069 },2070 {2071 name: "Cuba",2072 items: [2073 {2074 name: "HIV",2075 status: "Eligible",2076 },2077 {2078 name: "Malaria",2079 status: "Not Eligible",2080 },2081 {2082 name: "Tuberculosis",2083 status: "Not Eligible",2084 },2085 ],2086 },2087 {2088 name: "Côte d'Ivoire",2089 items: [2090 {2091 name: "HIV",2092 status: "Eligible",2093 },2094 {2095 name: "Malaria",2096 status: "Eligible",2097 },2098 {2099 name: "Tuberculosis",2100 status: "Eligible",2101 },2102 ],2103 },2104 {2105 name: "Djibouti",2106 items: [2107 {2108 name: "HIV",2109 status: "Eligible",2110 },2111 {2112 name: "Malaria",2113 status: "Eligible",2114 },2115 {2116 name: "Tuberculosis",2117 status: "Eligible",2118 },2119 ],2120 },2121 {2122 name: "Dominica",2123 items: [2124 {2125 name: "HIV",2126 status: "Eligible",2127 },2128 {2129 name: "Malaria",2130 status: "Not Eligible",2131 },2132 {2133 name: "Tuberculosis",2134 status: "Eligible",2135 },2136 ],2137 },2138 {2139 name: "Dominican Republic",2140 items: [2141 {2142 name: "HIV",2143 status: "Eligible",2144 },2145 {2146 name: "Malaria",2147 status: "Not Eligible",2148 },2149 {2150 name: "Tuberculosis",2151 status: "Not Eligible",2152 },2153 ],2154 },2155 {2156 name: "Ecuador",2157 items: [2158 {2159 name: "HIV",2160 status: "Eligible",2161 },2162 {2163 name: "Malaria",2164 status: "Eligible",2165 },2166 {2167 name: "Tuberculosis",2168 status: "Not Eligible",2169 },2170 ],2171 },2172 {2173 name: "Egypt",2174 items: [2175 {2176 name: "HIV",2177 status: "Eligible",2178 },2179 {2180 name: "Malaria",2181 status: "Not Eligible",2182 },2183 {2184 name: "Tuberculosis",2185 status: "Eligible",2186 },2187 ],2188 },2189 {2190 name: "El Salvador",2191 items: [2192 {2193 name: "HIV",2194 status: "Eligible",2195 },2196 {2197 name: "Malaria",2198 status: "Eligible",2199 },2200 {2201 name: "Tuberculosis",2202 status: "Eligible",2203 },2204 ],2205 },2206 {2207 name: "Equatorial Guinea",2208 items: [2209 {2210 name: "HIV",2211 status: "Eligible",2212 },2213 {2214 name: "Malaria",2215 status: "Eligible",2216 },2217 {2218 name: "Tuberculosis",2219 status: "Eligible",2220 },2221 ],2222 },2223 {2224 name: "Eritrea",2225 items: [2226 {2227 name: "HIV",2228 status: "Eligible",2229 },2230 {2231 name: "Malaria",2232 status: "Eligible",2233 },2234 {2235 name: "Tuberculosis",2236 status: "Eligible",2237 },2238 ],2239 },2240 {2241 name: "Eswatini",2242 items: [2243 {2244 name: "HIV",2245 status: "Eligible",2246 },2247 {2248 name: "Malaria",2249 status: "Eligible",2250 },2251 {2252 name: "Tuberculosis",2253 status: "Eligible",2254 },2255 ],2256 },2257 {2258 name: "Ethiopia",2259 items: [2260 {2261 name: "HIV",2262 status: "Eligible",2263 },2264 {2265 name: "Malaria",2266 status: "Eligible",2267 },2268 {2269 name: "Tuberculosis",2270 status: "Eligible",2271 },2272 ],2273 },2274 {2275 name: "Fiji",2276 items: [2277 {2278 name: "HIV",2279 status: "Not Eligible",2280 },2281 {2282 name: "Malaria",2283 status: "Not Eligible",2284 },2285 {2286 name: "Tuberculosis",2287 status: "Not Eligible",2288 },2289 ],2290 },2291 {2292 name: "Gabon",2293 items: [2294 {2295 name: "HIV",2296 status: "Eligible",2297 },2298 {2299 name: "Malaria",2300 status: "Eligible",2301 },2302 {2303 name: "Tuberculosis",2304 status: "Eligible",2305 },2306 ],2307 },2308 {2309 name: "Gambia",2310 items: [2311 {2312 name: "HIV",2313 status: "Eligible",2314 },2315 {2316 name: "Malaria",2317 status: "Eligible",2318 },2319 {2320 name: "Tuberculosis",2321 status: "Eligible",2322 },2323 ],2324 },2325 {2326 name: "Georgia",2327 items: [2328 {2329 name: "HIV",2330 status: "Eligible",2331 },2332 {2333 name: "Malaria",2334 status: "Not Eligible",2335 },2336 {2337 name: "Tuberculosis",2338 status: "Eligible",2339 },2340 ],2341 },2342 {2343 name: "Ghana",2344 items: [2345 {2346 name: "HIV",2347 status: "Eligible",2348 },2349 {2350 name: "Malaria",2351 status: "Eligible",2352 },2353 {2354 name: "Tuberculosis",2355 status: "Eligible",2356 },2357 ],2358 },2359 {2360 name: "Grenada",2361 items: [2362 {2363 name: "HIV",2364 status: "Eligible",2365 },2366 {2367 name: "Malaria",2368 status: "Not Eligible",2369 },2370 {2371 name: "Tuberculosis",2372 status: "Eligible",2373 },2374 ],2375 },2376 {2377 name: "Guatemala",2378 items: [2379 {2380 name: "HIV",2381 status: "Eligible",2382 },2383 {2384 name: "Malaria",2385 status: "Transition Funding",2386 },2387 {2388 name: "Tuberculosis",2389 status: "Transition Funding",2390 },2391 ],2392 },2393 {2394 name: "Guinea",2395 items: [2396 {2397 name: "HIV",2398 status: "Eligible",2399 },2400 {2401 name: "Malaria",2402 status: "Eligible",2403 },2404 {2405 name: "Tuberculosis",2406 status: "Eligible",2407 },2408 ],2409 },2410 {2411 name: "Guinea-Bissau",2412 items: [2413 {2414 name: "HIV",2415 status: "Eligible",2416 },2417 {2418 name: "Malaria",2419 status: "Eligible",2420 },2421 {2422 name: "Tuberculosis",2423 status: "Eligible",2424 },2425 ],2426 },2427 {2428 name: "Guyana",2429 items: [2430 {2431 name: "HIV",2432 status: "Eligible",2433 },2434 {2435 name: "Malaria",2436 status: "Transition Funding",2437 },2438 {2439 name: "Tuberculosis",2440 status: "Eligible",2441 },2442 ],2443 },2444 {2445 name: "Haiti",2446 items: [2447 {2448 name: "HIV",2449 status: "Eligible",2450 },2451 {2452 name: "Malaria",2453 status: "Eligible",2454 },2455 {2456 name: "Tuberculosis",2457 status: "Eligible",2458 },2459 ],2460 },2461 {2462 name: "Honduras",2463 items: [2464 {2465 name: "HIV",2466 status: "Eligible",2467 },2468 {2469 name: "Malaria",2470 status: "Eligible",2471 },2472 {2473 name: "Tuberculosis",2474 status: "Eligible",2475 },2476 ],2477 },2478 {2479 name: "India",2480 items: [2481 {2482 name: "HIV",2483 status: "Eligible",2484 },2485 {2486 name: "Malaria",2487 status: "Eligible",2488 },2489 {2490 name: "Tuberculosis",2491 status: "Eligible",2492 },2493 ],2494 },2495 {2496 name: "Indonesia",2497 items: [2498 {2499 name: "HIV",2500 status: "Eligible",2501 },2502 {2503 name: "Malaria",2504 status: "Eligible",2505 },2506 {2507 name: "Tuberculosis",2508 status: "Eligible",2509 },2510 ],2511 },2512 {2513 name: "Iran (Islamic Republic)",2514 items: [2515 {2516 name: "HIV",2517 status: "Eligible",2518 },2519 {2520 name: "Malaria",2521 status: "Not Eligible",2522 },2523 {2524 name: "Tuberculosis",2525 status: "Not Eligible",2526 },2527 ],2528 },2529 {2530 name: "Iraq",2531 items: [2532 {2533 name: "HIV",2534 status: "Not Eligible",2535 },2536 {2537 name: "Malaria",2538 status: "Not Eligible",2539 },2540 {2541 name: "Tuberculosis",2542 status: "Eligible",2543 },2544 ],2545 },2546 {2547 name: "Jamaica",2548 items: [2549 {2550 name: "HIV",2551 status: "Eligible",2552 },2553 {2554 name: "Malaria",2555 status: "Not Eligible",2556 },2557 {2558 name: "Tuberculosis",2559 status: "Not Eligible",2560 },2561 ],2562 },2563 {2564 name: "Jordan",2565 items: [2566 {2567 name: "HIV",2568 status: "Not Eligible",2569 },2570 {2571 name: "Malaria",2572 status: "Not Eligible",2573 },2574 {2575 name: "Tuberculosis",2576 status: "Eligible",2577 },2578 ],2579 },2580 {2581 name: "Kazakhstan",2582 items: [2583 {2584 name: "HIV",2585 status: "Eligible",2586 },2587 {2588 name: "Malaria",2589 status: "Not Eligible",2590 },2591 {2592 name: "Tuberculosis",2593 status: "Eligible",2594 },2595 ],2596 },2597 {2598 name: "Kenya",2599 items: [2600 {2601 name: "HIV",2602 status: "Eligible",2603 },2604 {2605 name: "Malaria",2606 status: "Eligible",2607 },2608 {2609 name: "Tuberculosis",2610 status: "Eligible",2611 },2612 ],2613 },2614 {2615 name: "Kiribati",2616 items: [2617 {2618 name: "HIV",2619 status: "Eligible",2620 },2621 {2622 name: "Malaria",2623 status: "Not Eligible",2624 },2625 {2626 name: "Tuberculosis",2627 status: "Eligible",2628 },2629 ],2630 },2631 {2632 name: "Korea (Democratic Peoples Republic)",2633 items: [2634 {2635 name: "HIV",2636 status: "Eligible",2637 },2638 {2639 name: "Malaria",2640 status: "Eligible",2641 },2642 {2643 name: "Tuberculosis",2644 status: "Eligible",2645 },2646 ],2647 },2648 {2649 name: "Kosovo",2650 items: [2651 {2652 name: "HIV",2653 status: "Transition Funding",2654 },2655 {2656 name: "Malaria",2657 status: "Not Eligible",2658 },2659 {2660 name: "Tuberculosis",2661 status: "Transition Funding",2662 },2663 ],2664 },2665 {2666 name: "Kyrgyzstan",2667 items: [2668 {2669 name: "HIV",2670 status: "Eligible",2671 },2672 {2673 name: "Malaria",2674 status: "Not Eligible",2675 },2676 {2677 name: "Tuberculosis",2678 status: "Eligible",2679 },2680 ],2681 },2682 {2683 name: "Lao (Peoples Democratic Republic)",2684 items: [2685 {2686 name: "HIV",2687 status: "Eligible",2688 },2689 {2690 name: "Malaria",2691 status: "Eligible",2692 },2693 {2694 name: "Tuberculosis",2695 status: "Eligible",2696 },2697 ],2698 },2699 {2700 name: "Lebanon",2701 items: [2702 {2703 name: "HIV",2704 status: "Eligible",2705 },2706 {2707 name: "Malaria",2708 status: "Not Eligible",2709 },2710 {2711 name: "Tuberculosis",2712 status: "Not Eligible",2713 },2714 ],2715 },2716 {2717 name: "Lesotho",2718 items: [2719 {2720 name: "HIV",2721 status: "Eligible",2722 },2723 {2724 name: "Malaria",2725 status: "Not Eligible",2726 },2727 {2728 name: "Tuberculosis",2729 status: "Eligible",2730 },2731 ],2732 },2733 {2734 name: "Liberia",2735 items: [2736 {2737 name: "HIV",2738 status: "Eligible",2739 },2740 {2741 name: "Malaria",2742 status: "Eligible",2743 },2744 {2745 name: "Tuberculosis",2746 status: "Eligible",2747 },2748 ],2749 },2750 {2751 name: "Madagascar",2752 items: [2753 {2754 name: "HIV",2755 status: "Eligible",2756 },2757 {2758 name: "Malaria",2759 status: "Eligible",2760 },2761 {2762 name: "Tuberculosis",2763 status: "Eligible",2764 },2765 ],2766 },2767 {2768 name: "Malawi",2769 items: [2770 {2771 name: "HIV",2772 status: "Eligible",2773 },2774 {2775 name: "Malaria",2776 status: "Eligible",2777 },2778 {2779 name: "Tuberculosis",2780 status: "Eligible",2781 },2782 ],2783 },2784 {2785 name: "Malaysia",2786 items: [2787 {2788 name: "HIV",2789 status: "Eligible",2790 },2791 {2792 name: "Malaria",2793 status: "Not Eligible",2794 },2795 {2796 name: "Tuberculosis",2797 status: "Eligible",2798 },2799 ],2800 },2801 {2802 name: "Maldives",2803 items: [2804 {2805 name: "HIV",2806 status: "Eligible",2807 },2808 {2809 name: "Malaria",2810 status: "Not Eligible",2811 },2812 {2813 name: "Tuberculosis",2814 status: "Eligible",2815 },2816 ],2817 },2818 {2819 name: "Mali",2820 items: [2821 {2822 name: "HIV",2823 status: "Eligible",2824 },2825 {2826 name: "Malaria",2827 status: "Eligible",2828 },2829 {2830 name: "Tuberculosis",2831 status: "Eligible",2832 },2833 ],2834 },2835 {2836 name: "Marshall Islands",2837 items: [2838 {2839 name: "HIV",2840 status: "Eligible",2841 },2842 {2843 name: "Malaria",2844 status: "Not Eligible",2845 },2846 {2847 name: "Tuberculosis",2848 status: "Eligible",2849 },2850 ],2851 },2852 {2853 name: "Mauritania",2854 items: [2855 {2856 name: "HIV",2857 status: "Eligible",2858 },2859 {2860 name: "Malaria",2861 status: "Eligible",2862 },2863 {2864 name: "Tuberculosis",2865 status: "Eligible",2866 },2867 ],2868 },2869 {2870 name: "Mauritius",2871 items: [2872 {2873 name: "HIV",2874 status: "Eligible",2875 },2876 {2877 name: "Malaria",2878 status: "Not Eligible",2879 },2880 {2881 name: "Tuberculosis",2882 status: "Not Eligible",2883 },2884 ],2885 },2886 {2887 name: "Micronesia (Federated States)",2888 items: [2889 {2890 name: "HIV",2891 status: "Eligible",2892 },2893 {2894 name: "Malaria",2895 status: "Not Eligible",2896 },2897 {2898 name: "Tuberculosis",2899 status: "Eligible",2900 },2901 ],2902 },2903 {2904 name: "Moldova",2905 items: [2906 {2907 name: "HIV",2908 status: "Eligible",2909 },2910 {2911 name: "Malaria",2912 status: "Not Eligible",2913 },2914 {2915 name: "Tuberculosis",2916 status: "Eligible",2917 },2918 ],2919 },2920 {2921 name: "Mongolia",2922 items: [2923 {2924 name: "HIV",2925 status: "Eligible",2926 },2927 {2928 name: "Malaria",2929 status: "Not Eligible",2930 },2931 {2932 name: "Tuberculosis",2933 status: "Eligible",2934 },2935 ],2936 },2937 {2938 name: "Montenegro",2939 items: [2940 {2941 name: "HIV",2942 status: "Eligible",2943 },2944 {2945 name: "Malaria",2946 status: "Not Eligible",2947 },2948 {2949 name: "Tuberculosis",2950 status: "Not Eligible",2951 },2952 ],2953 },2954 {2955 name: "Morocco",2956 items: [2957 {2958 name: "HIV",2959 status: "Eligible",2960 },2961 {2962 name: "Malaria",2963 status: "Not Eligible",2964 },2965 {2966 name: "Tuberculosis",2967 status: "Eligible",2968 },2969 ],2970 },2971 {2972 name: "Mozambique",2973 items: [2974 {2975 name: "HIV",2976 status: "Eligible",2977 },2978 {2979 name: "Malaria",2980 status: "Eligible",2981 },2982 {2983 name: "Tuberculosis",2984 status: "Eligible",2985 },2986 ],2987 },2988 {2989 name: "Myanmar",2990 items: [2991 {2992 name: "HIV",2993 status: "Eligible",2994 },2995 {2996 name: "Malaria",2997 status: "Eligible",2998 },2999 {3000 name: "Tuberculosis",3001 status: "Eligible",3002 },3003 ],3004 },3005 {3006 name: "Namibia",3007 items: [3008 {3009 name: "HIV",3010 status: "Eligible",3011 },3012 {3013 name: "Malaria",3014 status: "Eligible",3015 },3016 {3017 name: "Tuberculosis",3018 status: "Eligible",3019 },3020 ],3021 },3022 {3023 name: "Nauru",3024 items: [3025 {3026 name: "HIV",3027 status: "Not Eligible",3028 },3029 {3030 name: "Malaria",3031 status: "Not Eligible",3032 },3033 {3034 name: "Tuberculosis",3035 status: "Eligible",3036 },3037 ],3038 },3039 {3040 name: "Nepal",3041 items: [3042 {3043 name: "HIV",3044 status: "Eligible",3045 },3046 {3047 name: "Malaria",3048 status: "Eligible",3049 },3050 {3051 name: "Tuberculosis",3052 status: "Eligible",3053 },3054 ],3055 },3056 {3057 name: "Nicaragua",3058 items: [3059 {3060 name: "HIV",3061 status: "Eligible",3062 },3063 {3064 name: "Malaria",3065 status: "Eligible",3066 },3067 {3068 name: "Tuberculosis",3069 status: "Eligible",3070 },3071 ],3072 },3073 {3074 name: "Niger",3075 items: [3076 {3077 name: "HIV",3078 status: "Eligible",3079 },3080 {3081 name: "Malaria",3082 status: "Eligible",3083 },3084 {3085 name: "Tuberculosis",3086 status: "Eligible",3087 },3088 ],3089 },3090 {3091 name: "Nigeria",3092 items: [3093 {3094 name: "HIV",3095 status: "Eligible",3096 },3097 {3098 name: "Malaria",3099 status: "Eligible",3100 },3101 {3102 name: "Tuberculosis",3103 status: "Eligible",3104 },3105 ],3106 },3107 {3108 name: "North Macedonia",3109 items: [3110 {3111 name: "HIV",3112 status: "Eligible",3113 },3114 {3115 name: "Malaria",3116 status: "Not Eligible",3117 },3118 {3119 name: "Tuberculosis",3120 status: "Not Eligible",3121 },3122 ],3123 },3124 {3125 name: "Pakistan",3126 items: [3127 {3128 name: "HIV",3129 status: "Eligible",3130 },3131 {3132 name: "Malaria",3133 status: "Eligible",3134 },3135 {3136 name: "Tuberculosis",3137 status: "Eligible",3138 },3139 ],3140 },3141 {3142 name: "Palau",3143 items: [3144 {3145 name: "HIV",3146 status: "Not Eligible",3147 },3148 {3149 name: "Malaria",3150 status: "Not Eligible",3151 },3152 {3153 name: "Tuberculosis",3154 status: "Not Eligible",3155 },3156 ],3157 },3158 {3159 name: "Palestine",3160 items: [3161 {3162 name: "HIV",3163 status: "Eligible",3164 },3165 {3166 name: "Malaria",3167 status: "Not Eligible",3168 },3169 {3170 name: "Tuberculosis",3171 status: "Eligible",3172 },3173 ],3174 },3175 {3176 name: "Panama",3177 items: [3178 {3179 name: "HIV",3180 status: "Not Eligible",3181 },3182 {3183 name: "Malaria",3184 status: "Not Eligible",3185 },3186 {3187 name: "Tuberculosis",3188 status: "Not Eligible",3189 },3190 ],3191 },3192 {3193 name: "Papua New Guinea",3194 items: [3195 {3196 name: "HIV",3197 status: "Eligible",3198 },3199 {3200 name: "Malaria",3201 status: "Eligible",3202 },3203 {3204 name: "Tuberculosis",3205 status: "Eligible",3206 },3207 ],3208 },3209 {3210 name: "Paraguay",3211 items: [3212 {3213 name: "HIV",3214 status: "Eligible",3215 },3216 {3217 name: "Malaria",3218 status: "Not Eligible",3219 },3220 {3221 name: "Tuberculosis",3222 status: "Not Eligible",3223 },3224 ],3225 },3226 {3227 name: "Peru",3228 items: [3229 {3230 name: "HIV",3231 status: "Eligible",3232 },3233 {3234 name: "Malaria",3235 status: "Not Eligible",3236 },3237 {3238 name: "Tuberculosis",3239 status: "Eligible",3240 },3241 ],3242 },3243 {3244 name: "Philippines",3245 items: [3246 {3247 name: "HIV",3248 status: "Eligible",3249 },3250 {3251 name: "Malaria",3252 status: "Eligible",3253 },3254 {3255 name: "Tuberculosis",3256 status: "Eligible",3257 },3258 ],3259 },3260 {3261 name: "Romania",3262 items: [3263 {3264 name: "HIV",3265 status: "Not Eligible",3266 },3267 {3268 name: "Malaria",3269 status: "Not Eligible",3270 },3271 {3272 name: "Tuberculosis",3273 status: "Eligible",3274 },3275 ],3276 },3277 {3278 name: "Russian Federation",3279 items: [3280 {3281 name: "HIV",3282 status: "Eligible",3283 },3284 {3285 name: "Malaria",3286 status: "Not Eligible",3287 },3288 {3289 name: "Tuberculosis",3290 status: "Not Eligible",3291 },3292 ],3293 },3294 {3295 name: "Rwanda",3296 items: [3297 {3298 name: "HIV",3299 status: "Eligible",3300 },3301 {3302 name: "Malaria",3303 status: "Eligible",3304 },3305 {3306 name: "Tuberculosis",3307 status: "Eligible",3308 },3309 ],3310 },3311 {3312 name: "Saint Lucia",3313 items: [3314 {3315 name: "HIV",3316 status: "Eligible",3317 },3318 {3319 name: "Malaria",3320 status: "Not Eligible",3321 },3322 {3323 name: "Tuberculosis",3324 status: "Eligible",3325 },3326 ],3327 },3328 {3329 name: "Saint Vincent and Grenadines",3330 items: [3331 {3332 name: "HIV",3333 status: "Eligible",3334 },3335 {3336 name: "Malaria",3337 status: "Not Eligible",3338 },3339 {3340 name: "Tuberculosis",3341 status: "Eligible",3342 },3343 ],3344 },3345 {3346 name: "Samoa",3347 items: [3348 {3349 name: "HIV",3350 status: "Eligible",3351 },3352 {3353 name: "Malaria",3354 status: "Not Eligible",3355 },3356 {3357 name: "Tuberculosis",3358 status: "Eligible",3359 },3360 ],3361 },3362 {3363 name: "Sao Tome and Principe",3364 items: [3365 {3366 name: "HIV",3367 status: "Eligible",3368 },3369 {3370 name: "Malaria",3371 status: "Eligible",3372 },3373 {3374 name: "Tuberculosis",3375 status: "Eligible",3376 },3377 ],3378 },3379 {3380 name: "Senegal",3381 items: [3382 {3383 name: "HIV",3384 status: "Eligible",3385 },3386 {3387 name: "Malaria",3388 status: "Eligible",3389 },3390 {3391 name: "Tuberculosis",3392 status: "Eligible",3393 },3394 ],3395 },3396 {3397 name: "Serbia",3398 items: [3399 {3400 name: "HIV",3401 status: "Eligible",3402 },3403 {3404 name: "Malaria",3405 status: "Not Eligible",3406 },3407 {3408 name: "Tuberculosis",3409 status: "Not Eligible",3410 },3411 ],3412 },3413 {3414 name: "Sierra Leone",3415 items: [3416 {3417 name: "HIV",3418 status: "Eligible",3419 },3420 {3421 name: "Malaria",3422 status: "Eligible",3423 },3424 {3425 name: "Tuberculosis",3426 status: "Eligible",3427 },3428 ],3429 },3430 {3431 name: "Solomon Islands",3432 items: [3433 {3434 name: "HIV",3435 status: "Eligible",3436 },3437 {3438 name: "Malaria",3439 status: "Eligible",3440 },3441 {3442 name: "Tuberculosis",3443 status: "Eligible",3444 },3445 ],3446 },3447 {3448 name: "Somalia",3449 items: [3450 {3451 name: "HIV",3452 status: "Eligible",3453 },3454 {3455 name: "Malaria",3456 status: "Eligible",3457 },3458 {3459 name: "Tuberculosis",3460 status: "Eligible",3461 },3462 ],3463 },3464 {3465 name: "South Africa",3466 items: [3467 {3468 name: "HIV",3469 status: "Eligible",3470 },3471 {3472 name: "Malaria",3473 status: "Not Eligible",3474 },3475 {3476 name: "Tuberculosis",3477 status: "Eligible",3478 },3479 ],3480 },3481 {3482 name: "South Sudan",3483 items: [3484 {3485 name: "HIV",3486 status: "Eligible",3487 },3488 {3489 name: "Malaria",3490 status: "Eligible",3491 },3492 {3493 name: "Tuberculosis",3494 status: "Eligible",3495 },3496 ],3497 },3498 {3499 name: "Sri Lanka",3500 items: [3501 {3502 name: "HIV",3503 status: "Eligible",3504 },3505 {3506 name: "Malaria",3507 status: "Not Eligible",3508 },3509 {3510 name: "Tuberculosis",3511 status: "Eligible",3512 },3513 ],3514 },3515 {3516 name: "Sudan",3517 items: [3518 {3519 name: "HIV",3520 status: "Eligible",3521 },3522 {3523 name: "Malaria",3524 status: "Eligible",3525 },3526 {3527 name: "Tuberculosis",3528 status: "Eligible",3529 },3530 ],3531 },3532 {3533 name: "Suriname",3534 items: [3535 {3536 name: "HIV",3537 status: "Eligible",3538 },3539 {3540 name: "Malaria",3541 status: "Eligible",3542 },3543 {3544 name: "Tuberculosis",3545 status: "Eligible",3546 },3547 ],3548 },3549 {3550 name: "Syrian Arab Republic",3551 items: [3552 {3553 name: "HIV",3554 status: "Eligible",3555 },3556 {3557 name: "Malaria",3558 status: "Not Eligible",3559 },3560 {3561 name: "Tuberculosis",3562 status: "Eligible",3563 },3564 ],3565 },3566 {3567 name: "Tajikistan",3568 items: [3569 {3570 name: "HIV",3571 status: "Eligible",3572 },3573 {3574 name: "Malaria",3575 status: "Not Eligible",3576 },3577 {3578 name: "Tuberculosis",3579 status: "Eligible",3580 },3581 ],3582 },3583 {3584 name: "Tanzania (United Republic)",3585 items: [3586 {3587 name: "HIV",3588 status: "Eligible",3589 },3590 {3591 name: "Malaria",3592 status: "Eligible",3593 },3594 {3595 name: "Tuberculosis",3596 status: "Eligible",3597 },3598 ],3599 },3600 {3601 name: "Thailand",3602 items: [3603 {3604 name: "HIV",3605 status: "Eligible",3606 },3607 {3608 name: "Malaria",3609 status: "Eligible",3610 },3611 {3612 name: "Tuberculosis",3613 status: "Eligible",3614 },3615 ],3616 },3617 {3618 name: "Timor-Leste",3619 items: [3620 {3621 name: "HIV",3622 status: "Eligible",3623 },3624 {3625 name: "Malaria",3626 status: "Eligible",3627 },3628 {3629 name: "Tuberculosis",3630 status: "Eligible",3631 },3632 ],3633 },3634 {3635 name: "Togo",3636 items: [3637 {3638 name: "HIV",3639 status: "Eligible",3640 },3641 {3642 name: "Malaria",3643 status: "Eligible",3644 },3645 {3646 name: "Tuberculosis",3647 status: "Eligible",3648 },3649 ],3650 },3651 {3652 name: "Tonga",3653 items: [3654 {3655 name: "HIV",3656 status: "Eligible",3657 },3658 {3659 name: "Malaria",3660 status: "Not Eligible",3661 },3662 {3663 name: "Tuberculosis",3664 status: "Eligible",3665 },3666 ],3667 },3668 {3669 name: "Tunisia",3670 items: [3671 {3672 name: "HIV",3673 status: "Eligible",3674 },3675 {3676 name: "Malaria",3677 status: "Not Eligible",3678 },3679 {3680 name: "Tuberculosis",3681 status: "Eligible",3682 },3683 ],3684 },3685 {3686 name: "Turkmenistan",3687 items: [3688 {3689 name: "HIV",3690 status: "Not Eligible",3691 },3692 {3693 name: "Malaria",3694 status: "Not Eligible",3695 },3696 {3697 name: "Tuberculosis",3698 status: "Eligible",3699 },3700 ],3701 },3702 {3703 name: "Tuvalu",3704 items: [3705 {3706 name: "HIV",3707 status: "Eligible",3708 },3709 {3710 name: "Malaria",3711 status: "Not Eligible",3712 },3713 {3714 name: "Tuberculosis",3715 status: "Eligible",3716 },3717 ],3718 },3719 {3720 name: "Uganda",3721 items: [3722 {3723 name: "HIV",3724 status: "Eligible",3725 },3726 {3727 name: "Malaria",3728 status: "Eligible",3729 },3730 {3731 name: "Tuberculosis",3732 status: "Eligible",3733 },3734 ],3735 },3736 {3737 name: "Ukraine",3738 items: [3739 {3740 name: "HIV",3741 status: "Eligible",3742 },3743 {3744 name: "Malaria",3745 status: "Not Eligible",3746 },3747 {3748 name: "Tuberculosis",3749 status: "Eligible",3750 },3751 ],3752 },3753 {3754 name: "Uzbekistan",3755 items: [3756 {3757 name: "HIV",3758 status: "Eligible",3759 },3760 {3761 name: "Malaria",3762 status: "Not Eligible",3763 },3764 {3765 name: "Tuberculosis",3766 status: "Eligible",3767 },3768 ],3769 },3770 {3771 name: "Vanuatu",3772 items: [3773 {3774 name: "HIV",3775 status: "Eligible",3776 },3777 {3778 name: "Malaria",3779 status: "Eligible",3780 },3781 {3782 name: "Tuberculosis",3783 status: "Eligible",3784 },3785 ],3786 },3787 {3788 name: "Venezuela",3789 items: [3790 {3791 name: "HIV",3792 status: "Not Eligible",3793 },3794 {3795 name: "Malaria",3796 status: "Eligible",3797 },3798 {3799 name: "Tuberculosis",3800 status: "Not Eligible",3801 },3802 ],3803 },3804 {3805 name: "Viet Nam",3806 items: [3807 {3808 name: "HIV",3809 status: "Eligible",3810 },3811 {3812 name: "Malaria",3813 status: "Eligible",3814 },3815 {3816 name: "Tuberculosis",3817 status: "Eligible",3818 },3819 ],3820 },3821 {3822 name: "Yemen",3823 items: [3824 {3825 name: "HIV",3826 status: "Eligible",3827 },3828 {3829 name: "Malaria",3830 status: "Eligible",3831 },3832 {3833 name: "Tuberculosis",3834 status: "Eligible",3835 },3836 ],3837 },3838 {3839 name: "Zambia",3840 items: [3841 {3842 name: "HIV",3843 status: "Eligible",3844 },3845 {3846 name: "Malaria",3847 status: "Eligible",3848 },3849 {3850 name: "Tuberculosis",3851 status: "Eligible",3852 },3853 ],3854 },3855 {3856 name: "Zanzibar",3857 items: [3858 {3859 name: "HIV",3860 status: "Eligible",3861 },3862 {3863 name: "Malaria",3864 status: "Eligible",3865 },3866 {3867 name: "Tuberculosis",3868 status: "Eligible",3869 },3870 ],3871 },3872 {3873 name: "Zimbabwe",3874 items: [3875 {3876 name: "HIV",3877 status: "Eligible",3878 },3879 {3880 name: "Malaria",3881 status: "Eligible",3882 },3883 {3884 name: "Tuberculosis",3885 status: "Eligible",3886 },3887 ],3888 },...

Full Screen

Full Screen

my-opportunities.component.ts

Source:my-opportunities.component.ts Github

copy

Full Screen

1import { Component, OnInit } from '@angular/core';2import { ActivatedRoute, Router } from '@angular/router';3import { SpinnerService } from 'src/app/service/spinner/spinner.service';;4import { CompanyRequirementService } from 'src/app/service/company/company-requirement/company-requirement.service';5import { LocalService } from 'src/app/service/storage/local.service';6import { TalentService } from 'src/app/service/talent/talent.service';7@Component({8 selector: 'app-my-opportunities',9 templateUrl: './my-opportunities.component.html',10 styleUrls: ['./my-opportunities.component.css']11})12export class MyOpportunitiesComponent implements OnInit {13 // Company requirement.14 myOppurtunityList: any[]15 // Pagination.16 limit: number17 currentPage: number18 offset: number19 paginationString: string20 totalMyOppurtunities: number21 // Spinner.22 // Flags.23 allJobsSelected: boolean24 appliedSelected: boolean25 eligibleSelected: boolean26 // Eligible talent.27 eligibleTalent: any28 eligibleDegreeIDs: any29 eligibleDesignationIDs: any30 eligibleTechnologyIDs: any31 eligibleExpTechnologyIDs: any32 eligibleModel: any33 constructor(34 private spinnerService: SpinnerService,35 private companyRequirementService: CompanyRequirementService,36 private talentService: TalentService,37 private localService: LocalService,38 private router: Router,39 private route: ActivatedRoute,40 ) {41 this.initializeVariables()42 this.getEligibleTalent()43 }44 get ongoingOperations() {45 return this.spinnerService.ongoingOperations46 }47 ngOnInit(): void { }48 // Initialize global variables.49 initializeVariables(): void {50 // Components.51 this.myOppurtunityList = []52 // Spinner.53 this.spinnerService.loadingMessage = "Getting Opportunities"54 // Pagination.55 this.limit = 856 this.offset = 057 this.currentPage = 058 // Flags59 this.allJobsSelected = false60 this.appliedSelected = false61 this.eligibleSelected = true62 // Eligible talent.63 this.eligibleDegreeIDs = []64 this.eligibleDesignationIDs = []65 this.eligibleTechnologyIDs = []66 this.eligibleExpTechnologyIDs = []67 this.eligibleModel = {}68 }69 // Get my oppurtunities.70 getMyOpportunities(): void {71 this.spinnerService.loadingMessage = "Getting Oppurtunities"72 let queryParams: any = {}73 if (this.allJobsSelected) {74 queryParams.isActive = "1"75 this.routeTo("all-jobs")76 }77 if (this.appliedSelected) {78 queryParams.isActive = "1"79 queryParams.talentID = this.localService.getJsonValue("loginID")80 this.routeTo("applied")81 }82 if (this.eligibleSelected) {83 queryParams = this.eligibleModel84 queryParams.isActive = "1"85 this.routeTo("eligible")86 }87 queryParams.limit = this.limit88 queryParams.offset = this.offset89 console.log(queryParams)90 this.companyRequirementService.getMyOppurtunities(queryParams).subscribe((response) => {91 this.totalMyOppurtunities = response.headers.get('X-Total-Count')92 this.myOppurtunityList = response.body93 this.formatCompanyRequirementsFields()94 }, error => {95 console.error(error)96 if (error.statusText.includes('Unknown')) {97 alert("No connection to server. Check internet.")98 }99 }).add(() => {100 this.setPaginationString()101 })102 }103 routeTo(type: string) {104 this.router.navigate([], {105 relativeTo: this.route,106 queryParams: {107 type: type108 },109 });110 }111 // Get eligible talent.112 getEligibleTalent(): void {113 this.spinnerService.loadingMessage = "Getting Oppurtunities"114 this.talentService.getEligibleTalent(this.localService.getJsonValue("loginID")).subscribe((response) => {115 this.eligibleTalent = response116 this.getEligibleCriteriaFromTalent()117 }, error => {118 console.error(error)119 if (error.statusText.includes('Unknown')) {120 alert("No connection to server. Check internet.")121 }122 }).add(() => {123 this.setPaginationString()124 })125 }126 // Get the eligibility criteria from talent.127 getEligibleCriteriaFromTalent(): void {128 // Get technology IDs.129 if (this.eligibleTalent.technologies && this.eligibleTalent.technologies?.length > 0) {130 for (let i = 0; i < this.eligibleTalent.technologies.length; i++) {131 this.eligibleTechnologyIDs.push(this.eligibleTalent.technologies[i].id)132 }133 }134 // Get degree IDs.135 if (this.eligibleTalent.academics && this.eligibleTalent.academics?.length > 0) {136 for (let i = 0; i < this.eligibleTalent.academics.length; i++) {137 this.eligibleDegreeIDs.push(this.eligibleTalent.academics[i].degree.id)138 }139 }140 // Get designation and experience technology IDs.141 if (this.eligibleTalent.experiences && this.eligibleTalent.experiences.length != 0) {142 for (let i = 0; i < this.eligibleTalent.experiences.length; i++) {143 this.eligibleDesignationIDs.push(this.eligibleTalent.experiences[i].designation.id)144 if (this.eligibleTalent.experiences[i]?.technologies && this.eligibleTalent.experiences[i].technologies?.length > 0) {145 for (let j = 0; j < this.eligibleTalent.experiences[i].technologies.length; j++) {146 if (this.eligibleExpTechnologyIDs.includes(this.eligibleTalent.experiences[i].technologies[j].id)) {147 continue148 }149 this.eligibleExpTechnologyIDs.push(this.eligibleTalent.experiences[i].technologies[j].id)150 }151 }152 }153 }154 // Make the eligibility critera params.155 if (!this.eligibleTalent.isExperience && this.eligibleTechnologyIDs?.length > 0) {156 this.eligibleModel.technologies = this.eligibleTechnologyIDs157 this.eligibleModel.isFresher = "true"158 }159 if (this.eligibleTalent.isExperience && this.eligibleExpTechnologyIDs?.length > 0) {160 this.eligibleModel.technologies = this.eligibleExpTechnologyIDs161 this.eligibleModel.isFresher = "false"162 }163 if (this.eligibleTalent.isExperience && this.eligibleDesignationIDs?.length > 0) {164 this.eligibleModel.designation = this.eligibleDesignationIDs165 this.eligibleModel.isFresher = "false"166 }167 if (this.eligibleDegreeIDs?.length > 0) {168 this.eligibleModel.qualifications = this.eligibleDegreeIDs169 }170 // Call get my oppurtunities based on the criteria.171 this.getMyOpportunities()172 }173 // On clicking all jobs button.174 onAllJobsButtonClick(): void {175 this.allJobsSelected = true176 this.appliedSelected = false177 this.eligibleSelected = false178 this.getMyOpportunities()179 }180 // On clicking applied button.181 onAppliedButtonClick(): void {182 this.allJobsSelected = false183 this.appliedSelected = true184 this.eligibleSelected = false185 this.getMyOpportunities()186 }187 // On clicking eligible button.188 onEligibleButtonClick(): void {189 this.allJobsSelected = false190 this.appliedSelected = false191 this.eligibleSelected = true192 // this.getMyOpportunities()193 this.getEligibleTalent()194 }195 // Format fields of company requirement through interface.196 formatCompanyRequirementsFields(): void {197 for (let requirement of this.myOppurtunityList) {198 // Format package offered in indian rupee system.199 requirement.packageOfferedInstring = this.formatPackageInLPA(requirement['minimumPackage'], requirement['maximumPackage'])200 }201 }202 // Format the package number in terms of LPA.203 formatPackageInLPA(min: number, max: number): string {204 if (!min && !max) {205 return206 }207 let minNumber: number = min / 100000208 let maxNumber: number = max / 100000209 let output: string = minNumber + " - " + maxNumber + " Lpa"210 return output211 }212 // Set total company requirements list on current page.213 setPaginationString() {214 this.paginationString = ''215 let start: number = this.limit * this.offset + 1216 let end: number = +this.limit + this.limit * this.offset217 if (this.totalMyOppurtunities < end) {218 end = this.totalMyOppurtunities219 }220 if (this.totalMyOppurtunities == 0) {221 this.paginationString = ''222 return223 }224 this.paginationString = `${start} - ${end} of ${this.totalMyOppurtunities}`225 }226 // On page change.227 changePage(pageNumber: number): void {228 this.currentPage = pageNumber229 this.offset = this.currentPage - 1230 this.getMyOpportunities()231 }232 // Redirect to company details page.233 redirectToCompanyDetails(companyRequirementID: string): void {234 this.router.navigate(['/my-opportunities/company-details'], {235 queryParams: {236 "companyRequirementID": companyRequirementID,237 "email": this.localService.getJsonValue("email"),238 "talentID": this.localService.getJsonValue("loginID"),239 }240 }).catch(err => {241 console.error(err)242 })243 }...

Full Screen

Full Screen

AccountUtils.ts

Source:AccountUtils.ts Github

copy

Full Screen

1import { Eligible } from "../models/Eligible";2import { EligibleAddress } from "../models/EligibleAddress";3const db = require("../lib/db");4const Web3 = require("web3");5const web3 = new Web3(6 new Web3.providers.WebsocketProvider(process.env.NETWORK_PROVIDER, {7 reconnect: {8 auto: true,9 delay: 5000, // ms10 maxAttempts: 5,11 onTimeout: false,12 },13 })14);15interface CheckResult {16 eligible: boolean;17 balance: number;18}19async function checkAddress(address: string): Promise<CheckResult> {20 const balanceWei = await web3.eth.getBalance(address);21 const balance = parseFloat(web3.utils.fromWei(balanceWei, "ether"));22 const eligible = balance >= 0.01;23 return Promise.resolve({24 eligible,25 balance,26 });27}28const getAccountEligibilty = async (address: string, chainCheck: boolean) => {29 const addressLower = address.toLowerCase();30 const doc = await Eligible.findOne({ address: addressLower });31 if (!doc) {32 const eligibleByAddress = await EligibleAddress.findOne({33 address: addressLower,34 });35 if (!eligibleByAddress) {36 return { eligible: false, claimed: false, discount: false };37 }38 let eligible = eligibleByAddress.eligible;39 if (chainCheck) {40 eligible = (await checkAddress(address)).eligible;41 }42 return {43 // eligible: eligibleByAddress.eligible,44 eligible: eligible || eligibleByAddress.eligible,45 claimed: eligibleByAddress.claimed,46 discount: eligibleByAddress.discount || false,47 };48 }49 // const { eligible } = await checkAddress(address);50 let eligible = doc.eligible;51 if (chainCheck) {52 eligible = (await checkAddress(address)).eligible;53 }54 // 500 pertama whitelist layak mendapatkan diskon55 // diquery menggunakan timestamp user ke 500 (check menggunakan mongo shell)56 const discount = doc.timestamp <= 1647198632021;57 return { eligible: eligible || doc.eligible, claimed: doc.claimed, discount };58};59// async function checkAddress(60// ctx: Context,61// address: string62// ): Promise<CheckResult> {63// const balanceWei = await ctx.web3.eth.getBalance(address);64// const balance = parseFloat(ctx.web3.utils.fromWei(balanceWei, "ether"));65// const eligible = balance >= 0.05;66// return Promise.resolve({67// eligible,68// balance,69// });70// }...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1var pact = require('pact-foundation-pact');2var expect = require('chai').expect;3var request = require('request');4var path = require('path');5var fs = require('fs');6var port = 1234;7var server = pact.createServer({8 log: path.resolve(process.cwd(), 'logs', 'pact.log'),9 dir: path.resolve(process.cwd(), 'pacts'),10});11server.start().then(function() {12 console.log('Pact Mock Service Started');13 server.removeInteractions().then(function() {14 server.addInteraction({15 withRequest: {16 headers: {17 }18 },19 willRespondWith: {20 headers: {21 'Content-Type': 'application/json; charset=utf-8'22 },23 {24 }25 }26 }).then(function() {27 expect(response.statusCode).to.equal(200);28 expect(JSON.parse(body)).to.eql([29 {30 }31 ]);32 server.verify().then(function() {33 server.writePact().then(function() {34 console.log('Pact contract written');35 server.removeInteractions().then(function() {36 console.log('Pact interactions removed');37 server.stop().then(function() {38 console.log('Pact Mock Service Stopped');39 });40 });41 });42 });43 });44 });45 });46});

Full Screen

Using AI Code Generation

copy

Full Screen

1const { Matchers } = require('@pact-foundation/pact/dsl/matchers');2describe('Pact', () => {3 const expectedBody = {4 };5 const interaction = {6 withRequest: {7 headers: {8 },9 },10 willRespondWith: {11 headers: {12 'Content-Type': 'application/json; charset=utf-8',13 },14 body: Matchers.somethingLike(expectedBody),15 },16 };17 describe('test', () => {18 it('test', async () => {19 await provider.addInteraction(interaction);20 const response = await request.get('/test');21 expect(response.status).toEqual(200);22 expect(response.data).toEqual(expectedBody);23 });24 });25});

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run pact-foundation-pact automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful