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

@@ -409,7 +409,7 @@ $(document).ready(function () {
add_accident_date = modalAdd.find('#add_accident_date').persianDatepicker({
format: "YYYY/MM/DD",
minDate: new Date(2019, 03 - 1, 21), // it will set minDate from first of 1401
minDate: new Date(2019, 3 - 1, 21), // it will set minDate from first of 1401
autoClose: true,
// initialValue: false,
onSelect: function (unix) {
@@ -431,7 +431,7 @@ $(document).ready(function () {
edit_accident_date = modalEdit.find('#edit_accident_date').persianDatepicker({
format: "YYYY/MM/DD",
minDate: new Date(2019, 03 - 1, 21), // it will set minDate from first of 1401
minDate: new Date(2019, 3 - 1, 21), // it will set minDate from first of 1401
autoClose: true,
initialValue: false,
onSelect: function (unix) {
@@ -544,7 +544,7 @@ $(document).ready(function () {
// fetch accident reasons begin
$.ajax({
url: "https://rms.rmto.ir/daily_accident/accident_reasons",
url: "/daily_accident/accident_reasons",
type: "GET",
cache: false,
async: false,
@@ -566,7 +566,7 @@ $(document).ready(function () {
// fetch accident increase damage reasons begin
$.ajax({
url: "https://rms.rmto.ir/daily_accident/accident_increase_damage_reasons",
url: "/daily_accident/accident_increase_damage_reasons",
type: "GET",
cache: false,
async: false,
@@ -588,7 +588,7 @@ $(document).ready(function () {
// fetch accident participants begin
$.ajax({
url: "https://rms.rmto.ir/daily_accident/get_participants",
url: "/daily_accident/get_participants",
type: "GET",
cache: false,
async: false,
@@ -610,7 +610,7 @@ $(document).ready(function () {
// fetch accident type begin
$.ajax({
url: "https://rms.rmto.ir/daily_accident/accident_types",
url: "/daily_accident/accident_types",
type: "GET",
cache: false,
async: false,
@@ -631,7 +631,7 @@ $(document).ready(function () {
// fetch accident collision type begin
$.ajax({
url: "https://rms.rmto.ir/daily_accident/get_accident_collision_type",
url: "/daily_accident/get_accident_collision_type",
type: "GET",
cache: false,
async: false,
@@ -657,7 +657,7 @@ $(document).ready(function () {
// permissins begin
$.ajax({
url: "https://rms.rmto.ir/webapi/user/get-permission",
url: "/webapi/user/get-permission",
type: "GET",
cache: false,
async: false,
@@ -692,7 +692,7 @@ $(document).ready(function () {
$.inArray("add-accident-province", PERMISSIONS) != -1
) {
$.ajax({
url: `https://rms.rmto.ir/webapi/getuser/province-perm${$.inArray("add-accident", PERMISSIONS) != -1 ? "?type=all" : ""}`,
url: `/webapi/getuser/province-perm${$.inArray("add-accident", PERMISSIONS) != -1 ? "?type=all" : ""}`,
type: "GET",
beforeSend: function () {
showLoaderScreen();
@@ -720,7 +720,7 @@ $(document).ready(function () {
}
$.ajax({
url: `https://rms.rmto.ir/webapi/getuser/province-perm${$.inArray("edit-accident", PERMISSIONS) != -1 ? "?type=all" : ""}`,
url: `/webapi/getuser/province-perm${$.inArray("edit-accident", PERMISSIONS) != -1 ? "?type=all" : ""}`,
type: "GET",
beforeSend: function () {
showLoaderScreen();
@@ -747,7 +747,7 @@ $(document).ready(function () {
});
$.ajax({
url: `https://rms.rmto.ir/webapi/getuser/province-perm?type=all`,
url: `/webapi/getuser/province-perm?type=all`,
type: "GET",
beforeSend: function () {
showLoaderScreen();
@@ -816,7 +816,7 @@ $(document).ready(function () {
processing: true,
select: true,
ajax: {
url: "https://rms.rmto.ir/daily_accident/show",
url: "/daily_accident/show",
type: "GET",
dataSrc: function (json) {
@@ -1067,7 +1067,7 @@ $(document).ready(function () {
className: "static-btn-cta",
text: '<div class="btn-table-map"><div class="d-flex flex-column"><i class="fa mb-2 fa-map icon-color"></i>نمایش روی نقشه</div></div>',
action: function (e, dt, node, config) {
window.location = "https://rms.rmto.ir/v2/daily_accidents/map"
window.location = "/v2/daily_accidents/map"
},
},
{
@@ -1148,7 +1148,7 @@ $(document).on("click", "#add_accident", function () {
for (var pair of formData.entries()) { }
showLoaderScreen();
$.ajax({
url: "https://rms.rmto.ir/daily_accident/store",
url: "/daily_accident/store",
type: "POST",
headers: {
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content"),
@@ -1465,7 +1465,7 @@ $(document).on('click', '.btn-edit-accident', function () {
showLoaderScreen()
$.ajax({
url: `https://rms.rmto.ir/daily_accident/${id}`,
url: `/daily_accident/${id}`,
type: "GET",
headers: {
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content"),
@@ -1530,21 +1530,21 @@ $(document).on('click', '.btn-edit-accident', function () {
if (result.first_image != null) {
modal.find('#deviceImg1Title').css('display', 'none')
modal.find('#deviceImg1Preview').css('display', '')
modal.find('#deviceImg1Preview').attr('src', `https://rms.rmto.ir/storage/${result.first_image}`)
modal.find('#deviceImg1Preview').attr('src', `/storage/${result.first_image}`)
modal.find('#deleteDeviceImg1').prop('disabled', false)
}
if (result.second_image != null) {
modal.find('#deviceImg2Title').css('display', 'none')
modal.find('#deviceImg2Preview').css('display', '')
modal.find('#deviceImg2Preview').attr('src', `https://rms.rmto.ir/storage/${result.second_image}`)
modal.find('#deviceImg2Preview').attr('src', `/storage/${result.second_image}`)
modal.find('#deleteDeviceImg2').prop('disabled', false)
}
if (result.police_file != null) {
modal.find('#deviceImg3Title').css('display', 'none')
modal.find('#deviceImg3Preview').css('display', '')
modal.find('#deviceImg3Preview').attr('src', `https://rms.rmto.ir/storage/${result.police_file}`)
modal.find('#deviceImg3Preview').attr('src', `/storage/${result.police_file}`)
modal.find('#deleteDeviceImg3').prop('disabled', false)
}
@@ -1685,7 +1685,7 @@ $(document).on("click", "#edit_accident", function () {
showLoaderScreen();
$.ajax({
url: "https://rms.rmto.ir/daily_accident/update/" + modal.find('#edit_accident').data('rowId'),
url: "/daily_accident/update/" + modal.find('#edit_accident').data('rowId'),
type: "POST",
headers: {
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content"),
@@ -1746,7 +1746,7 @@ $(document).on('click', '.btn-delete-accident', function () {
preConfirm: () => {
showLoaderScreen();
$.ajax({
url: "https://rms.rmto.ir/daily_accident/delete/" + row_id,
url: "/daily_accident/delete/" + row_id,
type: "POST",
headers: {
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content"),
@@ -1960,7 +1960,7 @@ $(document).on("click", ".expert_confirmation", function () {
modal.find("button[type='unconfirm']").data("rowId", id);
modal.find("button[type='confirm']").data("rowId", id);
$.ajax({
url: `https://rms.rmto.ir/daily_accident/${id}`,
url: `/daily_accident/${id}`,
type: "GET",
cache: false,
async: false,
@@ -2061,7 +2061,7 @@ $(document).on('click', '#confirm', function () {
formData.append("state", 1);
$.ajax({
url: `https://rms.rmto.ir/daily_accident/set_state/${modal.find("button[type='confirm']").data("rowId")}`,
url: `/daily_accident/set_state/${modal.find("button[type='confirm']").data("rowId")}`,
type: "POST",
cache: false,
data: formData,
@@ -2122,7 +2122,7 @@ $(document).on("click", "#record_message", function () {
formData.append("message", message);
$.ajax({
url: `https://rms.rmto.ir/daily_accident/set_state/${modal.find("#record_message").data("rowId")}`,
url: `/daily_accident/set_state/${modal.find("#record_message").data("rowId")}`,
type: "POST",
cache: false,
data: formData,
@@ -2294,7 +2294,7 @@ $("#btn_excel-download").on("click", function () {
}
}
if (province != 0) queryParems.push(`province=${province}`);
const url = `https://rms.rmto.ir/reports/daily-accident${queryParems.length != 0 ? `?${queryParems.join("&")}` : ""}`;
const url = `/reports/daily-accident${queryParems.length != 0 ? `?${queryParems.join("&")}` : ""}`;
window.open(url, "_blank");
});
$("#btn_poster-download").on("click", function () {
@@ -2332,6 +2332,6 @@ $("#btn_poster-download").on("click", function () {
queryParems.push(`to_date=${currentDate.to}`);
}
}
const url = `https://rms.rmto.ir/daily_accident_poster${queryParems.length != 0 ? `?${queryParems.join("&")}` : ""}`;
const url = `/daily_accident_poster${queryParems.length != 0 ? `?${queryParems.join("&")}` : ""}`;
window.open(url, "_blank");
});

View File

@@ -69,7 +69,7 @@ var iranLayer = L.tileLayer(
function getProvinceList() {
return new Promise(function (resolve) {
$.ajax({
url: `https://rms.rmto.ir/webapi/getuser/province-perm?type=all`,
url: `/webapi/getuser/province-perm?type=all`,
type: "GET",
beforeSend: function () {
showLoaderScreen();
@@ -193,7 +193,7 @@ function addClusterMarkers(data) {
.setContent("در حال بروزرسانی ...")
.openOn(mymap);
$.ajax({
url: `https://rms.rmto.ir/daily_accident/${item.id}`,
url: `/daily_accident/${item.id}`,
type: "GET",
beforeSend: function () {
showLoaderScreen();
@@ -392,7 +392,7 @@ function GetData() {
}
if (queryParems.length != 0) {
$.ajax({
url: `https://rms.rmto.ir/daily_accident_map/accidents${queryParems.length != 0 ? `?${queryParems.join('&')}` : ''}`,
url: `/daily_accident_map/accidents${queryParems.length != 0 ? `?${queryParems.join('&')}` : ''}`,
type: "GET",
beforeSend: function () {
showLoaderScreen();

View File

@@ -81,7 +81,7 @@ var iranLayer = L.tileLayer(
{}
);
$.ajax({
url: "https://rms.rmto.ir/api/get-items-and-subs",
url: "/api/get-items-and-subs",
type: "GET",
async: false,
success: function (data) {
@@ -100,7 +100,7 @@ $.ajax({
},
});
$.ajax({
url: "https://rms.rmto.ir/csi/operation",
url: "/csi/operation",
type: "GET",
cache: false,
contentType: false,
@@ -128,7 +128,7 @@ $.ajax({
},
});
$.ajax({
url: "https://rms.rmto.ir/api/get-items-and-subs",
url: "/api/get-items-and-subs",
type: "GET",
async: false,
success: function (data) {
@@ -520,7 +520,7 @@ $("#filterEnd").on("click", function () {
"jYYYY/jM/jD"
).format("YYYY-MM-DD");
let url = "https://rms.rmto.ir/api/axis-report?";
let url = "/api/axis-report?";
let param = "";
param += `slat=${startAbrarMarker.getLatLng().lat.toFixed(6)}`;
@@ -593,7 +593,7 @@ $("#filterEnd").on("click", function () {
$("#excelEnd").on("click", function () {
console.log(excelParam);
const url = `https://rms.rmto.ir/api/axis-report-excel${excelParam != "" ? `?${excelParam}` : ""
const url = `/api/axis-report-excel${excelParam != "" ? `?${excelParam}` : ""
}`;
window.open(url, "_blank");
@@ -685,7 +685,7 @@ function removeAxisMarker() {
function showModalPoints(id, type) {
$.ajax({
url:
"https://rms.rmto.ir/api/axis-report/single?id=" + id + "&type=" + type,
"/api/axis-report/single?id=" + id + "&type=" + type,
type: "GET",
success: function (data) {
$("#points-data").modal("show");
@@ -743,9 +743,9 @@ function completeModalWithData(data, id) {
</thead>
<tbody>
<tr class="showphotocell">
<td><img src="https://rms.rmto.ir/storage/${data.data.files[0].path
<td><img src="/storage/${data.data.files[0].path
}"></td>
<td><img src="https://rms.rmto.ir/storage/${data.data.files[1].path
<td><img src="/storage/${data.data.files[1].path
}"></td>
</tr>
</tbody>
@@ -855,11 +855,11 @@ function completeModalWithData(data, id) {
</thead>
<tbody>
<tr class="showphotocell">
<td><img src="https://rms.rmto.ir/${data.data[0].image_path1.replace(
<td><img src="/${data.data[0].image_path1.replace(
"public",
"storage"
)}"></td>
<td><img src="https://rms.rmto.ir/${data.data[0].image_path2.replace(
<td><img src="/${data.data[0].image_path2.replace(
"public",
"storage"
)}"></td>
@@ -901,7 +901,7 @@ function showBodyFast(data) {
var bodycol = "";
for (var i = 0; i < data.length; i++) {
bodycol += `<td><img src="https://rms.rmto.ir/${data[i].path.replace(
bodycol += `<td><img src="/${data[i].path.replace(
"public",
"storage"
)}"></td>`;

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;

View File

@@ -1,20 +1,20 @@
//variables
const get_rahdari_projects_by_filter_api = "https://rms.rmto.ir/v2/contract/report/map";
const get_road_items_by_filter_api = "https://rms.rmto.ir/api/get-items-on-map";
const get_road_patrols_by_filter_api = "https://rms.rmto.ir/v2/road_patrols/report/map";
const get_safety_and_privacy_by_filter_api = "https://rms.rmto.ir/v2/safety_and_privacy/report/map";
const get_road_observations_by_filter_api = "https://rms.rmto.ir/public/homeprojects/fast/points";
const get_rahdari_projects_by_id = "https://rms.rmto.ir/v2/rahdari_projects/project/";
const get_road_items_by_id = "https://rms.rmto.ir/public/projects/road-items/";
const get_road_patrols_by_id = "https://rms.rmto.ir/v2/road_patrols/report/";
const get_safety_and_privacy_by_id = "https://rms.rmto.ir/v2/safety_and_privacy/";
const get_road_observations_by_id = "https://rms.rmto.ir/v2/road_observations/";
const provinces_api = "https://rms.rmto.ir/webapi/getuser/province-perm?type=all";
const edarat_api = "https://rms.rmto.ir/public/contents/edarate_shahri_by_province/";
const road_items_items_api = "https://rms.rmto.ir/v2/items";
const road_items_subitems_api = "https://rms.rmto.ir/v2/sub_items/";
const safety_and_privacy_subitems_api = "https://rms.rmto.ir/v2/safety_and_privacy/sub_item_list";
const unserializeJudiciaryDocument_url = "https://rms.rmto.ir/v2/safety_and_privacy/operator/cartable/unserialize/judiciary_document/";
const get_rahdari_projects_by_filter_api = "/v2/contract/report/map";
const get_road_items_by_filter_api = "/api/get-items-on-map";
const get_road_patrols_by_filter_api = "/v2/road_patrols/report/map";
const get_safety_and_privacy_by_filter_api = "/v2/safety_and_privacy/report/map";
const get_road_observations_by_filter_api = "/public/homeprojects/fast/points";
const get_rahdari_projects_by_id = "/v2/rahdari_projects/project/";
const get_road_items_by_id = "/public/projects/road-items/";
const get_road_patrols_by_id = "/v2/road_patrols/report/";
const get_safety_and_privacy_by_id = "/v2/safety_and_privacy/";
const get_road_observations_by_id = "/v2/road_observations/";
const provinces_api = "/webapi/getuser/province-perm?type=all";
const edarat_api = "/public/contents/edarate_shahri_by_province/";
const road_items_items_api = "/v2/items";
const road_items_subitems_api = "/v2/sub_items/";
const safety_and_privacy_subitems_api = "/v2/safety_and_privacy/sub_item_list";
const unserializeJudiciaryDocument_url = "/v2/safety_and_privacy/operator/cartable/unserialize/judiciary_document/";
let FILTERQUERY = {}
let TYPE;
MINZOOM = 5;
@@ -998,7 +998,7 @@ const roadPatrolsCreateMarkers = (data) => {
const plaque = result.officer_plaque.split("-");
modal.find('#modal_details_officer_plaque').html(`<div class="d-flex align-items-center justify-content-center" style="direction: ltr;"><div class="mr-1">${plaque[0]}</div><div class="mr-1">${plaque[1] == "*" ? '<i class="fa fa-wheelchair"></i>' : plaque[1]}</div><div class="mr-1">${plaque[2]}</div>-<div class="ml-1 mr-1">ایران</div><div>${plaque[3]}</div></div>`)
modal.find('#modal_details_distance').text(`${result.distance} کیلومتر`)
modal.find('#modal_detail_report_link').attr('href',`https://rms.rmto.ir/v2/road_patrols/operator/report/${data[i].id}`)
modal.find('#modal_detail_report_link').attr('href',`/v2/road_patrols/operator/report/${data[i].id}`)
modal.modal('show')
hideLoaderScreen()
},
@@ -1186,10 +1186,10 @@ const RoadObservationsCreateMarkers = (data) => {
if (result.data.image_before || result.data.image_after) {
modal.find('#modal_details_images').addClass('d-flex')
modal.find('#modal_details_images').removeClass('d-none')
modal.find('#modal_details_image_before').attr('href', 'https://rms.rmto.ir/' + result.data.image_before)
modal.find('#modal_details_image_before_img').attr('src', 'https://rms.rmto.ir/' + result.data.image_before)
modal.find('#modal_details_image_after').attr('href', 'https://rms.rmto.ir/' + result.data.image_after)
modal.find('#modal_details_image_after_img').attr('src', 'https://rms.rmto.ir/' + result.data.image_after)
modal.find('#modal_details_image_before').attr('href', '/' + result.data.image_before)
modal.find('#modal_details_image_before_img').attr('src', '/' + result.data.image_before)
modal.find('#modal_details_image_after').attr('href', '/' + result.data.image_after)
modal.find('#modal_details_image_after_img').attr('src', '/' + result.data.image_after)
}
modal.modal('show')
hideLoaderScreen()

View File

@@ -284,7 +284,7 @@ $(document).bind('click', function (e) {
$(document).ready(function () {
$.ajax({
url: "https://rms.rmto.ir/webapi/user/get-permission",
url: "/webapi/user/get-permission",
type: "GET",
cache: false,
async: false,
@@ -387,7 +387,7 @@ $(document).ready(function () {
select: true,
destroy: true,
ajax: {
url: "https://rms.rmto.ir/rahdari-points",
url: "/rahdari-points",
type: "GET",
dataSrc: function (json) {
@@ -702,7 +702,7 @@ $("#example").on("click", "button.rahdari-control", function () {
$("#lat-rahdar").val(lat);
$("#lng-rahdar").val(lng);
for (i = 0; i < row.data().files.length; i++) {
$("#rahdaredit #deviceImg" + (i + 1) + "Preview").attr("src", "https://rms.rmto.ir/storage/" + row.data().files[i].path);
$("#rahdaredit #deviceImg" + (i + 1) + "Preview").attr("src", "/storage/" + row.data().files[i].path);
}
if (document.getElementById("deviceImg1Preview").hasAttribute('src')) {
@@ -1025,11 +1025,11 @@ function showModalRahdari(id) {
$("#rahdaredit").modal("show");
}
$("#submitNewRow").on("click", function () {
let url = "https://rms.rmto.ir/rahdari/road-maintenance-project/create";
let url = "/rahdari/road-maintenance-project/create";
if (edit) {
url =
"https://rms.rmto.ir/rahdari/road-maintenance-project/" +
"/rahdari/road-maintenance-project/" +
idEdit +
"/edit";
}
@@ -1423,7 +1423,7 @@ $("#submitNewRow").on("click", function () {
function ajaxcalltable() {
$.ajax({
url: "https://rms.rmto.ir/rahdari/road-maintenance-project/getlist",
url: "/rahdari/road-maintenance-project/getlist",
type: "GET",
success: function (result) {
// console.log(result.data[0]);
@@ -1459,35 +1459,35 @@ function restrictInputOtherThanArabic($field) {
$("#approveprojecttype").on("click", function () {
if ($("#roadmaintanace").is(":checked")) {
window.open("https://rms.rmto.ir/road-maintenance-project");
window.open("/road-maintenance-project");
} else if ($("#reviewdangerpoint").is(":checked")) {
window.open("https://rms.rmto.ir/road-danger-prevention");
window.open("/road-danger-prevention");
} else if ($("#improveroad").is(":checked")) {
window.open("https://rms.rmto.ir/road-upgrade-safety");
window.open("/road-upgrade-safety");
} else if ($("#faniproject").is(":checked")) {
window.open("https://rms.rmto.ir/road-technical-building");
window.open("/road-technical-building");
} else if ($("#rahdarkhane").is(":checked")) {
window.open("https://rms.rmto.ir/road-tollhouse-management");
window.open("/road-tollhouse-management");
} else if ($("#projectbuild").is(":checked")) {
window.open("https://rms.rmto.ir/road-construction-rural");
window.open("/road-construction-rural");
}
$("#stepModalprojecttype").modal("hide");
});
function showprojecttest(index) {
if (index == 1) {
window.open("https://rms.rmto.ir/road-maintenance-project");
window.open("/road-maintenance-project");
// to do next page
} else if (index == 2) {
window.open("https://rms.rmto.ir/road-danger-prevention");
window.open("/road-danger-prevention");
} else if (index == 3) {
window.open("https://rms.rmto.ir/road-upgrade-safety");
window.open("/road-upgrade-safety");
} else if (index == 4) {
window.open("https://rms.rmto.ir/road-technical-building");
window.open("/road-technical-building");
} else if (index == 5) {
window.open("https://rms.rmto.ir/road-tollhouse-management");
window.open("/road-tollhouse-management");
} else if (index == 6) {
window.open("https://rms.rmto.ir/road-construction-rural");
window.open("/road-construction-rural");
}
}
$("#addrahdar").on("click", function () {
@@ -1695,7 +1695,7 @@ $("#addrahdar").on("click", function () {
$.ajax({
url: "https://rms.rmto.ir/rahdari-points/create",
url: "/rahdari-points/create",
type: "POST",
data: formDatadd,
headers: {
@@ -1914,7 +1914,7 @@ $("#editrahdar").on("click", function () {
}
$.ajax({
url: "https://rms.rmto.ir/rahdari-points/" + idEdit,
url: "/rahdari-points/" + idEdit,
type: "POST",
headers: {
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content"),
@@ -1925,7 +1925,7 @@ $("#editrahdar").on("click", function () {
processData: false,
success: function (result) {
$.ajax({
url: "https://rms.rmto.ir/rahdari-points",
url: "/rahdari-points",
type: "GET",
success: function (result) {
// console.log(result.data[0]);
@@ -2034,7 +2034,7 @@ function checkPersianWordValidation(str) {
}
function getProvincesFilter() {
let reqUrl = "https://rms.rmto.ir/public/contents/provinces";
let reqUrl = "/public/contents/provinces";
// showLoaderScreen();
$.ajax({
url: reqUrl,
@@ -2063,7 +2063,7 @@ function getProvincesFilter() {
function getProvincesAdd() {
/// [start] tollhouse_add_province_url
let reqUrl = `https://rms.rmto.ir/webapi/getuser/province-perm${$.inArray('add-tollhouse', PERMISSIONS) != -1 ? '?type=all' : ''}`
let reqUrl = `/webapi/getuser/province-perm${$.inArray('add-tollhouse', PERMISSIONS) != -1 ? '?type=all' : ''}`
/// [end] tollhouse_add_province_url
// showLoaderScreen();
@@ -2095,7 +2095,7 @@ function getProvincesAdd() {
function getProvincesEdit() {
/// [start] tollhouse_edit_tollhouse_url
let reqUrl = `https://rms.rmto.ir/webapi/getuser/province-perm${$.inArray('edit-tollhouse', PERMISSIONS) != -1 ? '?type=all' : ''}`
let reqUrl = `/webapi/getuser/province-perm${$.inArray('edit-tollhouse', PERMISSIONS) != -1 ? '?type=all' : ''}`
/// [end] tollhouse_edit_ptollhouse_url
// showLoaderScreen();
@@ -2126,7 +2126,7 @@ function getProvincesEdit() {
}
function getTowns(id, val) {
let reqUrl = "https://rms.rmto.ir/public/contents/provinces/" + id;
let reqUrl = "/public/contents/provinces/" + id;
showLoaderScreen();
$.ajax({
url: reqUrl,
@@ -2147,7 +2147,7 @@ function getTowns(id, val) {
}
function getTowns2(id, val) {
let reqUrl = "https://rms.rmto.ir/public/contents/provinces/" + id;
let reqUrl = "/public/contents/provinces/" + id;
showLoaderScreen();
$.ajax({
url: reqUrl,
@@ -2335,7 +2335,7 @@ $(document).on('click', '.btn-show-img-subitem', function () {
var tr = $(this).closest("tr");
var row = table.row(tr);
for (i = 0; i < row.data().files.length; i++) {
$('#imgSubItem' + (i + 1)).attr('src', 'https://rms.rmto.ir/storage/' + row.data().files[i].path);
$('#imgSubItem' + (i + 1)).attr('src', '/storage/' + row.data().files[i].path);
}
$('#subItemImgModal').modal('show')
@@ -2358,7 +2358,7 @@ $("#example").on("click", "button.deletsubmit", function () {
showLoaderOnConfirm: true,
preConfirm: () => {
$.ajax({
url: "https://rms.rmto.ir/rahdari-points/" + idkol + "/delete",
url: "/rahdari-points/" + idkol + "/delete",
type: "POST",
headers: {
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content"),
@@ -2407,7 +2407,7 @@ $("#btn_filter_show").on("click", function () {
queryParems.push(`type=${typearray}`)
}
const url = `https://rms.rmto.ir/rahdari-points${queryParems.length != 0 ? `?${queryParems.join('&')}` : ''}`
const url = `/rahdari-points${queryParems.length != 0 ? `?${queryParems.join('&')}` : ''}`
$.ajax({
url: url,

View File

@@ -26,24 +26,24 @@ var filter_date_from;
// end date/time picker variable
// api list
var damage_api = "https://rms.rmto.ir/v2/receipt/get-damages";
var permissions_api = "https://rms.rmto.ir/webapi/user/get-permission";
var province_api = "https://rms.rmto.ir/webapi/getuser/province-perm";
var receipt_show = "https://rms.rmto.ir/v2/receipt/show";
var receipt_add_api = "https://rms.rmto.ir/v2/receipt/store";
var receipt_edit_api = "https://rms.rmto.ir/v2/receipt/update/";
var receipt_delete_api = "https://rms.rmto.ir/v2/receipt/delete/";
var damage_api = "/v2/receipt/get-damages";
var permissions_api = "/webapi/user/get-permission";
var province_api = "/webapi/getuser/province-perm";
var receipt_show = "/v2/receipt/show";
var receipt_add_api = "/v2/receipt/store";
var receipt_edit_api = "/v2/receipt/update/";
var receipt_delete_api = "/v2/receipt/delete/";
var mapUrl = "https://rmsmap.rmto.ir/141map/";
var city_api = "https://rms.rmto.ir/public/contents/provinces/";
var accident_type_api = "https://rms.rmto.ir/daily_accident/accident_types";
var payment_info_api = "https://rms.rmto.ir/v2/receipt/upload-payment-info/";
var get_all_info_api = "https://rms.rmto.ir/v2/receipt/";
var sendToInsurance = "https://rms.rmto.ir/v2/receipt/send-to-insurance/";
var sendToDaghi = "https://rms.rmto.ir/v2/receipt/send-to-daghi/";
var documentRelease = "https://rms.rmto.ir/v2/receipt/document-release/";
var invoice_bill_api = "https://rms.rmto.ir/v2/receipt/invoice-bill/";
var send_sms_again = "https://rms.rmto.ir/v2/receipt/send-sms-again/";
var call_payment_status_api = "https://rms.rmto.ir/v2/receipt/call-payment-status/";
var city_api = "/public/contents/provinces/";
var accident_type_api = "/daily_accident/accident_types";
var payment_info_api = "/v2/receipt/upload-payment-info/";
var get_all_info_api = "/v2/receipt/";
var sendToInsurance = "/v2/receipt/send-to-insurance/";
var sendToDaghi = "/v2/receipt/send-to-daghi/";
var documentRelease = "/v2/receipt/document-release/";
var invoice_bill_api = "/v2/receipt/invoice-bill/";
var send_sms_again = "/v2/receipt/send-sms-again/";
var call_payment_status_api = "/v2/receipt/call-payment-status/";
// end api list
@@ -988,13 +988,13 @@ $(document).ready(function () {
render: function (data, type, row) {
let content = `<div class="d-flex justify-content-around">`;
if (data.damage_picture2 == null && data.damage_picture1 != null) {
content += `<img class="table-image" width="20px" height="20px" src="https://rms.rmto.ir/storage/${data.damage_picture1}" />`
content += `<img class="table-image" width="20px" height="20px" src="/storage/${data.damage_picture1}" />`
} else if (data.damage_picture1 == null && data.damage_picture2 != null) {
content += `<img class="table-image" width="20px" height="20px" src="https://rms.rmto.ir/storage/${data.damage_picture2}" />`
content += `<img class="table-image" width="20px" height="20px" src="/storage/${data.damage_picture2}" />`
} else if (data.damage_picture1 == null && data.damage_picture2 == null) {
content += `عکسی موجود نمی باشد`
} else {
content += `<img class="table-image" width="20px" height="20px" src="https://rms.rmto.ir/storage/${data.damage_picture1}" /><img class="table-image" width="20px" height="20px" src="https://rms.rmto.ir/storage/${data.damage_picture2}" />`
content += `<img class="table-image" width="20px" height="20px" src="/storage/${data.damage_picture1}" /><img class="table-image" width="20px" height="20px" src="/storage/${data.damage_picture2}" />`
}
content += `</div>`;
return content;
@@ -1267,13 +1267,13 @@ $(document).on("click", ".btn-edit-receipt", function () {
modal.find("#plaque_number_edit3").val(plaque_value[3]);
if (data.damage_picture1 != null) {
modal.find("#deviceImg1Preview_edit").attr("src", "https://rms.rmto.ir/storage/" + data.damage_picture1);
modal.find("#deviceImg1Preview_edit").attr("src", "/storage/" + data.damage_picture1);
modal.find("#deviceImg1Title_edit").css("display", "none");
modal.find("#deviceImg1Preview_edit").css("display", "");
modal.find("#deleteDeviceImg1_edit").prop("disabled", false);
}
if (data.damage_picture2 != null) {
modal.find("#deviceImg2Preview_edit").attr("src", "https://rms.rmto.ir/storage/" + data.damage_picture2);
modal.find("#deviceImg2Preview_edit").attr("src", "/storage/" + data.damage_picture2);
modal.find("#deviceImg2Title_edit").css("display", "none");
modal.find("#deviceImg2Preview_edit").css("display", "");
modal.find("#deleteDeviceImg2_edit").prop("disabled", false);
@@ -1297,7 +1297,7 @@ $(document).on("click", ".btn-edit-receipt", function () {
let perv_file = modal.find("#download_perv_file");
if (data.police_file != null) {
perv_file.find("button").prop("disabled", false);
perv_file.attr("href", `https://rms.rmto.ir/storage/${data.police_file}`);
perv_file.attr("href", `/storage/${data.police_file}`);
} else {
perv_file.find("button").prop("disabled", true);
perv_file.removeAttr("href");
@@ -2014,7 +2014,7 @@ $(document).on("click", ".btn-insurance-receipt", function () {
if (data.deposit_insurance_image) {
modal.find("input[name='deposit_redio_insurance'][value='1']").prop('checked', true);
modal.find("#deposit_slip_insurance").val("").removeAttr("disabled");
modal.find("#deposit_slip_insurancePreview").attr("src", `https://rms.rmto.ir/storage/${data.deposit_insurance_image}`);
modal.find("#deposit_slip_insurancePreview").attr("src", `/storage/${data.deposit_insurance_image}`);
modal.find("#deposit_slip_insurancePreview").css("display", "");
modal.find("#deposit_slip_insuranceTitle").css("display", "none");
modal.find('#deposit_slip_insurance_amount').removeAttr("disabled").val(data.deposit_insurance_amount)
@@ -2022,7 +2022,7 @@ $(document).on("click", ".btn-insurance-receipt", function () {
if (data.deposit_daghi_amount) {
modal.find("input[name='deposit_redio_daghi'][value='1']").prop('checked', true);
modal.find("#deposit_slip_daghi").val("").removeAttr("disabled");
modal.find("#deposit_slip_daghiPreview").attr("src", `https://rms.rmto.ir/storage/${data.deposit_daghi_image}`);
modal.find("#deposit_slip_daghiPreview").attr("src", `/storage/${data.deposit_daghi_image}`);
modal.find("#deposit_slip_daghiPreview").css("display", "");
modal.find("#deposit_slip_daghiTitle").css("display", "none");
modal.find('#deposit_slip_daghi_amount').removeAttr("disabled").val(data.deposit_daghi_amount)
@@ -2426,23 +2426,23 @@ $(document).on("click", ".btn-all-data-show", function () {
modal.find("#axis_name_all").text(results.axis_name);
modal.find("#status_all").text(results.status_fa);
results.police_serial != null ? modal.find("#police_serial_all").text(results.police_serial) : modal.find("#police_serial_all").text("-")
results.police_file != null ? modal.find("#police_file_all").attr("href", `https://rms.rmto.ir/storage/${results.police_file}`) : modal.find("#police_file_all button").prop("disabled", true);
results.police_file != null ? modal.find("#police_file_all").attr("href", `/storage/${results.police_file}`) : modal.find("#police_file_all button").prop("disabled", true);
results.damage_picture1 != null ? modal.find(".img-box-1").append(`<a href="https://rms.rmto.ir/storage/${results.damage_picture1}" download=""><img style="max-width: 100%; max-height: 200px;" src="https://rms.rmto.ir/storage/${results.damage_picture1}" alt=""></a>`) : modal.find(".img-box-1").append(`<h5 class='p-3 mx-auto text-info'>تصویری آپلود نشده است<h5>`);
results.damage_picture2 != null ? modal.find(".img-box-2").append(`<a href="https://rms.rmto.ir/storage/${results.damage_picture2}" download=""><img style="max-width: 100%; max-height: 200px;" src="https://rms.rmto.ir/storage/${results.damage_picture2}" alt=""></a>`) : modal.find(".img-box-2").append(`<h5 class='p-3 mx-auto text-info'>تصویری آپلود نشده است<h5>`);
results.damage_picture1 != null ? modal.find(".img-box-1").append(`<a href="/storage/${results.damage_picture1}" download=""><img style="max-width: 100%; max-height: 200px;" src="/storage/${results.damage_picture1}" alt=""></a>`) : modal.find(".img-box-1").append(`<h5 class='p-3 mx-auto text-info'>تصویری آپلود نشده است<h5>`);
results.damage_picture2 != null ? modal.find(".img-box-2").append(`<a href="/storage/${results.damage_picture2}" download=""><img style="max-width: 100%; max-height: 200px;" src="/storage/${results.damage_picture2}" alt=""></a>`) : modal.find(".img-box-2").append(`<h5 class='p-3 mx-auto text-info'>تصویری آپلود نشده است<h5>`);
results.deposit_insurance_image != null ? modal.find(".img-box-deposit-insurance").append(`<a href="https://rms.rmto.ir/storage/${results.deposit_insurance_image}" download=""><img style="max-width: 100%; max-height: 200px;" src="https://rms.rmto.ir/storage/${results.deposit_insurance_image}" alt=""></a>`) : "تصویری آپلود نشده است";
results.deposit_insurance_image != null ? modal.find(".img-box-deposit-insurance").append(`<a href="/storage/${results.deposit_insurance_image}" download=""><img style="max-width: 100%; max-height: 200px;" src="/storage/${results.deposit_insurance_image}" alt=""></a>`) : "تصویری آپلود نشده است";
results.deposit_insurance_image != null ? modal.find(".amount-box-deposit-insurance").html(`<span>سهم بیمه : <h6>${Number(results.deposit_insurance_amount).toLocaleString("en")} ریال</h6></span>`) : modal.find(".amount-box-deposit-insurance").html(`<span>سهم بیمه : <h6>${Number(0).toLocaleString("en")} ریال</h6></span>`);
results.deposit_daghi_image != null ? modal.find(".img-box-deposit-daghi").append(`<a href="https://rms.rmto.ir/storage/${results.deposit_daghi_image}" download=""><img style="max-width: 100%; max-height: 200px;" src="https://rms.rmto.ir/storage/${results.deposit_daghi_image}" alt=""></a>`) : "تصویری آپلود نشده است";
results.deposit_daghi_image != null ? modal.find(".img-box-deposit-daghi").append(`<a href="/storage/${results.deposit_daghi_image}" download=""><img style="max-width: 100%; max-height: 200px;" src="/storage/${results.deposit_daghi_image}" alt=""></a>`) : "تصویری آپلود نشده است";
results.deposit_daghi_image != null ? modal.find(".amount-box-deposit-daghi").html(`<span>سهم داغی : <h6>${Number(results.deposit_daghi_amount).toLocaleString("en")} ریال</h6></span>`) : modal.find(".amount-box-deposit-daghi").html(`<span>سهم داغی : <h6>${Number(0).toLocaleString("en")} ریال</h6></span>`);
@@ -2534,7 +2534,7 @@ $("#btn_excel-download").on("click", function () {
}
}
if (province != 0) queryParems.push(`province=${province}`);
const url = `https://rms.rmto.ir/reports/receipt${queryParems.length != 0 ? `?${queryParems.join("&")}` : ""}`;
const url = `/reports/receipt${queryParems.length != 0 ? `?${queryParems.join("&")}` : ""}`;
window.open(url, "_blank");
});

View File

@@ -2,8 +2,8 @@
var operationCartable;
var operationCartable_url = "/v2/road_items/operator/cartable/show";
const MAP_ENDPOINT = "https://rmsmap.rmto.ir";
var permission_api = "https://rms.rmto.ir/webapi/user/get-permission";
var excel_api = "https://rms.rmto.ir/v2/road_items/operator/cartable/report";
var permission_api = "/webapi/user/get-permission";
var excel_api = "/v2/road_items/operator/cartable/report";
var update_api = "/v2/road_items/operator/update/"
var items_api = "/v2/items"
var markers = [];

File diff suppressed because it is too large Load Diff

View File

@@ -5,10 +5,10 @@ var verify_api = "/v2/road_items/supervisor/cartable/verify/";
var items_api = "/v2/items";
var restore_api = "/v2/road_items/supervisor/cartable/restore/";
var delete_api = "/v2/road_items/supervisor/cartable/delete/";
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 excel_api = "https://rms.rmto.ir/v2/road_items/supervisor/cartable/report";
var provinces_api = "/webapi/getuser/province-perm";
var edarat_api = "/public/contents/edarate_shahri_by_province/";
var permission_api = "/webapi/user/get-permission";
var excel_api = "/v2/road_items/supervisor/cartable/report";
const MAP_ENDPOINT = "https://rmsmap.rmto.ir";
var markers = [];
var markersLayer;

View File

@@ -2,8 +2,8 @@
var operationCartable;
var operationCartable_url = "/v2/road_patrols/operator/cartable/show";
const MAP_ENDPOINT = "https://rmsmap.rmto.ir";
var permission_api = "https://rms.rmto.ir/webapi/user/get-permission";
var excel_api = "https://rms.rmto.ir/v2/road_patrols/operator/cartable/report";
var permission_api = "/webapi/user/get-permission";
var excel_api = "/v2/road_patrols/operator/cartable/report";
var report_api = "/v2/road_patrols/operator/report/";
var items_api = "/v2/items"
var markers = [];

View File

@@ -63,8 +63,8 @@ var mapStartIcon = L.divIcon({
</div>
</div>
</div>`,
iconSize: [55, 75],
iconAnchor: [33, 64],
iconSize: [56, 75],
iconAnchor: [28, 75],
});
var mapEndIcon = L.divIcon({
html: `

View File

@@ -3,12 +3,12 @@ var supervisorCartable;
var supervisorCartable_url = "/v2/road_patrols/supervisor/cartable/show";
var verify_api = "/v2/road_patrols/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";
var deletePatrol_api = "/v2/road_patrols/supervisor/cartable/delete/";
var report_api = "/v2/road_patrols/operator/report/";
var excel_api = "https://rms.rmto.ir/v2/road_patrols/supervisor/cartable/report";
var excel_api = "/v2/road_patrols/supervisor/cartable/report";
const MAP_ENDPOINT = "https://rmsmap.rmto.ir";
var markers = [];
var markersLayer;
@@ -57,7 +57,7 @@ var mapEndIcon = L.divIcon({
</div>
</div>`,
iconSize: [55, 75],
iconAnchor: [33, 64],
iconAnchor: [28, 75],
});
// icon

View File

@@ -5,11 +5,11 @@ var unserializeJudiciaryDocument_url = "/v2/safety_and_privacy/operator/cartable
var list_item_api = "/v2/safety_and_privacy/sub_item_list";
var secondStep_url = "/v2/safety_and_privacy/operator/second_step/";
var thirdStep_url = "/v2/safety_and_privacy/operator/third_step/";
var provinces_api = "https://rms.rmto.ir/webapi/getuser/province-perm";
var provinces_api = "/webapi/getuser/province-perm";
var delete_api = "/v2/safety_and_privacy/delete/";
var excel_api = "https://rms.rmto.ir/reports/safety-and-privacy";
var excel_api = "/reports/safety-and-privacy";
const MAP_ENDPOINT = "https://rmsmap.rmto.ir";
var permission_api = "https://rms.rmto.ir/webapi/user/get-permission";
var permission_api = "/webapi/user/get-permission";
var items_api = "/v2/items"
var markers = [];
var secondStepFiles = []

View File

@@ -2,8 +2,8 @@ var fromDateshowrizitem, toDateshowrizitem;
var PERMISSIONS = []
var PROVINCES = [];
var gozareshtable;
var MAIN_URL = "https://rms.rmto.ir/v2/safety_and_privacy/report/safety_and_privacy_data"
var EXCEL_API = "https://rms.rmto.ir/v2/safety_and_privacy/report/excel";
var MAIN_URL = "/v2/safety_and_privacy/report/safety_and_privacy_data"
var EXCEL_API = "/v2/safety_and_privacy/report/excel";
function checkfunctionS(obj) {
if (obj != undefined) {
@@ -15,7 +15,7 @@ function checkfunctionS(obj) {
$(document).ready(function () {
let reqUrl = "https://rms.rmto.ir/public/contents/provinces";
let reqUrl = "/public/contents/provinces";
$.ajax({
url: reqUrl,
@@ -105,10 +105,10 @@ $(document).ready(function () {
},
});
$.getScript('https://rms.rmto.ir/version2/js/dashboard_pages/safety_and_privacy/subtable.js');
$.getScript('/version2/js/dashboard_pages/safety_and_privacy/subtable.js');
$.ajax({
url: "https://rms.rmto.ir/webapi/user/get-permission",
url: "/webapi/user/get-permission",
type: "GET",
cache: false,
async: false,

View File

@@ -131,7 +131,7 @@ $(document).bind('click', function (e) {
});
(function () {
$.ajax({
url: "https://rms.rmto.ir/webapi/user/get-permission",
url: "/webapi/user/get-permission",
type: "GET",
cache: false,
async: false,
@@ -163,7 +163,7 @@ $(document).bind('click', function (e) {
if ($.inArray('show-camp', PERMISSIONS) != -1 || $.inArray('show-camp-province', PERMISSIONS) != -1) {
$.ajax({
/// [start] camp_add_province_url
url: `https://rms.rmto.ir/webapi/getuser/province-perm${$.inArray('show-camp', PERMISSIONS) != -1 ? '?type=all' : ''}`,
url: `/webapi/getuser/province-perm${$.inArray('show-camp', PERMISSIONS) != -1 ? '?type=all' : ''}`,
/// [end] camp_add_province_url
type: "GET",
beforeSend: function () {
@@ -207,7 +207,7 @@ $(document).bind('click', function (e) {
if ($.inArray('add-camp', PERMISSIONS) != -1 || $.inArray('add-camp-province', PERMISSIONS) != -1) {
$.ajax({
/// [start] camp_add_province_url
url: `https://rms.rmto.ir/webapi/getuser/province-perm${$.inArray('add-camp', PERMISSIONS) != -1 ? '?type=all' : ''}`,
url: `/webapi/getuser/province-perm${$.inArray('add-camp', PERMISSIONS) != -1 ? '?type=all' : ''}`,
/// [end] camp_add_province_url
type: "GET",
beforeSend: function () {
@@ -253,7 +253,7 @@ $(document).bind('click', function (e) {
if ($.inArray('edit-camp', PERMISSIONS) != -1 || $.inArray('edit-camp-province', PERMISSIONS) != -1) {
$.ajax({
/// [start] camp_edit_province_url
url: `https://rms.rmto.ir/webapi/getuser/province-perm${$.inArray('edit-camp', PERMISSIONS) != -1 ? '?type=all' : ''}`,
url: `/webapi/getuser/province-perm${$.inArray('edit-camp', PERMISSIONS) != -1 ? '?type=all' : ''}`,
/// [end] camp_edit_province_url
type: "GET",
beforeSend: function () {
@@ -298,7 +298,7 @@ $(document).bind('click', function (e) {
$.ajax({
/// [start] camp_filter_province_url
url: `https://rms.rmto.ir/webapi/getuser/province-perm${$.inArray('show-camp', PERMISSIONS) != -1 ? '?type=all' : ''}`,
url: `/webapi/getuser/province-perm${$.inArray('show-camp', PERMISSIONS) != -1 ? '?type=all' : ''}`,
/// [end] camp_filter_province_url
type: "GET",
beforeSend: function () {
@@ -373,7 +373,7 @@ $(document).bind('click', function (e) {
select: true,
destroy: true,
ajax: {
url: "https://rms.rmto.ir/webapi/camp/index",
url: "/webapi/camp/index",
type: "GET",
dataSrc: function (json) {
return json.data;
@@ -734,7 +734,7 @@ $("#submit-new-camp").on("click", function () {
}
if (checkAjax) {
$.ajax({
url: "https://rms.rmto.ir/webapi/camp/storeDevelop",
url: "/webapi/camp/storeDevelop",
type: "POST",
data: formData,
headers: {
@@ -807,7 +807,7 @@ $("#winter-camp-table").on("click", "button.image-show", function () {
for (var i = 0; i < 3; i++) {
$("#imgSubItem" + i + "").removeAttr("src")
if (photoSelected[i] != undefined) {
$("#imgSubItem" + i + "").attr("src", "https://rms.rmto.ir/" + photoSelected[i].path.replace("public", "storage") + "")
$("#imgSubItem" + i + "").attr("src", "/" + photoSelected[i].path.replace("public", "storage") + "")
}
else {
$("#imgSubItem" + i + "").attr("src", "../dist/images/notavailable.jpg")
@@ -835,7 +835,7 @@ $("#winter-camp-table").on("click", "button.location-button", function () {
var tr = $(this).closest("tr");
var row = tableCamp.row(tr);
idSelect = row.data().id;
window.open("https://rms.rmto.ir/v2/winter_camp/map/" + idSelect);
window.open("/v2/winter_camp/map/" + idSelect);
});
$("#winter-camp-table").on("click", "button.deletsubmit", function () {
var tr = $(this).closest("tr");
@@ -853,7 +853,7 @@ $("#winter-camp-table").on("click", "button.deletsubmit", function () {
preConfirm: () => {
showLoaderScreen();
$.ajax({
url: "https://rms.rmto.ir/webapi/camp/deleteDevelop/" + idSelect,
url: "/webapi/camp/deleteDevelop/" + idSelect,
type: "POST",
headers: {
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content"),
@@ -1092,7 +1092,7 @@ $("#edit-add-camp").on("click", function () {
}
if (checkEditAjax) {
$.ajax({
url: "https://rms.rmto.ir/webapi/camp/editDevelop/" + idChoosen,
url: "/webapi/camp/editDevelop/" + idChoosen,
type: "POST",
data: formData,
headers: {
@@ -1216,7 +1216,7 @@ $("#btn_filter_show").on("click", function () {
if (blockage != 0)
queryParems.push(`blockage=${blockage}`)
const url = `https://rms.rmto.ir/camp/all${queryParems.length != 0 ? `?${queryParems.join('&')}` : ''}`
const url = `/camp/all${queryParems.length != 0 ? `?${queryParems.join('&')}` : ''}`
$.ajax({
url: url,
@@ -1464,7 +1464,7 @@ function resetEditData(data) {
if (data.files[0] != undefined) {
$("#edit-deviceImg1Preview").attr("src", "https://rms.rmto.ir/" + data.files[0].path.replace("public", "storage") + "")
$("#edit-deviceImg1Preview").attr("src", "/" + data.files[0].path.replace("public", "storage") + "")
$("#edit-deviceImg1Title").css("display", "none")
$("#edit-deleteDeviceImg1").removeAttr('disabled');
@@ -1472,7 +1472,7 @@ function resetEditData(data) {
}
if (data.files[1] != undefined) {
$("#edit-deviceImg2Preview").attr("src", "https://rms.rmto.ir/" + data.files[1].path.replace("public", "storage") + "")
$("#edit-deviceImg2Preview").attr("src", "/" + data.files[1].path.replace("public", "storage") + "")
$("#edit-deviceImg2Title").css("display", "none")
$("#edit-deleteDeviceImg2").removeAttr('disabled');
@@ -1480,7 +1480,7 @@ function resetEditData(data) {
}
if (data.files[2] != undefined) {
$("#edit-deviceImg3Preview").attr("src", "https://rms.rmto.ir/" + data.files[2].path.replace("public", "storage") + "")
$("#edit-deviceImg3Preview").attr("src", "/" + data.files[2].path.replace("public", "storage") + "")
$("#edit-deviceImg3Title").css("display", "none")
$("#edit-deleteDeviceImg3").removeAttr('disabled');
@@ -1706,7 +1706,7 @@ function setMarkerDefaultAddEdit(startlatlng, endlatlng, status) {
function reloadTable() {
$.ajax({
url:
"https://rms.rmto.ir/webapi/camp/index",
"/webapi/camp/index",
type: "GET",
success: function (result) {
$("#winter-camp-table").dataTable().fnClearTable();
@@ -2186,7 +2186,7 @@ $('.btn-delete-img').on('click', function () {
function addTowntoSelect(num) {
$.ajax({
url: "https://rms.rmto.ir/public/contents/provinces/" + num,
url: "/public/contents/provinces/" + num,
type: "GET",
success: function (result) {
hideLoaderScreen();
@@ -2211,7 +2211,7 @@ function addTowntoSelect(num) {
}
function addTowntoSelectEdit(num) {
$.ajax({
url: "https://rms.rmto.ir/public/contents/provinces/" + num,
url: "/public/contents/provinces/" + num,
type: "GET",
success: function (result) {
hideLoaderScreen();
@@ -2237,7 +2237,7 @@ function addTowntoSelectEdit(num) {
function addTownToEditedCity(num, cityid) {
showLoaderScreen()
$.ajax({
url: "https://rms.rmto.ir/public/contents/provinces/" + num,
url: "/public/contents/provinces/" + num,
type: "GET",
success: function (result) {
hideLoaderScreen();
@@ -2332,7 +2332,7 @@ $(".temporary-open").on('click', function () {
formData.append("id", idChoosen);
formData.append("is-open-type", 1);
$.ajax({
url: "https://rms.rmto.ir/camp/update",
url: "/camp/update",
type: "POST",
headers: {
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content"),
@@ -2365,7 +2365,7 @@ $(".complet-open").on('click', function () {
formData.append("id", idChoosen);
formData.append("is-open-type", 2);
$.ajax({
url: "https://rms.rmto.ir/camp/update",
url: "/camp/update",
type: "POST",
headers: {
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content"),