public IActionResult RejectedByScrumMaster([FromRoute] int id)
        {
            var             username        = this.GetCurrentUserName();
            var             repo            = this.Storage.GetRepository <IRequestOvertimeRepository>();
            RequestOvertime requestOvertime = repo.WithKey(id);

            if (requestOvertime == null)
            {
                return(this.NotFound(new { success = false }));
            }

            requestOvertime.ScrumMasterRejected(10, GetCurrentUserName());
            this.Storage.Save();
            return(Ok(new { success = true }));
        }
        public IActionResult RejectedByScrumMaster([FromRoute] int id)
        {
            var             username        = this.GetCurrentUserName();
            var             repo            = this.Storage.GetRepository <IRequestOvertimeRepository>();
            RequestOvertime requestOvertime = repo.WithKey(id);

            if (requestOvertime == null)
            {
                return(this.NotFound(new { success = false }));
            }

            if (requestOvertime.HasFeedbackByScrumMaster() || requestOvertime.HasFeedbackByHumanResource())
            {
                this.ModelState.AddModelError("id", "Already have feedback by Scrum Master or HR");
            }

            if (ModelState.IsValid)
            {
                requestOvertime.ScrumMasterRejected(10, GetCurrentUserName());
                this.Storage.Save();
                return(Ok(new { success = true }));
            }
            return(BadRequest());
        }