fix komuditi pukal

This commit is contained in:
afiq
2021-01-25 08:58:30 +08:00
parent 14fbe85452
commit a9aba990fd
2 changed files with 6 additions and 4 deletions
@@ -59,6 +59,7 @@
</div>
</div>
<script>
let api_url = "{{ $api_url }}";
$(document).ready( function () {
checkKomuditi();
});
@@ -70,7 +71,7 @@
function checkKomuditi(){
$.ajax({
method:'get',
url:'http://api_arrahn.test/api/komuditi/check',
url: api_url + '/api/komuditi/check',
success:function(data){
var check_komuditi = Object.keys(data).length;
if(check_komuditi != 0){
@@ -106,7 +107,7 @@
if (komuditi) {
$.ajax({
method:'post',
url:'http://api_arrahn.test/api/komuditi/pendahuluan',
url: api_url + '/api/komuditi/pendahuluan',
data:{
'unit_komuditi':komuditi,
'purchased_by': user_name
@@ -152,7 +153,7 @@
if (komuditi) {
$.ajax({
method:'put',
url:'http://api_arrahn.test/api/komuditi/update',
url: api_url + '/api/komuditi/update',
data:{
'unit_komuditi':komuditi,
'purchased_by': user_name