Merged in feature/IO-2261-opensearch-replacements (pull request #757)
IO-2261 All Jobs, Bills, Payments Approved-by: Patrick Fic
This commit is contained in:
@@ -230,6 +230,7 @@ export function JobsList({ bodyshop, refetch, loading, jobs, total }) {
|
|||||||
<Button
|
<Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
delete search.search;
|
delete search.search;
|
||||||
|
delete search.page;
|
||||||
history.push({ search: queryString.stringify(search) });
|
history.push({ search: queryString.stringify(search) });
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -257,9 +258,11 @@ export function JobsList({ bodyshop, refetch, loading, jobs, total }) {
|
|||||||
loading={loading || searchLoading}
|
loading={loading || searchLoading}
|
||||||
pagination={
|
pagination={
|
||||||
search?.search
|
search?.search
|
||||||
? { pageSize: 25 }
|
? {
|
||||||
|
pageSize: 25,
|
||||||
|
showSizeChanger: false,
|
||||||
|
}
|
||||||
: {
|
: {
|
||||||
position: "top",
|
|
||||||
pageSize: 25,
|
pageSize: 25,
|
||||||
current: parseInt(page || 1),
|
current: parseInt(page || 1),
|
||||||
total: total,
|
total: total,
|
||||||
|
|||||||
@@ -218,6 +218,7 @@ export function PaymentsListPaginated({
|
|||||||
<Button
|
<Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
delete search.search;
|
delete search.search;
|
||||||
|
delete search.page;
|
||||||
history.push({ search: queryString.stringify(search) });
|
history.push({ search: queryString.stringify(search) });
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -254,9 +255,11 @@ export function PaymentsListPaginated({
|
|||||||
scroll={{ x: true }}
|
scroll={{ x: true }}
|
||||||
pagination={
|
pagination={
|
||||||
search?.search
|
search?.search
|
||||||
? { pageSize: 25 }
|
? {
|
||||||
|
pageSize: 25,
|
||||||
|
showSizeChanger: false,
|
||||||
|
}
|
||||||
: {
|
: {
|
||||||
position: "top",
|
|
||||||
pageSize: 25,
|
pageSize: 25,
|
||||||
current: parseInt(page || 1),
|
current: parseInt(page || 1),
|
||||||
total: total,
|
total: total,
|
||||||
|
|||||||
@@ -241,6 +241,7 @@ export function BillsListPage({
|
|||||||
<Button
|
<Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
delete search.search;
|
delete search.search;
|
||||||
|
delete search.page;
|
||||||
history.push({ search: queryString.stringify(search) });
|
history.push({ search: queryString.stringify(search) });
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -285,9 +286,11 @@ export function BillsListPage({
|
|||||||
scroll={{ x: true }}
|
scroll={{ x: true }}
|
||||||
pagination={
|
pagination={
|
||||||
search?.search
|
search?.search
|
||||||
? { pageSize: 25 }
|
? {
|
||||||
|
pageSize: 25,
|
||||||
|
showSizeChanger: false,
|
||||||
|
}
|
||||||
: {
|
: {
|
||||||
position: "top",
|
|
||||||
pageSize: 25,
|
pageSize: 25,
|
||||||
current: parseInt(page || 1),
|
current: parseInt(page || 1),
|
||||||
total: total,
|
total: total,
|
||||||
|
|||||||
@@ -130,7 +130,6 @@ async function OpenSearchUpdateHandler(req, res) {
|
|||||||
`,
|
`,
|
||||||
{ billId: req.body.event.data.new.id }
|
{ billId: req.body.event.data.new.id }
|
||||||
);
|
);
|
||||||
|
|
||||||
document = {
|
document = {
|
||||||
..._.pick(req.body.event.data.new, [
|
..._.pick(req.body.event.data.new, [
|
||||||
"id",
|
"id",
|
||||||
@@ -142,7 +141,6 @@ async function OpenSearchUpdateHandler(req, res) {
|
|||||||
...bill.bills_by_pk,
|
...bill.bills_by_pk,
|
||||||
bodyshopid: bill.bills_by_pk.job.shopid,
|
bodyshopid: bill.bills_by_pk.job.shopid,
|
||||||
};
|
};
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case "payments":
|
case "payments":
|
||||||
//Query to get the job and RO number
|
//Query to get the job and RO number
|
||||||
@@ -183,11 +181,10 @@ async function OpenSearchUpdateHandler(req, res) {
|
|||||||
"type",
|
"type",
|
||||||
]),
|
]),
|
||||||
...payment.payments_by_pk,
|
...payment.payments_by_pk,
|
||||||
bodyshopid: bill.payments_by_pk.job.shopid,
|
bodyshopid: payment.payments_by_pk.job.shopid,
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
const payload = {
|
const payload = {
|
||||||
id: req.body.event.data.new.id,
|
id: req.body.event.data.new.id,
|
||||||
index: req.body.table.name,
|
index: req.body.table.name,
|
||||||
|
|||||||
Reference in New Issue
Block a user