(search: string, fn: OptionsCallbackFunc)
| 41 | }; |
| 42 | |
| 43 | const getTenantOptions = (search: string, fn: OptionsCallbackFunc) => { |
| 44 | const req = new ListTenantsRequest(); |
| 45 | req.setSearch(search); |
| 46 | req.setLimit(10); |
| 47 | |
| 48 | TenantStore.list(req, (resp: ListTenantsResponse) => { |
| 49 | const options = resp.getResultList().map((o, i) => { |
| 50 | return { label: o.getName(), value: o.getId() }; |
| 51 | }); |
| 52 | fn(options); |
| 53 | }); |
| 54 | }; |
| 55 | |
| 56 | const getTenantOption = (id: string, fn: OptionCallbackFunc) => { |
| 57 | TenantStore.get(id, (resp: GetTenantResponse) => { |