|
1 | 1 | class BsRequestActionDescriptionComponentPreview < ViewComponent::Preview |
2 | | - # Preview at http://HOST:PORT/rails/view_components/bs_request_action_description_component/submit_preview |
3 | | - def submit_preview |
4 | | - action = BsRequestAction.where(type: :submit).last |
| 2 | + # Previews at http://HOST:PORT/rails/view_components/bs_request_action_description_component/ |
| 3 | + def add_role |
| 4 | + action = BsRequestAction.where(type: :add_role).last |
5 | 5 | render(BsRequestActionDescriptionComponent.new(action: action)) |
6 | 6 | end |
7 | 7 |
|
8 | | - def submit_preview_text_only |
9 | | - action = BsRequestAction.where(type: :submit).last |
| 8 | + def change_devel |
| 9 | + action = BsRequestAction.where(type: :change_devel).last |
| 10 | + render(BsRequestActionDescriptionComponent.new(action: action)) |
| 11 | + end |
| 12 | + |
| 13 | + def change_devel_text_only |
| 14 | + action = BsRequestAction.where(type: :change_devel).last |
10 | 15 | render(BsRequestActionDescriptionComponent.new(action: action, text_only: true)) |
11 | 16 | end |
12 | 17 |
|
13 | | - def delete_preview |
| 18 | + def delete |
14 | 19 | action = BsRequestAction.where(type: :delete).last |
15 | 20 | render(BsRequestActionDescriptionComponent.new(action: action)) |
16 | 21 | end |
17 | 22 |
|
18 | | - def delete_preview_text_only |
| 23 | + def delete_text_only |
19 | 24 | action = BsRequestAction.where(type: :delete).last |
20 | 25 | render(BsRequestActionDescriptionComponent.new(action: action, text_only: true)) |
21 | 26 | end |
22 | 27 |
|
23 | | - def add_role_preview |
24 | | - action = BsRequestAction.where(type: :add_role).first |
25 | | - render(BsRequestActionDescriptionComponent.new(action: action)) |
| 28 | + def maintenance_incident_text_only |
| 29 | + action = BsRequestAction.where(type: :maintenance_incident).last |
| 30 | + render(BsRequestActionDescriptionComponent.new(action: action, text_only: true)) |
26 | 31 | end |
27 | 32 |
|
28 | | - def change_devel_preview |
29 | | - action = BsRequestAction.where(type: :change_devel).first |
| 33 | + def maintenance_release_text_only |
| 34 | + action = BsRequestAction.where(type: :maintenance_release).last |
| 35 | + render(BsRequestActionDescriptionComponent.new(action: action, text_only: true)) |
| 36 | + end |
| 37 | + |
| 38 | + def set_bugowner_text_only |
| 39 | + action = BsRequestAction.where(type: :set_bugowner).last |
| 40 | + render(BsRequestActionDescriptionComponent.new(action: action, text_only: true)) |
| 41 | + end |
| 42 | + |
| 43 | + def submit |
| 44 | + action = BsRequestAction.where(type: :submit).last |
30 | 45 | render(BsRequestActionDescriptionComponent.new(action: action)) |
31 | 46 | end |
32 | 47 |
|
33 | | - def change_devel_preview_text_only |
34 | | - action = BsRequestAction.where(type: :change_devel).first |
| 48 | + def submit_text_only |
| 49 | + action = BsRequestAction.where(type: :submit).last |
35 | 50 | render(BsRequestActionDescriptionComponent.new(action: action, text_only: true)) |
36 | 51 | end |
37 | 52 | end |
0 commit comments