Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@
<mat-icon class="small-icon" svgIcon="open_in_new" matTooltip="opens in new window" *ngIf="canEdit">
</mat-icon>
</span>

<!-- LOCK ICON if Application record Public Domain is NO -->
<span *ngIf="application.publicDomain && application.publicDomain.toLowerCase() === 'no'">
&nbsp;&nbsp;
<mat-icon svgIcon="lock" class="lock-icon"
matTooltip="The Public Domain for this Application record is '{{application.publicDomain}}'"></mat-icon>
</span>
</div>

<div class="width650px textalignright font11px" *ngIf="canEdit">
Expand Down Expand Up @@ -203,7 +210,8 @@
<tr *ngFor="let clinical of application.clinicalTrialList; let i = index">
<td>{{(i+1)}}</td>
<td>
<a target="_blank" title="see clinicaltrials.gov" [href]="'https://clinicaltrials.gov/ct2/show/' + clinical.nctNumber">{{clinical.nctNumber}}</a>
<a target="_blank" title="see clinicaltrials.gov"
[href]="'https://clinicaltrials.gov/ct2/show/' + clinical.nctNumber">{{clinical.nctNumber}}</a>
<!--
<a [routerLink]="['/clinical-trial', clinical.nctNumber]"
target="_blank">{{clinical.nctNumber}}</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,10 @@
text-align: right;
}

.lock-icon {
color: #f0ad4e;
}

table.blueTable {
font-family: Roboto, "Helvetica Neue", sans-serif;
/*font-family: Verdana, Geneva, sans-serif;*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -395,11 +395,17 @@
<a class="substance-name" [routerLink]="['/application', application.id]" target="_blank">
{{application.appType}}&nbsp;{{application.appNumber}}
</a>
&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;
<a [routerLink]="['/application', application.id, 'edit']" target="_blank" *ngIf="canUpdate"
matTooltip='Edit GSRS Application Record'>
<mat-icon svgIcon="edit"></mat-icon>
</a>

<!-- LOCK ICON if Application record Public Domain is NO -->
<span *ngIf="application.publicDomain && application.publicDomain.toLowerCase() === 'no'">
&nbsp;&nbsp;
<mat-icon svgIcon="lock" class="lock-icon" matTooltip="The Public Domain for this Application record is '{{application.publicDomain}}'"></mat-icon>
</span>
</div>

<div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,11 +367,6 @@
color: #f0ad4e;
}

.narrow-search-dropdown {
/*width: -moz-fit-content;
width: fit-content;*/
}

.narrow-search-suggestions-container {
display: flex;
align-content: center;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ export class ProductDetailsBaseComponent implements OnInit, AfterViewInit, OnDes
// Get RxNorm Url if Product Code Type is RxNorm
this.getRxNormUrlforProductCode();

// Get Application Type and Application Number Url to go to Browse Application page.
this.getApplicationNumberTypeUrl();

// Sort Product Codes by ascending alphabetically
this.sortProductCodes();
}
Expand Down Expand Up @@ -418,6 +421,16 @@ export class ProductDetailsBaseComponent implements OnInit, AfterViewInit, OnDes
}); // product manufacture Items loop
}

getApplicationNumberTypeUrl() {
this.product.productProvenances.forEach((prov, indexProv) => {
if ((prov.applicationType) && (prov.applicationNumber)) {
if (prov.applicationType.toUpperCase() !== 'OTC MONOGRAPH FINAL' && prov.applicationType.toUpperCase() !== 'OTC MONOGRAPH NOT FINAL') {
prov._applicationUrl = 'root_appType:"^' + prov.applicationType + '$" AND root_appNumber:"^' + prov.applicationNumber + '$"';
}
}
});
}

saveJSON(): void {
const copyProd = _.cloneDeep(this.product);
let cleanProduct = this.scrub(copyProd);
Expand Down Expand Up @@ -566,6 +579,13 @@ export class ProductDetailsBaseComponent implements OnInit, AfterViewInit, OnDes
}
}

