This commit is contained in:
skidoodle 2024-03-13 00:33:46 +01:00
commit e124a47765
19374 changed files with 9806149 additions and 0 deletions

View file

@ -0,0 +1,21 @@
using System.Collections.Generic;
using System.Linq;
using System.Web.Mvc;
using Kreta.BusinessLogic.Helpers;
using Kreta.BusinessLogic.Helpers.SystemSettings;
using Kreta.Enums;
using Kreta.Web.Areas.Hianyzas.Models;
using Kreta.Web.Helpers;
using Kreta.Web.Security;
namespace Kreta.Web.Areas.Hianyzas.Controllers
{
public class BaseIgazolasController : Controller
{
public ActionResult IgazolasDetailGrid(int id, string apiControllerName = null)
{
var model = new IgazolasDetailModel { TanuloId = id, ApiControllerName = apiControllerName };
return PartialView(model);
}
}
}

View file

@ -0,0 +1,101 @@
using System.Collections.Generic;
using System.Net;
using System.Web.Http;
using System.Web.Mvc;
using Kreta.BusinessLogic.Classes;
using Kreta.BusinessLogic.Helpers;
using Kreta.Core.Exceptions;
using Kreta.Resources;
using Kreta.Web.Areas.Hianyzas.Logic;
using Kreta.Web.Areas.Hianyzas.Models;
using Kreta.Web.Helpers;
using Kreta.Web.Helpers.Error;
using Kreta.Web.Helpers.TabStrip;
using Kreta.Web.Models.EditorTemplates;
using Kreta.Web.Security;
namespace Kreta.Web.Areas.Hianyzas.Controllers
{
public class BaseMulasztasKeresoController : Controller
{
#region Properties
public static string GridName => "MulasztasKeresoGrid";
public static string SearchFormName => "MulasztasKeresoSearchForm";
public static string InfoPopUpId => "MulasztasKeresoInfoPopUpWindow";
#endregion Properties
public ActionResult OpenMulasztasInfoPopUp(int mulasztasId)
{
try
{
var mulasztasCo = new MulasztasHelper(ConnectionTypeExtensions.GetSessionConnectionType()).GetMulasztasById(mulasztasId);
var tanoraCo = new TanoraHelper(ConnectionTypeExtensions.GetSessionConnectionType()).GetTanoraByOrarendiId(mulasztasCo.OraId.Value, mulasztasCo.Datum, true, ClaimData.IsTanuloOrGondviselo);
var alapadatModel = new MulasztasInfoModel.AlapadatModel
{
Tanulo = mulasztasCo.TanuloNev,
Datum = mulasztasCo.Datum.ToShortDateString(),
Oraszam = mulasztasCo.Oraszam,
OsztalyCsoport = tanoraCo.OsztalyCsoportNev,
Tantargy = mulasztasCo.TargyNev,
MulasztasTipus = mulasztasCo.MulTipNev,
KesesPercben = mulasztasCo.KesIdo,
Igazolt = mulasztasCo.Igazolt.GetDisplayName(),
IgazolasTipus = mulasztasCo.IgazolasTipusNev,
Megjegyzes = mulasztasCo.Megjegyzes
};
var tanitasiOraModel = new MulasztasInfoModel.TanitasiOraModel
{
Datum = tanoraCo.Datum.ToShortDateString(),
Oraszam = tanoraCo.Oraszam,
HetNapja = tanoraCo.HetNapjaNev,
Hetirend = tanoraCo.HetirendNev,
Foglalkozas = tanoraCo.FoglalkozasNev,
OsztalyCsoport = tanoraCo.OsztalyCsoportNev,
Tantargy = tanoraCo.TantargyNev,
Tanar = tanoraCo.TanarNev,
HelyettesitesitoTanarNeve = tanoraCo.HelyettesitesitoTanarNeve,
Terem = tanoraCo.TeremNev,
Megtartott = tanoraCo.Megtartott.HasValue ? tanoraCo.Megtartott.Value.GetDisplayName() : HianyzasResource.NemNaplozott,
Sorszamozando = tanoraCo.Sorszamozando.GetDisplayName(),
OraKezdete = tanoraCo.OraKezd.ToString("HH:mm"),
OraVege = tanoraCo.OraVeg.ToString("HH:mm"),
Tema = tanoraCo.Tema,
Megjegyzes = tanoraCo.Megjegyzes
};
var popUpModel = new PopUpModel(new TabStripModel { TabList = GetInfoTabs(alapadatModel, tanitasiOraModel) }, "MulasztasKereso_Info_PopUp");
popUpModel.AddCancelBtn(popUpModel, "MulasztasKeresoHelper.mulasztasKeresoInfoPopUpCancel");
return PartialView(Constants.General.PopupView, popUpModel);
}
catch (BlException ex)
{
throw new StatusError(HttpStatusCode.BadRequest, ex.Message);
}
}
public static List<TabStripItemModel> GetInfoTabs(MulasztasInfoModel.AlapadatModel alapadatModel, MulasztasInfoModel.TanitasiOraModel tanitasiOraModel)
{
return new List<TabStripItemModel> {
new TabStripItemModel { ItemId = "1", ItemName = HianyzasResource.Alapadatok, Model = alapadatModel, PartialViewName = "MulasztasKereso_Info_Alapadatok_Tab", IsActive = true },
new TabStripItemModel { ItemId = "2", ItemName = HianyzasResource.TanitasiOraAdatai, Model = tanitasiOraModel, PartialViewName = "MulasztasKereso_Info_TanitasiOraAdatai_Tab" }
};
}
#region Export
public ActionResult ExportTanulokMulasztasai([FromUri] MulasztasSearchModel data)
{
return MulasztasKeresoLogic.ExportTanulokMulasztasai(data);
}
public ActionResult ExportTanorakonNemJelenlevok([FromUri] MulasztasSearchModel data)
{
return MulasztasKeresoLogic.ExportTanorakonNemJelenlevok(data);
}
#endregion
}
}

