Skip to content

Commit

Permalink
fix: added view more button to compound details page and other minor …
Browse files Browse the repository at this point in the history
…improvements
  • Loading branch information
CS76 committed Jun 3, 2024
1 parent f6d2402 commit 18eddbe
Show file tree
Hide file tree
Showing 4 changed files with 296 additions and 198 deletions.
20 changes: 10 additions & 10 deletions app/Livewire/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,20 +287,20 @@ public function render()
SELECT id, COUNT(*) OVER ()
FROM molecules
WHERE
(\"name\"::TEXT ILIKE '%" . $this->query . "%')
OR (\"synonyms\"::TEXT ILIKE '%" . $this->query . "%')
OR (\"identifier\"::TEXT ILIKE '%" . $this->query . "%')
(\"name\"::TEXT ILIKE '%".$this->query."%')
OR (\"synonyms\"::TEXT ILIKE '%".$this->query."%')
OR (\"identifier\"::TEXT ILIKE '%".$this->query."%')
ORDER BY
CASE
WHEN \"name\"::TEXT ILIKE '" . $this->query . "' THEN 1
WHEN \"synonyms\"::TEXT ILIKE '" . $this->query . "' THEN 2
WHEN \"identifier\"::TEXT ILIKE '" . $this->query . "' THEN 3
WHEN \"name\"::TEXT ILIKE '%" . $this->query . "%' THEN 4
WHEN \"synonyms\"::TEXT ILIKE '%" . $this->query . "%' THEN 5
WHEN \"identifier\"::TEXT ILIKE '%" . $this->query . "%' THEN 6
WHEN \"name\"::TEXT ILIKE '".$this->query."' THEN 1
WHEN \"synonyms\"::TEXT ILIKE '".$this->query."' THEN 2
WHEN \"identifier\"::TEXT ILIKE '".$this->query."' THEN 3
WHEN \"name\"::TEXT ILIKE '%".$this->query."%' THEN 4
WHEN \"synonyms\"::TEXT ILIKE '%".$this->query."%' THEN 5
WHEN \"identifier\"::TEXT ILIKE '%".$this->query."%' THEN 6
ELSE 7
END
LIMIT " . $this->size . " OFFSET " . $offset;
LIMIT ".$this->size.' OFFSET '.$offset;

} else {
$statement =
Expand Down
2 changes: 1 addition & 1 deletion resources/views/livewire/collection-list.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div>
<div class="mt-24">
<div class="mx-auto max-w-7xl px-4 py-8 sm:px-6 lg:px-8">
<h1 class="text-3xl font-bold tracking-tight text-gray-900">Browse collections</h1>
<h1 class="text-3xl font-bold tracking-tight text-primary-dark">Browse collections</h1>
<p class="mt-4 max-w-xl text-sm text-gray-700">Explore our database of natural products to uncover their
unique properties. Search, filter, and discover the diverse realm of chemistry.
</p>
Expand Down
Loading

0 comments on commit 18eddbe

Please sign in to comment.