131 lines
3.2 KiB
PHP
131 lines
3.2 KiB
PHP
|
@extends('layout.tokomain')
|
||
|
@section('activenav', '7')
|
||
|
@section('head-content-title', 'Pesanan')
|
||
|
@section('head-back-nav')
|
||
|
<li class="breadcrumb-item active">Pesanan</li>
|
||
|
@endsection
|
||
|
@section("container")
|
||
|
<!-- Main content -->
|
||
|
<section class="content">
|
||
|
<div class="row">
|
||
|
<div class="col-12">
|
||
|
<div class="card">
|
||
|
<div class="card-body">
|
||
|
@php
|
||
|
|
||
|
$nama_perus = Session::get("toko-user")["nama_perusahaan"];
|
||
|
|
||
|
$datalogin = "SELECT * FROM usertoko WHERE nama_perusahaan = '$nama_perus'";
|
||
|
|
||
|
$datalogin = DB::select($datalogin)[0];
|
||
|
|
||
|
$alamat = $datalogin->alamat;
|
||
|
$notelp = $datalogin->notelp;
|
||
|
$kota = $datalogin->kota;
|
||
|
$provinsi = $datalogin->provinsi;
|
||
|
|
||
|
@endphp
|
||
|
<div class="form-group">
|
||
|
<label for="">Alamat</label>
|
||
|
<input type="text" id="alamat" class="form-control" value="{{$alamat}}">
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label for="">No Telp</label>
|
||
|
<input type="text" id="notelp" class="form-control" value="{{$notelp}}">
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label for="">Kota</label>
|
||
|
<input type="text" id="kota" class="form-control" value="{{$kota}}">
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label for="">Provinsi</label>
|
||
|
<input type="text" id="provinsi" class="form-control" value="{{$provinsi}}">
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</section>
|
||
|
|
||
|
<script>
|
||
|
|
||
|
$.ajaxSetup({
|
||
|
headers: {
|
||
|
'X-CSRF-TOKEN': $('meta[name=csrf-token]').attr('content')
|
||
|
}
|
||
|
})
|
||
|
|
||
|
|
||
|
$("body").on("keyup", "#alamat", function(){
|
||
|
|
||
|
let nilaiB = $(this).val();
|
||
|
|
||
|
$.ajax({
|
||
|
url: '{{url('toko/alamat')}}',
|
||
|
type: 'POST',
|
||
|
dataType: 'text',
|
||
|
data: {
|
||
|
bayar: nilaiB
|
||
|
},
|
||
|
})
|
||
|
.done(function(res) {
|
||
|
console.log(res);
|
||
|
})
|
||
|
|
||
|
});
|
||
|
|
||
|
$("body").on("keyup", "#notelp", function(){
|
||
|
|
||
|
let nilaiB = $(this).val();
|
||
|
|
||
|
$.ajax({
|
||
|
url: '{{url('toko/notelp')}}',
|
||
|
type: 'POST',
|
||
|
dataType: 'text',
|
||
|
data: {
|
||
|
bayar: nilaiB
|
||
|
},
|
||
|
})
|
||
|
.done(function(res) {
|
||
|
})
|
||
|
|
||
|
});
|
||
|
|
||
|
$("body").on("keyup", "#kota", function(){
|
||
|
|
||
|
let nilaiB = $(this).val();
|
||
|
|
||
|
$.ajax({
|
||
|
url: '{{url('toko/kota')}}',
|
||
|
type: 'POST',
|
||
|
dataType: 'text',
|
||
|
data: {
|
||
|
bayar: nilaiB
|
||
|
},
|
||
|
})
|
||
|
.done(function(res) {
|
||
|
})
|
||
|
|
||
|
});
|
||
|
|
||
|
$("body").on("keyup", "#provinsi", function(){
|
||
|
|
||
|
let nilaiB = $(this).val();
|
||
|
|
||
|
$.ajax({
|
||
|
url: '{{url('toko/provinsi')}}',
|
||
|
type: 'POST',
|
||
|
dataType: 'text',
|
||
|
data: {
|
||
|
bayar: nilaiB
|
||
|
},
|
||
|
})
|
||
|
.done(function(res) {
|
||
|
})
|
||
|
|
||
|
});
|
||
|
|
||
|
|
||
|
</script>
|
||
|
|
||
|
@endsection
|