Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

staging select page bug fix #455

Merged
merged 4 commits into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading