mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	fix: clickable names in inc wh and action tables (#6275)
https://linear.app/unleash/issue/2-1954/make-names-clickable-in-actions-and-incoming-webhooks Makes names clickable in the incoming webhook and action tables. When clicked, they open the edit form for that resource.  
This commit is contained in:
		
							parent
							
								
									86b9ba79d7
								
							
						
					
					
						commit
						7e6a3c7e69
					
				| @ -16,12 +16,12 @@ import { IIncomingWebhook } from 'interfaces/incomingWebhook'; | ||||
| import { IncomingWebhooksActionsCell } from './IncomingWebhooksActionsCell'; | ||||
| import { IncomingWebhooksDeleteDialog } from './IncomingWebhooksDeleteDialog'; | ||||
| import { ToggleCell } from 'component/common/Table/cells/ToggleCell/ToggleCell'; | ||||
| import { HighlightCell } from 'component/common/Table/cells/HighlightCell/HighlightCell'; | ||||
| import copy from 'copy-to-clipboard'; | ||||
| import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig'; | ||||
| import { IncomingWebhookTokensCell } from './IncomingWebhooksTokensCell'; | ||||
| import { IncomingWebhooksModal } from '../IncomingWebhooksModal/IncomingWebhooksModal'; | ||||
| import { IncomingWebhooksTokensDialog } from '../IncomingWebhooksModal/IncomingWebhooksForm/IncomingWebhooksTokens/IncomingWebhooksTokensDialog'; | ||||
| import { LinkCell } from 'component/common/Table/cells/LinkCell/LinkCell'; | ||||
| 
 | ||||
| interface IIncomingWebhooksTableProps { | ||||
|     modalOpen: boolean; | ||||
| @ -91,8 +91,12 @@ export const IncomingWebhooksTable = ({ | ||||
|                 Cell: ({ | ||||
|                     row: { original: incomingWebhook }, | ||||
|                 }: { row: { original: IIncomingWebhook } }) => ( | ||||
|                     <HighlightCell | ||||
|                         value={incomingWebhook.name} | ||||
|                     <LinkCell | ||||
|                         title={incomingWebhook.name} | ||||
|                         onClick={() => { | ||||
|                             setSelectedIncomingWebhook(incomingWebhook); | ||||
|                             setModalOpen(true); | ||||
|                         }} | ||||
|                         subtitle={incomingWebhook.description} | ||||
|                     /> | ||||
|                 ), | ||||
|  | ||||
| @ -23,6 +23,7 @@ import { ProjectActionsDeleteDialog } from './ProjectActionsDeleteDialog'; | ||||
| import { useServiceAccounts } from 'hooks/api/getters/useServiceAccounts/useServiceAccounts'; | ||||
| import { useIncomingWebhooks } from 'hooks/api/getters/useIncomingWebhooks/useIncomingWebhooks'; | ||||
| import { useRequiredPathParam } from 'hooks/useRequiredPathParam'; | ||||
| import { LinkCell } from 'component/common/Table/cells/LinkCell/LinkCell'; | ||||
| 
 | ||||
| interface IProjectActionsTableProps { | ||||
|     modalOpen: boolean; | ||||
| @ -88,6 +89,17 @@ export const ProjectActionsTable = ({ | ||||
|                 Header: 'Name', | ||||
|                 accessor: 'name', | ||||
|                 minWidth: 60, | ||||
|                 Cell: ({ | ||||
|                     row: { original: action }, | ||||
|                 }: { row: { original: IActionSet } }) => ( | ||||
|                     <LinkCell | ||||
|                         title={action.name} | ||||
|                         onClick={() => { | ||||
|                             setSelectedAction(action); | ||||
|                             setModalOpen(true); | ||||
|                         }} | ||||
|                     /> | ||||
|                 ), | ||||
|             }, | ||||
|             { | ||||
|                 id: 'trigger', | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user