|
1 | 1 | import {duration} from '@gravity-ui/date-utils'; |
2 | 2 | import {Ban, CircleStop} from '@gravity-ui/icons'; |
3 | 3 | import type {Column as DataTableColumn} from '@gravity-ui/react-data-table'; |
4 | | -import {Flex, Icon, Text} from '@gravity-ui/uikit'; |
| 4 | +import {ActionTooltip, Flex, Icon, Text} from '@gravity-ui/uikit'; |
5 | 5 |
|
6 | 6 | import {ButtonWithConfirmDialog} from '../../components/ButtonWithConfirmDialog/ButtonWithConfirmDialog'; |
7 | 7 | import {CellWithPopover} from '../../components/CellWithPopover/CellWithPopover'; |
@@ -163,54 +163,54 @@ function OperationsActions({operation, database, refreshTable}: OperationsAction |
163 | 163 |
|
164 | 164 | return ( |
165 | 165 | <Flex gap="2"> |
166 | | - <ButtonWithConfirmDialog |
167 | | - buttonView="outlined" |
168 | | - dialogHeader={i18n('header_forget')} |
169 | | - dialogText={i18n('text_forget')} |
170 | | - onConfirmAction={() => |
171 | | - forgetOperation({id, database}) |
172 | | - .unwrap() |
173 | | - .then(() => { |
174 | | - createToast({ |
175 | | - name: 'Forgotten', |
176 | | - title: i18n('text_forgotten', {id}), |
177 | | - type: 'success', |
178 | | - }); |
179 | | - refreshTable(); |
180 | | - }) |
181 | | - } |
182 | | - buttonDisabled={isLoadingCancel} |
183 | | - withPopover |
184 | | - popoverContent={i18n('header_forget')} |
185 | | - popoverPlacement={['left', 'auto']} |
186 | | - popoverDisabled={false} |
187 | | - > |
188 | | - <Icon data={Ban} /> |
189 | | - </ButtonWithConfirmDialog> |
190 | | - <ButtonWithConfirmDialog |
191 | | - buttonView="outlined" |
192 | | - dialogHeader={i18n('header_cancel')} |
193 | | - dialogText={i18n('text_cancel')} |
194 | | - onConfirmAction={() => |
195 | | - cancelOperation({id, database}) |
196 | | - .unwrap() |
197 | | - .then(() => { |
198 | | - createToast({ |
199 | | - name: 'Cancelled', |
200 | | - title: i18n('text_cancelled', {id}), |
201 | | - type: 'success', |
202 | | - }); |
203 | | - refreshTable(); |
204 | | - }) |
205 | | - } |
206 | | - buttonDisabled={isForgetLoading} |
207 | | - withPopover |
208 | | - popoverContent={i18n('header_cancel')} |
209 | | - popoverPlacement={['right', 'auto']} |
210 | | - popoverDisabled={false} |
211 | | - > |
212 | | - <Icon data={CircleStop} /> |
213 | | - </ButtonWithConfirmDialog> |
| 166 | + <ActionTooltip title={i18n('header_forget')} placement={['left', 'auto']}> |
| 167 | + <div> |
| 168 | + <ButtonWithConfirmDialog |
| 169 | + buttonView="outlined" |
| 170 | + dialogHeader={i18n('header_forget')} |
| 171 | + dialogText={i18n('text_forget')} |
| 172 | + onConfirmAction={() => |
| 173 | + forgetOperation({id, database}) |
| 174 | + .unwrap() |
| 175 | + .then(() => { |
| 176 | + createToast({ |
| 177 | + name: 'Forgotten', |
| 178 | + title: i18n('text_forgotten', {id}), |
| 179 | + type: 'success', |
| 180 | + }); |
| 181 | + refreshTable(); |
| 182 | + }) |
| 183 | + } |
| 184 | + buttonDisabled={isLoadingCancel} |
| 185 | + > |
| 186 | + <Icon data={Ban} /> |
| 187 | + </ButtonWithConfirmDialog> |
| 188 | + </div> |
| 189 | + </ActionTooltip> |
| 190 | + <ActionTooltip title={i18n('header_cancel')} placement={['right', 'auto']}> |
| 191 | + <div> |
| 192 | + <ButtonWithConfirmDialog |
| 193 | + buttonView="outlined" |
| 194 | + dialogHeader={i18n('header_cancel')} |
| 195 | + dialogText={i18n('text_cancel')} |
| 196 | + onConfirmAction={() => |
| 197 | + cancelOperation({id, database}) |
| 198 | + .unwrap() |
| 199 | + .then(() => { |
| 200 | + createToast({ |
| 201 | + name: 'Cancelled', |
| 202 | + title: i18n('text_cancelled', {id}), |
| 203 | + type: 'success', |
| 204 | + }); |
| 205 | + refreshTable(); |
| 206 | + }) |
| 207 | + } |
| 208 | + buttonDisabled={isForgetLoading} |
| 209 | + > |
| 210 | + <Icon data={CircleStop} /> |
| 211 | + </ButtonWithConfirmDialog> |
| 212 | + </div> |
| 213 | + </ActionTooltip> |
214 | 214 | </Flex> |
215 | 215 | ); |
216 | 216 | } |
0 commit comments