Update Report Livechat

This commit is contained in:
2023-09-09 10:36:01 +07:00
parent ab194600c2
commit cff5dba314
5 changed files with 81 additions and 33 deletions

View File

@@ -4,6 +4,7 @@ namespace Modules\Internal\Transformers;
use Carbon\Carbon;
use Illuminate\Http\Resources\Json\JsonResource;
use App\Helpers\Helper;
class LivechatResource extends JsonResource
{
@@ -26,7 +27,8 @@ class LivechatResource extends JsonResource
'date_appointment' => Carbon::parse($this->appointment->appointmentDetail->dTanggalAppointment)->format('d-m-Y')
. ' ' . $this->appointment->appointmentDetail->tTimeAppointment ?? null,
'status_appointment' => $this->appointment->paymentStatus ?? null,
'date_created' => Carbon::parse($this->appointment->dCreateOn)->format('d-m-Y H:i:s') ?? null,
'date_created' => Carbon::parse($this->dRequestTime)->format('d-m-Y') ?? null,
'time_request' => Carbon::parse($this->dRequestTime)->format('H:i:s') ?? null,
'patient_media' => $this->sMedia ?? null,
'doctor_media' => $this->sMediaDokter ?? null,
'appointment_media' => $this->appointment->sMedia ?? null,
@@ -53,7 +55,7 @@ class LivechatResource extends JsonResource
$payment_detail = [
'payment_type' => $this->appointment->appointmentDetail->sPaymentDetails['payment_type'],
'transaction_time' => $this->appointment->appointmentDetail->sPaymentDetails['transaction_time'],
'gross_amount' => $this->appointment->appointmentDetail->sPaymentDetails['gross_amount'],
'gross_amount' => Helper::formatRupiah($this->appointment->appointmentDetail->sPaymentDetails['gross_amount']),
'currency' => $this->appointment->appointmentDetail->sPaymentDetails['currency'],
'status_message' => $this->appointment->appointmentDetail->sPaymentDetails['status_message'],
];