From 378e8145fe76d1e75196494caadb9db6c37261e2 Mon Sep 17 00:00:00 2001 From: Kailash Nadh Date: Sat, 1 Aug 2020 19:46:47 +0530 Subject: [PATCH] Add campaign search UI. --- campaigns.go | 3 ++- frontend/fontello/config.json | 28 +++++++++++------------ frontend/src/assets/icons/fontello.css | 1 + frontend/src/assets/icons/fontello.woff2 | Bin 6716 -> 6824 bytes frontend/src/views/Campaigns.vue | 14 +++++++++++- frontend/src/views/Lists.vue | 4 +++- frontend/src/views/Subscribers.vue | 9 ++++---- queries.sql | 2 +- 8 files changed, 38 insertions(+), 23 deletions(-) diff --git a/campaigns.go b/campaigns.go index 7c33e89..64c9cf4 100644 --- a/campaigns.go +++ b/campaigns.go @@ -84,7 +84,8 @@ func handleGetCampaigns(c echo.Context) error { single = true } if query != "" { - query = string(regexFullTextQuery.ReplaceAll([]byte(query), []byte("&"))) + query = `%` + + string(regexFullTextQuery.ReplaceAll([]byte(query), []byte("&"))) + `%` } err := app.queries.QueryCampaigns.Select(&out.Results, id, pq.StringArray(status), query, pg.Offset, pg.Limit) diff --git a/frontend/fontello/config.json b/frontend/fontello/config.json index d8d691a..5e8f936 100644 --- a/frontend/fontello/config.json +++ b/frontend/fontello/config.json @@ -496,6 +496,20 @@ "cancel" ] }, + { + "uid": "110ec51ea49a7f0cc9bfbde321f3c28d", + "css": "magnify", + "code": 59427, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M396.5 125Q468.8 125 531.3 161.1T629.9 259.8 666 396.5Q666 496.1 601.6 572.3L613.3 584H646.5L853.5 791 791 853.5 584 646.5V613.3L572.3 601.6Q496.1 666 396.5 666 322.3 666 259.8 629.9T161.1 531.3 125 395.5 161.1 259.8 259.8 161.1 396.5 125ZM396.5 209Q318.4 209 263.7 263.7T209 396.5 263.7 529.3 396.5 584 529.3 529.3 584 396.5 529.3 263.7 396.5 209Z", + "width": 1000 + }, + "search": [ + "magnify" + ] + }, { "uid": "f4ad3f6d071a0bfb3a8452b514ed0892", "css": "vector-square", @@ -12200,20 +12214,6 @@ "magnet-on" ] }, - { - "uid": "110ec51ea49a7f0cc9bfbde321f3c28d", - "css": "magnify", - "code": 59416, - "src": "custom_icons", - "selected": false, - "svg": { - "path": "M396.5 125Q468.8 125 531.3 161.1T629.9 259.8 666 396.5Q666 496.1 601.6 572.3L613.3 584H646.5L853.5 791 791 853.5 584 646.5V613.3L572.3 601.6Q496.1 666 396.5 666 322.3 666 259.8 629.9T161.1 531.3 125 395.5 161.1 259.8 259.8 161.1 396.5 125ZM396.5 209Q318.4 209 263.7 263.7T209 396.5 263.7 529.3 396.5 584 529.3 529.3 584 396.5 529.3 263.7 396.5 209Z", - "width": 1000 - }, - "search": [ - "magnify" - ] - }, { "uid": "cd529f71c055cf2da4843aafc1d70c8d", "css": "magnify-minus", diff --git a/frontend/src/assets/icons/fontello.css b/frontend/src/assets/icons/fontello.css index 10bf8e7..3d6cf7e 100644 --- a/frontend/src/assets/icons/fontello.css +++ b/frontend/src/assets/icons/fontello.css @@ -75,3 +75,4 @@ .mdi-arrow-up:before { content: '\e820'; } /* '' */ .mdi-arrow-down:before { content: '\e821'; } /* '' */ .mdi-cancel:before { content: '\e822'; } /* '' */ +.mdi-magnify:before { content: '\e823'; } /* '' */ diff --git a/frontend/src/assets/icons/fontello.woff2 b/frontend/src/assets/icons/fontello.woff2 index e6a4f8689b939877c5c3708ed4eb494d55b437f8..fb07f159c7e45eed1e3aa1c73df3ccd21304c4e4 100644 GIT binary patch literal 6824 zcmV;Z8dv3aPew8T0RR9102-(O4*&oF05g~X02)sK0RR9100000000000000000000 z0000SR0dW6hFS<936^jX2nx3pu{jG&00A}vBm;pI1Rw>4O$UWC41oq4XD=6&T|1<} zc_6g^9JMl{T9iaoZ6?b8|NoYt#$jJv2{t3Gu+_VCS*4sSRr*d{aJo~=O42L07Pw4X z-!@_>inC?eXXU>!S68%GV0(X0oL-K8#~#{`DnAtiPz)c2;eiL!W#~iyi?x=u&l%i- zogOoGpu=~TBQ*9&?!C)zG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>UJEmS>EW&ULz!veVU8~ECR^QXS<&=Xn3G^k<-QkfZT#u!qT)PQO0$U*gB6gX_4vP;_J<;v05mrl3eDpH diff --git a/frontend/src/views/Campaigns.vue b/frontend/src/views/Campaigns.vue index c568a45..8b99a7b 100644 --- a/frontend/src/views/Campaigns.vue +++ b/frontend/src/views/Campaigns.vue @@ -3,7 +3,7 @@

Campaigns - ({{ campaigns.total }}) + ({{ campaigns.total }})

@@ -12,6 +12,16 @@
+
+ + + + +
+
-

Lists ({{ lists.total }})

+

Lists + ({{ lists.total }}) +

New diff --git a/frontend/src/views/Subscribers.vue b/frontend/src/views/Subscribers.vue index 3698609..2fb515d 100644 --- a/frontend/src/views/Subscribers.vue +++ b/frontend/src/views/Subscribers.vue @@ -3,8 +3,7 @@

Subscribers - ({{ subscribers.total }}) - + ({{ subscribers.total }}) » {{ currentList.name }} @@ -21,9 +20,9 @@
- @@ -51,7 +50,7 @@
Query + icon-left="magnify">Query Reset
diff --git a/queries.sql b/queries.sql index 04ab602..62ef264 100644 --- a/queries.sql +++ b/queries.sql @@ -380,7 +380,7 @@ SELECT COUNT(*) OVER () AS total, campaigns.*, ( FROM campaigns WHERE ($1 = 0 OR id = $1) AND status=ANY(CASE WHEN ARRAY_LENGTH($2::campaign_status[], 1) != 0 THEN $2::campaign_status[] ELSE ARRAY[status] END) - AND ($3 = '' OR (to_tsvector(name || subject) @@ to_tsquery($3))) + AND ($3 = '' OR CONCAT(name, subject) ILIKE $3) ORDER BY campaigns.updated_at DESC OFFSET $4 LIMIT $5; -- name: get-campaign