2025-06-12 15:12:30 +02:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Web.Mvc;
|
2025-03-25 17:36:15 +01:00
|
|
|
|
using BeWoPlanerMobil.Models;
|
|
|
|
|
|
using BeWoPlanerMobil.Service;
|
|
|
|
|
|
using BeWoPlanerMobil.Util;
|
2025-06-12 15:12:30 +02:00
|
|
|
|
using BS.Shared.Core;
|
2025-03-25 17:36:15 +01:00
|
|
|
|
|
|
|
|
|
|
namespace BeWoPlanerMobil.Controllers
|
|
|
|
|
|
{
|
|
|
|
|
|
public class DebuggingToolsController : AbstractBaseController
|
|
|
|
|
|
{
|
|
|
|
|
|
private DebuggingToolsModel _Model;
|
|
|
|
|
|
public DebuggingToolsModel Model
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
if(!MobileSessionFacade.IsUserLoggedIn())
|
|
|
|
|
|
{
|
|
|
|
|
|
Logout();
|
|
|
|
|
|
return null;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-06-11 22:56:25 +02:00
|
|
|
|
if (_Model == null)
|
2025-03-25 17:36:15 +01:00
|
|
|
|
{
|
2025-06-11 22:56:25 +02:00
|
|
|
|
_Model = new DebuggingToolsModel();
|
|
|
|
|
|
InitModel(_Model);
|
2025-03-25 17:36:15 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-06-11 22:56:25 +02:00
|
|
|
|
//if (((DebuggingToolsModel)Session[ModelSessionConstants.DebuggingToolsModelKey])?.LoggedInEmployee is null)
|
|
|
|
|
|
//{
|
|
|
|
|
|
// _Model = new DebuggingToolsModel();
|
|
|
|
|
|
// InitModel(_Model);
|
|
|
|
|
|
// Session[ModelSessionConstants.DebuggingToolsModelKey] = _Model;
|
|
|
|
|
|
//}
|
|
|
|
|
|
//else
|
|
|
|
|
|
//{
|
|
|
|
|
|
// _Model = (DebuggingToolsModel) Session[ModelSessionConstants.DebuggingToolsModelKey];
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
2025-03-25 17:36:15 +01:00
|
|
|
|
return _Model;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[Authorize]
|
|
|
|
|
|
public ActionResult DebuggingTools()
|
|
|
|
|
|
{
|
2025-06-12 15:12:30 +02:00
|
|
|
|
if(!MobileSessionFacade.IsUserLoggedIn() || Model is null)
|
2025-03-25 17:36:15 +01:00
|
|
|
|
{
|
|
|
|
|
|
return RedirectToActionPermanent("Index", "Login");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-06-12 15:12:30 +02:00
|
|
|
|
Model.MandatorSettings = new MandatorSettings(MobileSessionFacade.Mandator.Settings);
|
|
|
|
|
|
|
2025-03-25 17:36:15 +01:00
|
|
|
|
return View(Model);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-06-12 15:12:30 +02:00
|
|
|
|
[Authorize]
|
|
|
|
|
|
public ActionResult LoadSettingsPartial()
|
|
|
|
|
|
{
|
|
|
|
|
|
return PartialView("DevToolsSettingsPartial", Model);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[Authorize]
|
|
|
|
|
|
public ActionResult LoadUserRightPartial()
|
|
|
|
|
|
{
|
|
|
|
|
|
return PartialView("DevToolsUserRightsPartial", Model);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[Authorize]
|
|
|
|
|
|
public ActionResult LoadDataGenerationPartial()
|
|
|
|
|
|
{
|
|
|
|
|
|
return PartialView("DevToolsDataGenerationPartial", Model);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-03-25 17:36:15 +01:00
|
|
|
|
[Authorize]
|
|
|
|
|
|
public override string SaveCollapsibleStatus(bool isOpen, string identifier)
|
|
|
|
|
|
{
|
|
|
|
|
|
Model.Collapsibles2IsShown[identifier] = isOpen;
|
|
|
|
|
|
|
|
|
|
|
|
return LeerzeichenFuerGetMethoden;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|