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 @@ -8,7 +8,7 @@ import { AppNotification, NotificationType } from '@gsrs-core/main-notification'
import { DomSanitizer, SafeUrl } from '@angular/platform-browser';
import { Subscription } from 'rxjs';
import { Title } from '@angular/platform-browser';
import { jp } from 'jsonpath';
import jp from 'jsonpath';
import { take, map } from 'rxjs/operators';
import * as moment from 'moment';
import * as _ from 'lodash';
Expand All @@ -31,10 +31,10 @@ import { SubstanceFormResults } from '@gsrs-core/substance-form/substance-form.m
import { Impurities, ImpuritiesDetails, ImpuritiesUnspecified, SubRelationship, ValidationMessage } from '../model/impurities.model';

@Component({
selector: 'app-impurities-form',
templateUrl: './impurities-form.component.html',
styleUrls: ['./impurities-form.component.scss'],
standalone: false
selector: 'app-impurities-form',
templateUrl: './impurities-form.component.html',
styleUrls: ['./impurities-form.component.scss'],
standalone: false
})
export class ImpuritiesFormComponent implements OnInit, OnDestroy {

Expand Down Expand Up @@ -128,6 +128,7 @@ export class ImpuritiesFormComponent implements OnInit, OnDestroy {
// if ((record) && this.jsonValid(record)) {
const response = JSON.parse(record);
if (response) {
// scrub ids and audit information before saving in import json
this.scrub(response);

this.impuritiesService.loadImpurities(response);
Expand Down Expand Up @@ -762,6 +763,7 @@ export class ImpuritiesFormComponent implements OnInit, OnDestroy {
delete intVersionHolders[i].internalVersion;
}

delete old['id'];
delete old['creationDate'];
delete old['createdBy'];
delete old['modifiedBy'];
Expand Down
4 changes: 2 additions & 2 deletions src/app/fda/impurities/service/impurities.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export class ImpuritiesService extends BaseHttpService {
}

saveImpurities(): Observable<Impurities> {
const url = this.apiBaseUrl + `impurities`;
const url = this.apiBaseUrlWithEntityContext;
const params = new HttpParams();
const options = {
params: params,
Expand Down Expand Up @@ -181,7 +181,7 @@ export class ImpuritiesService extends BaseHttpService {
}

validateImpur(): Observable<ValidationResults> {
const url = `${this.configService.configData.apiBaseUrl}api/v1/impurities/@validate`;
const url = this.apiBaseUrlWithEntityContext + '@validate';
return this.http.post(url, this.impurities);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -995,6 +995,7 @@ export class InvitroPharmacologySummaryFormComponent implements OnInit, OnDestro
delete assayResults[i]._assayResults;
}

delete old['id'];
delete old['creationDate'];
delete old['createdBy'];
delete old['modifiedBy'];
Expand Down
1 change: 1 addition & 0 deletions src/app/fda/product/product-form/product-form.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1136,6 +1136,7 @@ export class ProductFormComponent implements OnInit, AfterViewInit, OnDestroy {
delete intVersionHolders[i].internalVersion;
}

delete old['id'];
delete old['creationDate'];
delete old['createdBy'];
delete old['modifiedBy'];
Expand Down
Loading