Skip to content

Commit

Permalink
DRYD:140 - Implement condition check plugin.
Browse files Browse the repository at this point in the history
  • Loading branch information
ynejati committed Jul 13, 2017
1 parent 897d0ea commit 9b06f99
Show file tree
Hide file tree
Showing 21 changed files with 1,494 additions and 1 deletion.
44 changes: 44 additions & 0 deletions src/plugins/recordTypes/conditioncheck/advancedSearch.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import {
OP_OR,
OP_EQ,
OP_MATCH,
OP_RANGE,
} from '../../../constants/searchOperators';

export default {
op: OP_OR,
value: [
{
op: OP_MATCH,
path: 'ns2:conditionchecks_common/conditionCheckRefNumber',
},
{
op: OP_EQ,
path: 'ns2:conditionchecks_common/objectAuditCategory',
},
{
op: OP_EQ,
path: 'ns2:conditionchecks_common/conditionCheckGroupList/conditionCheckGroup/condition',
},
{
op: OP_EQ,
path: 'ns2:conditionchecks_common/conservationTreatmentPriority',
},
{
op: OP_RANGE,
path: 'ns2:conditionchecks_common/nextConditionCheckDate',
},
{
op: OP_RANGE,
path: 'ns2:conditionchecks_common/conditionCheckAssessmentDate',
},
{
op: OP_RANGE,
path: 'ns2:collectionspace_core/updatedAt',
},
{
op: OP_MATCH,
path: 'ns2:collectionspace_core/updatedBy',
},
],
};
41 changes: 41 additions & 0 deletions src/plugins/recordTypes/conditioncheck/columns.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import { defineMessages } from 'react-intl';
import { formatTimestamp } from '../../../helpers/formatHelpers';

export default {
default: [
{
name: 'conditionCheckRefNumber',
messages: defineMessages({
label: {
id: 'column.conditioncheck.default.conditionCheckRefNumber',
defaultMessage: 'Condition check reference number',
},
}),
sortBy: 'conditionchecks_common:conditionCheckRefNumber',
width: 200,
},
{
name: 'condition',
messages: defineMessages({
label: {
id: 'column.conditioncheck.default.condition',
defaultMessage: 'Condition',
},
}),
sortBy: 'conditionchecks_common:conditionCheckGroupList/conditionCheckGroup/0/condition',
width: 450,
},
{
name: 'updatedAt',
messages: defineMessages({
label: {
id: 'column.conditioncheck.default.updatedAt',
defaultMessage: 'Updated',
},
}),
formatValue: formatTimestamp,
sortBy: 'collectionspace_core:updatedAt',
width: 150,
},
],
};
Loading

0 comments on commit 9b06f99

Please sign in to comment.