Perubahan login dan register
This commit is contained in:
parent
c6e7e74f2a
commit
1af5e8a7da
@ -14,7 +14,7 @@ class UserTransactionController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function indexPembeli()
|
public function indexPembeli()
|
||||||
{
|
{
|
||||||
return view('user.transaction.pembeli.transaction-pembeli',[
|
return view('user.transaction.pembeli.index',[
|
||||||
'name'=>'npannisa',
|
'name'=>'npannisa',
|
||||||
'TransactionUser'=>TransactionUser::HistoryTransaction()
|
'TransactionUser'=>TransactionUser::HistoryTransaction()
|
||||||
]);
|
]);
|
||||||
|
@ -28,7 +28,7 @@ class DatabaseSeeder extends Seeder
|
|||||||
'nama_depan' => $faker->firstName,
|
'nama_depan' => $faker->firstName,
|
||||||
'nama_belakang' => $faker->lastName,
|
'nama_belakang' => $faker->lastName,
|
||||||
'tanggal_lahir' => $faker->date($format = 'Y-m-d', $max = 'now'),
|
'tanggal_lahir' => $faker->date($format = 'Y-m-d', $max = 'now'),
|
||||||
'email' => fake()->unique()->safeEmail(),
|
'email' => 'admin@example.net',
|
||||||
'email_verified_at' => now(),
|
'email_verified_at' => now(),
|
||||||
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
|
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
|
||||||
'remember_token' => Str::random(10),
|
'remember_token' => Str::random(10),
|
||||||
|
@ -58,6 +58,13 @@ video {
|
|||||||
z-index: 3;
|
z-index: 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.flex-input-btn {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-top: 3%;
|
||||||
|
}
|
||||||
|
|
||||||
form.sign-up-form {
|
form.sign-up-form {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: start;
|
align-items: start;
|
||||||
@ -103,8 +110,8 @@ form p {
|
|||||||
.input-field-signup-flex {
|
.input-field-signup-flex {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 55px;
|
height: 55px;
|
||||||
|
margin-top: 2%;
|
||||||
background-color: #f0f0f0;
|
background-color: #f0f0f0;
|
||||||
margin-top: 10px;
|
|
||||||
border-radius: 1rem;
|
border-radius: 1rem;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 15% 85%;
|
grid-template-columns: 15% 85%;
|
||||||
@ -113,6 +120,41 @@ form p {
|
|||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.input {
|
||||||
|
width: 100%;
|
||||||
|
height: 55px;
|
||||||
|
background-color: #f0f0f0;
|
||||||
|
border-radius: 1rem;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 15% 85%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.input input {
|
||||||
|
width: 110%;
|
||||||
|
height: 100%;
|
||||||
|
background: none;
|
||||||
|
outline: none;
|
||||||
|
border: none;
|
||||||
|
border-radius: 1rem;
|
||||||
|
line-height: 1;
|
||||||
|
font-weight: 600;
|
||||||
|
margin-right: 1rem;
|
||||||
|
font-size: 0.8rem;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input i {
|
||||||
|
padding: 0 1.5rem;
|
||||||
|
color: #acacac;
|
||||||
|
transition: 0.5s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.up {
|
||||||
|
margin-top: 3%;
|
||||||
|
}
|
||||||
|
|
||||||
.input-field-signin-flex input,
|
.input-field-signin-flex input,
|
||||||
.input-field-signup-flex input {
|
.input-field-signup-flex input {
|
||||||
width: 82%;
|
width: 82%;
|
||||||
|
@ -41,9 +41,11 @@ $("[data-checkboxes]").each(function () {
|
|||||||
// User
|
// User
|
||||||
$("#table-1").dataTable({
|
$("#table-1").dataTable({
|
||||||
columnDefs: [{ sortable: false, targets: [2, 7] }],
|
columnDefs: [{ sortable: false, targets: [2, 7] }],
|
||||||
|
searchable: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
// Refund, Setting, Transaction
|
// Refund, Setting, Transaction
|
||||||
$("#table-2").dataTable({
|
$("#table-2").dataTable({
|
||||||
ordering: true,
|
ordering: true,
|
||||||
|
searchable: true,
|
||||||
});
|
});
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-md-6">
|
<div class="col-md-9">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="d-flex justify-content-between align-items-center">
|
<div class="d-flex justify-content-between align-items-center">
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
<th>Foto Profil</th>
|
<th>Foto Profil</th>
|
||||||
<th>Nama Panjang</th>
|
<th>Nama Panjang</th>
|
||||||
<th>Email</th>
|
<th>Email</th>
|
||||||
{{-- <th>Gender</th> --}}
|
|
||||||
<th>Tanggal Daftar</th>
|
<th>Tanggal Daftar</th>
|
||||||
<th>Status</th>
|
<th>Status</th>
|
||||||
<th>Aksi</th>
|
<th>Aksi</th>
|
||||||
@ -37,7 +36,7 @@
|
|||||||
<img src="{{ $user->foto_profil != null ? asset('storage') : asset('assets/img/avatar/avatar-6.png') }}" alt="...">
|
<img src="{{ $user->foto_profil != null ? asset('storage') : asset('assets/img/avatar/avatar-6.png') }}" alt="...">
|
||||||
</figure>
|
</figure>
|
||||||
</td>
|
</td>
|
||||||
<td>{{ $user->nama }}</td>
|
<td>{{ $user->nama_depan.' '.$user->nama_belakang }}</td>
|
||||||
<td>{{ $user->email }}</td>
|
<td>{{ $user->email }}</td>
|
||||||
<td>{{ $user->created_at }}</td>
|
<td>{{ $user->created_at }}</td>
|
||||||
<td>
|
<td>
|
||||||
|
@ -87,7 +87,7 @@
|
|||||||
</div> --}}
|
</div> --}}
|
||||||
<!-- ======= MODAL ======= -->
|
<!-- ======= MODAL ======= -->
|
||||||
|
|
||||||
<div class="container">
|
<div class="container mt-5">
|
||||||
<div class="forms-container">
|
<div class="forms-container">
|
||||||
<div class="signin-signup">
|
<div class="signin-signup">
|
||||||
|
|
||||||
@ -175,11 +175,21 @@
|
|||||||
maxlength="16"
|
maxlength="16"
|
||||||
oninput="this.value = this.value.replace(/[^0-9]/g, '').substring(0, 16);" />
|
oninput="this.value = this.value.replace(/[^0-9]/g, '').substring(0, 16);" />
|
||||||
</div>
|
</div>
|
||||||
<div class="input-field up">
|
<div class="flex-input-btn">
|
||||||
<i class="fa fa-envelope" aria-hidden="true"></i>
|
<div class="input">
|
||||||
<input type="email" placeholder="Email" class="email-input" name="new_email" />
|
<i class="fa fa-envelope" aria-hidden="true"></i>
|
||||||
|
<input type="email" placeholder="Email" class="email-input" name="new_email"
|
||||||
|
id="newEmail" />
|
||||||
|
</div>
|
||||||
|
<button id="verifikasiEmail" class="btn-otp solid"
|
||||||
|
type="button">Verifikasi</button>
|
||||||
|
</div>
|
||||||
|
<div class="input-field up">
|
||||||
|
<i class="fa fa-ellipsis-h" aria-hidden="true"></i>
|
||||||
|
<input type="text" class="telp-input-signup"
|
||||||
|
oninput="this.value = this.value.replace(/[^0-6]/g, '').substring(0, 6);"
|
||||||
|
placeholder="Kode Verifikasi Email" name="email-verification">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="input-field up">
|
<div class="input-field up">
|
||||||
<i class="fa fa-phone" aria-hidden="true"></i>
|
<i class="fa fa-phone" aria-hidden="true"></i>
|
||||||
<input type="text" class="telp-input-signup" maxlength="13"
|
<input type="text" class="telp-input-signup" maxlength="13"
|
||||||
@ -403,6 +413,18 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
let verificationStatus = false;
|
||||||
|
let verificationCode = '';
|
||||||
|
|
||||||
|
function generateVerificationCode() {
|
||||||
|
const codeLength = 6;
|
||||||
|
let code = '';
|
||||||
|
for (let i = 0; i < codeLength; i++) {
|
||||||
|
code += Math.floor(Math.random() * 10); // Menghasilkan digit acak dari 0 hingga 9
|
||||||
|
}
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
$('#cekAkun').on('click', function() {
|
$('#cekAkun').on('click', function() {
|
||||||
let email = document.querySelector('[name="email"]').value;
|
let email = document.querySelector('[name="email"]').value;
|
||||||
const csrfToken = $('meta[name="csrf-token"]').attr('content');
|
const csrfToken = $('meta[name="csrf-token"]').attr('content');
|
||||||
@ -470,6 +492,27 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#verifikasiEmail').on('click', function() {
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#newEmail').on('input', function() {
|
||||||
|
const newEmail = $(this);
|
||||||
|
clearTimeout(newEmail.timer); // Menghapus timeout yang ada
|
||||||
|
|
||||||
|
// Menunggu 5 detik sebelum menghasilkan kode verifikasi
|
||||||
|
newEmail.timer = setTimeout(function() {
|
||||||
|
const email = newEmail.val().trim(); // Menghapus spasi di awal dan akhir
|
||||||
|
|
||||||
|
if (email === '') {
|
||||||
|
alert('Silakan masukkan alamat email Anda terlebih dahulu.');
|
||||||
|
} else {
|
||||||
|
const verificationCode = generateVerificationCode();
|
||||||
|
console.log(verificationCode);
|
||||||
|
}
|
||||||
|
}, 5000);
|
||||||
|
});
|
||||||
|
|
||||||
$('#signUp').on('click', function() {
|
$('#signUp').on('click', function() {
|
||||||
let emptyInput = [];
|
let emptyInput = [];
|
||||||
const csrfToken = $('meta[name="csrf-token"]').attr('content');
|
const csrfToken = $('meta[name="csrf-token"]').attr('content');
|
||||||
@ -479,6 +522,7 @@
|
|||||||
let email = document.querySelector('[name="new_email"]').value;
|
let email = document.querySelector('[name="new_email"]').value;
|
||||||
let nohp = document.querySelector('[name="nohp"]').value;
|
let nohp = document.querySelector('[name="nohp"]').value;
|
||||||
let gender = document.querySelector('[name="gender"]').value;
|
let gender = document.querySelector('[name="gender"]').value;
|
||||||
|
let emailVerification = document.querySelector('[name="email-verification"]').value;
|
||||||
|
|
||||||
// Tanggal lahir
|
// Tanggal lahir
|
||||||
let tanggalLahir = document.querySelector('[name="tanggal_lahir"]').value;
|
let tanggalLahir = document.querySelector('[name="tanggal_lahir"]').value;
|
||||||
@ -514,6 +558,8 @@
|
|||||||
|
|
||||||
if (email.trim() === "") {
|
if (email.trim() === "") {
|
||||||
emptyInput.push("Email tidak boleh kosong");
|
emptyInput.push("Email tidak boleh kosong");
|
||||||
|
} else if (!verificationStatus) {
|
||||||
|
emptyInput.push("Verifikasi email terlebih dahulu");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nohp.trim() === "") {
|
if (nohp.trim() === "") {
|
||||||
|
Loading…
Reference in New Issue
Block a user