Commit eaa17a0 1 parent 7cfee8b commit eaa17a0 Copy full SHA for eaa17a0
File tree 2 files changed +22
-3
lines changed
app/entityV2/shared/EntityDropdown
2 files changed +22
-3
lines changed Original file line number Diff line number Diff line change 1
1
import { MoreOutlined } from '@ant-design/icons' ;
2
2
import React , { useContext } from 'react' ;
3
3
import styled from 'styled-components' ;
4
+ import { useAppConfig } from '@src/app/useAppConfig' ;
4
5
import { useEntityData , useRefetch } from '../../../entity/shared/EntityContext' ;
5
6
import ShareMenuAction from '../../../shared/share/v2/ShareMenuAction' ;
6
7
import EntitySidebarContext from '../../../sharedV2/EntitySidebarContext' ;
@@ -63,6 +64,8 @@ function EntityMenuActions(props: Props) {
63
64
64
65
const refetch = useRefetch ( ) ;
65
66
67
+ const { entityVersioningEnabled } = useAppConfig ( ) . config . featureFlags ;
68
+
66
69
const hasVersioningActions = ! ! ( menuItems . has ( EntityMenuItems . LINK_VERSION ) || entityData ?. versionProperties ) ;
67
70
return (
68
71
< >
@@ -76,7 +79,7 @@ function EntityMenuActions(props: Props) {
76
79
< DeleteEntityMenuItem onDelete = { onDelete } options = { options } />
77
80
) }
78
81
{ menuItems . has ( EntityMenuItems . RAISE_INCIDENT ) && < RaiseIncidentMenuAction /> }
79
- { hasVersioningActions && (
82
+ { entityVersioningEnabled && hasVersioningActions && (
80
83
< MoreOptionsContainer >
81
84
< MoreOptionsMenuAction
82
85
menuItems = {
Original file line number Diff line number Diff line change
1
+ // Dayjs is missing core functionality without this. It causes issues in setting default value of antd datepicker without.
2
+ import dayjs from 'dayjs' ;
3
+ import advancedFormat from 'dayjs/plugin/advancedFormat' ;
4
+ import customParseFormat from 'dayjs/plugin/customParseFormat' ;
5
+ import localeData from 'dayjs/plugin/localeData' ;
6
+ import weekday from 'dayjs/plugin/weekday' ;
7
+ import weekOfYear from 'dayjs/plugin/weekOfYear' ;
8
+ import weekYear from 'dayjs/plugin/weekYear' ;
9
+
10
+ import * as Browse from './Browse' ;
1
11
import * as Global from './Global' ;
2
12
import * as Search from './Search' ;
3
- import * as Browse from './Browse' ;
13
+
14
+ dayjs . extend ( customParseFormat ) ;
15
+ dayjs . extend ( advancedFormat ) ;
16
+ dayjs . extend ( weekday ) ;
17
+ dayjs . extend ( localeData ) ;
18
+ dayjs . extend ( weekOfYear ) ;
19
+ dayjs . extend ( weekYear ) ;
4
20
5
21
// TODO: A way to populate configs without code changes?
6
22
// TOOD: Entity-oriented configurations?
7
- export { Global as GlobalCfg , Search as SearchCfg , Browse as BrowseCfg } ;
23
+ export { Browse as BrowseCfg , Global as GlobalCfg , Search as SearchCfg } ;
You can’t perform that action at this time.
0 commit comments