diff --git a/hasura/migrations/1603135634854_run_sql_migration/down.yaml b/hasura/migrations/1603135634854_run_sql_migration/down.yaml
new file mode 100644
index 0000000..fe51488
--- /dev/null
+++ b/hasura/migrations/1603135634854_run_sql_migration/down.yaml
@@ -0,0 +1 @@
+[]
diff --git a/hasura/migrations/1603135634854_run_sql_migration/up.yaml b/hasura/migrations/1603135634854_run_sql_migration/up.yaml
new file mode 100644
index 0000000..af0ec8e
--- /dev/null
+++ b/hasura/migrations/1603135634854_run_sql_migration/up.yaml
@@ -0,0 +1,16 @@
+- args:
+ cascade: true
+ read_only: false
+ sql: "CREATE OR REPLACE FUNCTION public.search_jobs(search text)\r\n RETURNS SETOF
+ jobs\r\n LANGUAGE plpgsql\r\n STABLE\r\nAS $function$ BEGIN if search = '' then
+ return query\r\nselect *\r\nfrom jobs j;\r\nelse return query\r\nSELECT *\r\nFROM
+ jobs j2\r\nWHERE ownr_fn ILIKE '%' || search || '%'\r\n or ownr_ln ILIKE
+ '%' || search || '%'\r\n \r\n or clm_no ILIKE '%' || search || '%'\r\n\r\nORDER
+ BY \r\n clm_no ILIKE '%' || search || '%'\r\n OR null,\r\n ownr_fn
+ ILIKE '%' || search || '%'\r\n OR NULL,\r\n ownr_ln ILIKE '%' || search
+ || '%'\r\n OR NULL;\r\nend if;\r\nEND $function$;"
+ type: run_sql
+- args:
+ name: search_jobs
+ schema: public
+ type: track_function
diff --git a/hasura/migrations/1603135748604_run_sql_migration/down.yaml b/hasura/migrations/1603135748604_run_sql_migration/down.yaml
new file mode 100644
index 0000000..fe51488
--- /dev/null
+++ b/hasura/migrations/1603135748604_run_sql_migration/down.yaml
@@ -0,0 +1 @@
+[]
diff --git a/hasura/migrations/1603135748604_run_sql_migration/up.yaml b/hasura/migrations/1603135748604_run_sql_migration/up.yaml
new file mode 100644
index 0000000..fad1f40
--- /dev/null
+++ b/hasura/migrations/1603135748604_run_sql_migration/up.yaml
@@ -0,0 +1,5 @@
+- args:
+ cascade: true
+ read_only: false
+ sql: drop FUNCTION public.search_jobs;
+ type: run_sql
diff --git a/hasura/migrations/1603135755518_run_sql_migration/down.yaml b/hasura/migrations/1603135755518_run_sql_migration/down.yaml
new file mode 100644
index 0000000..fe51488
--- /dev/null
+++ b/hasura/migrations/1603135755518_run_sql_migration/down.yaml
@@ -0,0 +1 @@
+[]
diff --git a/hasura/migrations/1603135755518_run_sql_migration/up.yaml b/hasura/migrations/1603135755518_run_sql_migration/up.yaml
new file mode 100644
index 0000000..982c2bb
--- /dev/null
+++ b/hasura/migrations/1603135755518_run_sql_migration/up.yaml
@@ -0,0 +1,16 @@
+- args:
+ cascade: true
+ read_only: false
+ sql: "CREATE OR REPLACE FUNCTION public.search_jobs(search text, startDate date,
+ endDate date)\n RETURNS SETOF jobs\n LANGUAGE plpgsql\n STABLE\nAS $function$
+ BEGIN if search = '' then return query\nselect *\nfrom jobs j;\nelse return
+ query\nSELECT *\nFROM jobs j2\nWHERE ownr_fn ILIKE '%' || search || '%'\n or
+ ownr_ln ILIKE '%' || search || '%'\n \n or clm_no ILIKE '%' || search ||
+ '%'\n\nORDER BY \n clm_no ILIKE '%' || search || '%'\n OR null,\n ownr_fn
+ ILIKE '%' || search || '%'\n OR NULL,\n ownr_ln ILIKE '%' || search ||
+ '%'\n OR NULL;\nend if;\nEND $function$;"
+ type: run_sql
+- args:
+ name: search_jobs
+ schema: public
+ type: track_function
diff --git a/hasura/migrations/1603135821609_run_sql_migration/down.yaml b/hasura/migrations/1603135821609_run_sql_migration/down.yaml
new file mode 100644
index 0000000..fe51488
--- /dev/null
+++ b/hasura/migrations/1603135821609_run_sql_migration/down.yaml
@@ -0,0 +1 @@
+[]
diff --git a/hasura/migrations/1603135821609_run_sql_migration/up.yaml b/hasura/migrations/1603135821609_run_sql_migration/up.yaml
new file mode 100644
index 0000000..c8c41d5
--- /dev/null
+++ b/hasura/migrations/1603135821609_run_sql_migration/up.yaml
@@ -0,0 +1,13 @@
+- args:
+ cascade: true
+ read_only: false
+ sql: "CREATE OR REPLACE FUNCTION public.search_jobs(search text, startDate date,
+ endDate date)\n RETURNS SETOF jobs\n LANGUAGE plpgsql\n STABLE\nAS $function$
+ BEGIN if search = '' then return query\nselect *\nfrom jobs j;\nelse return
+ query\nSELECT *\nFROM jobs j2\nWHERE \nclose_date between startDate and endDate
+ \ and\n(\nownr_fn ILIKE '%' || search || '%'\n or ownr_ln ILIKE '%' || search
+ || '%'\n \n or clm_no ILIKE '%' || search || '%')\n\nORDER BY \n clm_no
+ ILIKE '%' || search || '%'\n OR null,\n ownr_fn ILIKE '%' || search ||
+ '%'\n OR NULL,\n ownr_ln ILIKE '%' || search || '%'\n OR NULL;\nend
+ if;\nEND $function$;"
+ type: run_sql
diff --git a/hasura/migrations/1603135880002_run_sql_migration/down.yaml b/hasura/migrations/1603135880002_run_sql_migration/down.yaml
new file mode 100644
index 0000000..fe51488
--- /dev/null
+++ b/hasura/migrations/1603135880002_run_sql_migration/down.yaml
@@ -0,0 +1 @@
+[]
diff --git a/hasura/migrations/1603135880002_run_sql_migration/up.yaml b/hasura/migrations/1603135880002_run_sql_migration/up.yaml
new file mode 100644
index 0000000..5c88108
--- /dev/null
+++ b/hasura/migrations/1603135880002_run_sql_migration/up.yaml
@@ -0,0 +1,18 @@
+- args:
+ cascade: true
+ read_only: false
+ sql: "CREATE OR REPLACE FUNCTION public.search_jobs(search text, startDate date,
+ endDate date)\n RETURNS SETOF jobs\n LANGUAGE plpgsql\n STABLE\nAS $function$
+ BEGIN if search = '' then return query\nselect *\nfrom jobs j;\nelse\n\nif startDate
+ is null || endDate is null then \nreturn query\nSELECT *\nFROM jobs j2\nWHERE
+ \n\nownr_fn ILIKE '%' || search || '%'\n or ownr_ln ILIKE '%' || search ||
+ '%'\n \n or clm_no ILIKE '%' || search || '%'\nORDER BY \n clm_no ILIKE
+ '%' || search || '%'\n OR null,\n ownr_fn ILIKE '%' || search || '%'\n
+ \ OR NULL,\n ownr_ln ILIKE '%' || search || '%'\n OR NULL;\nelse \nreturn
+ query\nSELECT *\nFROM jobs j2\nWHERE \nclose_date between startDate and endDate
+ \ and\n(\nownr_fn ILIKE '%' || search || '%'\n or ownr_ln ILIKE '%' || search
+ || '%'\n \n or clm_no ILIKE '%' || search || '%')\n\nORDER BY \n clm_no
+ ILIKE '%' || search || '%'\n OR null,\n ownr_fn ILIKE '%' || search ||
+ '%'\n OR NULL,\n ownr_ln ILIKE '%' || search || '%'\n OR NULL;\n\nend
+ if;\n\n\nend if;\nEND $function$;"
+ type: run_sql
diff --git a/hasura/migrations/1603135999901_run_sql_migration/down.yaml b/hasura/migrations/1603135999901_run_sql_migration/down.yaml
new file mode 100644
index 0000000..fe51488
--- /dev/null
+++ b/hasura/migrations/1603135999901_run_sql_migration/down.yaml
@@ -0,0 +1 @@
+[]
diff --git a/hasura/migrations/1603135999901_run_sql_migration/up.yaml b/hasura/migrations/1603135999901_run_sql_migration/up.yaml
new file mode 100644
index 0000000..a00240f
--- /dev/null
+++ b/hasura/migrations/1603135999901_run_sql_migration/up.yaml
@@ -0,0 +1,18 @@
+- args:
+ cascade: true
+ read_only: false
+ sql: "CREATE OR REPLACE FUNCTION public.search_jobs(search text, startdate date,
+ enddate date)\n RETURNS SETOF jobs\n LANGUAGE plpgsql\n STABLE\nAS $function$
+ BEGIN if search = '' then return query\nselect *\nfrom jobs j;\nelse\n\nif (startDate
+ is null) || (endDate is null) then \nreturn query\nSELECT *\nFROM jobs j2\nWHERE
+ \n\nownr_fn ILIKE '%' || search || '%'\n or ownr_ln ILIKE '%' || search ||
+ '%'\n \n or clm_no ILIKE '%' || search || '%'\nORDER BY \n clm_no ILIKE
+ '%' || search || '%'\n OR null,\n ownr_fn ILIKE '%' || search || '%'\n
+ \ OR NULL,\n ownr_ln ILIKE '%' || search || '%'\n OR NULL;\nelse \nreturn
+ query\nSELECT *\nFROM jobs j2\nWHERE \nclose_date between startDate and endDate
+ \ and\n(\nownr_fn ILIKE '%' || search || '%'\n or ownr_ln ILIKE '%' || search
+ || '%'\n \n or clm_no ILIKE '%' || search || '%')\n\nORDER BY \n clm_no
+ ILIKE '%' || search || '%'\n OR null,\n ownr_fn ILIKE '%' || search ||
+ '%'\n OR NULL,\n ownr_ln ILIKE '%' || search || '%'\n OR NULL;\n\nend
+ if;\n\n\nend if;\nEND $function$;"
+ type: run_sql
diff --git a/hasura/migrations/1603136020110_run_sql_migration/down.yaml b/hasura/migrations/1603136020110_run_sql_migration/down.yaml
new file mode 100644
index 0000000..fe51488
--- /dev/null
+++ b/hasura/migrations/1603136020110_run_sql_migration/down.yaml
@@ -0,0 +1 @@
+[]
diff --git a/hasura/migrations/1603136020110_run_sql_migration/up.yaml b/hasura/migrations/1603136020110_run_sql_migration/up.yaml
new file mode 100644
index 0000000..9fd5cec
--- /dev/null
+++ b/hasura/migrations/1603136020110_run_sql_migration/up.yaml
@@ -0,0 +1,18 @@
+- args:
+ cascade: true
+ read_only: false
+ sql: "CREATE OR REPLACE FUNCTION public.search_jobs(search text, startdate date,
+ enddate date)\n RETURNS SETOF jobs\n LANGUAGE plpgsql\n STABLE\nAS $function$
+ BEGIN if search = '' then return query\nselect *\nfrom jobs j;\nelse\n\nif (startDate
+ is null) or (endDate is null) then \nreturn query\nSELECT *\nFROM jobs j2\nWHERE
+ \n\nownr_fn ILIKE '%' || search || '%'\n or ownr_ln ILIKE '%' || search ||
+ '%'\n \n or clm_no ILIKE '%' || search || '%'\nORDER BY \n clm_no ILIKE
+ '%' || search || '%'\n OR null,\n ownr_fn ILIKE '%' || search || '%'\n
+ \ OR NULL,\n ownr_ln ILIKE '%' || search || '%'\n OR NULL;\nelse \nreturn
+ query\nSELECT *\nFROM jobs j2\nWHERE \nclose_date between startDate and endDate
+ \ and\n(\nownr_fn ILIKE '%' || search || '%'\n or ownr_ln ILIKE '%' || search
+ || '%'\n \n or clm_no ILIKE '%' || search || '%')\n\nORDER BY \n clm_no
+ ILIKE '%' || search || '%'\n OR null,\n ownr_fn ILIKE '%' || search ||
+ '%'\n OR NULL,\n ownr_ln ILIKE '%' || search || '%'\n OR NULL;\n\nend
+ if;\n\n\nend if;\nEND $function$;"
+ type: run_sql
diff --git a/hasura/migrations/metadata.yaml b/hasura/migrations/metadata.yaml
index 3bf57a9..2942282 100644
--- a/hasura/migrations/metadata.yaml
+++ b/hasura/migrations/metadata.yaml
@@ -329,3 +329,7 @@ tables:
- type
- group
filter: {}
+functions:
+- function:
+ schema: public
+ name: search_jobs
diff --git a/src/App/App.styles.scss b/src/App/App.styles.scss
index 54576c3..7a09eba 100644
--- a/src/App/App.styles.scss
+++ b/src/App/App.styles.scss
@@ -50,6 +50,17 @@ body {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
background-color: #188fff;
}
+.jobs-list-container {
+ height: 100%;
+}
+
+.jobs-list-infinite-container {
+ overflow-y: auto;
+ overflow-x: hidden;
+ height: 100%;
+}
+
+
//Required for the tab with infinite loading
.ant-tabs-content {
diff --git a/src/components/atoms/jobs-parts-graph/jobs-parts-graph.atom.jsx b/src/components/atoms/jobs-parts-graph/jobs-parts-graph.atom.jsx
index 869f211..358d889 100644
--- a/src/components/atoms/jobs-parts-graph/jobs-parts-graph.atom.jsx
+++ b/src/components/atoms/jobs-parts-graph/jobs-parts-graph.atom.jsx
@@ -1,8 +1,8 @@
import { Skeleton, Typography } from "antd";
+import Dinero from "dinero.js";
import React, { useMemo } from "react";
import { Cell, Pie, PieChart, ResponsiveContainer } from "recharts";
import ErrorResultAtom from "../error-result/error-result.atom";
-import Dinero from "dinero.js";
import partTypeConverterAtom from "../part-type-converter/part-type-converter.atom";
export default function JobPartsGraphAtom({
job,
@@ -36,7 +36,7 @@ export default function JobPartsGraphAtom({
if (loading) return