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