fix email pendaftaran

parent fc09251b
...@@ -266,7 +266,7 @@ public function updatePembayaran(Request $request, $va) ...@@ -266,7 +266,7 @@ public function updatePembayaran(Request $request, $va)
'tanggal_bayar' => Carbon::now() 'tanggal_bayar' => Carbon::now()
]); ]);
//SendMail::dispatch($data, 'email.invoice', $data['registrasi']->email, 'registrasi', 'email_regis_sent_at'); //SendMail::dispatch($data, 'email.selesai_pembayaran', $data['registrasi']->email, 'registrasi', 'email_pembayaran_sent_at');
return response([ return response([
'status' => 200, 'status' => 200,
......
...@@ -22,18 +22,20 @@ class SendMail implements ShouldQueue ...@@ -22,18 +22,20 @@ class SendMail implements ShouldQueue
private $view; private $view;
private $table; private $table;
private $field; private $field;
private $subject;
/** /**
* Create a new job instance. * Create a new job instance.
* *
* @return void * @return void
*/ */
public function __construct($data, $view, $email, $table = null, $field = null) public function __construct($data, $view, $email, $table = null, $field = null, $subject = 'Pendaftaran KONASPI UNESA 2024')
{ {
$this->data = $data; $this->data = $data;
$this->view = $view; $this->view = $view;
$this->email = $email; $this->email = $email;
$this->table = $table; $this->table = $table;
$this->field = $field; $this->field = $field;
$this->subject = $subject;
} }
/** /**
...@@ -50,7 +52,7 @@ public function handle() ...@@ -50,7 +52,7 @@ public function handle()
Mail::send($this->view, $this->data, function ($message) use ($email){ Mail::send($this->view, $this->data, function ($message) use ($email){
$message->from('konaspi2024@unesa.ac.id', 'Universitas Negeri Surabaya'); $message->from('konaspi2024@unesa.ac.id', 'Universitas Negeri Surabaya');
$message->sender('konaspi2024@unesa.ac.id', 'Universitas Negeri Surabaya'); $message->sender('konaspi2024@unesa.ac.id', 'Universitas Negeri Surabaya');
$message->subject('Pendaftaran KONASPI UNESA 2024'); $message->subject($this->subject);
$message->to($email, $email); $message->to($email, $email);
} }
); );
......
...@@ -2,21 +2,12 @@ ...@@ -2,21 +2,12 @@
@section('title','Invoice') @section('title','Invoice')
@section('content') @section('content')
<section class="section"> <section class="section">
<div class="section-header">
<h1>Invoice</h1>
<div class="section-header-breadcrumb">
<div class="breadcrumb-item"><a href="/">Dashboard</a></div>
<div class="breadcrumb-item"><a href="">Data Registrasi</a></div>
<div class="breadcrumb-item active">Invoice</div>
</div>
</div>
<form novalidate="" method="POST" action="{{ route('user.store') ?? 'param' }}" enctype="multipart/form-data">
@csrf
<div class="section-body"> <div class="section-body">
<div class="invoice"> <div class="invoice">
<div class="invoice-print"> <div class="invoice-print">
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<p class="section-lead" style="font-size: 12pt">Terimakasih telah mendaftar KONASPI XI 2024. Berikut ini kami berikan detail terkait pembayaran kegiatan.</p>
<div class="invoice-title"> <div class="invoice-title">
<h2>Invoice</h2> <h2>Invoice</h2>
<div class="invoice-number">No. Transaksi #{{$registrasi['kode_registrasi'] ?? 'param' }}</div> <div class="invoice-number">No. Transaksi #{{$registrasi['kode_registrasi'] ?? 'param' }}</div>
...@@ -58,8 +49,7 @@ ...@@ -58,8 +49,7 @@
<div class="row mt-4"> <div class="row mt-4">
<div class="col-md-12" style="font-size: 12pt"> <div class="col-md-12" style="font-size: 12pt">
<div class="section-title">Rincian</div> <p class="section-lead">Rincian (registrasi sudah tidak bisa diubah)</p>
<p class="section-lead">Rincian registrasi sudah tidak bisa diubah</p>
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-striped table-hover table-md"> <table class="table table-striped table-hover table-md">
<tr> <tr>
...@@ -71,7 +61,7 @@ ...@@ -71,7 +61,7 @@
</tr> </tr>
@php @php
$no = 2; $no = 2;
$initialharga = $konaspi->harga ?? 0; $initialharga = $konaspi['harga'] ?? 0;
$subtotal = $initialharga; $subtotal = $initialharga;
$i = 0; $i = 0;
@endphp @endphp
...@@ -80,9 +70,9 @@ ...@@ -80,9 +70,9 @@
<td> <td>
Convention Convention
</td> </td>
<td class="text-center">Rp {{$konaspi->harga ?? 'param' }}</td> <td class="text-center">Rp {{$konaspi['harga']??'param'}}</td>
<td class="text-center">1</td> <td class="text-center">1</td>
<td class="text-right">Rp {{$konaspi->harga ?? 'param' }}</td> <td class="text-right">Rp {{$konaspi['harga']??'param'}}</td>
</tr> </tr>
@if (isset($hargaKonferensi)) @if (isset($hargaKonferensi))
@foreach ($hargaKonferensi as $kon) @foreach ($hargaKonferensi as $kon)
...@@ -90,13 +80,13 @@ ...@@ -90,13 +80,13 @@
$subtotal = $subtotal + $kon['hargakon']; $subtotal = $subtotal + $kon['hargakon'];
@endphp @endphp
<tr> <tr>
<td>{{$no ?? 'param' }}</td> <td>{{$no}}</td>
<td> <td>
{{$kon['namakeg'] ?? 'param' }} <br> Konferensi : <b> {{$kon['namakon'] ?? 'param' }} </b> {{$kon['namakeg']}} <br> Konferensi : <b> {{$kon['namakon']??'param'}} </b>
</td> </td>
<td class="text-center">Rp {{$kon['hargakon'] ?? 'param' }}</td> <td class="text-center">Rp {{$kon['hargakon']??'param'}}</td>
<td class="text-center">1</td> <td class="text-center">1</td>
<td class="text-right">Rp {{$kon['hargakon'] ?? 'param' }}</td> <td class="text-right">Rp {{$kon['hargakon']??'param'}}</td>
</tr> </tr>
@php @php
$i++; $i++;
...@@ -108,8 +98,7 @@ ...@@ -108,8 +98,7 @@
</div> </div>
<div class="row mt-4"> <div class="row mt-4">
<div class="col-lg-8"> <div class="col-lg-8">
<div class="section-title">Metode Pembayaran</div> <p class="section-lead" style="font-size: 12pt">Setelah pembayaran Anda berhasil dilakukan, Anda akan menerima notifikasi pembayaran melalui email. Untuk informasi lebih lanjut mengenai prosedur pembayaran, silakan kunjungi tautan berikut <a href="https://pmb.unesa.ac.id/vabtn.pdf">ini</a></p>
<p class="section-lead" style="font-size: 12pt">Setelah menekan tombol bayar, maka data akan tersimpan dan lakukan pembayaran tagihan menggunakan <b>Nomor Virtual Account</b> yang tertera pada <b>Invoice</b> ini</p>
{{-- <div class="d-flex"> {{-- <div class="d-flex">
<div class="mr-2 bg-visa" data-width="61" data-height="38"></div> <div class="mr-2 bg-visa" data-width="61" data-height="38"></div>
<div class="mr-2 bg-jcb" data-width="61" data-height="38"></div> <div class="mr-2 bg-jcb" data-width="61" data-height="38"></div>
...@@ -120,12 +109,12 @@ ...@@ -120,12 +109,12 @@
<div class="col-lg-4 text-right"> <div class="col-lg-4 text-right">
<div class="invoice-detail-item"> <div class="invoice-detail-item">
<div class="invoice-detail-name">Subtotal</div> <div class="invoice-detail-name">Subtotal</div>
<div class="invoice-detail-value">Rp {{$subtotal ?? 'param' }}</div> <div class="invoice-detail-value">Rp {{$subtotal}}</div>
</div> </div>
<hr class="mt-2 mb-2"> <hr class="mt-2 mb-2">
<div class="invoice-detail-item"> <div class="invoice-detail-item">
<div class="invoice-detail-name">Total</div> <div class="invoice-detail-name">Total</div>
<div class="invoice-detail-value invoice-detail-value-lg">Rp {{$subtotal ?? 'param' }}</div> <div class="invoice-detail-value invoice-detail-value-lg">Rp {{$subtotal}}</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -146,12 +135,9 @@ ...@@ -146,12 +135,9 @@
<input type="hidden" id="konaspi" name="konaspi" value="{{ json_encode($konaspi) ?? 'param' }}"> <input type="hidden" id="konaspi" name="konaspi" value="{{ json_encode($konaspi) ?? 'param' }}">
<input type="hidden" id="hargaKonferensi" name="hargaKonferensi" value="{{ json_encode($hargaKonferensi) ?? 'param' }}"> <input type="hidden" id="hargaKonferensi" name="hargaKonferensi" value="{{ json_encode($hargaKonferensi) ?? 'param' }}">
<input type="hidden" id="totalHarga" name="totalHarga" value="{{ json_encode($totalHarga) ?? 'param' }}"> <input type="hidden" id="totalHarga" name="totalHarga" value="{{ json_encode($totalHarga) ?? 'param' }}">
<button type="submit" class="btn btn-primary btn-icon icon-left"><i class="fas fa-credit-card"></i> Bayar</button>
<button class="btn btn-danger btn-icon icon-left"><i class="fas fa-times"></i> Cancel</button>
@endif @endif
</div> </div>
</div> </div>
</div> </div>
</form>
</section> </section>
@endsection @endsection
@extends('layouts.blank')
@section('title','Invoice')
@section('content')
<section class="section">
<div class="section-body">
<div class="invoice">
<div class="invoice-print">
<div class="row">
<div class="col-lg-12">
<p class="section-lead" style="font-size: 12pt">Terimakasih telah mendaftar KONASPI XI 2024. Pembayaran kegiatan telah kami terima</p>
<div class="invoice-title">
<h2>Invoice</h2>
<div class="invoice-number">No. Transaksi #{{$registrasi['kode_registrasi'] ?? 'param' }}</div>
</div>
<hr>
<div class="row" style="font-size: 12pt">
<div class="col-md-6">
<address>
<strong>Identitas:</strong><br>
{{$registrasi['nama'] ?? 'param' }}<br>
{{$registrasi['alamat'] ?? 'param' }}<br>
{{$registrasi['telepon'] ?? 'param' }}<br>
</address>
</div>
<div class="col-md-6 text-md-right">
<address>
<strong>Instansi:</strong><br>
{{$registrasi['instansi'] ?? 'param' }}<br>
</address>
</div>
</div>
<div class="row" style="font-size: 12pt">
<div class="col-md-6">
<address>
<strong>Metode Pembayaran:</strong><br>
Virtual Account : {{$registrasi['kode_registrasi'] ?? 'param' }}<br>
{{-- {{$registrasi['email'] ?? 'param' }} --}}
</address>
</div>
<div class="col-md-6 text-md-right">
<address>
<strong>Tanggal Registrasi:</strong><br>
{{$tglRegistrasi ?? 'param' }}<br><br>
</address>
</div>
</div>
</div>
</div>
<div class="row mt-4">
<div class="col-md-12" style="font-size: 12pt">
<p class="section-lead">Rincian (Lunas)</p>
<div class="table-responsive">
<table class="table table-striped table-hover table-md">
<tr>
<th data-width="40">#</th>
<th>Kegiatan</th>
<th class="text-center">Harga</th>
<th class="text-center">Jumlah</th>
<th class="text-right">Total Harga</th>
</tr>
@php
$no = 2;
$initialharga = $konaspi['harga'] ?? 0;
$subtotal = $initialharga;
$i = 0;
@endphp
<tr>
<td>1</td>
<td>
Convention
</td>
<td class="text-center">Rp {{$konaspi['harga']??'param'}}</td>
<td class="text-center">1</td>
<td class="text-right">Rp {{$konaspi['harga']??'param'}}</td>
</tr>
@if (isset($hargaKonferensi))
@foreach ($hargaKonferensi as $kon)
@php
$subtotal = $subtotal + $kon['hargakon'];
@endphp
<tr>
<td>{{$no}}</td>
<td>
{{$kon['namakeg']}} <br> Konferensi : <b> {{$kon['namakon']??'param'}} </b>
</td>
<td class="text-center">Rp {{$kon['hargakon']??'param'}}</td>
<td class="text-center">1</td>
<td class="text-right">Rp {{$kon['hargakon']??'param'}}</td>
</tr>
@php
$i++;
$no++;
@endphp
@endforeach
@endif
</table>
</div>
<div class="row mt-4">
<div class="col-lg-8">
{{-- <div class="d-flex">
<div class="mr-2 bg-visa" data-width="61" data-height="38"></div>
<div class="mr-2 bg-jcb" data-width="61" data-height="38"></div>
<div class="mr-2 bg-mastercard" data-width="61" data-height="38"></div>
<div class="bg-paypal" data-width="61" data-height="38"></div>
</div> --}}
</div>
<div class="col-lg-4 text-right">
<div class="invoice-detail-item">
<div class="invoice-detail-name">Subtotal</div>
<div class="invoice-detail-value">Rp {{$subtotal}}</div>
</div>
<hr class="mt-2 mb-2">
<div class="invoice-detail-item">
<div class="invoice-detail-name">Total</div>
<div class="invoice-detail-value invoice-detail-value-lg">Rp {{$subtotal}}</div>
</div>
</div>
</div>
</div>
</div>
</div>
<hr>
<div class="text-md-right">
{{-- <div class="float-lg-left mb-lg-0 mb-3">
<button class="btn btn-primary btn-icon icon-left"><i class="fas fa-credit-card"></i> Bayar</button>
<button class="btn btn-danger btn-icon icon-left"><i class="fas fa-times"></i> Cancel</button>
</div> --}}
{{-- <button class="btn btn-warning btn-icon icon-left"><i class="fas fa-print"></i> Cetak</button> --}}
@if (isset($registrasi) && isset($kegiatanpeserta) && isset($tglRegistrasi) && isset($konaspi) && isset($hargaKonferensi) && isset($totalHarga))
<input type="hidden" id="registrasi" name="registrasi" value="{{ json_encode($registrasi) ?? 'param' }}">
<input type="hidden" id="kegiatanpeserta" name="kegiatanpeserta" value="{{ json_encode($kegiatanpeserta) ?? 'param' }}">
<input type="hidden" id="tglRegistrasi" name="tglRegistrasi" value="{{ json_encode($tglRegistrasi) ?? 'param' }}">
<input type="hidden" id="konaspi" name="konaspi" value="{{ json_encode($konaspi) ?? 'param' }}">
<input type="hidden" id="hargaKonferensi" name="hargaKonferensi" value="{{ json_encode($hargaKonferensi) ?? 'param' }}">
<input type="hidden" id="totalHarga" name="totalHarga" value="{{ json_encode($totalHarga) ?? 'param' }}">
@endif
</div>
</div>
</div>
</section>
@endsection
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment