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

WIP resolve conflicts Precision new #378

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
6549f02
public changes for _html property
NikoAnderson Jun 3, 2021
620871a
[PFDA-2527] precisionFDA toolbar
Jul 16, 2021
1f9d862
[PFDA-2600] Disable Google Analytics via config.pfda.json
Aug 3, 2021
8aa0210
[PFDA-2560] Session expiration warning dialog to warn users of pendin…
Aug 11, 2021
bb77d39
[PFDA-2564] Substance submission UI improvements
Aug 17, 2021
b8b9d61
[PFDA-2615] Disable the Upload Document button for a reference when "…
Aug 17, 2021
2b39d7f
Default max session duration for precisionFDA should be 15 minutes
Aug 25, 2021
a1bd5cf
[PFDA-2528] Added warning modal dialogs when users click links that n…
Aug 31, 2021
19fe620
[PFDA-2687] Refined submissions success dialog
Oct 13, 2021
eb42788
[PFDA-2711] Added substance search bar to pFDA toolbar
Oct 19, 2021
1e3db16
[PFDA-2671] Fixed substance name not appearing in various places. Thi…
Oct 19, 2021
64822cd
[PFDA-2728] Update JSDraw license
Oct 19, 2021
4fd1b9d
[PFDA-2687] Tweak to substance submission success dialog message
Oct 20, 2021
d3f5514
[PFDA-2781] Add User Downloads menu item
Oct 28, 2021
40bf31b
resolving precisionfda merge conflicts in separate branch
NikoAnderson Dec 6, 2022
d6533c3
manual merge changes, fixing import pathing
NikoAnderson Dec 8, 2022
a41c5ef
JSDraw new license code
bartapes Nov 10, 2023
9612edb
Merge branch 'development_3.0' into precision_new
bartapes Dec 6, 2023
4710325
After merge cleanup
bartapes Dec 6, 2023
079eb64
After merge cleanup #2
bartapes Dec 6, 2023
bef80ff
Error fix
bartapes Dec 6, 2023
9f358fc
CBG removed
bartapes Jan 11, 2024
6ae2c03
CBG removed
bartapes Jan 11, 2024
b732815
Merge branch 'development_3.0' into precision_new
bartapes Feb 14, 2024
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
19 changes: 0 additions & 19 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -243,22 +243,6 @@
"with": "src/environments/environment.fda.local.ts"
}
]
},
"cbg.prod": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.cbg.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true
}
}
},
Expand Down Expand Up @@ -291,9 +275,6 @@
},
"gsrs.prod": {
"browserTarget": "gsrs-client:build:gsrs.prod"
},
"cbg.prod": {
"browserTarget": "gsrs-client:build:cbg.prod"
}
}
},
Expand Down
1 change: 0 additions & 1 deletion package.dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"build:fda:prod": "npm run build-libraries && npm run clear-libs-src && ng build --base-href=/ginas/app/beta/ --configuration=fda.prod && node process-index.js && cd lib && extract-zip dojo-custom-jsdraw.zip && cd .. && npm run copy-libs-dist && npm run build-server",
"build:gsrs:pre-prod": "npm run build-libraries && npm run clear-libs-src && ng build --base-href=/ginas/app/beta/ --aot=true --configuration=gsrs.pre-prod --sourceMap=true && node process-index.js && cd lib && extract-zip dojo-custom-jsdraw.zip && cd .. && npm run copy-libs-dist && npm run build-server",
"build:gsrs:prod": "npm run build-libraries && npm run clear-libs-src && ng build --base-href=/ginas/app/beta/ --aot=true --configuration=gsrs.prod --sourceMap=true && node process-index.js && cd lib && extract-zip dojo-custom-jsdraw.zip && cd .. && npm run copy-libs-dist && npm run build-server",
"build:cbg:prod": "npm run build-libraries && npm run clear-libs-src && ng build --base-href=/gsrs/app/beta/ --aot=true --configuration=cbg.prod --sourceMap=true && node process-index.js && cd lib && extract-zip dojo-custom-jsdraw.zip && cd .. && npm run copy-libs-dist && npm run build-server",
"test": "ng test",
"lint": "ng lint",
"tslint": "tslint",
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"build:fda:prod": "npm run build-libraries && npm run clear-libs-src && ng build --base-href=/ginas/app/beta/ --configuration=fda.prod && node process-index.js && cd lib && extract-zip dojo-custom-jsdraw.zip && cd .. && npm run copy-libs-dist && npm run build-server",
"build:gsrs:pre-prod": "npm run build-libraries && npm run clear-libs-src && ng build --base-href=/ginas/app/beta/ --aot=true --configuration=gsrs.pre-prod --sourceMap=true && node process-index.js && cd lib && extract-zip dojo-custom-jsdraw.zip && cd .. && npm run copy-libs-dist && npm run build-server",
"build:gsrs:prod": "npm run build-libraries && npm run clear-libs-src && ng build --base-href=/ginas/app/beta/ --aot=true --configuration=gsrs.prod --sourceMap=true && node process-index.js && cd lib && extract-zip dojo-custom-jsdraw.zip && cd .. && npm run copy-libs-dist && npm run build-server",
"build:cbg:prod": "npm run build-libraries && npm run clear-libs-src && ng build --base-href=/gsrs/app/beta/ --aot=true --configuration=cbg.prod --sourceMap=true && node process-index.js && cd lib && extract-zip dojo-custom-jsdraw.zip && cd .. && npm run copy-libs-dist && npm run build-server",
"test": "ng test",
"lint": "ng lint",
"tslint": "tslint",
Expand Down
1 change: 0 additions & 1 deletion package.real.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"build:fda:prod": "npm run build-libraries && npm run clear-libs-src && ng build --base-href=/ginas/app/beta/ --configuration=fda.prod && node process-index.js && cd lib && extract-zip dojo-custom-jsdraw.zip && cd .. && npm run copy-libs-dist && npm run build-server",
"build:gsrs:pre-prod": "npm run build-libraries && npm run clear-libs-src && ng build --base-href=/ginas/app/beta/ --aot=true --configuration=gsrs.pre-prod --sourceMap=true && node process-index.js && cd lib && extract-zip dojo-custom-jsdraw.zip && cd .. && npm run copy-libs-dist && npm run build-server",
"build:gsrs:prod": "npm run build-libraries && npm run clear-libs-src && ng build --base-href=/ginas/app/beta/ --aot=true --configuration=gsrs.prod --sourceMap=true && node process-index.js && cd lib && extract-zip dojo-custom-jsdraw.zip && cd .. && npm run copy-libs-dist && npm run build-server",
"build:cbg:prod": "npm run build-libraries && npm run clear-libs-src && ng build --base-href=/gsrs/app/beta/ --aot=true --configuration=cbg.prod --sourceMap=true && node process-index.js && cd lib && extract-zip dojo-custom-jsdraw.zip && cd .. && npm run copy-libs-dist && npm run build-server",
"test": "ng test",
"lint": "ng lint",
"tslint": "tslint",
Expand Down
60 changes: 31 additions & 29 deletions src/app/core/admin/import-browse/import-browse.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,19 @@ import { Title } from '@angular/platform-browser';
import { ControlledVocabularyService } from '@gsrs-core/controlled-vocabulary';
import { FormControl } from '@angular/forms';
import { WildcardService } from '@gsrs-core/utils/wildcard.service';
import { I } from '@angular/cdk/keycodes';
import { SubstanceDetail, SubstanceName, SubstanceCode, SubstanceService } from '@gsrs-core/substance';
import { ConfigService } from '@gsrs-core/config';
import { SubBrowseEmitterService } from '@gsrs-core/substances-browse/sub-browse-emitter.service';
import { LoadingService } from '@gsrs-core/loading';
import { MainNotificationService, AppNotification, NotificationType } from '@gsrs-core/main-notification';
import { GoogleAnalyticsService } from '@gsrs-core/google-analytics';
import { AuthService } from '@gsrs-core/auth';
import { environment } from '@environment/environment.cbg.prod';
import { AdminService } from '@gsrs-core/admin/admin.service';
import { Observable } from 'rxjs';
import { Subject } from 'rxjs';
import { BulkActionDialogComponent } from '@gsrs-core/admin/import-browse/bulk-action-dialog/bulk-action-dialog.component';
import { ImportScrubberComponent } from '@gsrs-core/admin/import-management/import-scrubber/import-scrubber.component';
import {Environment} from "@environment/environment.model";

