Skip to content

Commit

Permalink
Merge pull request #455 from ncats/momentCheck
Browse files Browse the repository at this point in the history
staging select page bug fix
  • Loading branch information
NikoAnderson authored Sep 15, 2023
2 parents f6fa6bc + 71c67a0 commit 5ea63ad
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 6 deletions.
7 changes: 6 additions & 1 deletion src/app/core/admin/import-browse/import-browse.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,12 @@ export class ImportBrowseComponent implements OnInit, AfterViewInit, OnDestroy {
this.substances.forEach(record => {
if (record.id && this.bulkList[record.id]) {
this.bulkList[record.id].checked = true;
} else {
} else if (record._metadata.recordId && this.bulkList[record._metadata.recordId]) {
this.bulkList[record._metadata.recordId].checked = true;
} else if (record._metadata.recordId) {
this.bulkList[record._metadata.recordId] = {"checked": true, "name": record._name, "id": record._metadata.recordId};
}
else {
this.bulkList[record.id] = {"checked": true, "name": record.name, "id": record.id};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,11 @@ export class ImportSummaryComponent implements OnInit {

deleteRecord() {
this.adminService.deleteStagedRecord([this.privateSubstance._metadata.recordId]).subscribe(response => {
this.message = "Successfully deleted staging area record data";
this.message = "Successfully deleted staging area record data. Closing dialog.";
this.deleted = true;
setTimeout(() => {
this.dialogRef.close();
}, 1500);
}, error => {
this.message = "There was a problem deleting staging area record data";

Expand Down
4 changes: 1 addition & 3 deletions src/app/core/facets-manager/facets-manager.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,8 @@ export class FacetsManagerComponent implements OnInit, OnDestroy, AfterViewInit
const newFacets = [];
this.showAudit = this.authService.hasRoles('admin');
let facetKeys = Object.keys(this.facetsConfig) || [];

if (this._facetDisplayType) {
if (this._facetDisplayType === 'default' || 'staging') {
if (this._facetDisplayType === 'default' || this._facetDisplayType === 'staging') {
facetKeys.forEach(facetKey => {
if (this.facetsConfig[facetKey].length
&& (facetKey === 'default' || this.authService.hasRoles(facetKey) || (facetKey === 'staging' && this.calledFrom === 'staging'))) {
Expand Down Expand Up @@ -331,7 +330,6 @@ export class FacetsManagerComponent implements OnInit, OnDestroy, AfterViewInit
}
});
} else if (this._facetDisplayType === 'facetView' && this._facetViewCategorySelected !== 'All') {
console.log('type is facetview');
if (this._configName && this._configName === 'substances') {
this.facetsConfig['facetView'].forEach(categoryRow => {
const category = categoryRow['category'];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
</div>
</div>
<div class="name-value" *ngIf="substance.structurallyDiverse && substance.structurallyDiverse.hybridSpeciesMaternalOrganism">
<div class="name">Hybrid Paternal Organism</div>
<div class="name">Hybrid Maternal Organism</div>
<div class="thumb-col">
<img class="image-thumb" appSubstanceImage [entityId]="substance.structurallyDiverse.hybridSpeciesMaternalOrganism.refuuid"
size="400">
Expand Down
5 changes: 5 additions & 0 deletions src/app/core/substances-browse/substances-browse.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ export class SubstancesBrowseComponent implements OnInit, AfterViewInit, OnDestr
fetchBulkLists() {
this.bulkSearchService.getBulkSearchLists().subscribe(result => {
console.log(result);
}, error => {
console.log(error);
});

}
Expand Down Expand Up @@ -254,6 +256,9 @@ export class SubstancesBrowseComponent implements OnInit, AfterViewInit, OnDestr
console.log(result);
this.userLists = result.lists;

}, error => {
console.log(error);
this.userLists = null;
})
} else {
this.showDeprecated = false;
Expand Down
3 changes: 3 additions & 0 deletions src/app/fda/config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
"apiKey": null,
"apiToken": null
},
"stagingArea": {
"mergeAction": false
},
"userRegistration": {
"configurations": {
"emailForm": {
Expand Down

0 comments on commit 5ea63ad

Please sign in to comment.