File tree 2 files changed +6
-3
lines changed
dashboard-shared/dashboard-detail/legacy/widgets/_composables/use-widget
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -10,10 +10,10 @@ import type { Currency } from '@/store/display/type';
10
10
11
11
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
12
12
// @ts -ignore
13
+ import type { WidgetFrameProps } from '@/services/dashboard-shared/dashboard-detail/legacy/widgets/_components/WidgetFrame.vue' ;
13
14
import type { WidgetState } from '@/services/dashboard-shared/dashboard-detail/legacy/widgets/_composables/use-widget/use-widget' ;
14
15
import { getNonInheritedWidgetOptionNamesAmongUsedVariables } from '@/services/dashboard-shared/dashboard-detail/legacy/widgets/_helpers/widget-schema-helper' ;
15
16
import type { WidgetEmit , WidgetProps } from '@/services/dashboard-shared/dashboard-detail/legacy/widgets/_types/widget-type' ;
16
- import type { WidgetFrameProps } from '@/services/dashboards/widgets/_components/WidgetFrame.vue' ;
17
17
18
18
export interface WidgetFrameOptions {
19
19
dateRange ?: DateRange | ComputedRef < DateRange > ;
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import type { ComputedRef } from 'vue';
2
2
import { computed , reactive } from 'vue' ;
3
3
4
4
import { RESOURCE_GROUP } from '@/api-clients/_common/schema/constant' ;
5
+ import type { PublicDashboardModel } from '@/api-clients/dashboard/public-dashboard/schema/model' ;
5
6
import { ROLE_TYPE } from '@/api-clients/identity/role/constant' ;
6
7
7
8
import { useUserStore } from '@/store/user/user-store' ;
@@ -36,13 +37,15 @@ export const useDashboardManageable = ({ dashboardId }: UseDashboardManageableOp
36
37
37
38
if ( entryPoint . value === 'WORKSPACE' ) {
38
39
if ( dashboard . value ?. dashboard_id . startsWith ( 'private' ) ) return true ;
39
- if ( dashboard . value ?. shared && dashboard . value ?. resource_group === RESOURCE_GROUP . DOMAIN ) return false ;
40
+ const publicDashboard = dashboard . value as PublicDashboardModel ;
41
+ if ( publicDashboard . shared && publicDashboard . resource_group === RESOURCE_GROUP . DOMAIN ) return false ;
40
42
if ( storeState . isWorkspaceOwner ) return true ;
41
43
return false ;
42
44
}
43
45
44
46
if ( entryPoint . value === 'PROJECT' ) {
45
- if ( dashboard . value ?. shared ) return false ;
47
+ const publicDashboard = dashboard . value as PublicDashboardModel ;
48
+ if ( publicDashboard . shared ) return false ;
46
49
return true ;
47
50
}
48
51
return false ;
You can’t perform that action at this time.
0 commit comments