IO-1256 Payments on job missing field & edit from list.
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import { Button, Card, Space, Table } from "antd";
|
import { Button, Card, Space, Table } from "antd";
|
||||||
|
import { EditFilled } from "@ant-design/icons";
|
||||||
import Dinero from "dinero.js";
|
import Dinero from "dinero.js";
|
||||||
import React, { useMemo, useState } from "react";
|
import React, { useMemo, useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
@@ -115,16 +116,29 @@ export function JobPayments({
|
|||||||
dataIndex: "actions",
|
dataIndex: "actions",
|
||||||
key: "actions",
|
key: "actions",
|
||||||
render: (text, record) => (
|
render: (text, record) => (
|
||||||
<PrintWrapperComponent
|
<Space wrap>
|
||||||
templateObject={{
|
<Button
|
||||||
name: TemplateList("payment").payment_receipt.key,
|
disabled={record.exportedat}
|
||||||
variables: { id: record.id },
|
onClick={() => {
|
||||||
}}
|
setPaymentContext({
|
||||||
messageObject={{
|
actions: { refetch: refetch },
|
||||||
to: job.ownr_ea,
|
context: record,
|
||||||
}}
|
});
|
||||||
id={job.id}
|
}}
|
||||||
/>
|
>
|
||||||
|
<EditFilled />
|
||||||
|
</Button>
|
||||||
|
<PrintWrapperComponent
|
||||||
|
templateObject={{
|
||||||
|
name: TemplateList("payment").payment_receipt.key,
|
||||||
|
variables: { id: record.id },
|
||||||
|
}}
|
||||||
|
messageObject={{
|
||||||
|
to: job.ownr_ea,
|
||||||
|
}}
|
||||||
|
id={job.id}
|
||||||
|
/>
|
||||||
|
</Space>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -559,6 +559,7 @@ export const GET_JOB_BY_PK = gql`
|
|||||||
}
|
}
|
||||||
payments {
|
payments {
|
||||||
id
|
id
|
||||||
|
jobid
|
||||||
amount
|
amount
|
||||||
payer
|
payer
|
||||||
created_at
|
created_at
|
||||||
@@ -566,6 +567,8 @@ export const GET_JOB_BY_PK = gql`
|
|||||||
transactionid
|
transactionid
|
||||||
memo
|
memo
|
||||||
date
|
date
|
||||||
|
type
|
||||||
|
exportedat
|
||||||
}
|
}
|
||||||
cccontracts {
|
cccontracts {
|
||||||
id
|
id
|
||||||
|
|||||||
Reference in New Issue
Block a user