]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/eg2/src/app/staff/cat/vandelay/import.component.html
c85233254c6efaf88bcfb228ee4fc57a05cd3c06
[working/Evergreen.git] / Open-ILS / src / eg2 / src / app / staff / cat / vandelay / import.component.html
1 <div class="row mb-3" *ngIf="importSelection()">
2   <div class="col-lg-2" *ngIf="selectedQueue">
3     <button class="btn btn-info label-with-material-icon"
4       routerLink="/staff/cat/vandelay/queue/{{recordType}}/{{selectedQueue.id}}">
5       <span class="material-icons">arrow_back</span>
6       <span i18n>Return to Queue</span>
7     </button>
8   </div>
9 </div>
10
11 <h2 i18n>MARC File Upload</h2>
12 <div class="common-form striped-odd form-validated ml-3 mr-3">
13   <div class="row">
14     <div class="col-lg-3">
15       <label i18n>Record Type</label>
16     </div>
17     <div class="col-lg-3">
18       <eg-combobox (onChange)="selectEntry($event, 'recordType')"
19         [disabled]="importSelection()"
20         [required]="true"
21         [startId]="recordType" placeholder="Record Type..." i18n-placeholder>
22         <eg-combobox-entry entryId="bib" entryLabel="Bibliographic Records" 
23           i18n-entryLabel></eg-combobox-entry>
24         <eg-combobox-entry entryId="authority" entryLabel="Authority Records" 
25           i18n-entryLabel></eg-combobox-entry>
26         <eg-combobox-entry entryId="bib-acq" entryLabel="Acquisitions Records" 
27           i18n-entryLabel></eg-combobox-entry>
28       </eg-combobox>
29     </div>
30     <div class="col-lg-3">
31       <label i18n>Select a Record Source</label>
32     </div>
33     <div class="col-lg-3">
34       <eg-combobox [entries]="formatEntries('bibSources')" 
35         (onChange)="selectEntry($event, 'bibSources')"
36         [startId]="selectedBibSource"
37         placeholder="Record Source..." i18n-placeholder>
38       </eg-combobox>
39     </div>
40   </div>
41   <div class="row">
42     <div class="col-lg-3">
43       <label i18n>Select or Create a Qeueue</label>
44     </div>
45     <div class="col-lg-3">
46       <eg-combobox [entries]="formatEntries('allQueues')"
47         [startId]="startQueueId"
48         [startIdFiresOnChange]="true"
49         [disabled]="startQueueId"
50         (onChange)="selectedQueue=$event" i18n-placeholder
51         [required]="true"
52         [allowFreeText]="true" placeholder="Select or Create a Queue...">
53       </eg-combobox>
54     </div>
55     <div class="col-lg-3">
56       <label i18n>Limit Matches to Bucket</label>
57     </div>
58     <div class="col-lg-3">
59       <eg-combobox [entries]="formatEntries('bibBuckets')" 
60         [startId]="selectedBucket"
61         [disabled]="(selectedQueue && !selectedQueue.freetext) || importSelection()"
62         (onChange)="selectEntry($event, 'bibBuckets')"
63         placeholder="Buckets..." i18n-placeholder></eg-combobox>
64     </div>
65   </div>
66   <div class="row">
67     <div class="col-lg-3">
68       <label i18n>Record Match Set</label>
69     </div>
70     <div class="col-lg-3">
71       <eg-combobox [entries]="formatEntries('matchSets')" 
72         [disabled]="(selectedQueue && !selectedQueue.freetext) || importSelection()"
73         [startId]="selectedMatchSet || defaultMatchSet"
74         (onChange)="selectEntry($event, 'matchSets')"
75         placeholder="Match Set..." i18n-placeholder></eg-combobox>
76     </div>
77     <div class="col-lg-3"><label i18n>Import Non-Matching Records</label></div>
78     <div class="col-lg-3">
79       <input class="form-check-input" type="checkbox" 
80         [(ngModel)]="importNonMatching">
81     </div>
82  </div>
83   <div class="row">
84     <div class="col-lg-3">
85       <label i18n>Holdings Import Profile</label>
86     </div>
87     <div class="col-lg-3"> <!-- TODO disable for authority -->
88       <eg-combobox [entries]="formatEntries('importItemDefs')"
89         [startId]="selectedHoldingsProfile"
90         [disabled]="(selectedQueue && !selectedQueue.freetext) || importSelection()"
91         (onChange)="selectEntry($event, 'importItemDefs')"
92         placeholder="Holdings Import Profile..." i18n-placeholder>
93       </eg-combobox>
94     </div>
95     <div class="col-lg-3"><label i18n>Merge On Exact Match (901c)</label></div>
96     <div class="col-lg-3">
97       <input class="form-check-input" type="checkbox" 
98         [(ngModel)]="mergeOnExact">
99     </div>
100   </div>
101   <div class="row">
102     <div class="col-lg-3">
103       <label i18n>Merge Profile</label>
104     </div>
105     <div class="col-lg-3">
106       <eg-combobox [entries]="formatEntries('mergeProfiles')"
107         (onChange)="selectEntry($event, 'mergeProfiles')"
108         placeholder="Merge Profile..." i18n-placeholder>
109       </eg-combobox>
110     </div>
111     <div class="col-lg-3"><label i18n>Merge On Single Match</label></div>
112     <div class="col-lg-3">
113       <input class="form-check-input" type="checkbox" 
114         [(ngModel)]="mergeOnSingleMatch">
115     </div>
116   </div>
117   <div class="row">
118     <div class="col-lg-3">
119       <label i18n>Insufficient Quality Fall-Through Profile</label></div>
120     <div class="col-lg-3">
121       <eg-combobox [entries]="formatEntries('mergeProfiles')"
122         (onChange)="selectEntry($event, 'FallThruMergeProfile')"
123         placeholder="Fall-Through Merge Profile..." i18n-placeholder>
124       </eg-combobox>
125     </div>
126     <div class="col-lg-3"><label i18n>Merge On Best Match</label></div>
127     <div class="col-lg-3">
128       <input class="form-check-input" type="checkbox" 
129         [(ngModel)]="mergeOnBestMatch">
130     </div>
131   </div>
132   <div class="row">
133     <div class="col-lg-3">
134       <label i18n>Best/Single Match Minimum Quality Ratio</label></div>
135     <div class="col-lg-3">
136       <input type="number" step="0.1" 
137         class="form-control" [(ngModel)]="minQualityRatio">
138     </div>
139     <div class="col-lg-3">
140       <label i18n>Auto-overlay In-process Acquisitions Copies</label></div>
141     <div class="col-lg-3">
142       <input class="form-check-input" type="checkbox" 
143         [(ngModel)]="autoOverlayAcqCopies">
144     </div>
145   </div>
146   <div class="row">
147     <div class="col-lg-3">
148       <label i18n>Optional Session Name:</label>
149     </div>
150     <div class="col-lg-3">
151       <input [(ngModel)]="sessionName" class="form-control" type="text"
152         i18n-placeholder placeholder="Session Name..."/>
153     </div>
154     <div class="col-lg-3">
155       <label i18n>Remove MARC Field Groups</label>
156     </div>
157     <div class="col-lg-3" *ngIf="bibTrashGroups.length == 0">
158         <span i18n class="font-italic">No Groups Configured</span>
159     </div>
160     <div class="col-lg-3" *ngIf="bibTrashGroups.length">
161       <select multiple [(ngModel)]="selectedTrashGroups" 
162         class="form-control" size="3">
163         <option *ngFor="let grp of bibTrashGroups" 
164           value="{{grp.id()}}">{{grp.label()}}</option>
165       </select>
166     </div>
167   </div>
168   <div class="row" *ngIf="!importSelection()">
169     <div class="col-lg-3">
170       <label i18n>File to Upload:</label>
171     </div>
172     <div class="col-lg-3">
173       <input #fileSelector (change)="fileSelected($event)" 
174         required class="form-control" type="file"/>
175     </div>
176   </div>
177   <div class="row" *ngIf="importSelection()">
178     <div class="col-lg-3">
179       <label>Import Selected</label>
180     </div>
181     <div class="col-lg-3">
182       <span *ngIf="!importSelection().importQueue" i18n>
183         Importing {{importSelection().recordIds.length}} Record(s)</span>
184       <span *ngIf="importSelection().importQueue" i18n>
185         Importing Queue {{importSelection().queue.name()}}</span>
186     </div>
187     <div class="col-lg-3">
188       <button class="btn btn-outline-info ml-2" (click)="clearSelection()" i18n>
189         Clear Selection
190       </button>
191     </div>
192   </div>
193   <div class="row">
194     <div class="col-lg-6 offset-lg-3">
195       <button class="btn btn-success btn-lg btn-block font-weight-bold"
196         [disabled]="isUploading || !hasNeededData()" 
197         (click)="upload()" i18n>Upload</button>
198     </div>
199   </div>
200   <!-- hide instead of *ngIf so ViewChild can find the progress bars -->
201   <div class="row" [hidden]="!showProgress || importSelection()">
202     <div class="col-lg-3">
203       <label i18n>Upload Progress</label>
204     </div>
205     <div class="col-lg-6">
206       <eg-progress-inline #uploadProgress></eg-progress-inline>
207     </div>
208   </div>
209   <div class="row" [hidden]="!showProgress || importSelection()">
210     <div class="col-lg-3">
211       <label i18n>Enqueue Progress</label>
212     </div>
213     <div class="col-lg-6">
214       <eg-progress-inline #enqueueProgress></eg-progress-inline>
215     </div>
216   </div>
217   <div class="row" [hidden]="!showProgress">
218     <div class="col-lg-3">
219       <label i18n>Import Progress</label>
220     </div>
221     <div class="col-lg-6">
222       <eg-progress-inline #importProgress></eg-progress-inline>
223     </div>
224   </div>
225   <div class="row" [hidden]="!uploadComplete">
226     <div class="col-lg-6 offset-lg-3">
227       <button class="btn btn-info btn-lg btn-block font-weight-bold"
228         routerLink="/staff/cat/vandelay/queue/{{recordType}}/{{activeQueueId}}"
229         i18n>Go To Queue</button>
230     </div>
231   </div>
232 </div>
233
234