View file

@ -0,0 +1,205 @@
using System.Collections.Generic;
using System.Linq;
using System.Web.Mvc;
using Kreta.BusinessLogic.Helpers;
using Kreta.BusinessLogic.Helpers.SystemSettings;
using Kreta.BusinessLogic.Security;
using Kreta.Enums;
using Kreta.Enums.ManualEnums;
using Kreta.Framework;
using Kreta.Web.Areas.Hianyzas.Models;
using Kreta.Web.Areas.Hianyzas.Models.Mulasztasok;
using Kreta.Web.Helpers;
using Kreta.Web.Helpers.TabStrip;
using Kreta.Web.Models.EditorTemplates;
using Kreta.Web.Security;
namespace Kreta.Web.Areas.Hianyzas.Controllers
{
public class BaseMulasztasokController : Controller
{
public List<SelectListItem> GetOsztalyCsoportList(bool setFirstItem = false)
{
IDictionary<string, string> osztalyokEsCsoportok = OsztalyokEsCsoportokHelpers.GetOsztalyokVagyOsztalyokEsCsoportok(ClaimData.FelhasznaloId, osztalyfonokiFeladat: true);
var result = osztalyokEsCsoportok.Select(x => new SelectListItem
{
Value = x.Key,
Text = x.Value
}).ToList();
if (setFirstItem && result.Any())
{
if (ClaimData.FelhasznaloSzerepkorok.ContainsKey(SzerepkorTipusEnum.Naplo))
{
var osztCsopId = new OsztalyCsoportHelper(ConnectionTypeExtensions.GetSessionConnectionType()).GetOsztalyfonokElsonekMegtalaltOsztalya(ClaimData.FelhasznaloId);
if (osztCsopId.HasValue)
{
foreach (var r in result)
{
if (r.Value == osztCsopId.Value.ToString())
{
r.Selected = true;
break;
}
}
}
else
{
result[0].Selected = true;
}
}
else
{
result[0].Selected = true;
}
}
return result;
}
public List<TabStripItemModel> GetMulasztasokTabs(string mulasztasokControllerName)
{
List<TabStripItemModel> list = new List<TabStripItemModel>
{
new TabStripItemModel
{
ItemId = "0",
ItemName = StringResourcesUtil.GetString(4332) /*Dátum nézet*/,
Area = "Hianyzas",
Controller = mulasztasokControllerName,
Action = "GetMulasztasokDatumNezetTab"
},
new TabStripItemModel
{
ItemId = "1",
ItemName = StringResourcesUtil.GetString(4333) /*Tanuló nézet*/,
Area = "Hianyzas",
Controller = mulasztasokControllerName,
Action = "GetMulasztasokTanuloNezetTab"
},
new TabStripItemModel
{
ItemId = "2",
ItemName = StringResourcesUtil.GetString(4334) /*Napló nézet*/,
Area = "Hianyzas",
Controller = mulasztasokControllerName,
Action = "GetMulasztasokNaploNezetTab"
}
};
return list;
}
[NonAction]
public ActionResult GetMulasztasokDatumNezetTab(string mulasztasokControllerName = null, string mulasztasokApiControllerName = null, int? szervezetTipusId = null)
{
var model = new MulasztasSearchModel
{
OsztalyCsoportList = GetOsztalyCsoportList(true)
};
if(!string.IsNullOrWhiteSpace(mulasztasokControllerName))
{
model.ControllerName = mulasztasokControllerName;
}
if (!string.IsNullOrWhiteSpace(mulasztasokApiControllerName))
{
model.ApiControllerName = mulasztasokApiControllerName;
}
model.SzervezetTipusId = szervezetTipusId;
return PartialView("Mulasztasok_DatumNezet_Tab", model);
}
[NonAction]
public ActionResult GetMulasztasokDatumNezetDetailGrid(MulasztasokDatumNezetGridModel dateModel)
{
dateModel.SzerepkorViewType = SzerepkorViewTypeEnum.OsztalyfonokNezet;
return PartialView("Mulasztasok_DatumNezet_DetailGrid", dateModel);
}
[NonAction]
public ActionResult GetMulasztasokTanuloNezetTab(string mulasztasokControllerName = null, string mulasztasokApiControllerName = null, int? szervezetTipusId = null)
{
var model = new MulasztasSearchModel
{
OsztalyCsoportList = GetOsztalyCsoportList(true)
};
if (!string.IsNullOrWhiteSpace(mulasztasokControllerName))
{
model.ControllerName = mulasztasokControllerName;
}
if (!string.IsNullOrWhiteSpace(mulasztasokApiControllerName))
{
model.ApiControllerName = mulasztasokApiControllerName;
}
model.SzervezetTipusId = szervezetTipusId;
return PartialView("Mulasztasok_TanuloNezet_Tab", model);
}
[NonAction]
public ActionResult GetMulasztasokTanuloNezetDetailGrid(MulasztasokTanuloNezetGridModel tanuloModel, bool GridHasDelete, int? SzervezetTipusId = null)
{
tanuloModel.GridHasDelete = GridHasDelete;
tanuloModel.SzervezetTipusId = SzervezetTipusId;
return PartialView("Mulasztasok_TanuloNezet_DetailGrid", tanuloModel);
}
[NonAction]
public ActionResult GetMulasztasokNaploNezetTab(string mulasztasokControllerName = null, string mulasztasokApiControllerName = null, int? szervezetTipusId = null)
{
var model = new MulasztasSearchModel
{
OsztalyCsoportList = GetOsztalyCsoportList(true)
};
if (!string.IsNullOrWhiteSpace(mulasztasokControllerName))
{
model.ControllerName = mulasztasokControllerName;
}
if (!string.IsNullOrWhiteSpace(mulasztasokApiControllerName))
{
model.ApiControllerName = mulasztasokApiControllerName;
}
model.SzervezetTipusId = szervezetTipusId;
return PartialView("Mulasztasok_NaploNezet_Tab", model);
}
[NonAction]
public ActionResult OpenTanuloMulasztasaiPopup(int tanuloId, int osztalyCsoportId, string apiControllerName = null, int? szervezetTipusId = null)
{
var model = new TanuloMulasztasaiPopupModel
{
TanuloId = tanuloId,
SzerepkorViewType = SzerepkorViewTypeEnum.OsztalyfonokNezet,
OsztalyCsoportId = osztalyCsoportId,
ApiControllerName = apiControllerName,
SzervezetTipusId = szervezetTipusId
};
var popupModel = new PopUpModel(model, "TanuloMulasztasai_Popup");
popupModel.AddCancelBtn(popupModel, "MulasztasKezelesHelper.detailTanuloWindowCancel");
return PartialView(Constants.General.PopupView, popupModel);
}
[NonAction]
public ActionResult TanuloKezeletlenMulasztasaiDetailGrid(TanuloMulasztasaiPopupModel gridModel, string apiControllerName = null, int? szervezetTipusId = null)
{
gridModel.SzerepkorViewType = SzerepkorViewTypeEnum.OsztalyfonokNezet;
gridModel.Kezeletlen = true;
gridModel.ApiControllerName = apiControllerName;
gridModel.SzervezetTipusId = szervezetTipusId;
return PartialView("TanuloMulasztasai_DetailGrid", gridModel);
}
[NonAction]
public ActionResult TanuloKezeltMulasztasaiDetailGrid(TanuloMulasztasaiPopupModel gridModel, string apiControllerName = null, int? szervezetTipusId = null)
{
gridModel.SzerepkorViewType = SzerepkorViewTypeEnum.OsztalyfonokNezet;
gridModel.Kezeletlen = false;
gridModel.ApiControllerName = apiControllerName;
gridModel.SzervezetTipusId = szervezetTipusId;
return PartialView("TanuloMulasztasai_DetailGrid", gridModel);
}
}
}

View file

@ -0,0 +1,85 @@
using System.Web.Mvc;
using Kreta.BusinessLogic.Helpers.SystemSettings;
using Kreta.BusinessLogic.Security;
using Kreta.Enums;
using Kreta.Enums.ManualEnums;
using Kreta.Web.Areas.Hianyzas.Models;
using Kreta.Web.Areas.Hianyzas.Models.Mulasztasok;
using Kreta.Web.Helpers;
using Kreta.Web.Models.EditorTemplates;
using Kreta.Web.Security;
namespace Kreta.Web.Areas.Hianyzas.Controllers
{
[MvcRoleClaimsAuthorize(true)]
[MvcRolePackageDenyAuthorize(KretaClaimPackages.IsOnlyAlkalmozott.ClaimValue)]
[MvcRolePackageAuthorize(KretaClaimPackages.CsoportVezeto.ClaimValue, KretaClaimPackages.SzuperOsztalyfonok.ClaimValue)]
public class CsoportMulasztasokController : Controller
{
public ActionResult Index()
{
var model = new MulasztasIndexModel();
return View("Index", model);
}
public ActionResult GetMulasztasokDatumNezetDetailGrid(MulasztasokDatumNezetGridModel gridModel)
{
gridModel.SzerepkorViewType = SzerepkorViewTypeEnum.CsoportvezetoNezet;
var systemSettingsHelper = new SystemSettingsHelper(ConnectionTypeExtensions.GetSessionConnectionType());
gridModel.MulasztasJogosultsagSetting = systemSettingsHelper.GetSystemSettingValue<CsoportvezetokIgazolasiJogosultsagaEnum>(RendszerBeallitasTipusEnum.Csoportvezetok_Igazolasi_Jogosultsaga);
gridModel.IsTanorai = (int)CsoportTipusEnum.iskolai_csoport_tanorai_celu_ == gridModel.CsoportTipusId;
return PartialView("Mulasztasok_DatumNezet_DetailGrid", gridModel);
}
public ActionResult OpenTanuloMulasztasaiPopup(int tanuloId, int osztalyCsoportId, string apiControllerName = null, int? szervezetTipusId = null)
{
var model = new TanuloMulasztasaiPopupModel
{
TanuloId = tanuloId,
SzerepkorViewType = SzerepkorViewTypeEnum.CsoportvezetoNezet,
OsztalyCsoportId = osztalyCsoportId,
ApiControllerName = apiControllerName,
SzervezetTipusId = szervezetTipusId
};
var systemSettingsHelper = new SystemSettingsHelper(ConnectionTypeExtensions.GetSessionConnectionType());
model.MulasztasJogosultsagSetting = systemSettingsHelper.GetSystemSettingValue<CsoportvezetokIgazolasiJogosultsagaEnum>(RendszerBeallitasTipusEnum.Csoportvezetok_Igazolasi_Jogosultsaga);
model.IsTanorai = (int)CsoportTipusEnum.iskolai_csoport_tanorai_celu_ == model.CsoportTipusId;
var popupModel = new PopUpModel(model, "TanuloMulasztasai_Popup");
popupModel.AddCancelBtn(popupModel, "MulasztasKezelesHelper.detailTanuloWindowCancel");
return PartialView(Constants.General.PopupView, popupModel);
}
public ActionResult TanuloKezeletlenMulasztasaiDetailGrid(TanuloMulasztasaiPopupModel gridModel)
{
gridModel.SzerepkorViewType = SzerepkorViewTypeEnum.CsoportvezetoNezet;
var systemSettingsHelper = new SystemSettingsHelper(ConnectionTypeExtensions.GetSessionConnectionType());
gridModel.MulasztasJogosultsagSetting = systemSettingsHelper.GetSystemSettingValue<CsoportvezetokIgazolasiJogosultsagaEnum>(RendszerBeallitasTipusEnum.Csoportvezetok_Igazolasi_Jogosultsaga);
gridModel.Kezeletlen = true;
return PartialView("TanuloMulasztasai_DetailGrid", gridModel);
}
public ActionResult TanuloKezeltMulasztasaiDetailGrid(TanuloMulasztasaiPopupModel gridModel)
{
gridModel.SzerepkorViewType = SzerepkorViewTypeEnum.CsoportvezetoNezet;
var systemSettingsHelper = new SystemSettingsHelper(ConnectionTypeExtensions.GetSessionConnectionType());
gridModel.MulasztasJogosultsagSetting = systemSettingsHelper.GetSystemSettingValue<CsoportvezetokIgazolasiJogosultsagaEnum>(RendszerBeallitasTipusEnum.Csoportvezetok_Igazolasi_Jogosultsaga);
gridModel.Kezeletlen = false;
return PartialView("TanuloMulasztasai_DetailGrid", gridModel);
}
}
}

View file

@ -0,0 +1,55 @@
using System.Linq;
using System.Web.Mvc;
using Kreta.BusinessLogic.Helpers;
using Kreta.BusinessLogic.Helpers.SystemSettings;
using Kreta.BusinessLogic.Security;
using Kreta.Enums;
using Kreta.Enums.ManualEnums;
using Kreta.Web.Areas.Hianyzas.Models;
using Kreta.Web.Helpers;
using Kreta.Web.Security;
namespace Kreta.Web.Areas.Hianyzas.Controllers
{
[MvcRoleClaimsAuthorize(true)]
[MvcRolePackageDenyAuthorize(KretaClaimPackages.IsOnlyAlkalmozott.ClaimValue)]
[MvcRolePackageAuthorize(KretaClaimPackages.CsoportVezeto.ClaimValue)]
[Attributes.KretaGlobalLanguageChangeActionFilter(LanguageCode = "hu-Dualis")]
public class DualisIgazolasController : BaseIgazolasController
{
private IKretaAuthorization Authorization { get; }
public bool IsDualisKepzesEnabled => new IntezmenyConfigHelper(ConnectionTypeExtensions.GetSystemConnectionType()).GetIntezmenyConfig<bool>(IntezmenyConfigModulEnum.DualisKepzes, IntezmenyConfigTipusEnum.IsEnabled);
public DualisIgazolasController(IKretaAuthorization authorization)
{
Authorization = authorization;
}
public ActionResult Index()
{
if (!Authorization.IsValidDualisMulasztasok())
{
return Redirect(Url.Action("AccessDenied", "ErrorHandler", new { area = string.Empty }));
}
var model = new IgazolasKeresoModel();
var osztalyokEsCsoportok = OsztalyokEsCsoportokHelpers.GetOsztalyokVagyOsztalyokEsCsoportok(ClaimData.FelhasznaloId, osztalyfonokiFeladat: true);
if (osztalyokEsCsoportok.Count == 1)
{
model.OsztCsopId = int.Parse(osztalyokEsCsoportok.First().Key);
}
else if (ClaimData.FelhasznaloSzerepkorok.ContainsKey(SzerepkorTipusEnum.Naplo))
{
model.OsztCsopId = new OsztalyCsoportHelper(ConnectionTypeExtensions.GetSessionConnectionType()).GetOsztalyfonokElsonekMegtalaltOsztalya(ClaimData.FelhasznaloId);
}
model.SzervezetTipusId = (int)SzervezetTipusEnum.Dualis;
model.ControllerName = Constants.Controllers.DualisIgazolas;
model.ApiControllerName = Constants.ApiControllers.DualisIgazolasokApi;
//model.IgazolasNaplozarasDatum = new SystemSettingsHelper(ConnectionTypeExtensions.GetActiveSessionConnectionType()).GetIgazolasokNaplozarasDatuma();
return View("~/Areas/Hianyzas/Views/Igazolas/Index.cshtml", model);
}
}
}

View file

