Skip to content

Commit

Permalink
Fix two Slack buttons not showing up (#342)
Browse files Browse the repository at this point in the history
  • Loading branch information
GDay authored Aug 20, 2023
1 parent 3c05789 commit 2a65f07
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 26 deletions.
16 changes: 9 additions & 7 deletions back/admin/people/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -2135,13 +2135,15 @@ def test_give_user_slack_access(settings, client, employee_factory, django_user_
},
{
"type": "actions",
"elements": {
"type": "button",
"text": {"type": "plain_text", "text": "resources"},
"style": "primary",
"value": "show:resources",
"action_id": "show:resources",
},
"elements": [
{
"type": "button",
"text": {"type": "plain_text", "text": "resources"},
"style": "primary",
"value": "show_resource_items",
"action_id": "show_resource_items",
},
],
},
]

Expand Down
14 changes: 8 additions & 6 deletions back/admin/people/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,14 @@ def post(self, request, pk, *args, **kwargs):
).message
),
actions(
button(
text=_("resources"),
value="show:resources",
style="primary",
action_id="show:resources",
)
[
button(
text=_("resources"),
value="show_resource_items",
style="primary",
action_id="show_resource_items",
)
]
),
]

Expand Down
16 changes: 9 additions & 7 deletions back/admin/settings/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,13 +437,15 @@ def test_sending_test_colleague_welcome_message(
},
{
"type": "actions",
"elements": {
"type": "button",
"text": {"type": "plain_text", "text": "recursos"},
"style": "primary",
"value": "show:resources",
"action_id": "show:resources",
},
"elements": [
{
"type": "button",
"text": {"type": "plain_text", "text": "recursos"},
"style": "primary",
"value": "show_resource_items",
"action_id": "show_resource_items",
},
],
},
]

Expand Down
14 changes: 8 additions & 6 deletions back/admin/settings/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,14 @@ def post(self, request, **kwargs):
blocks = [
paragraph(we),
actions(
button(
text=_("resources"),
value="show:resources",
style="primary",
action_id="show:resources",
)
[
button(
text=_("resources"),
value="show_resource_items",
style="primary",
action_id="show_resource_items",
)
]
),
]

Expand Down

0 comments on commit 2a65f07

Please sign in to comment.