fix: use correct created_at and updated_at (#7305)

This commit is contained in:
Nityananda Gohain 2025-03-13 15:14:06 +05:30 committed by GitHub
parent 9df23bc1ed
commit b46f0c9a7b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 17 additions and 17 deletions

View File

@ -22,7 +22,7 @@ function TopContributorsCard({
const viewAllTopContributorsParam = searchParams.get('viewAllTopContributors');
const [isViewAllVisible, setIsViewAllVisible] = useState(
!!viewAllTopContributorsParam ?? false,
!!viewAllTopContributorsParam,
);
const isDarkMode = useIsDarkMode();

View File

@ -28,7 +28,7 @@ export default function DashboardEmptyState(): JSX.Element {
}
const userRole: ROLES | null =
selectedDashboard?.created_by === user?.email
selectedDashboard?.createdBy === user?.email
? (USER_ROLES.AUTHOR as ROLES)
: user.role;

View File

@ -113,7 +113,7 @@ function GraphLayout(props: GraphLayoutProps): JSX.Element {
}
const userRole: ROLES | null =
selectedDashboard?.created_by === user?.email
selectedDashboard?.createdBy === user?.email
? (USER_ROLES.AUTHOR as ROLES)
: user.role;

View File

@ -44,7 +44,7 @@ export function WidgetRowHeader(props: WidgetRowHeaderProps): JSX.Element {
const { user } = useAppContext();
const userRole: ROLES | null =
selectedDashboard?.created_by === user?.email
selectedDashboard?.createdBy === user?.email
? (USER_ROLES.AUTHOR as ROLES)
: user.role;
const [addPanelPermission] = useComponentPermission(permissions, userRole);

View File

@ -8,10 +8,10 @@ describe('executeSearchQueries', () => {
const firstDashboard: Dashboard = {
id: 11111,
uuid: uuid(),
created_at: '',
updated_at: '',
created_by: '',
updated_by: '',
createdAt: '',
updatedAt: '',
createdBy: '',
updatedBy: '',
data: {
title: 'first dashboard',
variables: {},
@ -20,10 +20,10 @@ describe('executeSearchQueries', () => {
const secondDashboard: Dashboard = {
id: 22222,
uuid: uuid(),
created_at: '',
updated_at: '',
created_by: '',
updated_by: '',
createdAt: '',
updatedAt: '',
createdBy: '',
updatedBy: '',
data: {
title: 'second dashboard',
variables: {},
@ -32,10 +32,10 @@ describe('executeSearchQueries', () => {
const thirdDashboard: Dashboard = {
id: 333333,
uuid: uuid(),
created_at: '',
updated_at: '',
created_by: '',
updated_by: '',
createdAt: '',
updatedAt: '',
createdBy: '',
updatedBy: '',
data: {
title: 'third dashboard (with special characters +?\\)',
variables: {},

View File

@ -236,7 +236,7 @@ describe('dashboard list page', () => {
expect.objectContaining({
id: firstDashboardData.uuid,
title: firstDashboardData.data.title,
createdAt: firstDashboardData.created_at,
createdAt: firstDashboardData.createdAt,
}),
);
});