DONE: use flexible name for api call in frontend

This commit is contained in:
ISMAIL MASSERAN
2026-08-09 10:18:26 +08:00
parent 3d3a7f35f9
commit 87e2aaad50
106 changed files with 594 additions and 111 deletions
+3 -3
View File
@@ -326,7 +326,7 @@
</div>
<script src="{{ asset('js/rounded-methods.js') }}"></script>
<script>
var api_url = "<?php echo $api_url ?>";
var api_url = "{{ api_url_for_browser() }}";
var kodcaw_ujrah = "<?php echo $cawangan_info['kodcaw'] ?>";
$('form input').keydown(function (e) {
@@ -768,7 +768,7 @@
// Call API to get specific MaxMutuEmas data by karat
$.ajax({
url: '{{ config("api.url") }}/api/maxmutuemas/specific',
url: '{{ api_url_for_browser() }}/api/maxmutuemas/specific',
type: 'GET',
data: { karat: karat, nilaimarhun: nm },
success: function(response) {
@@ -1816,7 +1816,7 @@
rowsData.forEach((rowData) => {
// Call API to get margin data for each individual item
$.ajax({
url: '{{ config("api.url") }}/api/maxmutuemas/specific',
url: '{{ api_url_for_browser() }}/api/maxmutuemas/specific',
type: 'GET',
data: { karat: rowData.karat, nilaimarhun: rowData.nilaiMarhun },
success: function(response) {