const applicationUrlHolders = jp.query(old, '$..[?(@._applicationUrl)]');
for (let i = 0; i < applicationUrlHolders.length; i++) {
if (applicationUrlHolders[i]._applicationUrl) {
delete applicationUrlHolders[i]._applicationUrl;
}
}

const dailyMedUrlHolders = jp.query(old, '$..[?(@._dailyMedUrl)]');
for (let i = 0; i < dailyMedUrlHolders.length; i++) {
if (dailyMedUrlHolders[i]._dailyMedUrl) {
Expand Down Expand Up @@ -601,6 +621,7 @@ export class ProductDetailsBaseComponent implements OnInit, AfterViewInit, OnDes
}
}


delete old['_activeIngredients'];
delete old['_otherIngredients'];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,12 +236,26 @@
Application Type Number:
</div>
<div class="row-property-value-2">
<span class="font14px" *ngIf="prodProv.applicationType">
{{prodProv.applicationType}}
</span>
<span class="font14px" *ngIf="prodProv.applicationNumber">
{{prodProv.applicationNumber}}
</span>
<!-- Go to Browse Application page -->
<div *ngIf="prodProv._applicationUrl; else noAppTypeOrNumber">
<a [routerLink]="['/browse-applications']" [queryParams]="{search:prodProv._applicationUrl}"
target="_blank" matTooltip='Go to Application record' *ngIf="canUpdate">
<span class="font14px" *ngIf="prodProv.applicationType">
{{prodProv.applicationType}}
</span>
<span class="font14px" *ngIf="prodProv.applicationNumber">
{{prodProv.applicationNumber}}
</span>
</a>
</div>
<ng-template #noAppTypeOrNumber>
<span class="font14px" *ngIf="prodProv.applicationType">
{{prodProv.applicationType}}
</span>
<span class="font14px" *ngIf="prodProv.applicationNumber">
{{prodProv.applicationNumber}}
</span>
</ng-template>
</div>
</div>

Expand Down Expand Up @@ -441,8 +455,8 @@
&nbsp;&nbsp;
<span class="colororange">
<span
[title]="getSubstanceClass(prodIngred._substanceClass)"><b>{{prodIngred._substanceClass}}</b>
</span>
[title]="getSubstanceClass(prodIngred._substanceClass)"><b>{{prodIngred._substanceClass}}</b>
</span>
</span>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -686,10 +686,9 @@
</div>
<div class="row-property-value">
<!-- Go to Browse Application page -->

<div *ngIf="prodProv._applicationUrl; else noAppTypeOrNumber">
<a [routerLink]="['/browse-applications']" [queryParams]="{search:prodProv._applicationUrl}"
target="_blank" matTooltip='Go to Application record' *ngIf="isAdmin">
target="_blank" matTooltip='Go to Application record' *ngIf="isLoggedIn">
<span class="font14px" *ngIf="prodProv.applicationType">
{{prodProv.applicationType}}
</span>
Expand Down Expand Up @@ -1050,7 +1049,7 @@
</div> <!-- row Substance Name DISPLAY END -->

<!-- Display Audit Details BEGIN -->
<div class="row" *ngIf="isAdmin">
<div class="row" *ngIf="isLoggedIn">
<div class="row-property">
<div class="row-property-key">
Created Date:
Expand All @@ -1069,7 +1068,7 @@
</div>
</div>

<div class="row" *ngIf="isAdmin">
<div class="row" *ngIf="isLoggedIn">
<div class="row-property">
<div class="row-property-key">
Created By:
Expand Down
19 changes: 17 additions & 2 deletions src/app/fda/product/products-browse/products-browse.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -442,19 +442,34 @@ export class ProductsBrowseComponent implements OnInit, AfterViewInit, OnDestroy
}

