304 lines
No EOL
15 KiB
Text
304 lines
No EOL
15 KiB
Text
@using Kreta.Resources
|
|
@using Kreta.Web.Areas.Tanulo.Models
|
|
@using Kreta.Web.Security
|
|
@using Kreta.Web.Helpers.Grid;
|
|
@using Kreta.Web.Areas.Tanulo.Models
|
|
@using Kreta.BusinessLogic.Classes
|
|
@using Kreta.Resources
|
|
@using Kreta.Enums.ManualEnums
|
|
@model TanuloModel
|
|
|
|
@{
|
|
string magantanuloLabel = string.Empty, magantanulosagOkaLabel = string.Empty, magantanulosagKezdeteLabel = string.Empty;
|
|
if (ClaimData.IsSelectedTanev20_21OrLater)
|
|
{
|
|
magantanuloLabel = TanuloResource.EgyeniMunkarend;
|
|
magantanulosagOkaLabel = TanuloResource.EgyeniMunkarendOka;
|
|
magantanulosagKezdeteLabel = TanuloResource.EgyeniMunkarendKezdete;
|
|
}
|
|
}
|
|
|
|
<div class="container-fluid details">
|
|
<h4>@TanuloResource.TanugyiAdatai - @Model.TanuloTanugyModel.OsztalyNev</h4>
|
|
|
|
@Html.HiddenFor(x => x.TanuloTanugyModel.OsztalyId)
|
|
@Html.HiddenFor(x => x.TanuloTanugyModel.IsTanterviJellemzoRequired)
|
|
@Html.HiddenFor(x => x.TanuloTanugyModel.IsTanterviJellegRequired)
|
|
|
|
<div class="row">
|
|
@Html.KretaComboBoxFor(x => x.TanuloTanugyModel.NevelesiTervId, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.ComboBoxHelperApi, action = "GetTantervList" }), "Text", "Value").AutoBind(true).RenderWithName(3, 3, tooltipResource: TanuloResource.TanuloTanugyiAdatokNevelesiTervTooltip)
|
|
@if (Model.TanuloTanugyModel.IsOsszevontOsztaly)
|
|
{
|
|
@Html.KretaComboBoxFor(x => x.TanuloTanugyModel.TanuloEvfolyamTipus, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.ComboBoxHelperApi, action = "GetTanuloEvfolyamList" }), "Text", "Value").AutoBind(true).RenderWithName(3, 3)
|
|
}
|
|
</div>
|
|
@if (Model.TanuloTanugyModel.HasAktivOsztalybaSorolas)
|
|
{
|
|
<div class="row">
|
|
@Html.KretaNumericFor(x => x.TanuloTanugyModel.NaploSorszam).Min(0).Max(999999999).RenderWithName(3, 3, tooltipResource: TanuloResource.TanuloTanugyiAdatokNaploSorszamTooltip)
|
|
@Html.KretaTextBoxFor(x => x.TanuloTanugyModel.NyilvantartasiSzam).RenderWithName(3, 3, tooltipResource: TanuloResource.TanuloTanugyiAdatokTorzslapszamTooltip)
|
|
</div>
|
|
}
|
|
<div class="row">
|
|
@Html.KretaTextBoxFor(x => x.TanuloTanugyModel.BeirasiSorszam).RenderWithName(3, 3, tooltipResource: TanuloResource.TanuloTanugyiAdatokBeirasiNaploSorszamaTooltip)
|
|
@Html.KretaComboBoxFor(x => x.TanuloTanugyModel.FelvetelTaneveId, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.ComboBoxHelperApi, action = "GetTanevList" }), "Text", "Value").AutoBind(true).RenderWithName(3, 3, tooltipResource: TanuloResource.TanuloTanugyiAdatokFelvetelTaneveTooltip)
|
|
</div>
|
|
<div class="row">
|
|
@Html.KretaCheckBoxFor(x => x.TanuloTanugyModel.KifirAlapjanImportalt).Enable(false).RenderWithName(3, 3)
|
|
@Html.KretaComboBoxFor(x => x.TanuloTanugyModel.TanterviJellemzoId, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.ComboBoxHelperApi, action = "GetTantervJellemzoTipusList" }), "Text", "Value").AutoBind(true).RenderWithName(3, 3)
|
|
</div>
|
|
@if (Model.TanuloTanugyModel.IsSzakkepzeses && Model.TanuloTanugyModel.HasAktivOsztalybaSorolas)
|
|
{
|
|
<div class="row">
|
|
@Html.KretaCheckBoxFor(x => x.TanuloTanugyModel.TechnikusiEvfolyam).RenderWithName(3, 3, tooltipResource: TanuloResource.TanuloTanugyiAdatokTechnikusiEvfolyamTooltip)
|
|
@Html.KretaNumericFor(x => x.TanuloTanugyModel.GyakorlatiSzintvizsgakAtlaga).Min(0).Max(5).RenderWithName(3, 3, tooltipResource: TanuloResource.TanuloTanugyiAdatokGyakorlatiSzintvizsgakAtlagaTooltip)
|
|
</div>
|
|
}
|
|
@if (ClaimData.IsSelectedTanev20_21OrLater)
|
|
{
|
|
<h4>@TanuloResource.KollegiumiJogviszonyAdatai - @Model.TanuloTanugyModel.OsztalyNev</h4>
|
|
}
|
|
else
|
|
{
|
|
<h4>@TanuloResource.TanuloJogviszonyAdatai - @Model.TanuloTanugyModel.OsztalyNev</h4>
|
|
}
|
|
<div class="row">
|
|
@if (Model.TanuloTanugyModel.HasAktivOsztalybaSorolas)
|
|
{
|
|
@Html.KretaCheckBoxFor(x => x.TanuloTanugyModel.IsESL16EvesUtanBelepett).RenderWithName(3, 3)
|
|
if(ClaimData.IsSzakkepzoIntezmeny && ClaimData.IsSelectedTanev21_22OrLater)
|
|
{
|
|
@Html.KretaComboBoxFor(x => x.TanuloTanugyModel.TanterviJellegId, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperApi", action = "GetKepzesListS" })).AutoBind(true).RenderWithName(3, 3)
|
|
}
|
|
}
|
|
else
|
|
{
|
|
@Html.KretaEmpty(6)
|
|
}
|
|
</div>
|
|
<div class="row">
|
|
@Html.KretaCheckBoxFor(x => x.TanuloTanugyModel.TankotelezettsegetTeljesito).RenderWithName(3, 3)
|
|
@Html.KretaDatePickerFor(x => x.TanuloTanugyModel.TankotelezettsegVege).RenderWithName(3, 3)
|
|
</div>
|
|
<div class="row">
|
|
@Html.KretaCheckBoxFor(x => x.TanuloTanugyModel.Bejaro).RenderWithName(3, 3)
|
|
@Html.KretaCheckBoxFor(x => x.TanuloTanugyModel.SzakmaiGyakorlaton).RenderWithName(3, 3)
|
|
</div>
|
|
|
|
<div class="row">
|
|
@Html.KretaCheckBoxFor(x => x.TanuloTanugyModel.Magantanulo, new Dictionary<string, object> { { "id", "magantanuloChBx" } }).RenderWithName(3, 3, labelMsg: magantanuloLabel)
|
|
</div>
|
|
<div class="row">
|
|
@Html.KretaComboBoxFor(x => x.TanuloTanugyModel.MagantanulosagOka, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.ComboBoxHelperApi, action = "GetMagantanulosagOkaList" }), "Text", "Value").AutoBind(true).RenderWithName(3, 3, labelMsg: magantanulosagOkaLabel)
|
|
@Html.KretaDatePickerFor(x => x.TanuloTanugyModel.MagantanulosagKezdete).RenderWithName(3, 3, labelMsg: magantanulosagKezdeteLabel)
|
|
</div>
|
|
<div class="row">
|
|
@if (ClaimData.IsSelectedTanev20_21OrLater)
|
|
{
|
|
@Html.KretaDatePickerFor(x => x.TanuloTanugyModel.MagantanulosagVege).RenderWithName(3, 3)
|
|
}
|
|
else
|
|
{
|
|
@Html.KretaEmpty(6)
|
|
}
|
|
@Html.KretaCheckBoxFor(x => x.TanuloTanugyModel.Vendeg).RenderWithName(3, 3)
|
|
</div>
|
|
<div class="row">
|
|
@Html.KretaCheckBoxFor(x => x.TanuloTanugyModel.TandijatFizeto).RenderWithName(3, 3)
|
|
@Html.KretaCheckBoxFor(x => x.TanuloTanugyModel.TeritestFizeto).RenderWithName(3, 3)
|
|
</div>
|
|
<div class="row">
|
|
@Html.KretaCheckBoxFor(x => x.TanuloTanugyModel.Tanuloszerzodeses).RenderWithName(3, 3)
|
|
@if (ClaimData.IsSelectedTanev21_22OrLater)
|
|
{
|
|
@Html.KretaEmpty()
|
|
}
|
|
else
|
|
{
|
|
@Html.KretaCheckBoxFor(x => x.TanuloTanugyModel.PolgariSzerzodeses).RenderWithName(3, 3)
|
|
}
|
|
</div>
|
|
<div class="row">
|
|
@Html.KretaCheckBoxFor(x => x.TanuloTanugyModel.EgyuttmukodesiMegallapodasos).RenderWithName(3, 3)
|
|
@Html.KretaCheckBoxFor(x => x.TanuloTanugyModel.KizarolagIskolaiKeretekKozott).RenderWithName(3, 3)
|
|
</div>
|
|
<div class="row">
|
|
@Html.KretaCheckBoxFor(x => x.TanuloTanugyModel.DiaksportkorTag).RenderWithName(3, 3)
|
|
@Html.KretaCheckBoxFor(x => x.TanuloTanugyModel.Evismetlo).RenderWithName(3, 3)
|
|
</div>
|
|
<div class="row">
|
|
@Html.KretaTextBoxFor(x => x.TanuloTanugyModel.ElozoIntezmeny).RenderWithName(3, 3)
|
|
@Html.KretaCheckBoxFor(x => x.TanuloTanugyModel.SZKTV).RenderWithName(3, 3)
|
|
</div>
|
|
<div class="row">
|
|
@Html.KretaCheckBoxFor(x => x.TanuloTanugyModel.SZETV).RenderWithName(3, 3)
|
|
@Html.KretaCheckBoxFor(x => x.TanuloTanugyModel.OSZTV).RenderWithName(3, 3)
|
|
</div>
|
|
<div class="row">
|
|
@Html.KretaCheckBoxFor(x => x.TanuloTanugyModel.EgyebOrszagosDonto).RenderWithName(3, 3)
|
|
@Html.KretaCheckBoxFor(x => x.TanuloTanugyModel.IsSzakmaiGyakorlatHiany).RenderWithName(3, 3)
|
|
</div>
|
|
@if (ClaimData.IsSelectedTanev21_22OrLater)
|
|
{
|
|
<div class="row">
|
|
@Html.KretaCheckBoxFor(x => x.TanuloTanugyModel.IsKiemeltenTehetseges).RenderWithName(3, 3)
|
|
@Html.KretaCheckBoxFor(x => x.TanuloTanugyModel.IsSzamitogepetOktCelraHasznal).RenderWithName(3, 3)
|
|
</div>
|
|
<div class="row">
|
|
@Html.KretaCheckBoxFor(x => x.TanuloTanugyModel.IsSzabokyAdolfSzakkepODReszesul).RenderWithName(3, 3)
|
|
@if (Model.TanuloTanugyModel.IsAltalanosIskolaFeladatEllatasiHely)
|
|
{
|
|
@Html.KretaCheckBoxFor(x => x.TanuloTanugyModel.IsEgesznaposIskOktReszesul).RenderWithName(3, 3)
|
|
}
|
|
</div>
|
|
}
|
|
|
|
<h4>@TanuloResource.JogviszonyBeallitasok</h4>
|
|
<div class="row">
|
|
@Html.KretaCheckBoxFor(x => x.TanuloTanugyModel.JogviszonySzuneteltetese).RenderWithName(3, 3)
|
|
</div>
|
|
@if (Model.TanuloId.HasValue)
|
|
{
|
|
<div>
|
|
@{
|
|
const string TanuloApiController = Constants.ApiControllers.KollegiumTanuloApi;
|
|
}
|
|
<div class="container-fluid">
|
|
@(
|
|
Html.KretaGrid<JogviszonySzuneteltetesGridModel>(
|
|
"JogviszonyGrid",
|
|
new GridApiUrl(TanuloApiController, "GetJogviszonySzuneteltetesGrid", new Dictionary<string, string> { { "Id", Model.TanuloId.ToString() } }),
|
|
useToolBar: false
|
|
)
|
|
.Columns(columns =>
|
|
{
|
|
columns.Bound(c => c.Kezdete).Format(SDAFormat.Format[SDAFormat.FormatType.ShortDate]);
|
|
columns.Bound(c => c.Vege).Format(SDAFormat.Format[SDAFormat.FormatType.ShortDate]);
|
|
columns.Bound(c => c.OsztalyNev);
|
|
})
|
|
.FunctionCommand(Html, new List<FunctionCommand> { new FunctionCommand { Name = TanuloResource.Uj, ClientAction = "JogviszonySzuneteltetesHelper.openNewWindow" } })
|
|
.RowFunction(Html, new List<RowFunction> { new RowFunction { Name = CommonResource.Torles, ClientAction = "JogviszonySzuneteltetesHelper.deleteConfirm", IconEnum = GridRowFunctionIconEnum.Torles } })
|
|
.Sortable(sortable => sortable
|
|
.AllowUnsort(true)
|
|
.SortMode(GridSortMode.MultipleColumn))
|
|
)
|
|
</div>
|
|
<script type="text/javascript">
|
|
var JogviszonySzuneteltetesHelper = (function () {
|
|
var helper = function () { };
|
|
var url = {
|
|
New: "@Url.Action("OpenJogviszonySzuneteltetes", "Tanulo", new { area = Constants.Areas.Tanulo })",
|
|
Save: "@Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new {controller = Constants.ApiControllers.TanuloApi, action = "SaveJogviszonySzuneteltetes" })",
|
|
Delete: "@Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new {controller = Constants.ApiControllers.TanuloApi, action = "DeleteJogviszonySzuneteltetes" })"
|
|
};
|
|
|
|
helper.openNewWindow = function () {
|
|
AjaxHelper.DoPost(url.New, null, popUpWindow);
|
|
}
|
|
|
|
helper.deleteConfirm = function (rowData) {
|
|
KretaWindowHelper.confirmWindow("@(CommonResource.Kerdes)", "@(CommonResource.BiztosanTorli)", deleteSzuneteltetes, rowData.ID);
|
|
}
|
|
|
|
helper.Save = function () {
|
|
var json = $("#JogviszonySzuneteltetesForm").toObject();
|
|
json.tanuloId = $("#TanuloId").val();
|
|
json.osztalyId = $("#TanuloTanugyModel_OsztalyId").val();
|
|
|
|
AjaxHelper.DoValidationPost(url.Save, "JogviszonySzuneteltetesForm", json, JogviszonySzuneteltetesHelper.Cancel);
|
|
}
|
|
|
|
helper.Cancel = function () {
|
|
KretaWindowHelper.destroyWindow("newJogviszonySzuneteltetesWindow");
|
|
KretaGridHelper.refreshGrid("JogviszonyGrid");
|
|
}
|
|
|
|
function deleteSzuneteltetes(data) {
|
|
var isJogviszonySzuneteltetese = $("#TanuloTanugyModel_JogviszonySzuneteltetese").prop("checked");
|
|
var gridCnt = $("#JogviszonyGrid").data("kendoGrid").dataSource.data().length;
|
|
var json = { id: data, GridCnt: gridCnt, IsJogviszonySzuneteltetese: isJogviszonySzuneteltetese };
|
|
|
|
AjaxHelper.DoPost(url.Delete, json, JogviszonySzuneteltetesHelper.Cancel);
|
|
}
|
|
|
|
function popUpWindow(data) {
|
|
var config = KretaWindowHelper.getWindowConfigContainer();
|
|
config.title = "@(TanuloResource.JogviszonyBeallitasok)";
|
|
config.width = "50%";
|
|
config.height = "240px";
|
|
config.content = data;
|
|
|
|
var modal = KretaWindowHelper.createWindow("newJogviszonySzuneteltetesWindow", config);
|
|
KretaWindowHelper.openWindow(modal, true);
|
|
}
|
|
|
|
return helper;
|
|
})();
|
|
</script>
|
|
</div>
|
|
}
|
|
</div>
|
|
<script>
|
|
$(document).ready(function () {
|
|
if ($('#magantanuloChBx').is(':checked')) {
|
|
$('#TanuloTanugyModel_MagantanulosagOka').data('kendoComboBox').enable(true);
|
|
$('#TanuloTanugyModel_MagantanulosagKezdete').data('kendoDatePicker').enable(true);
|
|
$('#TanuloTanugyModel_MagantanulosagVege').data('kendoDatePicker').enable(true);
|
|
} else {
|
|
$('#TanuloTanugyModel_MagantanulosagOka').data('kendoComboBox').enable(false);
|
|
$('#TanuloTanugyModel_MagantanulosagKezdete').data('kendoDatePicker').enable(false);
|
|
$('#TanuloTanugyModel_MagantanulosagVege').data('kendoDatePicker').enable(false);
|
|
}
|
|
|
|
$('#magantanuloChBx').click(function () {
|
|
if ($(this).is(':checked')) {
|
|
$('#TanuloTanugyModel_MagantanulosagOka').data('kendoComboBox').enable(true);
|
|
$('#TanuloTanugyModel_MagantanulosagKezdete').data('kendoDatePicker').enable(true);
|
|
$('#TanuloTanugyModel_MagantanulosagVege').data('kendoDatePicker').enable(true);
|
|
} else {
|
|
$('#TanuloTanugyModel_MagantanulosagOka').data('kendoComboBox').enable(false);
|
|
$('#TanuloTanugyModel_MagantanulosagKezdete').data('kendoDatePicker').enable(false);
|
|
$('#TanuloTanugyModel_MagantanulosagVege').data('kendoDatePicker').enable(false);
|
|
|
|
$('#TanuloTanugyModel_MagantanulosagOka').data('kendoComboBox').value(null);
|
|
$('#TanuloTanugyModel_MagantanulosagKezdete').data('kendoDatePicker').value(null);
|
|
$('#TanuloTanugyModel_MagantanulosagVege').data('kendoDatePicker').value(null);
|
|
}
|
|
});
|
|
|
|
if (!$("#TanuloTanugyModel_JogviszonySzuneteltetese").prop("checked")) {
|
|
$("#JogviszonyGrid button").prop("disabled", true);
|
|
}
|
|
else {
|
|
$("#JogviszonyGrid button").prop("disabled", false);
|
|
}
|
|
|
|
$("#TanuloTanugyModel_JogviszonySzuneteltetese").change(function () {
|
|
if (!$("#TanuloTanugyModel_JogviszonySzuneteltetese").prop("checked")) {
|
|
$("#JogviszonyGrid button").prop("disabled", true);
|
|
}
|
|
else {
|
|
$("#JogviszonyGrid button").prop("disabled", false);
|
|
}
|
|
});
|
|
|
|
$('#TanuloTanugyModel_EgyuttmukodesiMegallapodasos').click(checkBoxLikeRadioButton);
|
|
$("#TanuloTanugyModel_Tanuloszerzodeses").click(checkBoxLikeRadioButton);
|
|
|
|
function checkBoxLikeRadioButton() {
|
|
if (@Json.Encode(ClaimData.IsSelectedTanev21_22OrLater)) {
|
|
const group = ['#TanuloTanugyModel_EgyuttmukodesiMegallapodasos',
|
|
'#TanuloTanugyModel_Tanuloszerzodeses'];
|
|
for (let chbx of group) {
|
|
if (this.checked) {
|
|
$(chbx).not(this).prop('disabled', true);
|
|
$(chbx).not(this).prop('checked', false);
|
|
}
|
|
else {
|
|
$(chbx).not(this).prop('disabled', false);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
</script> |