Compare commits

...

2 Commits

Author SHA1 Message Date
Philipp Lang fc368bcd1a improve search performance in contribution member search
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is passing Details
2023-10-31 11:01:22 +01:00
Philipp Lang 972b1845ed ignore debugbar dir 2023-10-31 10:39:07 +01:00
3 changed files with 16 additions and 7 deletions

1
.gitignore vendored
View File

@ -14,6 +14,7 @@ Homestead.json
.vagrant/
.phpunit.result.cache
/storage/temp/
/storage/debugbar/
# User data files
/data/

View File

@ -119,6 +119,10 @@ class MemberResource extends JsonResource
*/
public static function meta(): array
{
if (request()->header('X-Meta') === 'false') {
return [];
}
if (request()->header('X-Inertia-Partial-Data', '') !== '' && !str_contains(request()->header('X-Inertia-Partial-Data', ''), 'meta')) {
return [];
}

View File

@ -66,13 +66,17 @@ export default {
this.search.s = event;
debounce(async () => {
var response = await this.axios.post('/api/member/search', {
var response = await this.axios.post(
'/api/member/search',
{
filter: {
search: event,
hasBirthday: true,
hasFullAddress: true,
},
});
},
{ headers: { 'X-Meta': 'false' } }
);
this.search.results = response.data.data;
}, 300)();