sortData(sort: Sort) {
// Check if a valid column is selected for sorting
if (sort.active) {
// Get the index of the column being sorted from the displayedColumns array
const orderIndex = this.displayedColumns.indexOf(sort.active).toString();

// Store the current sort direction (ascending or descending)
this.ascDescDir = sort.direction;

// Iterate through predefined sort configurations to find matching sort criteria
this.sortValues.forEach(sortValue => {
// Verify that the sort configuration has both column and direction defined
if (sortValue.displayedColumns && sortValue.direction) {
if (this.displayedColumns[orderIndex] === sortValue.displayedColumns && this.ascDescDir === sortValue.direction) {
// Match the current column and direction with predefined sort values
// to determine the appropriate sort order value for the API/backend
if (this.displayedColumns[orderIndex] === sortValue.displayedColumns &&
this.ascDescDir === sortValue.direction) {
// Set the order value that will be used in the search/filter request
this.order = sortValue.value;
}
}
});

// Trigger a new search with the updated sort parameters
// Search Applications
this.searchProducts();
}

// Exit the function (explicit return for clarity)
return;
}

Expand Down Expand Up @@ -585,7 +600,7 @@ export class ProductsBrowseComponent implements OnInit, AfterViewInit, OnDestroy
let truncateAppType = this.truncateBeforeNumber(prov.applicationNumber);
let truncateAppNum = this.truncateAfterAlpha(prov.applicationNumber);
if (prov.applicationType.toUpperCase() !== 'OTC MONOGRAPH FINAL' && prov.applicationType.toUpperCase() !== 'OTC MONOGRAPH NOT FINAL') {
prov._applicationUrl = 'root_appType:"^' + truncateAppType + '$" AND root_appNumber:"^' + truncateAppNum + '$"';
prov._applicationUrl = 'root_appType:"^' + prov.applicationType + '$" AND root_appNumber:"^' + prov.applicationNumber + '$"';
}
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,36 +113,29 @@ export class SubstanceApplicationComponent extends SubstanceDetailsBaseTableDisp
if ($event) {
const evt: any = $event.tab;
const textLabel: string = evt.textLabel;
// Get Center and fromTable/Source from Tab Label

// Extract center and table information from the tab label
if (textLabel != null) {
this.loadingStatus = 'Loading data...';

// Parse the tab label to extract center (before space) and fromTable (after space)
const index = textLabel.indexOf(' ');
this.center = textLabel.slice(0, index);
this.fromTable = textLabel.slice(index + 1, textLabel.length);

//let fromReplace = '';
/*
if (this.fromTable.indexOf('Integrity') >= 0) {
fromReplace = this.fromTable.replace('Integrity', 'Darrts');
} else if (this.fromTable.indexOf('GSRS') >= 0) {
fromReplace = this.fromTable.replace('GSRS', 'SRS');
}
if (fromReplace && fromReplace.length > 0) {
this.fromTable = fromReplace;
}
*/
}

// set the current result data to empty or null.
// Clear existing results before loading new data
this.paged = [];


// Build search query with substance key, center, and source table parameters
this.privateSearch = 'root_applicationProductList_applicationIngredientList_substanceKey:'
+ this.bdnum + ' AND root_center:' + this.center + ' AND root_fromTable: ' + this.fromTable;


// Fetch application data based on the constructed search criteria
this.getApplicationBySubstanceKeyCenter();
}
}

// GSRS 3.0
getApplicationBySubstanceKeyCenter(pageEvent?: PageEvent, searchType?: string) {
this.setPageEvent(pageEvent);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
View
</a>
&nbsp;&nbsp;
<a [routerLink]="['/product', product.id, 'edit']" target="_blank" *ngIf="isAdmin"
<a [routerLink]="['/product', product.id, 'edit']" target="_blank" *ngIf="canUpdate"
matTooltip='Edit GSRS Product Record'>
<mat-icon svgIcon="edit"></mat-icon>
</a>
Expand Down
Loading