@ -0,0 +1,53 @@
using System.Web.Mvc;
using Kreta.BusinessLogic.Helpers;
using Kreta.BusinessLogic.Security;
using Kreta.Enums;
using Kreta.Enums.ManualEnums;
using Kreta.Web.Areas.Hianyzas.Models;
using Kreta.Web.Helpers;
using Kreta.Web.Security;
namespace Kreta.Web.Areas.Hianyzas.Controllers
{
[MvcRoleClaimsAuthorize(true)]
[MvcRolePackageDenyAuthorize(KretaClaimPackages.IsOnlyAlkalmozott.ClaimValue, KretaClaimPackages.IsSzirIntezmeny.ClaimValue, KretaClaimPackages.IsDefaultAdminUser.ClaimValue)]
[MvcRolePackageAuthorize(KretaClaimPackages.Adminisztrator.ClaimValue, KretaClaimPackages.Dualis_Admin.ClaimValue)]
[Attributes.KretaGlobalLanguageChangeActionFilter(LanguageCode = "hu-Dualis")]
public class DualisMulasztasKeresoController : BaseMulasztasKeresoController
{
private IKretaAuthorization Authorization { get; }
public bool IsDualisKepzesEnabled => new IntezmenyConfigHelper(ConnectionTypeExtensions.GetSystemConnectionType()).GetIntezmenyConfig<bool>(IntezmenyConfigModulEnum.DualisKepzes, IntezmenyConfigTipusEnum.IsEnabled);
public DualisMulasztasKeresoController(IKretaAuthorization authorization)
{
Authorization = authorization;
}
public ActionResult Index()
{
if (!Authorization.IsValidDualisMulasztasok())
{
return Redirect(Url.Action("AccessDenied", "ErrorHandler", new { area = string.Empty }));
}
var model = new MulasztasSearchModel
{
FeladatEllatasiHelyId = ClaimData.FelhelySzuro,
ControllerName = Constants.Controllers.DualisMulasztasKereso,
ApiControllerName = Constants.ApiControllers.DualisMulasztasKeresoApi
};
if (IsDualisKepzesEnabled)
{
model.SzervezetTipusEnum = SzervezetTipusEnum.Dualis;
}
if (ClaimData.FelhasznaloSzerepkor != SzerepkorTipusEnum.Adminisztrator)
{
model.SzervezetId = new SzervezetHelper(ConnectionTypeExtensions.GetSessionConnectionType()).GetAlkalmazottSzervezetId(ClaimData.FelhasznaloId);
}
return View("~/Areas/Hianyzas/Views/MulasztasKereso/Index.cshtml", model);
}
}
}

View file

@ -0,0 +1,98 @@
using System;
using System.Web.Mvc;
using Kreta.BusinessLogic.Helpers;
using Kreta.BusinessLogic.Helpers.SystemSettings;
using Kreta.BusinessLogic.Security;
using Kreta.Enums;
using Kreta.Enums.ManualEnums;
using Kreta.Web.Areas.Hianyzas.Models;
using Kreta.Web.Areas.Hianyzas.Models.Mulasztasok;
using Kreta.Web.Helpers;
using Kreta.Web.Security;
namespace Kreta.Web.Areas.Hianyzas.Controllers
{
[MvcRoleClaimsAuthorize(true)]
[MvcRolePackageDenyAuthorize(KretaClaimPackages.IsOnlyAlkalmozott.ClaimValue)]
[MvcRolePackageAuthorize(KretaClaimPackages.CsoportVezeto.ClaimValue)]
[Attributes.KretaGlobalLanguageChangeActionFilter(LanguageCode = "hu-Dualis")]
public class DualisMulasztasokController : BaseMulasztasokController
{
protected IKretaAuthorization Authorization { get; }
public DualisMulasztasokController(IKretaAuthorization authorization)
{
Authorization = authorization ?? throw new ArgumentNullException(nameof(authorization));
}
public ActionResult Index()
{
if (!Authorization.IsValidDualisOktato())
{
return Redirect(Url.Action("AccessDenied", "ErrorHandler", new { area = string.Empty }));
}
var model = new MulasztasIndexModel
{
OsztalyCsoportList = GetOsztalyCsoportList(true),
TabList = GetMulasztasokTabs(Constants.Controllers.DualisMulasztasok),
IgazolasNaploZarasDatum = new SystemSettingsHelper(ConnectionTypeExtensions.GetSessionConnectionType()).GetIgazolasokNaplozarasDatuma(),
};
if (ClaimData.FelhasznaloSzerepkorok.ContainsKey(SzerepkorTipusEnum.Naplo))
{
model.OsztalyCsoportId = new OsztalyCsoportHelper(ConnectionTypeExtensions.GetSessionConnectionType()).GetOsztalyfonokElsonekMegtalaltOsztalya(ClaimData.FelhasznaloId);
}
return View("Index", model);
}
public ActionResult GetMulasztasokDatumNezetTab()
{
return base.GetMulasztasokDatumNezetTab(Constants.Controllers.DualisMulasztasok, Constants.ApiControllers.DualisMulasztasokApi, (int)SzervezetTipusEnum.Dualis);
}
public ActionResult GetMulasztasokDatumNezetDetailGrid(MulasztasokDatumNezetGridModel dateModel)
{
dateModel.ApiControllerName = Constants.ApiControllers.DualisMulasztasokApi;
dateModel.SzervezetTipusId = (int)SzervezetTipusEnum.Dualis;
dateModel.MulasztasJogosultsagSetting = CsoportvezetokIgazolasiJogosultsagaEnum.BarmitBeallithatnak;
return base.GetMulasztasokDatumNezetDetailGrid(dateModel);
}
public ActionResult GetMulasztasokTanuloNezetTab()
{
return base.GetMulasztasokTanuloNezetTab(Constants.Controllers.DualisMulasztasok, Constants.ApiControllers.DualisMulasztasokApi, (int)SzervezetTipusEnum.Dualis);
}
public ActionResult GetMulasztasokTanuloNezetDetailGrid(MulasztasokTanuloNezetGridModel tanuloModel, bool GridHasDelete)
{
tanuloModel.ApiControllerName = Constants.ApiControllers.DualisMulasztasokApi;
return base.GetMulasztasokTanuloNezetDetailGrid(tanuloModel, GridHasDelete, (int)SzervezetTipusEnum.Dualis);
}
public ActionResult GetMulasztasokNaploNezetTab()
{
return base.GetMulasztasokNaploNezetTab(Constants.Controllers.DualisMulasztasok, Constants.ApiControllers.DualisMulasztasokApi, (int)SzervezetTipusEnum.Dualis);
}
public ActionResult OpenTanuloMulasztasaiPopup(int tanuloId, int osztalyCsoportId, string apiControllerName = null)
{
return base.OpenTanuloMulasztasaiPopup(tanuloId, osztalyCsoportId, apiControllerName, (int)SzervezetTipusEnum.Dualis);
}
public ActionResult TanuloKezeletlenMulasztasaiDetailGrid(TanuloMulasztasaiPopupModel gridModel, string apiControllerName = null)
{
return base.TanuloKezeletlenMulasztasaiDetailGrid(gridModel, apiControllerName, (int)SzervezetTipusEnum.Dualis);
}
public ActionResult TanuloKezeltMulasztasaiDetailGrid(TanuloMulasztasaiPopupModel gridModel, string apiControllerName = null)
{
return base.TanuloKezeltMulasztasaiDetailGrid(gridModel, apiControllerName, (int)SzervezetTipusEnum.Dualis);
}
}
}

View file

@ -0,0 +1,55 @@
using System.Web.Mvc;
using Kreta.BusinessLogic.Helpers;
using Kreta.BusinessLogic.Security;
using Kreta.Web.Areas.Hianyzas.Models;
using Kreta.Web.Areas.Tanulo.Helper;
using Kreta.Web.Helpers;
using Kreta.Web.Helpers.Modal;
using Kreta.Web.Models.EditorTemplates;
using Kreta.Web.Security;
namespace Kreta.Web.Areas.Hianyzas.Controllers
{
[MvcRoleClaimsAuthorize(true)]
[MvcRolePackageDenyAuthorize(KretaClaimPackages.IsOnlyAlkalmozott.ClaimValue)]
[MvcRolePackageAuthorize(KretaClaimPackages.Adminisztrator.ClaimValue)]
public class FelmentesekController : Controller
{
#region Properties
public static string GridName => "FelmentesekGrid";
public static string SearchFormName => "searchForm";
public static string NewModifyPopupName => "New_Modify_Popup";
public static string NewModifyFormName => "FelmentesekNewModifyForm";
#endregion Properties
public ActionResult Index()
{
var model = new FelmentesekSearchModel();
return View(model);
}
public ActionResult ModFelmentes(int id)
{
var model = TanuloLogic.GetFelmentes(id);
var pm = new PopUpModel(model, "_Felmentes_Bevitel");
pm.Buttons.Add(new ModalButtonModel() { Name = "BtnFelmentesCancel", Text = Resources.CommonResource.Megse, EventName = "FelmentesekHelper.modFelmentesCancel" });
pm.Buttons.Add(new ModalButtonModel() { Name = "BtnFelmentesOk", Text = Resources.CommonResource.Mentes, EventName = "FelmentesekHelper.modFelmentesSave" });
return PartialView(Constants.General.PopupView, pm);
}
public ActionResult InfoFelmentes(int id)
{
var model = new FelmentesekGridModel(new FelmentesHelper(ConnectionTypeExtensions.GetSessionConnectionType()).GetFelmentesById(id), true);
var pm = new PopUpModel(model, "_Felmentes_Info");
pm.Buttons.Add(new ModalButtonModel() { Name = "BtnFelmentesInfoCancel", Text = Resources.CommonResource.Megse, EventName = "FelmentesekHelper.infoFelmentesCancel" });
return PartialView(Constants.General.PopupView, pm);
}
}
}

View file

@ -0,0 +1,42 @@
using System;
using System.Web.Http;
using System.Web.Mvc;
using Kreta.BusinessLogic.Helpers;
using Kreta.BusinessLogic.Security;
using Kreta.Resources;
using Kreta.Web.Areas.Hianyzas.Models;
using Kreta.Web.Helpers;
using Kreta.Web.Security;
namespace Kreta.Web.Areas.Hianyzas.Controllers
{
[MvcRoleClaimsAuthorize(true)]
[MvcRolePackageAuthorize(KretaClaimPackages.Ellenorzo.ClaimValue)]
public class HianyzasokController : Controller
{
// GET: Hianyzas/Hianyzasok
public ActionResult Index(int? id)
{
var hianyzasokSearchModel = new HianyzasokSearchModel
{
MulaszatasId = id,
};
return View(hianyzasokSearchModel);
}
public ActionResult Export([FromUri] HianyzasokSearchModel searchModel)
{
var mulasztasHelper = new MulasztasHelper(ConnectionTypeExtensions.GetActiveSessionConnectionType());
var stream = mulasztasHelper.ExportTanuloKesesekHianyzasok(searchModel.ConvertToMulasztasokCo());
var fileName = string.Format(HianyzasResource.TanuloKesesekHianyzasokExportFileName, DateTime.Now.ToString(Constants.General.ExportFileNameDateFormat));
var result = new FileStreamResult(stream, Core.Constants.ContentTypes.Xlsx)
{
FileDownloadName = fileName
};
return result;
}
}
}

View file

