Spaces:
Sleeping
Sleeping
Commit
·
1a1c017
1
Parent(s):
ac7c562
backend/main.py
CHANGED
@@ -151,6 +151,8 @@ def get_filters(request: Request):
|
|
151 |
"legalBases": normalize(df["legalBasis"].to_list()),
|
152 |
"organizations": normalize(df["list_name"].explode().to_list()),
|
153 |
"countries": normalize(df["list_country"].explode().to_list()),
|
|
|
|
|
154 |
}
|
155 |
|
156 |
|
|
|
151 |
"legalBases": normalize(df["legalBasis"].to_list()),
|
152 |
"organizations": normalize(df["list_name"].explode().to_list()),
|
153 |
"countries": normalize(df["list_country"].explode().to_list()),
|
154 |
+
"fundingSchemes": normalize(df["fundingScheme"].explode().to_list()),
|
155 |
+
"ids": normalize(df["id"].to_list()),
|
156 |
}
|
157 |
|
158 |
|
frontend/src/components/ProjectExplorer.tsx
CHANGED
@@ -95,64 +95,66 @@ const ProjectExplorer: React.FC<ProjectExplorerProps> = ({
|
|
95 |
{/* Left Pane: Projects & Filters */}
|
96 |
<Box w={{ base: "100%", md: "70%" }} p={4}>
|
97 |
<Flex gap={4} mb={4} flexWrap="wrap">
|
98 |
-
{/* Title search */}
|
99 |
<Input
|
100 |
placeholder="Search by title..."
|
101 |
value={search}
|
102 |
onChange={(e) => { setSearch(e.target.value); setPage(0); }}
|
103 |
-
|
104 |
/>
|
105 |
-
<
|
106 |
-
placeholder="
|
107 |
value={idFilter}
|
108 |
onChange={(e) => { setIdFilter(e.target.value); setPage(0); }}
|
109 |
-
w="100px"
|
110 |
isDisabled={loadingFilters}
|
111 |
-
|
112 |
-
|
113 |
-
|
|
|
114 |
<ChakraSelect
|
115 |
-
placeholder={loadingFilters ? "Loading
|
116 |
value={statusFilter}
|
117 |
onChange={(e) => { setStatusFilter(e.target.value); setPage(0); }}
|
118 |
isDisabled={loadingFilters}
|
119 |
-
|
120 |
>
|
121 |
{filterOpts.statuses.map((s) => <option key={s} value={s}>{s}</option>)}
|
122 |
</ChakraSelect>
|
123 |
-
|
124 |
-
|
125 |
-
<Input
|
126 |
-
placeholder="Search Legal Basis…"
|
127 |
value={legalFilter}
|
128 |
onChange={(e) => { setLegalFilter(e.target.value); setPage(0); }}
|
129 |
-
w="150px"
|
130 |
isDisabled={loadingFilters}
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
|
|
|
|
135 |
value={orgFilter}
|
136 |
onChange={(e) => { setOrgFilter(e.target.value); setPage(0); }}
|
137 |
-
w="150px"
|
138 |
isDisabled={loadingFilters}
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
|
|
|
|
143 |
value={countryFilter}
|
144 |
onChange={(e) => { setCountryFilter(e.target.value); setPage(0); }}
|
145 |
-
w="120px"
|
146 |
isDisabled={loadingFilters}
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
|
|
|
|
151 |
value={fundingSchemeFilter}
|
152 |
onChange={(e) => { setFundingSchemeFilter(e.target.value); setPage(0); }}
|
153 |
-
w="150px"
|
154 |
isDisabled={loadingFilters}
|
155 |
-
|
|
|
|
|
|
|
156 |
</Flex>
|
157 |
|
158 |
<Box
|
|
|
95 |
{/* Left Pane: Projects & Filters */}
|
96 |
<Box w={{ base: "100%", md: "70%" }} p={4}>
|
97 |
<Flex gap={4} mb={4} flexWrap="wrap">
|
|
|
98 |
<Input
|
99 |
placeholder="Search by title..."
|
100 |
value={search}
|
101 |
onChange={(e) => { setSearch(e.target.value); setPage(0); }}
|
102 |
+
width={{ base: "100%", md: "200px" }}
|
103 |
/>
|
104 |
+
<ChakraSelect
|
105 |
+
placeholder={loadingFilters ? "Loading..." : "ID"}
|
106 |
value={idFilter}
|
107 |
onChange={(e) => { setIdFilter(e.target.value); setPage(0); }}
|
|
|
108 |
isDisabled={loadingFilters}
|
109 |
+
width="100px"
|
110 |
+
>
|
111 |
+
{filterOpts.fundingSchemes.map((c) => <option key={c} value={c}>{c}</option>)}
|
112 |
+
</ChakraSelect>
|
113 |
<ChakraSelect
|
114 |
+
placeholder={loadingFilters ? "Loading..." : "Status"}
|
115 |
value={statusFilter}
|
116 |
onChange={(e) => { setStatusFilter(e.target.value); setPage(0); }}
|
117 |
isDisabled={loadingFilters}
|
118 |
+
width="120px"
|
119 |
>
|
120 |
{filterOpts.statuses.map((s) => <option key={s} value={s}>{s}</option>)}
|
121 |
</ChakraSelect>
|
122 |
+
<ChakraSelect
|
123 |
+
placeholder={loadingFilters ? "Loading..." : "Legal Basis"}
|
|
|
|
|
124 |
value={legalFilter}
|
125 |
onChange={(e) => { setLegalFilter(e.target.value); setPage(0); }}
|
|
|
126 |
isDisabled={loadingFilters}
|
127 |
+
width="150px"
|
128 |
+
>
|
129 |
+
{filterOpts.legalBases.map((lb) => <option key={lb} value={lb}>{lb}</option>)}
|
130 |
+
</ChakraSelect>
|
131 |
+
<ChakraSelect
|
132 |
+
placeholder={loadingFilters ? "Loading..." : "Organization"}
|
133 |
value={orgFilter}
|
134 |
onChange={(e) => { setOrgFilter(e.target.value); setPage(0); }}
|
|
|
135 |
isDisabled={loadingFilters}
|
136 |
+
width="150px"
|
137 |
+
>
|
138 |
+
{filterOpts.organizations.map((o) => <option key={o} value={o}>{o}</option>)}
|
139 |
+
</ChakraSelect>
|
140 |
+
<ChakraSelect
|
141 |
+
placeholder={loadingFilters ? "Loading..." : "Country"}
|
142 |
value={countryFilter}
|
143 |
onChange={(e) => { setCountryFilter(e.target.value); setPage(0); }}
|
|
|
144 |
isDisabled={loadingFilters}
|
145 |
+
width="120px"
|
146 |
+
>
|
147 |
+
{filterOpts.countries.map((c) => <option key={c} value={c}>{c}</option>)}
|
148 |
+
</ChakraSelect>
|
149 |
+
<ChakraSelect
|
150 |
+
placeholder={loadingFilters ? "Loading..." : "Funding Scheme"}
|
151 |
value={fundingSchemeFilter}
|
152 |
onChange={(e) => { setFundingSchemeFilter(e.target.value); setPage(0); }}
|
|
|
153 |
isDisabled={loadingFilters}
|
154 |
+
width="120px"
|
155 |
+
>
|
156 |
+
{filterOpts.fundingSchemes.map((c) => <option key={c} value={c}>{c}</option>)}
|
157 |
+
</ChakraSelect>
|
158 |
</Flex>
|
159 |
|
160 |
<Box
|
frontend/src/hooks/useAppState.ts
CHANGED
@@ -68,7 +68,9 @@ export const useAppState = () => {
|
|
68 |
statuses: ["SIGNED", "CLOSED", "TERMINATED", "UNKNOWN"],
|
69 |
organizations: data.organizations,
|
70 |
countries: data.countries,
|
71 |
-
legalBases: data.legalBases
|
|
|
|
|
72 |
});
|
73 |
});
|
74 |
};
|
|
|
68 |
statuses: ["SIGNED", "CLOSED", "TERMINATED", "UNKNOWN"],
|
69 |
organizations: data.organizations,
|
70 |
countries: data.countries,
|
71 |
+
legalBases: data.legalBases,
|
72 |
+
fundingSchemes: data.fundingSchemes,
|
73 |
+
ids: data.ids
|
74 |
});
|
75 |
});
|
76 |
};
|