-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
880002c
commit 3d3fbc5
Showing
5 changed files
with
109 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,53 @@ | ||
import { FormattedMessage } from "react-intl"; | ||
import { FormattedMessage } from 'react-intl'; | ||
|
||
export const COLUMN_NAMES = { | ||
name: 'name', | ||
// TODO: refine | ||
code: 'code', | ||
institution: 'institution', | ||
campus: 'campus', | ||
library: 'library', | ||
isActive: 'isActive', | ||
isAssigned: 'isAssigned', | ||
}; | ||
|
||
export const COLUMN_MAPPING = { | ||
[COLUMN_NAMES.name]: <FormattedMessage id="stripes-acq-components.find-location.results.column.name" />, | ||
// TODO: refine | ||
[COLUMN_NAMES.code]: <FormattedMessage id="code" />, | ||
[COLUMN_NAMES.code]: <FormattedMessage id="stripes-acq-components.find-location.results.column.code" />, | ||
[COLUMN_NAMES.institution]: <FormattedMessage id="stripes-acq-components.find-location.results.column.institution" />, | ||
[COLUMN_NAMES.campus]: <FormattedMessage id="stripes-acq-components.find-location.results.column.campus" />, | ||
[COLUMN_NAMES.library]: <FormattedMessage id="stripes-acq-components.find-location.results.column.library" />, | ||
[COLUMN_NAMES.isActive]: <FormattedMessage id="stripes-acq-components.find-location.results.column.status" />, | ||
[COLUMN_NAMES.isAssigned]: <FormattedMessage id="stripes-acq-components.find-location.results.column.assignment" />, | ||
}; | ||
|
||
export const VISIBLE_COLUMNS = Object.values(COLUMN_NAMES); | ||
export const SORTABLE_COLUMNS = Object.values(COLUMN_NAMES); | ||
export const VISIBLE_COLUMNS = [ | ||
COLUMN_NAMES.name, | ||
COLUMN_NAMES.code, | ||
COLUMN_NAMES.institution, | ||
COLUMN_NAMES.campus, | ||
COLUMN_NAMES.library, | ||
COLUMN_NAMES.isActive, | ||
]; | ||
|
||
export const SORTABLE_COLUMNS = [ | ||
COLUMN_NAMES.name, | ||
COLUMN_NAMES.code, | ||
COLUMN_NAMES.isActive, | ||
]; | ||
|
||
export const FILTERS = { | ||
institutions: 'institutions', | ||
libraries: 'libraries', | ||
campuses: 'campuses', | ||
libraries: 'libraries', | ||
isAssigned: 'isAssigned', | ||
}; | ||
|
||
export const ASSIGNED_FILTER_OPTIONS = [ | ||
{ | ||
value: true, | ||
label: <FormattedMessage id="stripes-acq-components.filter.assignment.assigned" />, | ||
}, | ||
{ | ||
value: false, | ||
label: <FormattedMessage id="stripes-acq-components.filter.assignment.unassigned" />, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters