Skip to content

Commit

Permalink
Revert "to revert"
Browse files Browse the repository at this point in the history
This reverts commit be3f14a.
  • Loading branch information
jawanbdarni committed Dec 1, 2024
1 parent be3f14a commit 757ad85
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 41 deletions.
27 changes: 19 additions & 8 deletions cloudapp/src/app/ILL/requestForm/requestForm.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,9 @@ <h3>{{mmsTitle}} ({{nacsisId}})</h3>
<form [formGroup]="formResourceInformation" >
<mat-form-field class="form-card-inputs-medium" appearance="outline">
<mat-label translate>ILL.RequestForm.RequestType</mat-label>
<mat-select [formControl]="requestType" required (selectionChange)=onRequestTypeSelected()>
<mat-option *ngFor="let requestType of requestTypeList" [value]="requestType.value">
{{requestType.viewValue | translate}}
</mat-option>
</mat-select>
</mat-form-field>

<input matInput [value]="getViewValueByValue(requestType) | translate" readonly />
</mat-form-field>

<mat-form-field class="form-card-inputs-medium" appearance="outline">
<mat-label translate>ILL.RequestForm.PayClass</mat-label>
Expand Down Expand Up @@ -164,7 +161,19 @@ <h3>{{mmsTitle}} ({{nacsisId}})</h3>
formControlName="HMLNM{{element.index}}">
</td>
</ng-container>

<ng-container matColumnDef="amlida">
<th mat-header-cell *matHeaderCellDef>
{{ 'ILL.RequestForm.AMLIDA' | translate }}
</th>
<td mat-cell *matCellDef="let element">
<input
cdkTextareaAutosize
matInput
[formControlName]="'AMLIDA' + element.index"
/>
</td>
</ng-container>

<ng-container matColumnDef="location">
<th mat-header-cell *matHeaderCellDef>
{{'ILL.HoldingSearchResult.LOC' | translate}} </th>
Expand Down Expand Up @@ -248,7 +257,9 @@ <h3>{{mmsTitle}} ({{nacsisId}})</h3>

<mat-form-field class="form-card-inputs-medium" appearance="outline">
<mat-label translate>ILL.RequestForm.DateNeededBy</mat-label>
<input matInput [matDatepicker]="picker" [formControl]="ODATE">
<input matInput [matDatepicker]="picker" [formControl]="ODATE"
[disabled]="true"
(focus)="picker.open()">
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
<mat-datepicker #picker></mat-datepicker>
</mat-form-field>
Expand Down
49 changes: 16 additions & 33 deletions cloudapp/src/app/ILL/requestForm/requestForm.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -391,43 +391,26 @@ export class RequestFormComponent implements OnInit, OnChanges {
panelCloseStateRequestInformation() {
this.panelStateRequestInformation = false;
}


showVolDetal(element, tag) {
let str = "";
let volumeArr = element.vol;
if (this.illService.isEmpty(volumeArr)) {
return ""; // Return an empty string if no volume data exists
}

switch (tag) {
case 'VOL':
return volumeArr[0]?.VOL || ""; // Safely access VOL
case 'CLN':
return volumeArr[0]?.CLN || ""; // Safely access CLN
case 'RGTN':
return volumeArr[0]?.RGTN || ""; // Safely access RGTN
default:
return ""; // Default case
if (!this.illService.isEmpty(volumeArr)) {
switch (tag) {
case 'VOL':
str = volumeArr[0].VOL;
break;
case 'CLN':
str = volumeArr[0].CLN;
break;
case 'RGTN':
str = volumeArr[0].RGTN;
break;
}
}
return str;
}


// showVolDetal(element, tag) {
// let str = "";
// let volumeArr = element.vol;
// if (!this.illService.isEmpty(volumeArr)) {
// switch (tag) {
// case 'VOL':
// str = volumeArr[0].VOL;
// break;
// case 'CLN':
// str = volumeArr[0].CLN;
// break;
// case 'RGTN':
// str = volumeArr[0].RGTN;
// break;
// }
// }
// return str;
// }

order() {
//check required fields
Expand Down

0 comments on commit 757ad85

Please sign in to comment.