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

ILL Borrowing module #14

Open
wants to merge 22 commits into
base: nacsis-cat-ill
Choose a base branch
from
Open
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
@@ -0,0 +1,20 @@
<div class="full-view-record">
<div *ngFor="let line of resultFullDisplay;index as i" class="full-view-line {{isEvenRow(i)}}">
<div class="full-view-line-header">
{{line.getHeaderLabel() | translate}}
</div>
<div class="full-view-line-content">
<div class="full-view-line-field" *ngFor="let field of line.getContent()">
<div class="full-view-line-field-label" *ngIf="field.hasLabel()">
{{ field.getLabel() | translate}}
</div>
<a *ngIf="field.isLinkable() else noLink" (click)="onFullViewLink(field.getLink(), field.getContent())">
{{field.getContent()}}
</a>
<ng-template #noLink>
{{field.getContent()}}
</ng-template>
</div>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
.full-view-line {
display: grid;
grid-template-columns: 300px auto;
padding-top: 0.5em;
padding-bottom: 0.5em;
&:first-child {
padding-right: 12px;
}
}

.even {
background-color: whitesmoke;
}

.full-view-line-header {
font-weight: bold;
padding-right: 15px;
padding-left: 5px;
}

.full-view-line-content {
display: flex;
flex-wrap: wrap;
}

.full-view-line-field {
display: flex;
padding-right: 10px;
}

.full-view-line-field-label {
font-weight: bold;
padding-right: 5px;
}

a,
a label {
cursor: pointer;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { Component, Input, Output, EventEmitter } from '@angular/core';
import { SearchType } from '../../user-controls/search-form/search-form-utils';


@Component({
selector: 'full-view-display-member',
templateUrl: './full-view-display-member.component.html',
styleUrls: ['./full-view-display-member.component.scss']
})

export class FullviewDisplayOfMemComponent {

@Input() resultFullDisplay;
@Output() onFullViewLinkSelected = new EventEmitter<FullViewLink>();


constructor() { }

onFullViewLink(searchType: SearchType, linkID: string) {
this.onFullViewLinkSelected.emit(new FullViewLink(searchType, linkID));
}

isEvenRow(i: number) {
if (i % 2 == 0) {
return "even";
}
}

}


export class FullViewLink {
constructor (
public searchType: SearchType,
public linkID: string
) { }
}
120 changes: 120 additions & 0 deletions cloudapp/src/app/ILL/holdingSearch/holdingSearch-utils.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
import { FormGroup, FormControl, Validators } from "@angular/forms";

export const holdingFormGroup = (holdingVolume): FormGroup =>{

var newHoldingSearch: boolean = false;

if (holdingVolume == null) {
newHoldingSearch = true;
}

return new FormGroup({
FANO: new FormControl(newHoldingSearch ? '' : holdingVolume.FANO),
VOL_HLV: new FormControl(newHoldingSearch ? '' : holdingVolume.VOL_HLV),
CPYR_HLYR: new FormControl(newHoldingSearch ? '' : holdingVolume.CPYR_HLYR),
LOC: new FormControl(newHoldingSearch ? '' : holdingVolume.LOC),
KENCODE: new FormControl(newHoldingSearch ? '' : holdingVolume.KENCODE),
SETCODE: new FormControl(newHoldingSearch ? '' : holdingVolume.SETCODE),
ORGCODE: new FormControl(newHoldingSearch ? '' : holdingVolume.ORGCODE),
ILLFLG: new FormControl(newHoldingSearch ? '' : holdingVolume.ILLFLG),
STAT: new FormControl(newHoldingSearch ? '' : holdingVolume.STAT),
GRPCODE: new FormControl(newHoldingSearch ? '' : holdingVolume.GRPCODE),
COPYS: new FormControl(newHoldingSearch ? '' : holdingVolume.COPYS),
LOANS: new FormControl(newHoldingSearch ? '' : holdingVolume.LOANS),
FAXS: new FormControl(newHoldingSearch ? '' : holdingVolume.FAXS)
});

}

export const initResourceInformationFormGroup = (): FormGroup =>{
return new FormGroup ({
ONO:new FormControl(),
PRMT:new FormControl(),
BIBID:new FormControl(),
STDNO:new FormControl(),
VOL:new FormControl(),
PAGE:new FormControl(),
YEAR:new FormControl(),
BIBNT:new FormControl('', [Validators.required]),
ARTCL:new FormControl()
})
}

export const initRequesterInformationFormGroup = (): FormGroup =>{
return new FormGroup ({
BVRFY:new FormControl(),
HVRFY:new FormControl(),
CLNT:new FormControl(),
CLNTP:new FormControl(),
ODATE:new FormControl(new Date().toISOString()),

SENDCMNT:new FormControl(),
OSTAF:new FormControl('', [Validators.required]),
OADRS:new FormControl('', [Validators.required]),
OLDF:new FormControl(),
OLDAF:new FormControl(),

OEDA:new FormControl()
})
}

export const initRotaFormGroup = (): FormGroup =>{
return new FormGroup ({
HMLID1:new FormControl(),
HMLID2:new FormControl(),
HMLID3:new FormControl(),
HMLID4:new FormControl(),
HMLID5:new FormControl(),

HMLNM1:new FormControl(),
HMLNM2:new FormControl(),
HMLNM3:new FormControl(),
HMLNM4:new FormControl(),
HMLNM5:new FormControl(),

LOC1:new FormControl(),
LOC2:new FormControl(),
LOC3:new FormControl(),
LOC4:new FormControl(),
LOC5:new FormControl(),


VOL1:new FormControl(),
VOL2:new FormControl(),
VOL3:new FormControl(),
VOL4:new FormControl(),
VOL5:new FormControl(),

CLN1:new FormControl(),
CLN2:new FormControl(),
CLN3:new FormControl(),
CLN4:new FormControl(),
CLN5:new FormControl(),

RGTN1:new FormControl(),
RGTN2:new FormControl(),
RGTN3:new FormControl(),
RGTN4:new FormControl(),
RGTN5:new FormControl()
})
}



export enum FieldName {
FANO = "FANO",
VOL = "VOL",
YEAR = "YEAR",
LOC = "LOC",
KENCODE = "_KENCODE_",
SETCODE = "_SETCODE_",
ORGCODE = "_ORGCODE_",
GRPCODE = "_GRPCODE_",
ILLFLG = "_ILLFLG_",
STAT = "_STAT_",
COPYS = "_COPYS_",
LOANS = "_LOANS_",
FAXS = "_FAXS_",
Owner = "owner",
nacsisId = "nacsisId"
}
Loading