Skip to content

Commit

Permalink
updated invitro
Browse files Browse the repository at this point in the history
  • Loading branch information
Newatia authored and Newatia committed Apr 18, 2024
1 parent f683bae commit a85388c
Show file tree
Hide file tree
Showing 10 changed files with 331 additions and 129 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1001,6 +1001,18 @@
</ng-template>
</span>
</div>

<!-- Edit SUMMARY Record -->
<div class="marginleft40px">
<mat-icon svgIcon="edit"></mat-icon>
</div>
<div>
<a [routerLink]="['/invitro-pharm/summary', testAgt.testAgentId, 'edit']" target="_blank"
*ngIf="isAdmin" matTooltip='Edit Assay Summary Record'>
<span class="font13px">Edit Summary Record</span>
</a>
</div>

</div>
</div>

Expand Down Expand Up @@ -1086,8 +1098,9 @@
target="_blank" alt="View Assay Screening Record"
matTooltip='View Assay Record'>View
</a>&nbsp;&nbsp;&nbsp;
<a [routerLink]="['/invitro-pharm', assaysum.id, 'edit']" target="_blank"
*ngIf="isAdmin" matTooltip='Edit Assay Summary Record'>
<a [routerLink]="['/invitro-pharm', assaysum.id, 'edit']"
target="_blank" *ngIf="isAdmin"
matTooltip='Edit Assay Summary Record'>
<mat-icon svgIcon="edit"></mat-icon>
</a>
</div>
Expand Down Expand Up @@ -1444,6 +1457,17 @@
</td>
</ng-container>


<ng-container matColumnDef="isFromResult">
<th mat-header-cell *matHeaderCellDef> From Result Data </th>
<td class="width80px" mat-cell *matCellDef="let assaysum">
<span *ngIf="assaysum.isFromResult && assaysum.isFromResult == '1'">
<mat-icon matTooltip="This Summary data is from Result data">check_circle_outline
</mat-icon>
</span>
</td>
</ng-container>

<ng-container matColumnDef="referenceSource">
<th mat-header-cell *matHeaderCellDef> Reference Source </th>
<td mat-cell *matCellDef="let assaysum"> {{assaysum.referenceSourceTypeNumber}} </td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ export class InvitroPharmacologyBrowseComponent implements OnInit {

testAgentSummaryColumns: string[] = [
'viewDetails',
'isFromResult',
'referenceSource',
'testAgent',
'assayTarget',
Expand Down Expand Up @@ -615,6 +616,8 @@ export class InvitroPharmacologyBrowseComponent implements OnInit {
summaryObj.relationshipType = screening.invitroSummary.relationshipType;
summaryObj.interactionType = screening.invitroSummary.interactionType;

summaryObj.isFromResult = screening.invitroSummary.isFromResult;

assayObj.summary = summaryObj;

assayObj.summaries = [];
Expand All @@ -632,6 +635,7 @@ export class InvitroPharmacologyBrowseComponent implements OnInit {
testAgent = screening.invitroAssayResultInformation.invitroTestAgent.testAgent;
assayObj.testAgent = testAgent;
testAgentSubstanceUuid = screening.invitroAssayResultInformation.invitroTestAgent.testAgentSubstanceUuid;
let testAgentId = screening.invitroAssayResultInformation.invitroTestAgent.id;

// Get the index if the value exists in the key 'testAgent'
const indexTestAgent = this.browseByTestAgentList.findIndex(record => record.testAgent === testAgent);
Expand All @@ -648,7 +652,8 @@ export class InvitroPharmacologyBrowseComponent implements OnInit {
// Create new card record
let assayList = [];
assayList.push(assayObj);
const appScreening = { 'testAgent': testAgent, 'testAgentSubstanceUuid': testAgentSubstanceUuid, 'testAgentScreeningList': assayList, 'testAgentSummaryList': summaryList };
const appScreening = { 'testAgent': testAgent, 'testAgentSubstanceUuid': testAgentSubstanceUuid, 'testAgentId': testAgentId,
'testAgentScreeningList': assayList, 'testAgentSummaryList': summaryList };
this.browseByTestAgentList.push(appScreening);
} // else
} // if invitroTestAgent exists
Expand Down
Loading

0 comments on commit a85388c

Please sign in to comment.