diff --git a/src/components/teams/AddTeamModal.svelte b/src/components/teams/AddTeamModal.svelte index 89752448..06ba6a49 100644 --- a/src/components/teams/AddTeamModal.svelte +++ b/src/components/teams/AddTeamModal.svelte @@ -35,7 +35,9 @@ $: parentGroup = undefined; $: orgs = []; RunnerOrganizationService.runnerOrganizationControllerGetAll().then((val) => { - orgs = val; + orgs = val.map((r) => { + return { label: r.name, value: r }; + }); }); function submit() { if (processed_last_submit === true) { @@ -148,24 +150,18 @@ class="block text-sm font-medium text-gray-700">{$_('organization')} getContactLabel(option)} - getOptionLabel={(option) => getContactLabel(option)} itemFilter={(label, filterText, option) => label .toLowerCase() .includes( filterText.toLowerCase() - ) || option.id.toString().startsWith(filterText.toLowerCase())} + ) || option.value.id + .toString() + .startsWith(filterText.toLowerCase())} items={contacts} showChevron={true} placeholder={$_('no-contact-selected')} noOptionsMessage={$_('no-contact-found')} - bind:selectedValue={teamdata.contact} + bind:selectedValue={contact} + on:select={(selectedValue)=> teamdata.contact = selectedValue.detail.value} on:clear={() => (teamdata.contact = null)} />
@@ -361,22 +376,17 @@ class="font-medium text-gray-700">{$_('organization')}