Fix thinko to allow Currency Type searching (30)
authorMike Rylander <mrylander@gmail.com>
Fri, 15 May 2020 15:19:52 +0000 (11:19 -0400)
committerMike Rylander <mrylander@gmail.com>
Fri, 15 May 2020 15:32:06 +0000 (11:32 -0400)
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider-search-form.component.html
Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider-search-form.component.ts
Open-ILS/src/eg2/src/app/staff/acq/provider/provider-record.service.ts

index 751f89d..c7fa301 100644 (file)
@@ -29,7 +29,7 @@
       <input i18n-placeholder placeholder="Provider Phone" [ngModelOptions]="{standalone: true}" [(ngModel)]="providerPhone" type="text" class="form-control" />
     </div>
     <div class="col-lg-2">
-      <eg-combobox i18n-placeholder placeholder="Currency" idlClass="acqct" (onChange)="providerCurrencyType = $event ? $event.code : null"></eg-combobox>
+      <eg-combobox i18n-placeholder placeholder="Currency" idlClass="acqct" (onChange)="providerCurrencyType = $event ? $event.id : null" [asyncSupportsEmptyTermClick]="true"></eg-combobox>
     </div>
   </div>
 
index 9f0b522..5a255f8 100644 (file)
@@ -92,7 +92,7 @@ export class AcqProviderSearchFormComponent implements OnInit, AfterViewInit {
             });
         }
         if (this.providerCurrencyType) {
-            searchTerms.push({ classes: ['acqpro'], fields: ['currency_type'], op: 'ilike', value: this.providerCurrencyType });
+            searchTerms.push({ classes: ['acqpro'], fields: ['currency_type'], op: '=', value: this.providerCurrencyType });
         }
         if (this.providerSAN) {
             searchTerms.push({ classes: ['acqpro'], fields: ['san'], op: 'ilike', value: this.providerSAN });
index be2b5e6..792e31f 100644 (file)
@@ -42,7 +42,7 @@ export class ProviderRecordService {
                 flesh_fields: { acqpro:  [
                                            'attributes', 'holdings_subfields', 'contacts',
                                            'addresses', 'provider_notes',
-                                           'edi_accounts',
+                                           'edi_accounts', 'currency_type'
                                          ],
                                 acqpa:   ['provider'],
                                 acqpc:   ['provider','addresses'],