-
-
Notifications
You must be signed in to change notification settings - Fork 825
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
Expose mapping search task to Search Kit #19561
Conversation
(Standard links)
|
@@ -86,7 +86,7 @@ public static function preProcessCommon(&$form) { | |||
$form->_contactIds = []; | |||
$form->_contactTypes = []; | |||
|
|||
$isStandAlone = in_array('task', $form->urlPath) || in_array('standalone', $form->urlPath); | |||
$isStandAlone = in_array('task', $form->urlPath) || in_array('standalone', $form->urlPath) || in_array('map', $form->urlPath); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could call $form->isStandAlone() & then on the CRM_Contact_Form_Task_Map form it could return TRUE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eileenmcnaughton is that a new function or just something I haven't come across but yeh I'm thinking that might be what is needed, the map task does get used in a number of different contexts so will need to check if this does anything to them (don't think so but maybe)
Fix OSM Javascript to work on Search Kit display
cbde30b
to
8fccc8a
Compare
@eileenmcnaughton @JoeMurray @colemanw the display task of Mapping Contacts now works, I have tested as best as I can using both OSM and also Google Maps and both seem to work now. The only thing would be about the isStandAlone question IMO |
Works for me for google. It uses a popup even if you have popups turned off but that's not a blocker just the map is kind of the wrong size for the popup. Regular search + map still works. I don't have any comment on the isStandalone. |
OK merging based on @demeritcowboy's testing - I think that standalone thing is still a bit of a mess but I won't make it a blocker on this PR |
Cool. |
Overview
Expose Contact Mapping task to Search Kit
Before
No Mapping task
After
Mapping task option
Technical Details
This is also a work in progress but it at least gets it show in the list of search tasks, the issue I am currently running into is that at least with Open Street Maps is that when the popup opens this code https://github.com/civicrm/civicrm-core/blob/master/templates/CRM/Contact/Form/Task/Map/OpenStreetMaps.tpl#L156 doesn't seem to fire correctly so initmap doesn't get run not sure what the correct change should be
ping @colemanw @eileenmcnaughton @JoeMurray