@Component({
selector: 'app-import-browse',
Expand All @@ -73,6 +72,7 @@ export class ImportBrowseComponent implements OnInit, AfterViewInit, OnDestroy {

public exactMatchSubstances: Array<SubstanceDetail>;

environment: Environment;
searchOnIdentifiers: boolean;
searchEntity: string;
pageIndex: number;
Expand Down Expand Up @@ -201,7 +201,7 @@ export class ImportBrowseComponent implements OnInit, AfterViewInit, OnDestroy {
} else {
this.bulkList[recordId] = {"checked": checked, "substance": event.substance};
}

}

bulkActionDialog() {
Expand All @@ -219,7 +219,7 @@ export class ImportBrowseComponent implements OnInit, AfterViewInit, OnDestroy {
this.bulkList = response;
}
this.overlayContainer.style.zIndex = null;

});
}

Expand All @@ -235,7 +235,7 @@ export class ImportBrowseComponent implements OnInit, AfterViewInit, OnDestroy {
let added = 0;
if (pagingResponse.content){


pagingResponse.content.forEach(record => {
if ( record && record.id) {
if (this.bulkList[record.id]) {
Expand Down Expand Up @@ -276,11 +276,11 @@ export class ImportBrowseComponent implements OnInit, AfterViewInit, OnDestroy {
else {
this.bulkList[record.id] = {"checked": true, "name": record.name, "id": record.id};
}

});
}


}

deselectAll() {
Expand All @@ -299,14 +299,14 @@ export class ImportBrowseComponent implements OnInit, AfterViewInit, OnDestroy {
}
});
this.overlayContainer.style.zIndex = '1002';

dialogref.afterClosed().subscribe(result => {
this.overlayContainer.style.zIndex = null;

if(result) {
this.scrubberModel = result;
}

});
}

Expand All @@ -317,7 +317,7 @@ export class ImportBrowseComponent implements OnInit, AfterViewInit, OnDestroy {
this.adminService.getImportScrubberSchema().subscribe(response => {
this.scrubberSchema = response;
});

this.gaService.sendPageView('Staging Area');
this.cvService.getDomainVocabulary('CODE_SYSTEM').pipe(take(1)).subscribe(response => {
this.codeSystem = response['CODE_SYSTEM'].dictionary;
Expand Down Expand Up @@ -370,6 +370,8 @@ export class ImportBrowseComponent implements OnInit, AfterViewInit, OnDestroy {
});
this.facetManagerService.registerGetFacetsHandler(this.substanceService.getStagingFacets );

this.environment = this.configService.environment;

this.subscriptions.push(authSubscription);
this.isComponentInit = true;
this.loadComponent();
Expand All @@ -386,10 +388,10 @@ export class ImportBrowseComponent implements OnInit, AfterViewInit, OnDestroy {
this.adminService.GetStagedRecord(record.recordId).subscribe( resp => {
this.records.push(resp);
this.idMapping[resp.uuid] = record.recordId;

});
});
});
});
}

setUpPrivateSearchTerm() {
Expand Down Expand Up @@ -589,7 +591,7 @@ export class ImportBrowseComponent implements OnInit, AfterViewInit, OnDestroy {
}
}

getRecord(id: string): Observable<any> {
getRecord(id: string): Observable<any> {
let subject = new Subject<string>();
let ids = [];
let sources = [];
Expand All @@ -607,7 +609,7 @@ export class ImportBrowseComponent implements OnInit, AfterViewInit, OnDestroy {

}
}

});
});
let items = [];
Expand Down Expand Up @@ -712,7 +714,7 @@ export class ImportBrowseComponent implements OnInit, AfterViewInit, OnDestroy {
this.lastPage = Math.floor(this.totalSubstances / this.pageSize + 1);
}


pagingResponse.content.forEach(entry => {
this.getRecord(entry._metadata.recordId).subscribe(response => {
this.substances.push(response);
Expand All @@ -727,7 +729,7 @@ export class ImportBrowseComponent implements OnInit, AfterViewInit, OnDestroy {
this.matchTypes = [];
this.narrowSearchSuggestionsCount = 0;
this.loadingService.setLoading(false);

// this.substanceService.setResult(pagingResponse.etag, pagingResponse.content, pagingResponse.total);
}, error => {
this.gaService.sendException('getSubstancesDetails: error from API call');
Expand Down Expand Up @@ -770,7 +772,7 @@ export class ImportBrowseComponent implements OnInit, AfterViewInit, OnDestroy {

}, () => {
subscription.unsubscribe();
/*
/*
this.substances.forEach(substance => {
this.setSubstanceNames(substance.uuid);
this.setSubstanceCodes(substance.uuid);
Expand Down Expand Up @@ -888,11 +890,11 @@ searchTermOkforBeginsWithSearch(): boolean {


populateUrlQueryParameters(): void {

}

editAdvancedSearch(): void {
const eventLabel = environment.isAnalyticsPrivate ? 'advanced search term' :
const eventLabel = this.environment.isAnalyticsPrivate ? 'advanced search term' :
`${this.privateSearchTerm}`;
this.gaService.sendEvent('substancesFiltering', 'icon-button:edit-advanced-search', eventLabel);
// ** BEGIN: Store in Local Storage for Advanced Search
Expand Down Expand Up @@ -946,7 +948,7 @@ searchTermOkforBeginsWithSearch(): boolean {
}

editStructureSearch(): void {
const eventLabel = environment.isAnalyticsPrivate ? 'structure search term' :
const eventLabel = this.environment.isAnalyticsPrivate ? 'structure search term' :
`${this.privateStructureSearchTerm}-${this.privateSearchType}-${this.privateSearchCutoff}`;
this.gaService.sendEvent('substancesFiltering', 'icon-button:edit-structure-search', eventLabel);

Expand All @@ -966,7 +968,7 @@ searchTermOkforBeginsWithSearch(): boolean {

clearStructureSearch(): void {

const eventLabel = environment.isAnalyticsPrivate ? 'structure search term' :
const eventLabel = this.environment.isAnalyticsPrivate ? 'structure search term' :
`${this.privateStructureSearchTerm}-${this.privateSearchType}-${this.privateSearchCutoff}`;
this.gaService.sendEvent('substancesFiltering', 'icon-button:clear-structure-search', eventLabel);

Expand All @@ -981,7 +983,7 @@ searchTermOkforBeginsWithSearch(): boolean {
}

editSequenceSearh(): void {
const eventLabel = environment.isAnalyticsPrivate ? 'sequence search term' :
const eventLabel = this.environment.isAnalyticsPrivate ? 'sequence search term' :
`${this.privateSequenceSearchTerm}-${this.privateSearchType}-${this.privateSearchCutoff}-${this.privateSearchSeqType}`;
this.gaService.sendEvent('substancesFiltering', 'icon-button:edit-sequence-search', eventLabel);

Expand All @@ -1001,7 +1003,7 @@ searchTermOkforBeginsWithSearch(): boolean {

clearSequenceSearch(): void {

const eventLabel = environment.isAnalyticsPrivate ? 'sequence search term' :
const eventLabel = this.environment.isAnalyticsPrivate ? 'sequence search term' :
`${this.privateSequenceSearchTerm}-${this.privateSearchType}-${this.privateSearchCutoff}-${this.privateSearchSeqType}`;
this.gaService.sendEvent('substancesFiltering', 'icon-button:clear-sequence-search', eventLabel);

Expand All @@ -1017,7 +1019,7 @@ searchTermOkforBeginsWithSearch(): boolean {
}

editBulkSearch(): void {
const eventLabel = environment.isAnalyticsPrivate ? 'bulk search term' :
const eventLabel = this.environment.isAnalyticsPrivate ? 'bulk search term' :
`${this.searchEntity}-bulk-search-${this.privateBulkSearchQueryId}`;
this.gaService.sendEvent('substancesFiltering', 'icon-button:edit-bulk-search', eventLabel);

Expand All @@ -1033,7 +1035,7 @@ searchTermOkforBeginsWithSearch(): boolean {

clearBulkSearch(): void {

const eventLabel = environment.isAnalyticsPrivate ? 'bulk search term' :
const eventLabel = this.environment.isAnalyticsPrivate ? 'bulk search term' :
`${this.searchEntity}-bulk-search-${this.privateBulkSearchQueryId}`;
this.gaService.sendEvent('substancesFiltering', 'icon-button:clear-bulk-search', eventLabel);

Expand All @@ -1052,7 +1054,7 @@ searchTermOkforBeginsWithSearch(): boolean {

clearSearch(): void {

const eventLabel = environment.isAnalyticsPrivate ? 'search term' : this.privateSearchTerm;
const eventLabel = this.environment.isAnalyticsPrivate ? 'search term' : this.privateSearchTerm;
this.gaService.sendEvent('substancesFiltering', 'icon-button:clear-search', eventLabel);

this.privateSearchTerm = '';
Expand Down Expand Up @@ -1173,7 +1175,7 @@ searchTermOkforBeginsWithSearch(): boolean {
}

openImageModal(substance: any): void {
const eventLabel = environment.isAnalyticsPrivate ? 'substance' : substance._name;
const eventLabel = this.environment.isAnalyticsPrivate ? 'substance' : substance._name;
this.gaService.sendEvent('substancesContent', 'link:structure-zoom', eventLabel);

let data: any;
Expand Down
2 changes: 2 additions & 0 deletions src/app/core/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import { MatBottomSheetModule } from '@angular/material/bottom-sheet';
import { MatProgressBarModule } from '@angular/material/progress-bar';
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
import { BaseComponent } from './base/base.component';
import { PfdaToolbarComponent } from './base/pfda-toolbar/pfda-toolbar.component';
import { HomeComponent } from './home/home.component';
import { RegistrarsComponent } from './registrars/registrars.component';
import { SubstancesBrowseComponent } from './substances-browse/substances-browse.component';
Expand Down Expand Up @@ -124,6 +125,7 @@ import { PrivacyStatementModule } from './privacy-statement/privacy-statement.mo
AppComponent,
PageNotFoundComponent,
BaseComponent,
PfdaToolbarComponent,
HomeComponent,
UnauthorizedComponent,
SubstancesBrowseComponent,
Expand Down
20 changes: 20 additions & 0 deletions src/app/core/assets/icons/pfda/gsrs-logo-round-bw.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions src/app/core/assets/icons/pfda/home.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/app/core/assets/icons/pfda/profile.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions src/app/core/assets/icons/pfda/questionmark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading