.where(["#{TimeEntry.table_name}.user_id = ? AND #{TimeEntry.table_name}.spent_on BETWEEN ? AND ?", user.id, Date.today - 6, Date.today]).references(:projects)
.visible(User.current)
.where(project_id: @project.id)
.where(["#{TimeEntry.table_name}.spent_on BETWEEN ? AND ?", Date.today - 6, Date.today]).references(:projects)