public IActionResult DashboardDepartment(DateTime?minDate, DateTime?maxDate)
        {
            if (!minDate.HasValue)
            {
                minDate = new DateTime(DateTime.Now.Year, 1, 1);
            }
            if (!maxDate.HasValue)
            {
                maxDate = new DateTime(DateTime.Now.Year, 12, 30);
            }

            ViewData["minDate"] = minDate.Value.ToString("yyyy-MM-dd");
            ViewData["maxDate"] = maxDate.Value.ToString("yyyy-MM-dd");

            var departmentRecordView = _salesRecordService.FindByDateGroupingChart(minDate, maxDate);
            var departmentNameView   = _salesRecordService.FindByDepartment();


            ViewBag.MinDate = minDate.Value.ToString("dd/MM/yyyy");
            ViewBag.MaxDate = maxDate.Value.ToString("dd/MM/yyyy");


            ViewBag.Departments = departmentNameView;
            ViewBag.Amount      = departmentRecordView;

            return(View());
        }