Skip to content

Commit

Permalink
feat(log payment): use now() for payment data when logging single pay…
Browse files Browse the repository at this point in the history
…ment

ref Greenstand#345
  • Loading branch information
Mloweedgar committed Feb 8, 2022
1 parent 17a5de2 commit 1518002
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ function LogPaymentForm(props) {

const handleOnFormSubmit = () => {
const { id, worker_id, amount, currency } = selectedItem;
const paid_at = new Date();
earningsAPI
.patchEarning({ id, worker_id, amount, currency, ...payload })
.patchEarning({ id, worker_id, amount, currency, paid_at, ...payload })
.then(() => refreshData())
.catch((e) => console.log('error logging payment', e));
closeForm();
Expand Down

0 comments on commit 1518002

Please sign in to comment.