//GET: Index
        public async Task <IActionResult> Index(string firstAttribute = null, string option = null, string search = null)
        {
            PolaganjasView polaganjasView = new PolaganjasView()
            {
                Statusi = _context.StatusPrijave.ToList()
            };


            if (!User.IsInRole(SD.AdminEndUser))
            {
                int kandidatID = await _kandidat.GetIdByEmail(User.Identity.Name);

                polaganjasView.NonProcessed = await _polaganja.GetNonProcessedRequests(kandidatID);

                polaganjasView.Processed = await _polaganja.GetProcessedRequests(kandidatID);
            }
            else
            {
                polaganjasView.NonProcessed = await _polaganja.GetNonProcessedRequests(firstAttribute, option, search);

                polaganjasView.Processed = await _polaganja.GetProcessedRequests(firstAttribute, option, search);
            }

            return(View(polaganjasView));
        }
        public async Task <IActionResult> ExportProcessed()
        {
            var polaganjas = User.IsInRole(SD.AdminEndUser)
                ? await _polaganja.GetProcessedRequests()
                : await _polaganja.GetProcessedRequests(await _kandidati.GetIdByEmail(User.Identity.Name));

            return(await WritePolaganja(polaganjas));
        }