Files
Backend-Api/ServiceHost/wwwroot/AssetsClient/pages/RollCall/js/Index.js
2025-04-09 18:38:05 +03:30

54 lines
1.5 KiB
JavaScript

var ajaxService = new AjaxService(antiForgeryToken);
$(".openAction").click(function () {
$(this).next().find(".operations-btns").slideToggle(500);
$(".operations-btns").not($(this).next().find(".operations-btns")).slideUp(500);
});
$(document).ready(function () {
$(this).find(".operations-btns").first().slideToggle(500);
ajaxService.get(statusCameraAccountAndWorkshopSettingUrl)
.then(response => {
if (response.hasRollCallService) {
if (!response.hasCameraAccount || !response.hasRollCallWorkshopSetting) {
//window.location.href = saveCameraAccountUrl;
AjaxUrlContentModal(saveCameraAccountUrl);
}
}
});
//if (hasRollCallService) {
// if (!hasCameraAccount || !hasRollCallWorkshopSetting) {
// window.location.href = saveCameraAccountUrl;
// }
//}
$('.loadingButton').on('click', function (e) {
if (e.ctrlKey || e.metaKey) {
return;
}
var button = $(this);
var loadingDiv = button.find('.loading');
loadingDiv.show();
});
});
// function AjaxPlans(id) {
// $.ajax({
// url: '@Url.Page("./Plans")',
// type: 'GET',
// headers: {
// 'workshopId': id
// },
// success: function (response) {
// window.location.href = '@Url.Page("./Plans")'
// },
// error: function (e) {
// console.log('error: ' + e)
// }
// });
// }