fix skit2

This commit is contained in:
hafifierahman
2022-03-02 16:29:02 +08:00
parent 66ce944b7f
commit a831fb4276
3 changed files with 53 additions and 4 deletions
@@ -91,7 +91,7 @@
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
<div class="flex items-center">
<div class="ml-3">
<button type="button" data-modal-toggle="popup-modal" class="border border-yellow-600 text-yellow-600 font-montserrat py-2 px-4 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300">
<button type="button" @click="bayaranfunc(bayaran.id)" data-modal-toggle="popup-modal" class="border border-yellow-600 text-yellow-600 font-montserrat py-2 px-4 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300">
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z" />
@@ -162,7 +162,7 @@
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
<div class="flex items-center">
<div class="ml-3">
<button type="button" data-modal-toggle="popup-modal" class="border border-yellow-600 text-yellow-600 font-montserrat py-2 px-4 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300">
<button type="button" @click="upahfunc(upah.norujukan)" data-modal-toggle="popup-modal" class="border border-yellow-600 text-yellow-600 font-montserrat py-2 px-4 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300">
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z" />
@@ -266,7 +266,7 @@
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
<div class="flex items-center">
<div class="ml-3">
<button type="button" data-modal-toggle="popup-modal" class="border border-yellow-600 text-yellow-600 font-montserrat py-2 px-4 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300">
<button type="button" @click="rekodfunc(rekod.norujukan,rekod.jenistebus,rekod.hargajualan)" data-modal-toggle="popup-modal" class="border border-yellow-600 text-yellow-600 font-montserrat py-2 px-4 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300">
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z" />
@@ -347,6 +347,45 @@ export default {
this.objupah = response.data;
});
},
bayaranfunc: function(id){
// var urlroute = '{{ route("resit.ansuran", ":id") }}';
console.log(route().has('resit.ansuran'))
return window.route('resit.ansuran', id)
},
upahfunc: function(norujukan){
// var urlroute = '{{ route("resit.advansur", ":id") }}';
console.log(norujukan)
},
rekodfunc: function(norujukan,sttebus,hargajualan){
switch(sttebus) {
case 'P':
var urlroute = '{{ route("resit.tambahpinjam", ":id") }}';
urlroute = urlroute.replace(':id', tebusaz['norujukan']);
break;
case 'T':
if(hargajualan === '')
{
var urlroute = '{{ route("resit.belumtebus", ":id") }}';
urlroute = urlroute.replace(':id', tebusaz['norujukan']);
}else{
var urlroute = '{{ route("resit.tebus", ":id") }}';
urlroute = urlroute.replace(':id', tebusaz['norujukan']);
}
break;
case 'A':
var urlroute = '{{ route("resit.belumansurans", ":id") }}';
urlroute = urlroute.replace(':id', tebusaz['norujukan']);
break;
case 'S':
var urlroute = '{{ route("resit.tebusseparuh", ":id") }}';
urlroute = urlroute.replace(':id', tebusaz['norujukan']);
break;
}
console.log(norujukan)
},
}
}
</script>
@@ -9,7 +9,7 @@
<breadcrumb :items="[{ 'title' : 'Pelanggan', 'icon' : 'fas fa-users' },{ 'title' : 'Butiran', 'icon' : 'fas fa-users' }]"></breadcrumb>
<details-pelanggan :customer="{{ json_encode($customer_info) }}"></details-pelanggan>
<details-pelanggan :customer="{{ json_encode($customer_info) }}" :route="'{{ route('resit.ansuran', [""]) }}'"></details-pelanggan>
</div>
</main>
+10
View File
@@ -81,3 +81,13 @@ Route::get('/akaunhome/cetakperbelanjaan',['as'=>'cetak.perbelanjaan','uses'=>'A
//Resit
Route::get('/resit/{id}',['as'=>'resit.ansuran','uses'=>'ResitController@resit']);
Route::get('/resitansurans/{id}',['as'=>'resit.ansurans','uses'=>'ResitController@resitansurans']);
Route::get('/resitbelumansurans/{id}',['as'=>'resit.belumansurans','uses'=>'ResitController@resitbelumansurans']);
Route::get('/resit/tebus/{id}',['as'=>'resit.tebus','uses'=>'ResitController@resittebus']);
Route::get('/resit/advansur/{id}',['as'=>'resit.advansur','uses'=>'ResitController@resitadvansur']);
Route::get('/resit/tebusseparuh/{id}',['as'=>'resit.tebusseparuh','uses'=>'ResitController@resittebusseparuh']);
Route::get('/resit/belumtebus/{id}',['as'=>'resit.belumtebus','uses'=>'ResitController@resitbelumtebus']);
Route::get('/resit/tambahpinjam/{id}',['as'=>'resit.tambahpinjam','uses'=>'ResitController@resittambahpinjam']);
Route::get('/resit/tebusautotawarruq/{id}',['as'=>'resit.autotawarruq','uses'=>'ResitController@resitautotawarruq']);