Merged in release/2023-05-05 (pull request #758)

IO-2261 All Jobs, Bills, Payments
This commit is contained in:
Patrick Fic
2023-05-05 14:49:55 +00:00
4 changed files with 16 additions and 10 deletions

View File

@@ -230,6 +230,7 @@ export function JobsList({ bodyshop, refetch, loading, jobs, total }) {
<Button
onClick={() => {
delete search.search;
delete search.page;
history.push({ search: queryString.stringify(search) });
}}
>
@@ -257,9 +258,11 @@ export function JobsList({ bodyshop, refetch, loading, jobs, total }) {
loading={loading || searchLoading}
pagination={
search?.search
? { pageSize: 25 }
? {
pageSize: 25,
showSizeChanger: false,
}
: {
position: "top",
pageSize: 25,
current: parseInt(page || 1),
total: total,

View File

@@ -218,6 +218,7 @@ export function PaymentsListPaginated({
<Button
onClick={() => {
delete search.search;
delete search.page;
history.push({ search: queryString.stringify(search) });
}}
>
@@ -254,9 +255,11 @@ export function PaymentsListPaginated({
scroll={{ x: true }}
pagination={
search?.search
? { pageSize: 25 }
? {
pageSize: 25,
showSizeChanger: false,
}
: {
position: "top",
pageSize: 25,
current: parseInt(page || 1),
total: total,

View File

@@ -241,6 +241,7 @@ export function BillsListPage({
<Button
onClick={() => {
delete search.search;
delete search.page;
history.push({ search: queryString.stringify(search) });
}}
>
@@ -285,9 +286,11 @@ export function BillsListPage({
scroll={{ x: true }}
pagination={
search?.search
? { pageSize: 25 }
? {
pageSize: 25,
showSizeChanger: false,
}
: {
position: "top",
pageSize: 25,
current: parseInt(page || 1),
total: total,

View File

@@ -130,7 +130,6 @@ async function OpenSearchUpdateHandler(req, res) {
`,
{ billId: req.body.event.data.new.id }
);
document = {
..._.pick(req.body.event.data.new, [
"id",
@@ -142,7 +141,6 @@ async function OpenSearchUpdateHandler(req, res) {
...bill.bills_by_pk,
bodyshopid: bill.bills_by_pk.job.shopid,
};
break;
case "payments":
//Query to get the job and RO number
@@ -183,11 +181,10 @@ async function OpenSearchUpdateHandler(req, res) {
"type",
]),
...payment.payments_by_pk,
bodyshopid: bill.payments_by_pk.job.shopid,
bodyshopid: payment.payments_by_pk.job.shopid,
};
break;
}
const payload = {
id: req.body.event.data.new.id,
index: req.body.table.name,