IO-1256 Payments on job missing field & edit from list.

This commit is contained in:
Patrick Fic
2021-07-13 11:09:15 -07:00
parent 34422dfef7
commit 33e2201524
2 changed files with 27 additions and 10 deletions

View File

@@ -1,4 +1,5 @@
import { Button, Card, Space, Table } from "antd";
import { EditFilled } from "@ant-design/icons";
import Dinero from "dinero.js";
import React, { useMemo, useState } from "react";
import { useTranslation } from "react-i18next";
@@ -115,16 +116,29 @@ export function JobPayments({
dataIndex: "actions",
key: "actions",
render: (text, record) => (
<PrintWrapperComponent
templateObject={{
name: TemplateList("payment").payment_receipt.key,
variables: { id: record.id },
}}
messageObject={{
to: job.ownr_ea,
}}
id={job.id}
/>
<Space wrap>
<Button
disabled={record.exportedat}
onClick={() => {
setPaymentContext({
actions: { refetch: refetch },
context: record,
});
}}
>
<EditFilled />
</Button>
<PrintWrapperComponent
templateObject={{
name: TemplateList("payment").payment_receipt.key,
variables: { id: record.id },
}}
messageObject={{
to: job.ownr_ea,
}}
id={job.id}
/>
</Space>
),
},
];

View File

@@ -559,6 +559,7 @@ export const GET_JOB_BY_PK = gql`
}
payments {
id
jobid
amount
payer
created_at
@@ -566,6 +567,8 @@ export const GET_JOB_BY_PK = gql`
transactionid
memo
date
type
exportedat
}
cccontracts {
id