Skip to content

Commit

Permalink
Merge pull request #68 from richard483/fix-1
Browse files Browse the repository at this point in the history
fix bug & template
  • Loading branch information
richard483 authored Jan 22, 2024
2 parents f986cd2 + cf0bb45 commit 5e94947
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 31 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "backend-8tech",
"version": "4.1.9",
"version": "4.2.0",
"description": "",
"author": "8tech",
"private": true,
Expand Down
30 changes: 5 additions & 25 deletions src/contract/assets/template1.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,32 +65,17 @@ <h3>Nomor: {{id}}</h3>
<br>
<p>PEKERJA akan melakukan pekerjaan <b>{{title}}</b> dengan ketentuan sebagai berikut:</p>
<table>
<tr>
<td>Waktu Kerja</td>
<td>:</td>
<td>{{contract.work_time}}</td>
</tr>
<tr>
<td>Upah</td>
<td>:</td>
<td>{{contract.salary}}</td>
</tr>
<tr>
<td>Periode Pembayaran</td>
<td>:</td>
<td>{{contract.payment_method}}</td>
</tr>
<tr>
<td>Periode Kontrak</td>
<td>:</td>
<td>{{contract.periode}}</td>
<td>{{paymentRate}}</td>
</tr>
</table>
<p>Demikian surat perjanjian ini dibuat dan ditandatangani oleh kedua belah pihak pada tanggal
{{contract.createdAt}}.</p>
<div class="signature">
<p>{{contract.worker.name}}</p>
<p>{{contract.company.name}}</p>
<p>{{userId}}</p>
<p>{{companyId}}</p>
</div>
<br>
<br>
Expand All @@ -106,14 +91,9 @@ <h3>Nomor: {{id}}</h3>
<td>{{description}}</td>
</tr>
<tr>
<td>Custom Field 1</td>
<td>:</td>
<td>{{customField1}}</td>
</tr>
<tr>
<td>Custom Field 2</td>
<td>Details</td>
<td>:</td>
<td>{{customField2}}</td>
<td>{{details}}</td>
</tr>
</table>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/contract/contract.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export class ContractService {
await this.paymentService.createPayoutLink(
{
amount: contract.paymentRate,
email: contract.User.email,
email: contract.user.email,
},
contractId,
contract.paymentId,
Expand Down
7 changes: 5 additions & 2 deletions src/payment/payment.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,11 @@ export class PaymentService {
},
)
.catch((err: any) => {
console.log('#createPayoutLink error caused by: ', err);
throw new HttpException({ payment: err }, HttpStatus.BAD_REQUEST);
console.log('#createPayoutLink error caused by: ', err.response.data);
throw new HttpException(
{ payment: err.response.data },
HttpStatus.BAD_REQUEST,
);
});

if (paymentId) {
Expand Down

0 comments on commit 5e94947

Please sign in to comment.