Fix dev/core#4566 by ensuring groupNames are fetched
authorcolemanw <coleman@civicrm.org>
Mon, 25 Sep 2023 02:17:23 +0000 (22:17 -0400)
committercolemanw <coleman@civicrm.org>
Mon, 25 Sep 2023 14:43:47 +0000 (10:43 -0400)
commit24cedfd64c9cb419b8abe8fa0d82511bb6439be9
tree57f5a2db772a018ac8c212f033853f66f163f180
parent05abb59b9e4078794efe6aebf6505a2ab3cf27d5
Fix dev/core#4566 by ensuring groupNames are fetched

The problem was that EditUnsubGroupCtrl needed CRM.crmMailing.groupNames to be fetched,
but wasn't doing anything about it. Instead it was passively waiting around for someone
else to call for them to be loaded. The only place doing this was ViewRecipCtrl, and not consistently.
It was working in core but not in Mosaico.

I solved this by moving the loader functions to a service so they could be called from both places.
ang/crmMailing/EditUnsubGroupCtrl.js
ang/crmMailing/ViewRecipCtrl.js
ang/crmMailing/services.js