N°7157 - Allow users to unsubscribe from notification channels (#611)

* N°7157 - Allow users to unsubscribe from notification channels

* Fix type hinting

* Add missing dict entries

* Allows to subscribe/unsubscribe from notifications individually

* Refactor NotificationsService to singleton pattern

* Refactor NotificationsRepository to singleton pattern and rename methods to a more functional naming

* Add PHPDoc and type hints

* Dump autoloaders

* Replace modals with toasts

* Add dict entry

---------

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>
This commit is contained in:
Stephen Abello
2024-02-19 09:25:47 +01:00
committed by GitHub
parent efe5f004a1
commit ceba1ad1e9
28 changed files with 1305 additions and 24 deletions

View File

@@ -49,6 +49,14 @@ let oWidget{{ oUIBlock.GetId() }} = $('#{{ oUIBlock.GetId() }}').selectize({
{% if oUIBlock.HasRemoveItemButton() %}
'remove_button' : {},
{% endif %}
{# PLUGIN min items #}
{% if oUIBlock.GetMinItems() is not empty %}
'combodo_min_items' : {
minItems: {{ oUIBlock.GetMinItems() }},
errorMessage: '{{ 'UI:Component:Input:Set:MinimumItems'|dict_format(oUIBlock.GetMinItems()) }}'
},
{% endif %}
},
{# Max items you can select #}
@@ -197,6 +205,31 @@ let oWidget{{ oUIBlock.GetId() }} = $('#{{ oUIBlock.GetId() }}').selectize({
'data-tooltip-html-enabled': true
});
CombodoTooltip.InitTooltipFromMarkup($item);
{% if oUIBlock.GetOnItemAddJs() is not null %}
{{ oUIBlock.GetOnItemAddJs()|raw }}
{% endif %}
},
{# On item remove #}
onItemRemove: function(value, $item){
{% if oUIBlock.GetOnItemRemoveJs() is not null %}
{{ oUIBlock.GetOnItemRemoveJs()|raw }}
{% endif %}
},
{# On option remove #}
onOptionRemove: function(value, $item){
{% if oUIBlock.GetOnOptionRemoveJs() is not null %}
{{ oUIBlock.GetOnOptionRemoveJs()|raw }}
{% endif %}
},
{# On option add #}
onOptionAdd: function(value, $item){
{% if oUIBlock.GetOnOptionAddJs() is not null %}
{{ oUIBlock.GetOnOptionAddJs()|raw }}
{% endif %}
},
{# plugin combodo_add_button #}