@ -0,0 +1,40 @@
using System.Collections.Generic;
using System.Linq;
using System.Web.Mvc;
using Kreta.BusinessLogic.Helpers;
using Kreta.BusinessLogic.Helpers.SystemSettings;
using Kreta.BusinessLogic.Security;
using Kreta.Enums;
using Kreta.Web.Areas.Hianyzas.Models;
using Kreta.Web.Helpers;
using Kreta.Web.Security;
namespace Kreta.Web.Areas.Hianyzas.Controllers
{
[MvcRoleClaimsAuthorize(true)]
[MvcRolePackageDenyAuthorize(KretaClaimPackages.IsOnlyAlkalmozott.ClaimValue)]
[MvcRolePackageAuthorize(KretaClaimPackages.Osztalyfonok.ClaimValue, KretaClaimPackages.SzuperOsztalyfonok.ClaimValue,
KretaClaimPackages.Evfolyamfelelos.ClaimValue)]
public class IgazolasController : BaseIgazolasController
{
public ActionResult Index()
{
var model = new IgazolasKeresoModel();
IDictionary<string, string> osztalyokEsCsoportok = OsztalyokEsCsoportokHelpers.GetOsztalyokVagyOsztalyokEsCsoportok(ClaimData.FelhasznaloId, osztalyfonokiFeladat: true);
if (osztalyokEsCsoportok.Count == 1) /*TODO:Tobb Osztaly*//*OM-1677*/
{
model.OsztCsopId = int.Parse(osztalyokEsCsoportok.First().Key);
}
else if (ClaimData.FelhasznaloSzerepkorok.ContainsKey(SzerepkorTipusEnum.Naplo))
{
model.OsztCsopId = new OsztalyCsoportHelper(ConnectionTypeExtensions.GetSessionConnectionType()).GetOsztalyfonokElsonekMegtalaltOsztalya(ClaimData.FelhasznaloId);
}
model.IgazolasNaplozarasDatum = new SystemSettingsHelper(ConnectionTypeExtensions.GetActiveSessionConnectionType()).GetIgazolasokNaplozarasDatuma();
return View(model);
}
}
}

View file

@ -0,0 +1,50 @@
using System.Web.Http;
using System.Web.Mvc;
using Kreta.BusinessLogic.HelperClasses;
using Kreta.BusinessLogic.Helpers;
using Kreta.BusinessLogic.Security;
using Kreta.Web.Areas.Hianyzas.Models;
using Kreta.Web.Controllers.Logic;
using Kreta.Web.Helpers;
using Kreta.Web.Models.EditorTemplates;
using Kreta.Web.Security;
namespace Kreta.Web.Areas.Hianyzas.Controllers
{
[MvcRoleClaimsAuthorize(true)]
[MvcRolePackageDenyAuthorize(KretaClaimPackages.IsOnlyAlkalmozott.ClaimValue, KretaClaimPackages.IsSzirIntezmeny.ClaimValue)]
[MvcRolePackageAuthorize(KretaClaimPackages.Adminisztrator.ClaimValue)]
public class IgazolasokListajaController : Controller
{
public ActionResult Index()
{
var model = new IgazolasokListajaSearchModel() { FeladatEllatasiHelyId = ClaimData.FelhelySzuro };
return View(model);
}
public ActionResult IgazolasInfoPopUp(int igazolasId)
{
IgazolasCO igazolasCO = new IgazolasHelper(ConnectionTypeExtensions.GetActiveSessionConnectionType()).GetIgazolasInfo(igazolasId);
IgazolasModel igazolasModel = new IgazolasModel
{
ID = igazolasCO.ID,
RogzitoId = igazolasCO.RogzitoId,
RogzitoNev = igazolasCO.RogzitoNev,
RogzDatumRoviddatum = igazolasCO.RogzDatum.ToShortDateString(),
ErvKezdeteRoviddatum = igazolasCO.ErvKezdete.ToShortDateString(),
ErvVegeRoviddatum = igazolasCO.ErvVege.ToShortDateString(),
IgazolasTipus = igazolasCO.IgazolasTipus,
Megjegyzes = igazolasCO.Megjegyzes,
TanuloId = igazolasCO.TanuloId,
TanuloNev = igazolasCO.TanuloNev,
OsztCsopNev = igazolasCO.OsztCsopNev
};
var model = new PopUpModel(igazolasModel, "Igazolas_Info");
model = model.AddCancelBtn(model, "IgazolasokListajaHelper.igazolasInfoCancel");
return PartialView(Constants.General.PopupView, model);
}
}
}

View file

@ -0,0 +1,26 @@
using System.Web.Http;
using System.Web.Mvc;
using Kreta.BusinessLogic.Security;
using Kreta.Web.Areas.Hianyzas.Models;
using Kreta.Web.Controllers.Logic;
using Kreta.Web.Security;
namespace Kreta.Web.Areas.Hianyzas.Controllers
{
[MvcRoleClaimsAuthorize(true)]
[MvcRolePackageDenyAuthorize(KretaClaimPackages.IsOnlyAlkalmozott.ClaimValue)]
[MvcRolePackageAuthorize(KretaClaimPackages.Ellenorzo.ClaimValue)]
public class InformaciokIgazolasokController : Controller
{
// GET: Hianyzas/InformaciokIgazolasok
public ActionResult Index()
{
return View();
}
public ActionResult ExportIgazolasok([FromUri] InformaciokIgazolasSearchModel data)
{
return CommonExportLogic.ExportInformaciokIgazolas(data);
}
}
}

View file

