Skip to content

Commit

Permalink
fix for businesses filter on attendance view (#3466)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinM1312 committed Apr 24, 2024
1 parent f43e139 commit bcf81b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/controllers/api/v1/attendance_view_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def index
start_date = filter_date == current_date ? (current_date.at_beginning_of_week - 1.day).to_s : filter_date.to_s
end_date = filter_date == current_date ? current_date.at_end_of_week.to_s : (filter_date + 1.day).at_end_of_week.to_s

business_ids = params[:business_ids]
business_ids = params[:business_ids]&.split(',')

attendance_info = AttendanceInfoService.new(start_date, end_date, business_ids)
response = attendance_info.call
Expand Down
6 changes: 3 additions & 3 deletions client/src/_shared/SiteFilterSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export default function SiteFilterSelect({ businesses, onChange }) {
''
)
return {
minWidth: `${longestName.length * 10}px`,
maxWidth: `${longestName.length * 10}px`
minWidth: `${longestName.length * 20}px`,
maxWidth: `${longestName.length * 20}px`
}
}

Expand All @@ -32,7 +32,7 @@ export default function SiteFilterSelect({ businesses, onChange }) {
onChange={onChange}
onSelect={() => setFilterOpen(!filterOpen)}
dropdownStyle={setWidths()}
style={{ minWidth: '200px' }}
style={{ minWidth: '220px' }}
role="siteFilter"
onClick={() => setFilterOpen(!filterOpen)}
value={filteredCases}
Expand Down

0 comments on commit bcf81b2

Please sign in to comment.