Skip to content

Commit

Permalink
wc - Updated interpreter browser and grid for merging allowed setting…
Browse files Browse the repository at this point in the history
…s per browser

Signed-off-by: gpveronica <[email protected]>
  • Loading branch information
gpveronica committed Jan 9, 2024
1 parent e241688 commit 4252f57
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,9 @@ class VariantInterpreterBrowserTemplate extends LitElement {
this._config.filter = UtilsNew.mergeFiltersAndDetails(this._config?.filter, this.settings);
}

// BROWSER: Admin browser configuration merged with internal default configuration.
if (this.settings?.table) {
const {toolbar, ...otherTableProps} = this.settings.table;
UtilsNew.setObjectValue(this._config, "filter.result.grid", {
...this._config.filter.result.grid,
...otherTableProps,
...toolbar,
});
UtilsNew.mergeTableSettings(this._config, this.settings, "INTERPRETER", this.toolId, this.opencgaSession);
}

// Apply User grid configuration. Only 'pageSize', 'columns', 'geneSet', 'consequenceType' and 'populationFrequenciesConfig' are set
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,11 @@ export default class VariantInterpreterGrid extends LitElement {
};
this.gridCommons = new GridCommons(this.gridId, this, this._config);

// Settings for the grid toolbar
const {toolbar, ...otherTableProps} = this._config;
this.toolbarSetting = {
...this._config,
...otherTableProps,
...toolbar,
showCreate: false,
// columns: defaultColumns[0].filter(col => col.rowspan === 2 && col.colspan === 1 && col.visible !== false),
// gridColumns: defaultColumns, // original column structure
Expand Down Expand Up @@ -1532,10 +1535,12 @@ export default class VariantInterpreterGrid extends LitElement {
showToolbar: true,
showActions: true,

showCreate: false,
showExport: true,
showSettings: true,
exportTabs: ["download", "export", "link", "code"], // this is customisable in external settings in `table.toolbar`
toolbar: {
showCreate: false,
showSettings: true,
showExport: true,
exportTabs: ["download", "export", "link", "code"]
},

hideType: false,
hidePopulationFrequencies: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,18 @@ export default class VariantInterpreterRearrangementGrid extends LitElement {
};
this.gridCommons = new GridCommons(this.gridId, this, this._config);

// Settings for the grid toolbar
const {toolbar, ...otherTableProps} = this._config;
this.toolbarSetting = {
...this._config,
...otherTableProps,
...toolbar,
};

this.toolbarConfig = {
toolId: this.toolId,
resource: "CLINICAL_VARIANT",
showInterpreterConfig: true,
columns: this._getDefaultColumns()
columns: this._getDefaultColumns(),
};
this.requestUpdate();
this.renderVariants();
Expand Down Expand Up @@ -738,7 +741,10 @@ export default class VariantInterpreterRearrangementGrid extends LitElement {
NotificationUtils.dispatch(this, NotificationUtils.NOTIFY_RESPONSE, response);
})
.finally(() => {
this.toolbarConfig = {...this.toolbarConfig, downloading: false};
this.toolbarConfig = {
...this.toolbarConfig,
downloading: false,
};
this.requestUpdate();
});
}
Expand Down Expand Up @@ -939,13 +945,16 @@ export default class VariantInterpreterRearrangementGrid extends LitElement {
pagination: true,
pageSize: 10,
pageList: [5, 10, 25],
showExport: true,
showSettings: true,
showReview: true,
showEditReview: true,
showSelectCheckbox: false,
showActions: false,

toolbar: {
showExport: true,
showSettings: true,
},

alleleStringLengthMax: 50,

// genotype: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ class VariantInterpreter extends LitElement {
</div>
${this.clinicalAnalysis.interpretation?.method?.name ? html`
<div style="font-size:0.875em;">
<strong>${this.clinicalAnalysis.interpretation.method.name}</strong>
<strong>${this.clinicalAnalysis.interpretation.method.name}</strong>
</div>
` : null}
<div class="text-muted">
Expand Down

0 comments on commit 4252f57

Please sign in to comment.