changed API urls to relative paths

This commit is contained in:
2024-02-17 10:08:24 +00:00
parent 8eef7d0c28
commit 917ebfeb7c
19 changed files with 299 additions and 2753 deletions

View File

@@ -22,7 +22,7 @@ $(document).ready(function () {
initialValueType: "persian",
});
let reqUrl = "https://rms.rmto.ir/public/contents/provinces";
let reqUrl = "/public/contents/provinces";
$.ajax({
url: reqUrl,
@@ -112,10 +112,10 @@ $(document).ready(function () {
},
});
// $.getScript('https://rms.rmto.ir/version2/js/dashboard_pages/road_observations/test.js');
// $.getScript('/version2/js/dashboard_pages/road_observations/test.js');
$.ajax({
url: "https://rms.rmto.ir/webapi/user/get-permission",
url: "/webapi/user/get-permission",
type: "GET",
cache: false,
async: false,
@@ -171,7 +171,7 @@ $("#sorttestitems").on("click", function() {
$("#gozarehtowntable")
.DataTable()
.ajax.url(
"https://rms.rmto.ir/v2/road_observations/report/report_table" +
"/v2/road_observations/report/report_table" +
"?from_date=" +
date_from +
"&date_to=" +
@@ -219,7 +219,7 @@ function rendertable(PROVINCES) {
processing: true,
select: true,
ajax: {
url: "https://rms.rmto.ir/v2/road_observations/report/report_table",
url: "/v2/road_observations/report/report_table",
type: "GET",
dataSrc: function (json) {
// let temp = []
@@ -533,7 +533,7 @@ function rendertable(PROVINCES) {
queryParems.push(`toDate=${date_to}`);
// }
// if (province != 0) queryParems.push(`province_id=${province}`);
const url = `https://rms.rmto.ir/v2/road_observations/report/report${queryParems.length != 0 ? `?${queryParems.join("&")}` : ""}`;
const url = `/v2/road_observations/report/report${queryParems.length != 0 ? `?${queryParems.join("&")}` : ""}`;
window.open(url, "_blank");
},
},

View File

@@ -2,11 +2,11 @@
var operationCartable;
var operationCartable_url = "/v2/road_observations/operator/cartable/show";
const MAP_ENDPOINT = "https://rmsmap.rmto.ir";
var provinces_api = "https://rms.rmto.ir/webapi/getuser/province-perm";
var permission_api = "https://rms.rmto.ir/webapi/user/get-permission";
var provinces_api = "/webapi/getuser/province-perm";
var permission_api = "/webapi/user/get-permission";
var update_api = "/v2/road_observations/handle/"
var items_api = "/v2/items";
var excel_api = 'https://rms.rmto.ir/v2/road_observations/operator/cartable/report';
var excel_api = '/v2/road_observations/operator/cartable/report';
var markers = [];
var markersLayer;
var editMap = null;

View File

@@ -970,7 +970,7 @@ function pendingTableFunc() {
queryParems.push(`toDate=${currentDate.to}`);
}
if (province != 0) queryParems.push(`province_id=${province}`);
const url = `https://rms.rmto.ir/v2/road_observations/report/pending${queryParems.length != 0 ? `?${queryParems.join("&")}` : ""}`;
const url = `/v2/road_observations/report/pending${queryParems.length != 0 ? `?${queryParems.join("&")}` : ""}`;
window.open(url, "_blank");
},
},
@@ -979,7 +979,7 @@ function pendingTableFunc() {
className: "d-md-none mx-2",
text: '<div class="btn-table-filter"><div class="d-flex flex-column"><i class="fa mb-2 fa-reply icon-color"></i>بازگشت</div></div>',
action: function (e, dt, node, config) {
window.location = 'https://rms.rmto.ir/v2'
window.location = '/v2'
},
},
// className: "done-table-btn mx-2",

View File

@@ -3,11 +3,11 @@ var supervisorCartable;
var supervisorCartable_url = "/v2/road_observations/supervisor/cartable/show";
var verify_api = "/v2/road_observations/supervisor/cartable/verify/";
var items_api = "/v2/items";
var provinces_api = "https://rms.rmto.ir/webapi/getuser/province-perm";
var edarat_api = "https://rms.rmto.ir/public/contents/edarate_shahri_by_province/";
var permission_api = "https://rms.rmto.ir/webapi/user/get-permission";
var provinces_api = "/webapi/getuser/province-perm";
var edarat_api = "/public/contents/edarate_shahri_by_province/";
var permission_api = "/webapi/user/get-permission";
const MAP_ENDPOINT = "https://rmsmap.rmto.ir";
var excel_api = "https://rms.rmto.ir/v2/road_observations/supervisor/cartable/report";
var excel_api = "/v2/road_observations/supervisor/cartable/report";
var markers = [];
var markersLayer;
var mapZoom = getWidth() < 508 ? 5 : 6;