daftar pelanggan xsiap
This commit is contained in:
@@ -1,312 +1,328 @@
|
||||
@extends('layouts.app')
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" itemscope itemtype="http://schema.org/WebPage">
|
||||
|
||||
@section('content')
|
||||
<style>
|
||||
.background {
|
||||
max-width: -webkit-fill-available;
|
||||
padding: 15%;
|
||||
}
|
||||
|
||||
<title>Pertama Kali | Customer Portal</title>
|
||||
.shadow-primary {
|
||||
box-shadow: #4A4E59 !important;
|
||||
}
|
||||
|
||||
<h6 style="text-align: center; margin-bottom: 10%;">Pertama Kali</h6>
|
||||
.text-primary {
|
||||
color: #4A4E59 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="container text-center mt-7">
|
||||
<!-- <img class="login-logo login-6" src="{{ asset('argon') }}/login/logo_arrahn_baru.png"> -->
|
||||
<div class="container mt-5">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
|
||||
{{-- <form action="#" method="post" enctype="multipart/form-data" class="login-form" novalidate="novalidate"> --}}
|
||||
@csrf
|
||||
<div class="row ml-5">
|
||||
<div class="col-xs-6 col-xl-6">
|
||||
<div class="form-group {{ $errors->has('otp') ? ' has-danger' : '' }}">
|
||||
<input placeholder="One-Time-Password" class="form-control{{ $errors->has('otp') ? ' is-invalid' : '' }}" type="text" name="otp" value="{{ old('otp') }}" id="login-otp" required autofocus aria-required="true">
|
||||
</div>
|
||||
<span id="spanotp" class="text-danger" role="alert">
|
||||
<small><strong id="errorotp"></strong></small>
|
||||
</span>
|
||||
<!-- Fonts and icons -->
|
||||
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700,900|Roboto+Slab:400,700" />
|
||||
<!-- Nucleo Icons -->
|
||||
<link href="{{ asset('css/nucleo-icons.css') }}" rel="stylesheet">
|
||||
<link href="{{ asset('css/nucleo-svg.css') }}" rel="stylesheet">
|
||||
<link href="{{ asset('argon') }}/img/brand/ARRAHN1.png" rel="icon" type="image/png">
|
||||
|
||||
</div>
|
||||
<div class="col-xs-6 col-xl-6">
|
||||
<div class="form-group {{ $errors->has('icno') ? ' has-danger' : '' }}">
|
||||
<input type="text" placeholder="Nombor Kad Pengenalan" class="form-control{{ $errors->has('icno') ? ' is-invalid' : '' }}" id="login-icno" name="icno" required aria-required="true">
|
||||
</div>
|
||||
<!-- Material Icons -->
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons+Round" rel="stylesheet">
|
||||
<!-- CSS Files -->
|
||||
<link href="{{ asset('css/material-kit-login.css') }}" rel="stylesheet">
|
||||
<script src="{{ asset('argon') }}/vendor/jquery/dist/jquery.min.js"></script>
|
||||
|
||||
<span id="spanic" class="text-danger invisible" role="alert">
|
||||
<small><strong id="erroricno">ss</strong></small>
|
||||
</span>
|
||||
</head>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<body class="sign-in-basic">
|
||||
|
||||
<div class="page-header align-items-start min-vh-100" style="background-image: url('/argon/login/backg4_x2.jpg');" loading="lazy">
|
||||
<span class="mask bg-gradient-dark opacity-6"></span>
|
||||
<div class="container my-auto mx-auto ">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 col-xs-6">
|
||||
<div class="col-lg-10 col-md-12 col-12 mx-auto mt-5">
|
||||
<div class="card z-index-0 fadeIn3 fadeInBottom">
|
||||
|
||||
</div>
|
||||
<div class="col-sm-8 col-xs-6 text-right">
|
||||
<button id="seterusbtn" class="btn btn-success login pull-right" type="button" onclick="checkpelanggan();">Seterusnya</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-xs-12 forgetpassword">
|
||||
<center>
|
||||
<div class="forgot-password">
|
||||
<a href="{{ route('login') }}" class="text-light">
|
||||
<font color="#3598dc">Log-Masuk</font>
|
||||
</a> |@if (Route::has('password.request')) <a href="{{ route('password.request') }}" class="text-light">
|
||||
<font color="#3598dc">Lupa Katalaluan</font>
|
||||
</a>@endif
|
||||
<!-- <div class="card-header p-0 position-relative mt-n4 mx-3 z-index-2">
|
||||
<div class="bg-gradient-primary border-radius-lg py-3 pe-1" style="background: #4A4E59;">
|
||||
<img src="{{ asset('/argon/login/logo_arrahn_baru2.png') }}" alt="Logo Ar Rahn" class="background" style="text-align: center;">
|
||||
<h3 style="text-align: center; color:#12B652">CUSTOMER PORTAL</h3>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="card-header p-0 position-relative mt-n4 mx-3 z-index-2">
|
||||
<div class="bg-gradient-primary border-radius-lg py-3 pe-1" style="background: #4A4E59;">
|
||||
<h4 class="text-white font-weight-bolder text-center mt-2 mb-0">Customer Portal</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div style="font-size: 10px;"><br><br>Paparan terbaik menggunakan Mozilla Firefox, Google Chrome & Internet Explorer 9.0 ke atas dengan resolusi 1920 x 1080</div>
|
||||
</center>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-lg-5">
|
||||
<h3 class="mt-2 mb-4" style="text-align: center;">Daftar Akaun</h3>
|
||||
<p>Sila isi nombor OTP yang telah di mesej ke nombor telefon bimbit anda.</p>
|
||||
<div class="input-group input-group-outline my-3 {{ $errors->has('email') ? ' has-danger' : '' }}">
|
||||
<input placeholder="OTP" class="form-control{{ $errors->has('email') ? ' is-invalid' : '' }}" type="email" name="email" value="{{ old('email') }}" id="login-username">
|
||||
</div>
|
||||
<span class="invalid-feedback" style="display: block;margin-top:-10px !important;" role="alert">
|
||||
</span>
|
||||
<div class="input-group input-group-outline mb-3">
|
||||
<input placeholder="E-mail" class="form-control{{ $errors->has('password') ? ' is-invalid' : '' }}" type="email" name="password" id="login-password">
|
||||
</div>
|
||||
<span class="invalid-feedback" style="display: block;margin-top:-10px !important;" role="alert">
|
||||
</span>
|
||||
<div class="text-center mt-6">
|
||||
<button type="submit" class="btn bg-gradient-dark w-100 my-4 mb-2" onclick="loadingbtn();this.disabled=true;this.form.submit();" style="background: #4A4E59;">SETERUSNYA</button>
|
||||
<button id="seterusbtn" class="btn btn-success login pull-right" type="button" onclick="checkpelanggan();">Seterusnya</button>
|
||||
|
||||
</div>
|
||||
<p class="mt-6 text-sm text-center">
|
||||
|
||||
<a href="{{ route('login') }}">Log-Masuk</a>
|
||||
<a href="#" class="text-dark text-gradient font-weight-bold"> | </a>
|
||||
<a href="{{ route('password.request') }}">Lupa Kata Laluan</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-lg-6 mt-lg-0 mt-5 ps-lg-0 ps-0 ms-auto">
|
||||
<div class="my-auto mx-auto">
|
||||
<p>hajshhasfsfsfsfssffsfssfffffffffffffffffffffffffffffffffffffffffffffs</p>
|
||||
<img src="('/argon/login/backg4_x2.jpg')" alt="">
|
||||
</div>
|
||||
<!-- <div class="card-body p-0 my-3 mt-5">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="input-group input-group-static mb-4">
|
||||
<label>Nama</label>
|
||||
<input type="email" class="form-control" placeholder="ahmad" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="input-group input-group-static mb-4">
|
||||
<label>IC</label>
|
||||
<input type="email" class="form-control" placeholder="8989989-89-0555" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 ps-md-2">
|
||||
<div class="input-group input-group-static mb-4">
|
||||
<label>No Telefon</label>
|
||||
<input type="email" class="form-control" placeholder="0128989500" readonly>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-0 mt-md-0">
|
||||
<div class="input-group input-group-static mb-4">
|
||||
<label>Alamat</label>
|
||||
<input type="email" class="form-control" placeholder="lot 1934, skeksyten" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="input-group input-group-static mb-4">
|
||||
<label>Poskod</label>
|
||||
<input type="email" class="form-control" placeholder="121" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="input-group input-group-static mb-4">
|
||||
<label>Negeri</label>
|
||||
<input type="email" class="form-control" placeholder="Kelantamm" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<span class="text-danger text-xl-center font-weight-bold" style="text-align: center;"><small>*Diminta untuk semak maklumat pelanggan terlebih dahulu!</small></span><br>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6" style="text-align: center;">
|
||||
<button id="betulbtn" type="submit" class="btn btn-success mt-2">Betul</button>
|
||||
</div>
|
||||
<div class="col-6" style="text-align: center;">
|
||||
<button type="button" class="btn btn-danger mt-2" onclick="backfunc()">Salah</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{-- </form> --}}
|
||||
|
||||
<footer class="footer bottom-0 py-2 w-100">
|
||||
<div class="container">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-12 my-auto">
|
||||
<div class="text-sm text-white text-lg-start" style="text-align: center !important;">
|
||||
@2021, Copyright Koperasi Permodalan Kelantan Berhad
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- Core JS Files -->
|
||||
<script src="{{ asset('assets/js/material-kit/core/popper.min.js') }}" type="text/javascript"></script>
|
||||
|
||||
|
||||
<br>
|
||||
</div>
|
||||
<div class="col-md-6 col-xl-6 py-0 px-0">
|
||||
<div>
|
||||
<div style="position: relative;text-align:center;color:white;">
|
||||
<script src="{{ asset('assets/js/material-kit/core/bootstrap.min.js') }}" type="text/javascript"></script>
|
||||
|
||||
<div id="makpel" class="card-body bg-secondary px-lg-5 py-lg-5 rounded w-75 invisible" style="position: absolute;top:50%;left:50%;transform:translate(-50%,-50%);">
|
||||
<h2 class="text-center mt-2 mb-4 font-weight-bold text-uppercase">Maklumat Pelanggan</h2>
|
||||
@if (Session::has('custdetail'))
|
||||
<?php $customerdetails = Session::get('custdetail'); ?>
|
||||
@endif
|
||||
<form method="GET" action="{{ route('register') }}">
|
||||
{{-- @csrf --}}
|
||||
<script src="{{ asset('assets/js/material-kit/plugins/perfect-scrollbar.min.js') }}"></script>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="name" class="col-md-2 col-lg-2 col-lx-2 col-form-label text-dark text-md-right text-xl-right">{{ __('Nama') }}</label>
|
||||
<!-- Plugin for Parallax, full documentation here: https://github.com/wagerfield/parallax -->
|
||||
<script src="{{ asset('assets/js/material-kit/plugins/parallax.min.js') }}"></script>
|
||||
|
||||
<div class="col-md-10">
|
||||
<input autocomplete="off" type="text" name="name" class="form-control @error('name') is-invalid @enderror" value="{{ Session::has('custdetail') ? $customerdetails[0]['nama'] : old('name') }}" readonly>
|
||||
<!-- Control Center for Material UI Kit: parallax effects, scripts for the example pages etc -->
|
||||
<!-- Google Maps Plugin -->
|
||||
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDTTfWur0PDbZWPr7Pmq8K3jiDp0_xUziI"></script>
|
||||
<!-- <script src="{{ asset('assets/js/material-kit/material-kit.min.js?v=3.0.0') }}" type="text/javascript"></script> -->
|
||||
|
||||
@error('name')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="icno" class="col-md-2 col-form-label text-dark text-md-right">{{ __('No IC') }}</label>
|
||||
|
||||
<div class="col-md-4">
|
||||
<input autocomplete="off" type="text" name="icno" class="form-control @error('icno') is-invalid @enderror" value="{{ Session::has('custdetail') ? $customerdetails[0]['kpbaru'] : old('icno') }}" readonly>
|
||||
@error('icno')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
<label for="notel" class="col-md-2 col-form-label text-dark text-md-right">{{ __('No. Tel') }}</label>
|
||||
<div class="col-md-4">
|
||||
<input autocomplete="off" type="text" name="notel" class="form-control" value="{{ Session::has('custdetail') ? $customerdetails[0]['telefon'] : old('notel') }}" disabled>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="alamat" class="col-md-2 col-form-label text-dark text-md-right">{{ __('Alamat') }}</label>
|
||||
<div class="col-md-10">
|
||||
@php
|
||||
// $koddaerah = Http::get(config('api.url') .'/api/daerah/' .$customerdetails[0]['koddaerah'] )->json();
|
||||
// $kodnegeri = Http::get(config('api.url') .'/api/negeri/' .$customerdetails[0]['kodnegeri'] )->json();
|
||||
|
||||
@endphp
|
||||
<textarea name="alamat" class="form-control" rows="3" disabled>{{ Session::has('custdetail') ? $customerdetails[0]['alamat1'] . ' ' . $customerdetails[0]['alamat2'] : old('alamat') }}
|
||||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="icno" class="col-md-2 col-form-label text-dark text-md-right">{{ __('Poskod') }}</label>
|
||||
|
||||
<div class="col-md-4">
|
||||
<input autocomplete="off" type="text" name="poskod" class="form-control @error('poskod') is-invalid @enderror" value="{{ Session::has('custdetail') ? $customerdetails[0]['poskod'] : old('poskod') }}" disabled>
|
||||
@error('poskod')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
<label for="namadaerah" class="col-md-2 col-form-label text-dark text-md-right">{{ __('Daerah') }}</label>
|
||||
<div class="col-md-4">
|
||||
<input autocomplete="off" type="text" name="namadaerah" class="form-control" value="{{ Session::has('custdetail') ? $koddaerah['namadaerah'] : old('namadaerah') }}" disabled>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="negeri" class="col-md-2 col-form-label text-dark text-md-right">{{ __('Negeri') }}</label>
|
||||
|
||||
<div class="col-md-10">
|
||||
<input autocomplete="off" type="text" name="negeri" class="form-control @error('negeri') is-invalid @enderror" value="{{ Session::has('custdetail') ? $kodnegeri['negeri'] : old('negeri') }}" disabled>
|
||||
|
||||
@error('negeri')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<span class="text-danger text-xl-center font-weight-bold"><small>*Diminta untuk semak maklumat pelanggan terlebih dahulu!</small></span><br>
|
||||
<button id="betulbtn" type="submit" class="btn btn-success mt-2">Betul</button>
|
||||
<button type="button" class="btn btn-danger mt-2" onclick="backfunc()">Salah</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let api_url = "{{ config('api.url') }}";
|
||||
<script>
|
||||
let api_url = "{{ config('api.url') }}";
|
||||
|
||||
|
||||
function checkpelanggan() {
|
||||
var otp_verify = $('#login-otp').val();
|
||||
var otp_icno = $('#login-icno').val();
|
||||
var boolotp = false;
|
||||
var boolicno = false;
|
||||
function checkpelanggan() {
|
||||
var otp_verify = $('#login-otp').val();
|
||||
var otp_icno = $('#login-icno').val();
|
||||
var boolotp = false;
|
||||
var boolicno = false;
|
||||
|
||||
if (otp_verify == null || otp_verify == '') {
|
||||
$('#errorotp').text('sila isikan otp anda!');
|
||||
$('#spanotp').addClass('visible');
|
||||
$('#spanotp').removeClass('invisible');
|
||||
boolotp = true;
|
||||
} else {
|
||||
$('#errorotp').text('');
|
||||
$('#spanotp').addClass('invisible');
|
||||
$('#spanotp').removeClass('visible');
|
||||
boolotp = false;
|
||||
}
|
||||
if (otp_verify == null || otp_verify == '') {
|
||||
$('#errorotp').text('sila isikan otp anda!');
|
||||
$('#spanotp').addClass('visible');
|
||||
$('#spanotp').removeClass('invisible');
|
||||
boolotp = true;
|
||||
} else {
|
||||
$('#errorotp').text('');
|
||||
$('#spanotp').addClass('invisible');
|
||||
$('#spanotp').removeClass('visible');
|
||||
boolotp = false;
|
||||
}
|
||||
|
||||
if (otp_icno == null || otp_icno == '') {
|
||||
$('#erroricno').text('sila isikan icno anda!');
|
||||
$('#spanic').addClass('visible');
|
||||
$('#spanic').removeClass('invisible');
|
||||
boolicno = true;
|
||||
} else {
|
||||
$('#erroricno').text('');
|
||||
$('#spanic').addClass('invisible');
|
||||
$('#spanic').removeClass('visible');
|
||||
boolicno = false;
|
||||
}
|
||||
if (otp_icno == null || otp_icno == '') {
|
||||
$('#erroricno').text('sila isikan icno anda!');
|
||||
$('#spanic').addClass('visible');
|
||||
$('#spanic').removeClass('invisible');
|
||||
boolicno = true;
|
||||
} else {
|
||||
$('#erroricno').text('');
|
||||
$('#spanic').addClass('invisible');
|
||||
$('#spanic').removeClass('visible');
|
||||
boolicno = false;
|
||||
}
|
||||
|
||||
if (boolotp === false && boolicno === false) {
|
||||
$.ajax({
|
||||
url: api_url + '/api/otp/check/' + otp_verify,
|
||||
method: 'GET',
|
||||
success: function(data) {
|
||||
|
||||
if (data.length > 0) {
|
||||
console.log(data[0].nokp);
|
||||
$.ajax({
|
||||
url: api_url + '/api/customers/' + data[0].nokp,
|
||||
method: 'GET',
|
||||
success: function(data) {
|
||||
|
||||
$('input[name="name"]').val(data.nama);
|
||||
$('input[name="icno"]').val(data.kpbaru);
|
||||
$('input[name="notel"]').val(data.telefon);
|
||||
$('input[name="poskod"]').val(data.poskod);
|
||||
$('textarea[name="alamat"]').val(data.alamat1);
|
||||
if (boolotp === false && boolicno === false) {
|
||||
$.ajax({
|
||||
url: api_url + '/api/otp/check/' + otp_verify,
|
||||
method: 'GET',
|
||||
success: function(data) {
|
||||
|
||||
if (data.length > 0) {
|
||||
console.log(data[0].nokp);
|
||||
$.ajax({
|
||||
url: api_url + '/api/daerah/' + data.koddaerah,
|
||||
url: api_url + '/api/customers/' + data[0].nokp,
|
||||
method: 'GET',
|
||||
success: function(data) {
|
||||
console.log(data);
|
||||
$('input[name="namadaerah"]').val(data.namadaerah);
|
||||
|
||||
$('input[name="name"]').val(data.nama);
|
||||
$('input[name="icno"]').val(data.kpbaru);
|
||||
$('input[name="notel"]').val(data.telefon);
|
||||
$('input[name="poskod"]').val(data.poskod);
|
||||
$('textarea[name="alamat"]').val(data.alamat1);
|
||||
|
||||
$.ajax({
|
||||
url: api_url + '/api/daerah/' + data.koddaerah,
|
||||
method: 'GET',
|
||||
success: function(data) {
|
||||
console.log(data);
|
||||
$('input[name="namadaerah"]').val(data.namadaerah);
|
||||
}
|
||||
});
|
||||
$.ajax({
|
||||
url: api_url + '/api/negeri/' + data.kodnegeri,
|
||||
method: 'GET',
|
||||
success: function(data) {
|
||||
console.log(data);
|
||||
$('input[name="negeri"]').val(data.negeri);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$('#spanic').addClass('invisible');
|
||||
$('#spanic').removeClass('visible');
|
||||
$('#spanic').addClass('invisible');
|
||||
$('#spanic').removeClass('visible');
|
||||
$("#seterusbtn").prop("disabled", true);
|
||||
|
||||
$('#makpel').addClass('visible');
|
||||
$('#makpel').removeClass('invisible');
|
||||
|
||||
}
|
||||
});
|
||||
$.ajax({
|
||||
url: api_url + '/api/negeri/' + data.kodnegeri,
|
||||
method: 'GET',
|
||||
success: function(data) {
|
||||
console.log(data);
|
||||
$('input[name="negeri"]').val(data.negeri);
|
||||
} else {
|
||||
$.notify({
|
||||
icon: 'fas fa-exclamation-triangle fa-2x',
|
||||
newest_on_top: true,
|
||||
message: "<strong style='font-size:15px;text-align:center;margin-left:100px;'>Pelanggan tidak membuat sebarang login!</strong>"
|
||||
}, {
|
||||
type: 'danger',
|
||||
allow_dismiss: false,
|
||||
placement: {
|
||||
align: 'center',
|
||||
from: 'bottom'
|
||||
},
|
||||
animate: {
|
||||
enter: 'animate__animated animate__bounce',
|
||||
|
||||
exit: 'animate__animated animate__bounceOutDown'
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$('#spanic').addClass('invisible');
|
||||
$('#spanic').removeClass('visible');
|
||||
$('#spanic').addClass('invisible');
|
||||
$('#spanic').removeClass('visible');
|
||||
$("#seterusbtn").prop("disabled", true);
|
||||
|
||||
$('#makpel').addClass('visible');
|
||||
$('#makpel').removeClass('invisible');
|
||||
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$.notify({
|
||||
icon: 'fas fa-exclamation-triangle fa-2x',
|
||||
newest_on_top: true,
|
||||
message: "<strong style='font-size:15px;text-align:center;margin-left:100px;'>Pelanggan tidak membuat sebarang login!</strong>"
|
||||
}, {
|
||||
type: 'danger',
|
||||
allow_dismiss: false,
|
||||
placement: {
|
||||
align: 'center',
|
||||
from: 'bottom'
|
||||
},
|
||||
animate: {
|
||||
enter: 'animate__animated animate__bounce',
|
||||
|
||||
exit: 'animate__animated animate__bounceOutDown'
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function backfunc() {
|
||||
$('#makpel').addClass('invisible');
|
||||
$('#makpel').removeClass('visible');
|
||||
$("#seterusbtn").prop("disabled", false);
|
||||
}
|
||||
|
||||
// $('body').on('click', '.loading', function() {
|
||||
// loading();
|
||||
// });
|
||||
|
||||
$(function() {
|
||||
$('.login-form').submit(function() {
|
||||
if ($(this).valid()) {
|
||||
//
|
||||
} else {
|
||||
loading_close();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
var slideIndex = 0;
|
||||
showSlides();
|
||||
|
||||
}
|
||||
|
||||
function backfunc() {
|
||||
$('#makpel').addClass('invisible');
|
||||
$('#makpel').removeClass('visible');
|
||||
$("#seterusbtn").prop("disabled", false);
|
||||
}
|
||||
|
||||
// $('body').on('click', '.loading', function() {
|
||||
// loading();
|
||||
// });
|
||||
|
||||
$(function() {
|
||||
$('.login-form').submit(function() {
|
||||
if ($(this).valid()) {
|
||||
//
|
||||
} else {
|
||||
loading_close();
|
||||
function showSlides() {
|
||||
var i;
|
||||
var slides = document.getElementsByClassName("mySlides");
|
||||
for (i = 0; i < slides.length; i++) {
|
||||
slides[i].style.display = "none";
|
||||
}
|
||||
slideIndex++;
|
||||
if (slideIndex > slides.length) {
|
||||
slideIndex = 1
|
||||
}
|
||||
slides[slideIndex - 1].style.display = "block";
|
||||
setTimeout(showSlides, 10000); // Change image every 2 seconds
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
var slideIndex = 0;
|
||||
showSlides();
|
||||
</body>
|
||||
|
||||
function showSlides() {
|
||||
var i;
|
||||
var slides = document.getElementsByClassName("mySlides");
|
||||
for (i = 0; i < slides.length; i++) {
|
||||
slides[i].style.display = "none";
|
||||
}
|
||||
slideIndex++;
|
||||
if (slideIndex > slides.length) {
|
||||
slideIndex = 1
|
||||
}
|
||||
slides[slideIndex - 1].style.display = "block";
|
||||
setTimeout(showSlides, 10000); // Change image every 2 seconds
|
||||
}
|
||||
</script>
|
||||
|
||||
@endsection
|
||||
</html>
|
||||
@@ -1,356 +1,328 @@
|
||||
@extends('layouts.app', ['class' => 'bg-white'])
|
||||
|
||||
@section('content')
|
||||
{{-- @include('layouts.headers.guest') --}}
|
||||
{{-- @include('layouts.headers.guest') --}}
|
||||
|
||||
<div class="user-login-5">
|
||||
<div class="row h-100 w-100 d-flex justify-content-center mx-auto">
|
||||
<div class="col-md-6">
|
||||
<div class="container text-center mt-7">
|
||||
<img class="login-logo login-6" src="{{ asset('argon') }}/login/logo_arrahn_baru.png">
|
||||
<div class="container mt-5">
|
||||
<div class="user-login-5">
|
||||
<div class="row h-100 w-100 d-flex justify-content-center mx-auto">
|
||||
<div class="col-md-6">
|
||||
<div class="container text-center mt-7">
|
||||
<img class="login-logo login-6" src="{{ asset('argon') }}/login/logo_arrahn_baru.png">
|
||||
<div class="container mt-5">
|
||||
|
||||
{{-- <form action="#" method="post" enctype="multipart/form-data" class="login-form" novalidate="novalidate"> --}}
|
||||
@csrf
|
||||
<div class="row ml-5">
|
||||
<div class="col-xs-6 col-xl-6">
|
||||
<div class="form-group {{ $errors->has('otp') ? ' has-danger' : '' }}">
|
||||
<input placeholder="One-Time-Password" class="form-control{{ $errors->has('otp') ? ' is-invalid' : '' }}" type="text" name="otp" value="{{ old('otp') }}" id="login-otp" required autofocus aria-required="true">
|
||||
</div>
|
||||
<span id="spanotp" class="text-danger" role="alert">
|
||||
<small><strong id="errorotp"></strong></small>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
<div class="col-xs-6 col-xl-6">
|
||||
<div class="form-group {{ $errors->has('icno') ? ' has-danger' : '' }}">
|
||||
<input type="text" placeholder="Nombor Kad Pengenalan" class="form-control{{ $errors->has('icno') ? ' is-invalid' : '' }}" id="login-icno" name="icno" required aria-required="true">
|
||||
</div>
|
||||
|
||||
<span id="spanic" class="text-danger invisible" role="alert">
|
||||
<small><strong id="erroricno">ss</strong></small>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
{{-- <form action="#" method="post" enctype="multipart/form-data" class="login-form" novalidate="novalidate"> --}}
|
||||
@csrf
|
||||
<div class="row ml-5">
|
||||
<div class="col-xs-6 col-xl-6">
|
||||
<div class="form-group {{ $errors->has('otp') ? ' has-danger' : '' }}">
|
||||
<input placeholder="One-Time-Password" class="form-control{{ $errors->has('otp') ? ' is-invalid' : '' }}" type="text" name="otp" value="{{ old('otp') }}" id="login-otp" required autofocus aria-required="true">
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-4 col-xs-6">
|
||||
|
||||
</div>
|
||||
<div class="col-sm-8 col-xs-6 text-right">
|
||||
<button id="seterusbtn" class="btn btn-success login pull-right" type="button" onclick="checkpelanggan();">Seterusnya</button>
|
||||
</div>
|
||||
<span id="spanotp" class="text-danger" role="alert">
|
||||
<small><strong id="errorotp"></strong></small>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-xs-12 forgetpassword">
|
||||
<center>
|
||||
<div class="forgot-password">
|
||||
<a href="{{ route('login') }}" class="text-light"><font color="#3598dc">Log-Masuk</font></a> |@if (Route::has('password.request')) <a href="{{ route('password.request') }}" class="text-light"><font color="#3598dc">Lupa Katalaluan</font></a>@endif
|
||||
</div>
|
||||
<div style="font-size: 10px;"><br><br>Paparan terbaik menggunakan Mozilla Firefox, Google Chrome & Internet Explorer 9.0 ke atas dengan resolusi 1920 x 1080</div>
|
||||
</center>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{{-- </form> --}}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<br>
|
||||
</div>
|
||||
<div class="col-md-6 col-xl-6 py-0 px-0">
|
||||
<div>
|
||||
<div style="position: relative;text-align:center;color:white;">
|
||||
|
||||
@include('auth.slides.slidespage')
|
||||
|
||||
<div id="makpel" class="card-body bg-secondary px-lg-5 py-lg-5 rounded w-75 invisible" style="position: absolute;top:50%;left:50%;transform:translate(-50%,-50%);">
|
||||
<h2 class="text-center mt-2 mb-4 font-weight-bold text-uppercase">Maklumat Pelanggan</h2>
|
||||
@if (Session::has('custdetail'))
|
||||
<?php $customerdetails = Session::get('custdetail'); ?>
|
||||
@endif
|
||||
<form method="GET" action="{{ route('register') }}">
|
||||
{{-- @csrf --}}
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="name"
|
||||
class="col-md-2 col-lg-2 col-lx-2 col-form-label text-dark text-md-right text-xl-right">{{ __('Nama') }}</label>
|
||||
|
||||
<div class="col-md-10">
|
||||
<input autocomplete="off" type="text" name="name"
|
||||
class="form-control @error('name') is-invalid @enderror"
|
||||
value="{{ Session::has('custdetail') ? $customerdetails[0]['nama'] : old('name') }}"
|
||||
readonly>
|
||||
|
||||
@error('name')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="icno"
|
||||
class="col-md-2 col-form-label text-dark text-md-right">{{ __('No IC') }}</label>
|
||||
|
||||
<div class="col-md-4">
|
||||
<input autocomplete="off" type="text" name="icno"
|
||||
class="form-control @error('icno') is-invalid @enderror"
|
||||
value="{{ Session::has('custdetail') ? $customerdetails[0]['kpbaru'] : old('icno') }}"
|
||||
readonly>
|
||||
@error('icno')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
<label for="notel"
|
||||
class="col-md-2 col-form-label text-dark text-md-right">{{ __('No. Tel') }}</label>
|
||||
<div class="col-md-4">
|
||||
<input autocomplete="off" type="text" name="notel" class="form-control"
|
||||
value="{{ Session::has('custdetail') ? $customerdetails[0]['telefon'] : old('notel') }}"
|
||||
disabled>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="alamat"
|
||||
class="col-md-2 col-form-label text-dark text-md-right">{{ __('Alamat') }}</label>
|
||||
<div class="col-md-10">
|
||||
@php
|
||||
// $koddaerah = Http::get(config('api.url') .'/api/daerah/' .$customerdetails[0]['koddaerah'] )->json();
|
||||
// $kodnegeri = Http::get(config('api.url') .'/api/negeri/' .$customerdetails[0]['kodnegeri'] )->json();
|
||||
|
||||
@endphp
|
||||
<textarea name="alamat" class="form-control" rows="3"
|
||||
disabled>{{ Session::has('custdetail') ? $customerdetails[0]['alamat1'] . ' ' . $customerdetails[0]['alamat2'] : old('alamat') }}
|
||||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="icno"
|
||||
class="col-md-2 col-form-label text-dark text-md-right">{{ __('Poskod') }}</label>
|
||||
|
||||
<div class="col-md-4">
|
||||
<input autocomplete="off" type="text" name="poskod"
|
||||
class="form-control @error('poskod') is-invalid @enderror"
|
||||
value="{{ Session::has('custdetail') ? $customerdetails[0]['poskod'] : old('poskod') }}"
|
||||
disabled>
|
||||
@error('poskod')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
<label for="namadaerah"
|
||||
class="col-md-2 col-form-label text-dark text-md-right">{{ __('Daerah') }}</label>
|
||||
<div class="col-md-4">
|
||||
<input autocomplete="off" type="text" name="namadaerah" class="form-control"
|
||||
value="{{ Session::has('custdetail') ? $koddaerah['namadaerah'] : old('namadaerah') }}"
|
||||
disabled>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="negeri"
|
||||
class="col-md-2 col-form-label text-dark text-md-right">{{ __('Negeri') }}</label>
|
||||
|
||||
<div class="col-md-10">
|
||||
<input autocomplete="off" type="text" name="negeri"
|
||||
class="form-control @error('negeri') is-invalid @enderror"
|
||||
value="{{ Session::has('custdetail') ? $kodnegeri['negeri'] : old('negeri') }}"
|
||||
disabled>
|
||||
|
||||
@error('negeri')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<span class="text-danger text-xl-center font-weight-bold"><small>*Diminta untuk semak maklumat pelanggan terlebih dahulu!</small></span><br>
|
||||
<button id="betulbtn" type="submit" class="btn btn-success mt-2">Betul</button>
|
||||
<button type="button" class="btn btn-danger mt-2" onclick="backfunc()">Salah</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-xl-6">
|
||||
<div class="form-group {{ $errors->has('icno') ? ' has-danger' : '' }}">
|
||||
<input type="text" placeholder="Nombor Kad Pengenalan" class="form-control{{ $errors->has('icno') ? ' is-invalid' : '' }}" id="login-icno" name="icno" required aria-required="true">
|
||||
</div>
|
||||
|
||||
<span id="spanic" class="text-danger invisible" role="alert">
|
||||
<small><strong id="erroricno">ss</strong></small>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-4 col-xs-6">
|
||||
|
||||
</div>
|
||||
<div class="col-sm-8 col-xs-6 text-right">
|
||||
<button id="seterusbtn" class="btn btn-success login pull-right" type="button" onclick="checkpelanggan();">Seterusnya</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-xs-12 forgetpassword">
|
||||
<center>
|
||||
<div class="forgot-password">
|
||||
<a href="{{ route('login') }}" class="text-light">
|
||||
<font color="#3598dc">Log-Masuk</font>
|
||||
</a> |@if (Route::has('password.request')) <a href="{{ route('password.request') }}" class="text-light">
|
||||
<font color="#3598dc">Lupa Katalaluan</font>
|
||||
</a>@endif
|
||||
</div>
|
||||
<div style="font-size: 10px;"><br><br>Paparan terbaik menggunakan Mozilla Firefox, Google Chrome & Internet Explorer 9.0 ke atas dengan resolusi 1920 x 1080</div>
|
||||
</center>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{{-- </form> --}}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<br>
|
||||
</div>
|
||||
<div class="col-md-6 col-xl-6 py-0 px-0">
|
||||
<div>
|
||||
<div style="position: relative;text-align:center;color:white;">
|
||||
|
||||
@include('auth.slides.slidespage')
|
||||
|
||||
<div id="makpel" class="card-body bg-secondary px-lg-5 py-lg-5 rounded w-75 invisible" style="position: absolute;top:50%;left:50%;transform:translate(-50%,-50%);">
|
||||
<h2 class="text-center mt-2 mb-4 font-weight-bold text-uppercase">Maklumat Pelanggan</h2>
|
||||
@if (Session::has('custdetail'))
|
||||
<?php $customerdetails = Session::get('custdetail'); ?>
|
||||
@endif
|
||||
<form method="GET" action="{{ route('register') }}">
|
||||
{{-- @csrf --}}
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="name" class="col-md-2 col-lg-2 col-lx-2 col-form-label text-dark text-md-right text-xl-right">{{ __('Nama') }}</label>
|
||||
|
||||
<div class="col-md-10">
|
||||
<input autocomplete="off" type="text" name="name" class="form-control @error('name') is-invalid @enderror" value="{{ Session::has('custdetail') ? $customerdetails[0]['nama'] : old('name') }}" readonly>
|
||||
|
||||
@error('name')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="icno" class="col-md-2 col-form-label text-dark text-md-right">{{ __('No IC') }}</label>
|
||||
|
||||
<div class="col-md-4">
|
||||
<input autocomplete="off" type="text" name="icno" class="form-control @error('icno') is-invalid @enderror" value="{{ Session::has('custdetail') ? $customerdetails[0]['kpbaru'] : old('icno') }}" readonly>
|
||||
@error('icno')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
<label for="notel" class="col-md-2 col-form-label text-dark text-md-right">{{ __('No. Tel') }}</label>
|
||||
<div class="col-md-4">
|
||||
<input autocomplete="off" type="text" name="notel" class="form-control" value="{{ Session::has('custdetail') ? $customerdetails[0]['telefon'] : old('notel') }}" disabled>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="alamat" class="col-md-2 col-form-label text-dark text-md-right">{{ __('Alamat') }}</label>
|
||||
<div class="col-md-10">
|
||||
@php
|
||||
// $koddaerah = Http::get(config('api.url') .'/api/daerah/' .$customerdetails[0]['koddaerah'] )->json();
|
||||
// $kodnegeri = Http::get(config('api.url') .'/api/negeri/' .$customerdetails[0]['kodnegeri'] )->json();
|
||||
|
||||
@endphp
|
||||
<textarea name="alamat" class="form-control" rows="3" disabled>{{ Session::has('custdetail') ? $customerdetails[0]['alamat1'] . ' ' . $customerdetails[0]['alamat2'] : old('alamat') }}
|
||||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="icno" class="col-md-2 col-form-label text-dark text-md-right">{{ __('Poskod') }}</label>
|
||||
|
||||
<div class="col-md-4">
|
||||
<input autocomplete="off" type="text" name="poskod" class="form-control @error('poskod') is-invalid @enderror" value="{{ Session::has('custdetail') ? $customerdetails[0]['poskod'] : old('poskod') }}" disabled>
|
||||
@error('poskod')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
<label for="namadaerah" class="col-md-2 col-form-label text-dark text-md-right">{{ __('Daerah') }}</label>
|
||||
<div class="col-md-4">
|
||||
<input autocomplete="off" type="text" name="namadaerah" class="form-control" value="{{ Session::has('custdetail') ? $koddaerah['namadaerah'] : old('namadaerah') }}" disabled>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="negeri" class="col-md-2 col-form-label text-dark text-md-right">{{ __('Negeri') }}</label>
|
||||
|
||||
<div class="col-md-10">
|
||||
<input autocomplete="off" type="text" name="negeri" class="form-control @error('negeri') is-invalid @enderror" value="{{ Session::has('custdetail') ? $kodnegeri['negeri'] : old('negeri') }}" disabled>
|
||||
|
||||
@error('negeri')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<span class="text-danger text-xl-center font-weight-bold"><small>*Diminta untuk semak maklumat pelanggan terlebih dahulu!</small></span><br>
|
||||
<button id="betulbtn" type="submit" class="btn btn-success mt-2">Betul</button>
|
||||
<button type="button" class="btn btn-danger mt-2" onclick="backfunc()">Salah</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="modal-loading" name="myModal" class="modalloading modal fade" role="dialog" style="display:none">
|
||||
|
||||
<div class="modal-dialog-loading">
|
||||
<img src="{{ asset('argon') }}/login/curvebars.svg" style="height:150px;width:150px;">
|
||||
<div class="modal-dialog-loading">
|
||||
<img src="{{ asset('argon') }}/login/curvebars.svg" style="height:150px;width:150px;">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
let api_url = "{{ config('api.url') }}";
|
||||
|
||||
|
||||
function checkpelanggan()
|
||||
{
|
||||
|
||||
function checkpelanggan() {
|
||||
var otp_verify = $('#login-otp').val();
|
||||
var otp_icno = $('#login-icno').val();
|
||||
var boolotp = false;var boolicno = false;
|
||||
var boolotp = false;
|
||||
var boolicno = false;
|
||||
|
||||
if(otp_verify == null || otp_verify == '')
|
||||
{
|
||||
if (otp_verify == null || otp_verify == '') {
|
||||
$('#errorotp').text('sila isikan otp anda!');
|
||||
$('#spanotp').addClass('visible');
|
||||
$('#spanotp').removeClass('invisible');
|
||||
boolotp = true;
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
$('#errorotp').text('');
|
||||
$('#spanotp').addClass('invisible');
|
||||
$('#spanotp').removeClass('visible');
|
||||
boolotp = false;
|
||||
}
|
||||
|
||||
if(otp_icno == null || otp_icno == '')
|
||||
{
|
||||
if (otp_icno == null || otp_icno == '') {
|
||||
$('#erroricno').text('sila isikan icno anda!');
|
||||
$('#spanic').addClass('visible');
|
||||
$('#spanic').removeClass('invisible');
|
||||
boolicno = true;
|
||||
}else{
|
||||
} else {
|
||||
$('#erroricno').text('');
|
||||
$('#spanic').addClass('invisible');
|
||||
$('#spanic').removeClass('visible');
|
||||
boolicno = false;
|
||||
}
|
||||
|
||||
if(boolotp === false && boolicno === false)
|
||||
{
|
||||
if (boolotp === false && boolicno === false) {
|
||||
$.ajax({
|
||||
url: api_url + '/api/otp/check/'+ otp_verify,
|
||||
method:'GET',
|
||||
success:function(data){
|
||||
|
||||
if(data.length > 0)
|
||||
{
|
||||
console.log(data[0].nokp);
|
||||
$.ajax({
|
||||
url: api_url + '/api/customers/'+ data[0].nokp,
|
||||
method:'GET',
|
||||
success:function(data){
|
||||
|
||||
$('input[name="name"]').val(data.nama);
|
||||
$('input[name="icno"]').val(data.kpbaru);
|
||||
$('input[name="notel"]').val(data.telefon);
|
||||
$('input[name="poskod"]').val(data.poskod);
|
||||
$('textarea[name="alamat"]').val(data.alamat1);
|
||||
url: api_url + '/api/otp/check/' + otp_verify,
|
||||
method: 'GET',
|
||||
success: function(data) {
|
||||
|
||||
if (data.length > 0) {
|
||||
console.log(data[0].nokp);
|
||||
$.ajax({
|
||||
url: api_url + '/api/daerah/'+ data.koddaerah,
|
||||
method:'GET',
|
||||
success:function(data){
|
||||
console.log(data);
|
||||
$('input[name="namadaerah"]').val(data.namadaerah);
|
||||
}
|
||||
url: api_url + '/api/customers/' + data[0].nokp,
|
||||
method: 'GET',
|
||||
success: function(data) {
|
||||
|
||||
$('input[name="name"]').val(data.nama);
|
||||
$('input[name="icno"]').val(data.kpbaru);
|
||||
$('input[name="notel"]').val(data.telefon);
|
||||
$('input[name="poskod"]').val(data.poskod);
|
||||
$('textarea[name="alamat"]').val(data.alamat1);
|
||||
|
||||
$.ajax({
|
||||
url: api_url + '/api/daerah/' + data.koddaerah,
|
||||
method: 'GET',
|
||||
success: function(data) {
|
||||
console.log(data);
|
||||
$('input[name="namadaerah"]').val(data.namadaerah);
|
||||
}
|
||||
});
|
||||
$.ajax({
|
||||
url: api_url + '/api/negeri/' + data.kodnegeri,
|
||||
method: 'GET',
|
||||
success: function(data) {
|
||||
console.log(data);
|
||||
$('input[name="negeri"]').val(data.negeri);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$('#spanic').addClass('invisible');
|
||||
$('#spanic').removeClass('visible');
|
||||
$('#spanic').addClass('invisible');
|
||||
$('#spanic').removeClass('visible');
|
||||
$("#seterusbtn").prop("disabled", true);
|
||||
|
||||
$('#makpel').addClass('visible');
|
||||
$('#makpel').removeClass('invisible');
|
||||
|
||||
}
|
||||
});
|
||||
$.ajax({
|
||||
url: api_url + '/api/negeri/'+ data.kodnegeri,
|
||||
method:'GET',
|
||||
success:function(data){
|
||||
console.log(data);
|
||||
$('input[name="negeri"]').val(data.negeri);
|
||||
}
|
||||
} else {
|
||||
$.notify({
|
||||
icon: 'fas fa-exclamation-triangle fa-2x',
|
||||
newest_on_top: true,
|
||||
message: "<strong style='font-size:15px;text-align:center;margin-left:100px;'>Pelanggan tidak membuat sebarang login!</strong>"
|
||||
}, {
|
||||
type: 'danger',
|
||||
allow_dismiss: false,
|
||||
placement: {
|
||||
align: 'center',
|
||||
from: 'bottom'
|
||||
},
|
||||
animate: {
|
||||
enter: 'animate__animated animate__bounce',
|
||||
|
||||
exit: 'animate__animated animate__bounceOutDown'
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$('#spanic').addClass('invisible');
|
||||
$('#spanic').removeClass('visible');
|
||||
$('#spanic').addClass('invisible');
|
||||
$('#spanic').removeClass('visible');
|
||||
$("#seterusbtn").prop("disabled",true);
|
||||
|
||||
$('#makpel').addClass('visible');
|
||||
$('#makpel').removeClass('invisible');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
else{
|
||||
$.notify({
|
||||
icon: 'fas fa-exclamation-triangle fa-2x',
|
||||
newest_on_top: true,
|
||||
message: "<strong style='font-size:15px;text-align:center;margin-left:100px;'>Pelanggan tidak membuat sebarang login!</strong>"
|
||||
},{
|
||||
type: 'danger',
|
||||
allow_dismiss: false,
|
||||
placement:{ align:'center',from:'bottom'},
|
||||
animate: {
|
||||
enter: 'animate__animated animate__bounce',
|
||||
|
||||
exit: 'animate__animated animate__bounceOutDown'
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function backfunc()
|
||||
{
|
||||
function backfunc() {
|
||||
$('#makpel').addClass('invisible');
|
||||
$('#makpel').removeClass('visible');
|
||||
$("#seterusbtn").prop("disabled",false);
|
||||
$("#seterusbtn").prop("disabled", false);
|
||||
}
|
||||
|
||||
// $('body').on('click', '.loading', function() {
|
||||
// loading();
|
||||
// });
|
||||
|
||||
$(function () {
|
||||
$('.login-form').submit(function () {
|
||||
if($(this).valid()) {
|
||||
//
|
||||
}
|
||||
else {
|
||||
loading_close();
|
||||
}
|
||||
});
|
||||
// $('body').on('click', '.loading', function() {
|
||||
// loading();
|
||||
// });
|
||||
|
||||
$(function() {
|
||||
$('.login-form').submit(function() {
|
||||
if ($(this).valid()) {
|
||||
//
|
||||
} else {
|
||||
loading_close();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var slideIndex = 0;
|
||||
showSlides();
|
||||
var slideIndex = 0;
|
||||
showSlides();
|
||||
|
||||
function showSlides() {
|
||||
function showSlides() {
|
||||
var i;
|
||||
var slides = document.getElementsByClassName("mySlides");
|
||||
for (i = 0; i < slides.length; i++) {
|
||||
slides[i].style.display = "none";
|
||||
}
|
||||
slideIndex++;
|
||||
if (slideIndex > slides.length) {slideIndex = 1}
|
||||
slides[slideIndex-1].style.display = "block";
|
||||
setTimeout(showSlides, 10000); // Change image every 2 seconds
|
||||
if (slideIndex > slides.length) {
|
||||
slideIndex = 1
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<!-- END : LOGIN PAGE 5-2 -->
|
||||
<!--[if lt IE 9]>
|
||||
slides[slideIndex - 1].style.display = "block";
|
||||
setTimeout(showSlides, 10000); // Change image every 2 seconds
|
||||
}
|
||||
</script>
|
||||
<!-- END : LOGIN PAGE 5-2 -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="assets/global/plugins/respond.min.js"></script>
|
||||
<script src="assets/global/plugins/excanvas.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
@endsection
|
||||
@endsection
|
||||
Reference in New Issue
Block a user