@@ -2,6 +2,7 @@ import PixButton from '@1024pix/pix-ui/components/pix-button';
2
2
import PixIcon from ' @1024pix/pix-ui/components/pix-icon' ;
3
3
import PixModal from ' @1024pix/pix-ui/components/pix-modal' ;
4
4
import PixSelect from ' @1024pix/pix-ui/components/pix-select' ;
5
+ import PixTableColumn from ' @1024pix/pix-ui/components/pix-table-column' ;
5
6
import { action } from ' @ember/object' ;
6
7
import { service } from ' @ember/service' ;
7
8
import Component from ' @glimmer/component' ;
@@ -77,85 +78,94 @@ export default class ActionsOnUsersRoleInOrganization extends Component {
77
78
}
78
79
79
80
<template >
80
- <td >
81
- {{#if this . isEditionMode }}
82
- <PixSelect
83
- class =" pix-select-in-table"
84
- @ onChange ={{this .setRoleSelection }}
85
- @ value ={{this .selectedNewRole }}
86
- @ options ={{this .organizationRoles }}
87
- @ placeholder =" - Rôle -"
88
- @ screenReaderOnly ={{ true }}
89
- >
90
- <: label >Sélectionner un rôle</: label >
91
- <: default as | organizationRole | >{{organizationRole.label }} </: default >
92
- </PixSelect >
93
- {{else }}
94
- {{@ organizationMembership.roleLabel }}
95
- {{/if }}
96
- </td >
81
+ <PixTableColumn @ context ={{@ context }} >
82
+ <: header >
83
+ Rôle
84
+ </: header >
85
+ <: cell >
86
+ {{#if this . isEditionMode }}
87
+ <PixSelect
88
+ @ onChange ={{this .setRoleSelection }}
89
+ @ value ={{this .selectedNewRole }}
90
+ @ options ={{this .organizationRoles }}
91
+ @ placeholder =" - Rôle -"
92
+ @ screenReaderOnly ={{ true }}
93
+ >
94
+ <: label >Sélectionner un rôle</: label >
95
+ <: default as | organizationRole | >{{organizationRole.label }} </: default >
96
+ </PixSelect >
97
+ {{else }}
98
+ {{@ organizationMembership.roleLabel }}
99
+ {{/if }}
100
+ </: cell >
101
+ </PixTableColumn >
97
102
98
103
{{#if this . accessControl.hasAccessToOrganizationActionsScope }}
99
- <td >
100
- <div class =" member-item-actions" >
101
- {{#if this . isEditionMode }}
102
- <div class =" member-item-actions__modify" >
103
- <PixButton @ size =" small" @ triggerAction ={{this .updateRoleOfMember }} class =" member-item-actions__button" >
104
- {{t " common.actions.save" }}
105
- </PixButton >
104
+ <PixTableColumn @ context ={{@ context }} >
105
+ <: header >
106
+ Actions
107
+ </: header >
108
+ <: cell >
109
+ <div class =" member-item-actions" >
110
+ {{#if this . isEditionMode }}
111
+ <div class =" member-item-actions__modify" >
112
+ <PixButton @ size =" small" @ triggerAction ={{this .updateRoleOfMember }} class =" member-item-actions__button" >
113
+ {{t " common.actions.save" }}
114
+ </PixButton >
115
+ <PixButton
116
+ @ size =" small"
117
+ @ variant =" secondary"
118
+ @ triggerAction ={{this .cancelUpdateRoleOfMember }}
119
+ aria-label ={{t " common.actions.cancel" }}
120
+ class =" member-item-actions__button"
121
+ >
122
+ <PixIcon @ name =" close" @ ariaHidden ={{ true }} />
123
+ </PixButton >
124
+ </div >
125
+ {{else }}
106
126
<PixButton
127
+ @ isDisabled ={{@ organizationMembership.isSaving }}
107
128
@ size =" small"
108
- @ variant =" secondary"
109
- @ triggerAction ={{this .cancelUpdateRoleOfMember }}
110
- aria-label ={{t " common.actions.cancel" }}
111
129
class =" member-item-actions__button"
130
+ aria-label =" Modifier le rôle"
131
+ @ triggerAction ={{this .editRoleOfMember }}
132
+ @ iconBefore =" edit"
112
133
>
113
- < PixIcon @ name = " close " @ ariaHidden = {{ true }} />
134
+ Modifier le rôle
114
135
</PixButton >
115
- </div >
116
- {{else }}
136
+ {{/if }}
117
137
<PixButton
118
- @ isDisabled ={{@ organizationMembership.isSaving }}
119
138
@ size =" small"
139
+ @ variant =" error"
140
+ @ isDisabled ={{@ organizationMembership.isSaving }}
120
141
class =" member-item-actions__button"
121
- aria-label =" Modifier le rôle "
122
- @ triggerAction ={{this .editRoleOfMember }}
123
- @ iconBefore =" edit "
142
+ aria-label =" Désactiver l'agent "
143
+ @ triggerAction ={{this .toggleDisplayConfirm }}
144
+ @ iconBefore =" delete "
124
145
>
125
- Modifier le rôle
146
+ {{ t " common.actions.deactivate " }}
126
147
</PixButton >
127
- {{/if }}
128
- <PixButton
129
- @ size =" small"
130
- @ variant =" error"
131
- @ isDisabled ={{@ organizationMembership.isSaving }}
132
- class =" member-item-actions__button"
133
- aria-label =" Désactiver l'agent"
134
- @ triggerAction ={{this .toggleDisplayConfirm }}
135
- @ iconBefore =" delete"
136
- >
137
- {{t " common.actions.deactivate" }}
138
- </PixButton >
139
- </div >
140
-
141
- <PixModal
142
- @ title =" Désactivation d'un membre"
143
- @ onCloseButtonClick ={{this .toggleDisplayConfirm }}
144
- @ showModal ={{this .displayConfirm }}
145
- >
146
- <: content >
147
- <p >
148
- Etes-vous sûr de vouloir désactiver le membre de cette équipe ?
149
- </p >
150
- </: content >
151
- <: footer >
152
- <PixButton @ variant =" secondary" @ triggerAction ={{this .toggleDisplayConfirm }} >
153
- {{t " common.actions.cancel" }}
154
- </PixButton >
155
- <PixButton @ triggerAction ={{this .disableOrganizationMembership }} >Confirmer</PixButton >
156
- </: footer >
157
- </PixModal >
158
- </td >
148
+ </div >
149
+ </: cell >
150
+ </PixTableColumn >
159
151
{{/if }}
152
+
153
+ <PixModal
154
+ @ title =" Désactivation d'un membre"
155
+ @ onCloseButtonClick ={{this .toggleDisplayConfirm }}
156
+ @ showModal ={{this .displayConfirm }}
157
+ >
158
+ <: content >
159
+ <p >
160
+ Etes-vous sûr de vouloir désactiver le membre de cette équipe ?
161
+ </p >
162
+ </: content >
163
+ <: footer >
164
+ <PixButton @ variant =" secondary" @ triggerAction ={{this .toggleDisplayConfirm }} >
165
+ {{t " common.actions.cancel" }}
166
+ </PixButton >
167
+ <PixButton @ triggerAction ={{this .disableOrganizationMembership }} >Confirmer</PixButton >
168
+ </: footer >
169
+ </PixModal >
160
170
</template >
161
171
}
0 commit comments