Rom89823974978 commited on
Commit
056d113
·
1 Parent(s): f4673b6
frontend/src/components/ProjectDetails.tsx CHANGED
@@ -196,8 +196,7 @@ export default function ProjectDetails({
196
  <Table size="sm" variant="simple" mb={6}>
197
  <Thead><Tr>
198
  <Th whiteSpace="nowrap">Name</Th>
199
- <Th whiteSpace="nowrap">City</Th>
200
- <Th whiteSpace="nowrap">Country</Th>
201
  <Th whiteSpace="nowrap">SME</Th>
202
  <Th whiteSpace="nowrap">Role</Th>
203
  <Th isNumeric whiteSpace="nowrap">Contribution (€)</Th>
 
196
  <Table size="sm" variant="simple" mb={6}>
197
  <Thead><Tr>
198
  <Th whiteSpace="nowrap">Name</Th>
199
+ <Th whiteSpace="nowrap">Location</Th>
 
200
  <Th whiteSpace="nowrap">SME</Th>
201
  <Th whiteSpace="nowrap">Role</Th>
202
  <Th isNumeric whiteSpace="nowrap">Contribution (€)</Th>
frontend/src/components/ProjectExplorer.tsx CHANGED
@@ -19,6 +19,7 @@ import {
19
  Avatar,
20
  } from "@chakra-ui/react";
21
  import type { ProjectExplorerProps, Project, ChatMessage } from "../hooks/types";
 
22
 
23
  interface FilterOptions {
24
  statuses: string[];
@@ -95,66 +96,64 @@ const ProjectExplorer: React.FC<ProjectExplorerProps> = ({
95
  <Box w={{ base: "100%", md: "70%" }} p={4}>
96
  <Heading size="sm" mb={2}>Projects</Heading>
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..." : "Status"}
106
  value={statusFilter}
107
  onChange={(e) => { setStatusFilter(e.target.value); setPage(0); }}
108
  isDisabled={loadingFilters}
109
- width="120px"
110
  >
111
  {filterOpts.statuses.map((s) => <option key={s} value={s}>{s}</option>)}
112
  </ChakraSelect>
113
- <ChakraSelect
114
- placeholder={loadingFilters ? "Loading..." : "Legal Basis"}
 
 
115
  value={legalFilter}
116
  onChange={(e) => { setLegalFilter(e.target.value); setPage(0); }}
 
117
  isDisabled={loadingFilters}
118
- width="150px"
119
- >
120
- {filterOpts.legalBases.map((lb) => <option key={lb} value={lb}>{lb}</option>)}
121
- </ChakraSelect>
122
- <ChakraSelect
123
- placeholder={loadingFilters ? "Loading..." : "Organization"}
124
  value={orgFilter}
125
  onChange={(e) => { setOrgFilter(e.target.value); setPage(0); }}
 
126
  isDisabled={loadingFilters}
127
- width="150px"
128
- >
129
- {filterOpts.organizations.map((o) => <option key={o} value={o}>{o}</option>)}
130
- </ChakraSelect>
131
- <ChakraSelect
132
- placeholder={loadingFilters ? "Loading..." : "Country"}
133
  value={countryFilter}
134
  onChange={(e) => { setCountryFilter(e.target.value); setPage(0); }}
 
135
  isDisabled={loadingFilters}
136
- width="120px"
137
- >
138
- {filterOpts.countries.map((c) => <option key={c} value={c}>{c}</option>)}
139
- </ChakraSelect>
140
- <ChakraSelect
141
- placeholder={loadingFilters ? "Loading..." : "Funding Scheme"}
142
- value={countryFilter}
143
  onChange={(e) => { setFundingSchemeFilter(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..." : "ID"}
151
- value={countryFilter}
152
- onChange={(e) => { setIdFilter(e.target.value); setPage(0); }}
153
- isDisabled={loadingFilters}
154
- width="100px"
155
- >
156
- {filterOpts.countries.map((c) => <option key={c} value={c}>{c}</option>)}
157
- </ChakraSelect>
158
  </Flex>
159
 
160
  <Box
 
19
  Avatar,
20
  } from "@chakra-ui/react";
21
  import type { ProjectExplorerProps, Project, ChatMessage } from "../hooks/types";
22
+ import { i } from "framer-motion/client";
23
 
24
  interface FilterOptions {
25
  statuses: string[];
 
96
  <Box w={{ base: "100%", md: "70%" }} p={4}>
97
  <Heading size="sm" mb={2}>Projects</Heading>
98
  <Flex gap={4} mb={4} flexWrap="wrap">
99
+ {/* Title search */}
100
  <Input
101
  placeholder="Search by title..."
102
  value={search}
103
  onChange={(e) => { setSearch(e.target.value); setPage(0); }}
104
+ w={{ base: "100%", md: "200px" }}
105
  />
106
+ <Input
107
+ placeholder="Search ID…"
108
+ value={idFilter}
109
+ onChange={(e) => { setIdFilter(e.target.value); setPage(0); }}
110
+ w="100px"
111
+ isDisabled={loadingFilters}
112
+ />
113
+
114
+ {/* Status dropdown remains */}
115
  <ChakraSelect
116
+ placeholder={loadingFilters ? "Loading" : "Status"}
117
  value={statusFilter}
118
  onChange={(e) => { setStatusFilter(e.target.value); setPage(0); }}
119
  isDisabled={loadingFilters}
120
+ w="120px"
121
  >
122
  {filterOpts.statuses.map((s) => <option key={s} value={s}>{s}</option>)}
123
  </ChakraSelect>
124
+
125
+ {/* Free-text filters */}
126
+ <Input
127
+ placeholder="Search Legal Basis…"
128
  value={legalFilter}
129
  onChange={(e) => { setLegalFilter(e.target.value); setPage(0); }}
130
+ w="150px"
131
  isDisabled={loadingFilters}
132
+ />
133
+
134
+ <Input
135
+ placeholder="Search Organization…"
 
 
136
  value={orgFilter}
137
  onChange={(e) => { setOrgFilter(e.target.value); setPage(0); }}
138
+ w="150px"
139
  isDisabled={loadingFilters}
140
+ />
141
+
142
+ <Input
143
+ placeholder="Search Country…"
 
 
144
  value={countryFilter}
145
  onChange={(e) => { setCountryFilter(e.target.value); setPage(0); }}
146
+ w="120px"
147
  isDisabled={loadingFilters}
148
+ />
149
+
150
+ <Input
151
+ placeholder="Search Funding Scheme…"
152
+ value={fundingSchemeFilter}
 
 
153
  onChange={(e) => { setFundingSchemeFilter(e.target.value); setPage(0); }}
154
+ w="150px"
155
  isDisabled={loadingFilters}
156
+ />
 
 
 
 
 
 
 
 
 
 
 
 
157
  </Flex>
158
 
159
  <Box