@ -0,0 +1,27 @@
using System.Web.Mvc;
using Kreta.BusinessLogic.Helpers;
using Kreta.BusinessLogic.Security;
using Kreta.Enums.ManualEnums;
using Kreta.Web.Areas.Hianyzas.Models;
using Kreta.Web.Helpers;
using Kreta.Web.Security;
namespace Kreta.Web.Areas.Hianyzas.Controllers
{
[MvcRoleClaimsAuthorize(true)]
[MvcRolePackageDenyAuthorize(KretaClaimPackages.IsOnlyAlkalmozott.ClaimValue, KretaClaimPackages.IsSzirIntezmeny.ClaimValue)]
[MvcRolePackageAuthorize(KretaClaimPackages.Adminisztrator.ClaimValue)]
public class MulasztasKeresoController : BaseMulasztasKeresoController
{
public ActionResult Index()
{
var model = new MulasztasSearchModel
{
FeladatEllatasiHelyId = ClaimData.FelhelySzuro,
IsSzakkepzo = ClaimData.IsSzakkepzoIntezmeny
};
return View("Index", model);
}
}
}

View file

@ -0,0 +1,86 @@
using System.Collections.Generic;
using System.Linq;
using System.Web.Mvc;
using Kreta.BusinessLogic.Helpers;
using Kreta.BusinessLogic.Helpers.SystemSettings;
using Kreta.BusinessLogic.Security;
using Kreta.Enums;
using Kreta.Enums.ManualEnums;
using Kreta.Framework;
using Kreta.Web.Areas.Hianyzas.Models;
using Kreta.Web.Areas.Hianyzas.Models.Mulasztasok;
using Kreta.Web.Helpers;
using Kreta.Web.Helpers.TabStrip;
using Kreta.Web.Models.EditorTemplates;
using Kreta.Web.Security;
namespace Kreta.Web.Areas.Hianyzas.Controllers
{
[MvcRoleClaimsAuthorize(true)]
[MvcRolePackageDenyAuthorize(KretaClaimPackages.IsOnlyAlkalmozott.ClaimValue)]
[MvcRolePackageAuthorize(KretaClaimPackages.Osztalyfonok.ClaimValue,
KretaClaimPackages.SzuperOsztalyfonok.ClaimValue,
KretaClaimPackages.Evfolyamfelelos.ClaimValue)]
public class MulasztasokController : BaseMulasztasokController
{
public ActionResult Index()
{
var model = new MulasztasIndexModel
{
OsztalyCsoportList = GetOsztalyCsoportList(true),
TabList = GetMulasztasokTabs(Constants.Controllers.Mulasztasok),
IgazolasNaploZarasDatum = new SystemSettingsHelper(ConnectionTypeExtensions.GetSessionConnectionType()).GetIgazolasokNaplozarasDatuma(),
};
if (ClaimData.FelhasznaloSzerepkorok.ContainsKey(SzerepkorTipusEnum.Naplo))
{
model.OsztalyCsoportId = new OsztalyCsoportHelper(ConnectionTypeExtensions.GetSessionConnectionType()).GetOsztalyfonokElsonekMegtalaltOsztalya(ClaimData.FelhasznaloId);
}
return View("Index", model);
}
public ActionResult GetMulasztasokDatumNezetTab()
{
return base.GetMulasztasokDatumNezetTab(Constants.Controllers.Mulasztasok, Constants.ApiControllers.MulasztasokApi);
}
public ActionResult GetMulasztasokDatumNezetDetailGrid(MulasztasokDatumNezetGridModel dateModel)
{
var igazolasNaplozarasDatuma = new SystemSettingsHelper(ConnectionTypeExtensions.GetSessionConnectionType()).GetIgazolasokNaplozarasDatuma();
dateModel.IsMulasztasKezelheto = dateModel.MulasztasDatuma > igazolasNaplozarasDatuma;
return base.GetMulasztasokDatumNezetDetailGrid(dateModel);
}
public ActionResult GetMulasztasokTanuloNezetTab()
{
return base.GetMulasztasokTanuloNezetTab(Constants.Controllers.Mulasztasok, Constants.ApiControllers.MulasztasokApi);
}
public ActionResult GetMulasztasokTanuloNezetDetailGrid(MulasztasokTanuloNezetGridModel tanuloModel, bool GridHasDelete)
{
return base.GetMulasztasokTanuloNezetDetailGrid(tanuloModel, GridHasDelete);
}
public ActionResult GetMulasztasokNaploNezetTab()
{
return base.GetMulasztasokNaploNezetTab(Constants.Controllers.Mulasztasok, Constants.ApiControllers.MulasztasokApi);
}
public ActionResult OpenTanuloMulasztasaiPopup(int tanuloId, int osztalyCsoportId, string apiControllerName = null)
{
return base.OpenTanuloMulasztasaiPopup(tanuloId, osztalyCsoportId, apiControllerName);
}
public ActionResult TanuloKezeletlenMulasztasaiDetailGrid(TanuloMulasztasaiPopupModel gridModel, string apiControllerName = null)
{
return base.TanuloKezeletlenMulasztasaiDetailGrid(gridModel, apiControllerName);
}
public ActionResult TanuloKezeltMulasztasaiDetailGrid(TanuloMulasztasaiPopupModel gridModel, string apiControllerName = null)
{
return base.TanuloKezeltMulasztasaiDetailGrid(gridModel, apiControllerName);
}
}
}

View file

@ -0,0 +1,17 @@
using System.Web.Mvc;
namespace Kreta.Web.Areas.Hianyzas.Controllers
{
//Note: kikapcsolva, mert jelenleg nincs használatban
//[MvcRoleClaimsAuthorize(true)]
//[MvcRolePackageAuthorize(KretaClaimPackages.Ellenorzo.ClaimValue)]
public class TantargyiMulasztasController : Controller
{
// GET: Hianyzas/TantargyiMulasztas
public ActionResult Index()
{
return View();
}
}
}