Skip to content

Commit aafb52e

Browse files
committed
chore: solve lint error
Signed-off-by: samuel.park <[email protected]>
1 parent 2a78f12 commit aafb52e

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Diff for: apps/web/src/services/dashboard-shared/dashboard-detail/legacy/widgets/_composables/use-widget/use-widget-frame.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ import type { Currency } from '@/store/display/type';
1010

1111
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
1212
// @ts-ignore
13+
import type { WidgetFrameProps } from '@/services/dashboard-shared/dashboard-detail/legacy/widgets/_components/WidgetFrame.vue';
1314
import type { WidgetState } from '@/services/dashboard-shared/dashboard-detail/legacy/widgets/_composables/use-widget/use-widget';
1415
import { getNonInheritedWidgetOptionNamesAmongUsedVariables } from '@/services/dashboard-shared/dashboard-detail/legacy/widgets/_helpers/widget-schema-helper';
1516
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';
1717

1818
export interface WidgetFrameOptions {
1919
dateRange?: DateRange|ComputedRef<DateRange>;

Diff for: apps/web/src/services/dashboards/composables/use-dashboard-manageable.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import type { ComputedRef } from 'vue';
22
import { computed, reactive } from 'vue';
33

44
import { RESOURCE_GROUP } from '@/api-clients/_common/schema/constant';
5+
import type { PublicDashboardModel } from '@/api-clients/dashboard/public-dashboard/schema/model';
56
import { ROLE_TYPE } from '@/api-clients/identity/role/constant';
67

78
import { useUserStore } from '@/store/user/user-store';
@@ -36,13 +37,15 @@ export const useDashboardManageable = ({ dashboardId }: UseDashboardManageableOp
3637

3738
if (entryPoint.value === 'WORKSPACE') {
3839
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;
4042
if (storeState.isWorkspaceOwner) return true;
4143
return false;
4244
}
4345

4446
if (entryPoint.value === 'PROJECT') {
45-
if (dashboard.value?.shared) return false;
47+
const publicDashboard = dashboard.value as PublicDashboardModel;
48+
if (publicDashboard.shared) return false;
4649
return true;
4750
}
4851
return false;

0 commit comments

Comments
 (0)