Skip to content

Commit

Permalink
[#227] Migrate outdated components and classes in filters
Browse files Browse the repository at this point in the history
  • Loading branch information
palagdan committed Oct 28, 2024
1 parent 192ef1c commit de84e69
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
16 changes: 8 additions & 8 deletions src/components/record/RecordTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ const FilterableInstitutionHeader = ({ filters, onFilterChange }) => {
rootClose={true}
overlay={
<Popover id="records-filters-institution" className="record-filters-popup">
<Popover.Content>
<Popover.Body>
<InstitutionFilter value={filters.institution} onChange={onFilterChange} />
</Popover.Content>
</Popover.Body>
</Popover>
}
>
Expand Down Expand Up @@ -184,14 +184,14 @@ const FilterableLastModifiedHeader = ({ filters, sort, onFilterAndSortChange })
rootClose={true}
overlay={
<Popover id="records-filters-date" className="record-filters-popup">
<Popover.Content>
<Popover.Body>
<DateIntervalFilter
minDate={filters.minDate}
maxDate={filters.maxDate}
sort={sort.date}
onChange={onFilterAndSortChange}
/>
</Popover.Content>
</Popover.Body>
</Popover>
}
>
Expand Down Expand Up @@ -231,9 +231,9 @@ const FilterablePhaseHeader = ({ filters, onFilterChange }) => {
rootClose={true}
overlay={
<Popover id="records-filters-phase" className="record-filters-popup">
<Popover.Content>
<Popover.Body>
<PhaseFilter value={filters.phase} onChange={onFilterChange} />
</Popover.Content>
</Popover.Body>
</Popover>
}
>
Expand Down Expand Up @@ -265,9 +265,9 @@ const FilterableTemplateHeader = ({ filters, onFilterChange }) => {
rootClose={true}
overlay={
<Popover id="records-filters-template" className="record-filters-popup">
<Popover.Content>
<Popover.Body>
<TemplateFilter value={filters.formTemplate} onChange={onFilterChange} />
</Popover.Content>
</Popover.Body>
</Popover>
}
>
Expand Down
10 changes: 5 additions & 5 deletions src/components/record/filter/DateIntervalFilter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const DateIntervalFilter = ({ minDate, maxDate, sort, onChange }) => {
selectsStart={true}
startDate={startDate}
endDate={endDate}
className="filter-datetimepicker float-right form-control"
className="filter-datetimepicker float-end form-control"
dateFormat="dd-MM-yyyy"
onChange={(v) => onChange({ minDate: toIsoDate(v) }, {})}
/>
Expand All @@ -45,7 +45,7 @@ const DateIntervalFilter = ({ minDate, maxDate, sort, onChange }) => {
startDate={startDate}
endDate={endDate}
maxDate={new Date()}
className="filter-datetimepicker float-right form-control"
className="filter-datetimepicker float-end form-control"
dateFormat="dd-MM-yyyy"
onChange={(v) => onChange({ maxDate: toIsoDate(v) }, {})}
/>
Expand All @@ -61,7 +61,7 @@ const DateIntervalFilter = ({ minDate, maxDate, sort, onChange }) => {
onClick={() => onChange({}, { date: SortDirection.ASC })}
>
{i18n("sort.asc")}
{sort === SortDirection.ASC && <FaCheck className="ml-1" />}
{sort === SortDirection.ASC && <FaCheck className="ms-1" />}
</Button>
</Col>
</Row>
Expand All @@ -74,14 +74,14 @@ const DateIntervalFilter = ({ minDate, maxDate, sort, onChange }) => {
onClick={() => onChange({}, { date: SortDirection.DESC })}
>
{i18n("sort.desc")}
{sort === SortDirection.DESC && <FaCheck className="ml-1" />}
{sort === SortDirection.DESC && <FaCheck className="ms-1" />}
</Button>
</Col>
</Row>
<hr />
<Row>
<Col>
<div className="float-right">
<div className="float-end">
<Button
size="sm"
disabled={minDate === undefined && maxDate === undefined}
Expand Down
2 changes: 1 addition & 1 deletion src/components/record/filter/InstitutionFilter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const InstitutionFilter = ({ value, onChange }) => {
<hr />
<Row>
<Col>
<div className="float-right">
<div className="float-end">
<Button
size="sm"
disabled={value === undefined}
Expand Down
2 changes: 1 addition & 1 deletion src/components/record/filter/PhaseFilter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const PhaseFilter = ({ value, onChange }) => {
<hr />
<Row>
<Col>
<div className="float-right">
<div className="float-end">
<Button
size="sm"
disabled={values.length === 0}
Expand Down
2 changes: 1 addition & 1 deletion src/components/record/filter/TemplateFilter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const TemplateFilter = ({ value, onChange }) => {
<hr />
<Row>
<Col>
<div className="float-right">
<div className="float-end">
<Button
size="sm"
disabled={values.length === 0}
Expand Down

0 comments on commit de84e69

Please sign in to comment.