Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Has someone introduced you' Dropdown Box #3161

Open
pqhf5kd opened this issue Nov 4, 2019 · 5 comments
Open

'Has someone introduced you' Dropdown Box #3161

pqhf5kd opened this issue Nov 4, 2019 · 5 comments

Comments

@pqhf5kd
Copy link

@pqhf5kd pqhf5kd commented Nov 4, 2019

Can the 'Search and select an existing contact' dropdown box from the 'Add a new relationship' form also be used for the 'Has someone introduced you' dropdown on the 'How did you meet' form?

I'm only at 175 contacts and it's very frustrating trying to select someone to the 'Has someone introduced you' field.

@mohammed90
Copy link

@mohammed90 mohammed90 commented Nov 10, 2019

If anyone wants to take it up, a tag analogous to this

<contact-select
:required="true"
:title="'{{ trans('people.relationship_form_associate_dropdown') }}'"
:name="'existing_contact_id'"
:placeholder="'{{ trans('people.relationship_form_associate_dropdown_placeholder') }}'"
:default-options="{{ \Safe\json_encode($existingContacts) }}"
:user-contact-id="'{{ $contact->id }}'">
</contact-select>

needs to be used here

<select class="form-control" name="metThroughId" id="metThroughId">
<option value="">{{ trans('people.introductions_no_met_through') }}</option>
@foreach (auth()->user()->account->contacts()->real()->active()->get() as $metThroughContact)
@if ($metThroughContact->id != $contact->id)
<option value="{{ $metThroughContact->id }}" {{ (is_null($contact->first_met_through_contact_id)) ? '' : (($metThroughContact->id == $contact->first_met_through_contact_id) ? 'selected' : '') }}>
{{ $metThroughContact->name }}
</option>
@endif
@endforeach
</select>

@LukasRos
Copy link

@LukasRos LukasRos commented Nov 22, 2019

This issue bugs me a lot, too. Thanks for the hints, @mohammed90, I will try to fix it.

@asbiin
Copy link

@asbiin asbiin commented Apr 13, 2020

Hi @LukasRos still want to work on this?

@asbiin asbiin added the bug label Apr 13, 2020
LukasRos added a commit to LukasRos/monica that referenced this issue Apr 16, 2020
@LukasRos
Copy link

@LukasRos LukasRos commented Apr 16, 2020

@asbiin I have replaced the custom select with the Vue component like @mohammed90 suggested. It works already, however I'm not sure how to initialize the component with a value when the user has already selected an introduction contact. I will look into this again.

@Dlewis89
Copy link

@Dlewis89 Dlewis89 commented Feb 5, 2022

Hey @asbiin, I would like to take a crack at this but I have to admit I've never used this library before. I need a day or two to get familiar with the code and the related issue and then I'll be able to tackle this. Is that okay?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants