Skip to content

Commit

Permalink
Added createdBy and createdDate filtering to experiments table
Browse files Browse the repository at this point in the history
  • Loading branch information
nickpalladino committed Feb 2, 2023
1 parent 34ece8f commit 89d4d5f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/breeding-insight/model/Sort.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ export class GermplasmSort {
// experiments
export enum ExperimentSortField {
Name = "name",
Active = "active"
Active = "active",
CreatedBy = "createdBy",
CreatedDate = "createdDate"
}

export class ExperimentSort {
Expand Down
6 changes: 4 additions & 2 deletions src/components/experiments/ExperimentsObservationsTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@
<b-table-column label="Status" field="active" sortable v-slot="props" :th-attrs="(column) => ({scope:'col'})" >
{{ getStatus(props.row.data.active) }}
</b-table-column>
<b-table-column label="Date Created" sortable v-slot="props" :th-attrs="(column) => ({scope:'col'})">
<b-table-column label="Date Created" field="createdDate" sortable v-slot="props" :th-attrs="(column) => ({scope:'col'})" searchable>
{{ props.row.data.additionalInfo.createdDate }}
</b-table-column>
<b-table-column label="Created By" sortable v-slot="props" :th-attrs="(column) => ({scope:'col'})">
<b-table-column label="Created By" field="createdBy" sortable v-slot="props" :th-attrs="(column) => ({scope:'col'})" searchable>
{{ props.row.data.additionalInfo.createdBy.userName }}
</b-table-column>
<b-table-column label="Datasets" cell-class="fixed-width-wrapped" sortable v-slot="props" :th-attrs="(column) => ({scope:'col'})">
Expand Down Expand Up @@ -136,6 +136,8 @@ export default class ExperimentsObservationsTable extends Vue {
private fieldMap: any = {
'name': ExperimentSortField.Name,
'active': ExperimentSortField.Active,
'createdDate': ExperimentSortField.CreatedDate,
'createdBy': ExperimentSortField.CreatedBy
};

mounted() {
Expand Down

0 comments on commit 89d4d5f

Please sign in to comment.