@using Kreta.Web.Helpers.Grid; @using Kreta.Web.Areas.HRModul.Models; @using Kreta.Resources; @using Kreta.BusinessLogic.Classes; @using Kreta.Enums.ManualEnums; @using Kreta.Web.Security; @model TavolletjelentoSearchModel @{ Layout = "~/Views/Shared/_MasterLayout.cshtml"; var isLeaderCallClass = "disabledItem"; if (Model.SrcKezeles) { isLeaderCallClass = ""; } } @section AddCss { @Styles.Render("~/Content/HRModul") } @section AddSearchPanel { @using (Html.SearchPanelSideBar("searchForm", "TavolletjelentoGrid")) { @Html.HiddenFor(x => x.SrcKezeles) @Html.HiddenFor(x => x.SrcFoIntezmenyeE) @Html.HiddenFor(x => x.IsTavolletFoIntezmenye) @Html.KretaMultiSelectFor(x => x.SrcNaptariEv, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperEnumApi", action = "GetTavolletjelentoNaptariEvekList" }), "Text", "Value").RenderSearchPanelSideBar() @Html.KretaComboBoxFor(x => x.SrcTipus, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperEnumApi", action = "GetTavolletjelentoTipusList" }), "Text", "Value").RenderSearchPanelSideBar()
@Html.KretaMultiSelectFor(x => x.SrcAlkalmazott, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperApi", action = "GetAllAlkalmazott", id = Model.AlkalmazottFilterId }), "Text", "Value").AutoBind(true).RenderSearchPanelSideBar()
@Html.KretaComboBoxFor(x => x.SrcStatusz, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperEnumApi", action = "GetTavolletjelentoStatuszList" }), "Text", "Value").RenderSearchPanelSideBar() @Html.KretaDatePickerFor(x => x.SrcIdoszakKezdet).Min(Model.MinimumSrcIdoszakKezdet).RenderSearchPanelSideBar() @Html.KretaDatePickerFor(x => x.SrcIdoszakVeg).Min(Model.MinimumSrcIdoszakVeg).RenderSearchPanelSideBar() @Html.KretaComboBoxFor(x => x.SrcMelleklettelRendelkezik, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.ComboBoxHelperEnumApi, action = "GetIgenNemEnumList" })).RenderSearchPanelSideBar() @Html.KretaRangeDatePickerSideBar(x => x.SrcRogzitesDatumaTol, x => x.SrcRogzitesDatumaIg) @Html.KretaComboBoxFor(x => x.SrcToroltekMegjelenitese, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.ComboBoxHelperEnumApi, action = "GetIgenNemEnumList" }), "Text", "Value").AutoBind(true).RenderSearchPanelSideBar() } } @{ var functionCommands = new List(); var multipleRowFunctions = new List(); var grid = Html.KretaGrid ( name: "TavolletjelentoGrid", getUrl: new GridApiUrl("TavolletjelentoApi", "GetTavolletjelentoGrid", new Dictionary { }), dataParameterFunction: "searchForm", allowScrolling: true, allowSorting: true, sort: sort => sort.Add(m => m.RogzitesDatuma).Descending() ) .AutoBind(true); if (Model.IsTavolletFoIntezmenye && Model.SrcKezeles && (Model.SrcIsAdminCall || Model.SrcIsLeaderCall)) { grid.Columns(c => c.Template(t => t.ToString()).HeaderHtmlAttributes(new { @class = "tavolletjelentoGridColumnHeaderTh" }).Title(@"
").ClientTemplate(@" #if((StatuszId == 7574 || StatuszId == 7654) && !Torolt_BOOL) {#
#}# ").Width("3%")); } grid.Columns(columns => { columns.Bound(c => c.TipusId_DNAME); columns.Bound(c => c.AlkalmazottNev).Width("10%"); columns.Bound(c => c.SzTSzAzonosito).Width("7%"); columns.Bound(c => c.IdoszakKezdet).Format(SDAFormat.Format[SDAFormat.FormatType.ShortDate]).Width("6%"); columns.Bound(c => c.IdoszakVeg).Format(SDAFormat.Format[SDAFormat.FormatType.ShortDate]).Width("6%"); columns.Bound(c => c.HasMelleklet_BNAME).ClientTemplate("#if(HasMelleklet_BOOL){##:HasMelleklet_BNAME##}else{# #:HasMelleklet_BNAME# #}#").Width("8%"); columns.Bound(c => c.RogzitesDatuma).Format(SDAFormat.Format[SDAFormat.FormatType.ShortDate]).Width("6%"); columns.Bound(c => c.MunkanapSzam).Width("8%"); columns.Bound(c => c.HatralevoNapokSzama).ClientTemplate("# if(TipusId == 7606 || TipusId == 7610 || TipusId == 7609) { # #:HatralevoNapokSzama# # } else { # - # } #").Sortable(false).Width("8%"); columns.Bound(c => c.StatuszId_DNAME).ClientTemplate("#if(Torolt_BOOL){#Törölt#}else{##:StatuszId_DNAME##}#").Width("10%"); columns.Bound(c => c.RogzitoGuid).Hidden(); }); if (Model.IsTavolletFoIntezmenye && Model.SrcTavolletRogzitheto && (Model.SrcFoIntezmenyeE.HasValue && Model.SrcFoIntezmenyeE == 1)) { functionCommands.Add(new FunctionCommand { Name = HRModulResource.UjTavolletRogzites, ClientAction = "TavolletjelentoHelper.openTavolletjelentoNewWindow" }); } multipleRowFunctions.Add(new RowFunction { Name = CommonResource.Adatok, ClientAction = "TavolletjelentoHelper.openTavolletjelentoDetailWindow", IconEnum = GridRowFunctionIconEnum.Adatok, IsConditional = false }); multipleRowFunctions.Add(new RowFunction { Name = CommonResource.Modositas, ClientAction = "TavolletjelentoHelper.openTavolletjelentoModifyWindow", IconEnum = GridRowFunctionIconEnum.Modositas, IsConditional = true, IsMultipleConditionalColumn = true, IsVisibleRowFunctionJsFunctionName = "DetailGridHelper.setRowEditing" }); multipleRowFunctions.Add(new RowFunction { Name = CommonResource.Torles, ClientAction = "TavolletjelentoHelper.deleteConfirmWindow", IconEnum = GridRowFunctionIconEnum.Torles, IsConditional = true, IsMultipleConditionalColumn = true, IsVisibleRowFunctionJsFunctionName = "DetailGridHelper.setDeleteRowEditing" }); if (Model.IsTavolletFoIntezmenye && Model.SrcKezeles && (Model.SrcIsLeaderCall || Model.SrcIsAdminCall) && (Model.SrcFoIntezmenyeE.HasValue && Model.SrcFoIntezmenyeE == 1)) { List nestedFunctions = new List { }; if (Model.SrcIsLeaderCall) { nestedFunctions.Add(new FunctionCommand { Name = HRModulResource.KijeloltekElfogadasa, ClientAction = "TavolletjelentoHelper.selectedTavolletElfogadas" }); nestedFunctions.Add(new FunctionCommand { Name = HRModulResource.KijeloltekElutasitasa, ClientAction = "TavolletjelentoHelper.selectedTavolletElutasitas" }); } nestedFunctions.Add(new FunctionCommand { Name = HRModulResource.KijeloltekModositasa, ClientAction = "TavolletjelentoHelper.openTobbesTavolletUpdateModifyWindow" }); functionCommands.Add(new FunctionCommand { Name = "Kijelöltekre vonatkozó műveletek".ToUpper(), NestedCommands = nestedFunctions }); } functionCommands.Add(new FunctionCommand { Name = ImportExportCommonResource.Export, ClientAction = "TavolletjelentoHelper.exportGrid" }); grid.RowFunction(Html, multipleRowFunctions); grid.FunctionCommand(Html, functionCommands); if (Model.IsTavolletFoIntezmenye && Model.SrcKezeles && Model.SrcIsLeaderCall && (Model.SrcFoIntezmenyeE.HasValue && Model.SrcFoIntezmenyeE == 1)) { grid.Columns(column => { column.Template(@).Width(140).ClientTemplate( @"#var now = new Date(); var prevMonth = new Date(); prevMonth.setMonth(prevMonth.getMonth() - 1, 1);# #if((StatuszId == 7574 || StatuszId == 7654) && !Torolt_BOOL && ( IdoszakKezdet.getFullYear() > now.getFullYear() || (IdoszakKezdet.getFullYear() == now.getFullYear() && IdoszakKezdet.getMonth() >= now.getMonth()) || (IdoszakKezdet.getFullYear() == prevMonth.getFullYear() && IdoszakKezdet.getMonth() == prevMonth.getMonth() && now.getDate() < 6) )) { if(TavolletjelentoHelper.checkActionTitle(TipusId)) {# #} else {# #} # #}#"); }); } else if (Model.IsTavolletFoIntezmenye && Model.SrcKezeles && Model.SrcIsAdminCall && (Model.SrcFoIntezmenyeE.HasValue && Model.SrcFoIntezmenyeE == 1)) { grid.Columns(column => { column.Template(@).Width(140).ClientTemplate( @"#var now = new Date(); var prevMonth = new Date(); prevMonth.setMonth(prevMonth.getMonth() - 1, 1);# #if((StatuszId == 7574 || StatuszId == 7654) && !Torolt_BOOL && ( IdoszakKezdet.getFullYear() > now.getFullYear() || (IdoszakKezdet.getFullYear() == now.getFullYear() && IdoszakKezdet.getMonth() >= now.getMonth()) || (IdoszakKezdet.getFullYear() == prevMonth.getFullYear() && IdoszakKezdet.getMonth() == prevMonth.getMonth() && now.getDate() < 6) )) { # #}#"); }); } } @if (Model.SrcFoIntezmenyeE.HasValue && Model.SrcFoIntezmenyeE == 0) {

@HRModulResource.WarnNemFointezmenyCsokkentettJogosultsag

@HRModulResource.WarnNemFointezmenyCsokkentettJogosultsagMiattNemElerhetoFunkciok
} @if (!Model.IsTavolletFoIntezmenye) {
} @Html.Partial("_InfoBar", Model)
@(grid)