mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-21 05:00:56 +00:00
featL completed v1 routes for projects
This commit is contained in:
@@ -29,7 +29,7 @@ import {
|
||||
} from "@app/hooks/api/auditLogs/constants";
|
||||
import { EventType } from "@app/hooks/api/auditLogs/enums";
|
||||
import { UserAgentType } from "@app/hooks/api/auth/types";
|
||||
import { Workspace } from "@app/hooks/api/workspace/types";
|
||||
import { Project } from "@app/hooks/api/workspace/types";
|
||||
|
||||
import { LogFilterItem } from "./LogFilterItem";
|
||||
import { auditLogFilterFormSchema, Presets, TAuditLogFilterFormData } from "./types";
|
||||
@@ -44,7 +44,7 @@ type Props = {
|
||||
presets?: Presets;
|
||||
setFilter: (data: TAuditLogFilterFormData) => void;
|
||||
filter: TAuditLogFilterFormData;
|
||||
project?: Workspace;
|
||||
project?: Project;
|
||||
};
|
||||
|
||||
const getActiveFilterCount = (filter: TAuditLogFilterFormData) => {
|
||||
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
} from "@app/context";
|
||||
import { Timezone } from "@app/helpers/datetime";
|
||||
import { withPermission, withProjectPermission } from "@app/hoc";
|
||||
import { Workspace } from "@app/hooks/api/workspace/types";
|
||||
import { Project } from "@app/hooks/api/workspace/types";
|
||||
import { usePopUp } from "@app/hooks/usePopUp";
|
||||
|
||||
import { LogsDateFilter } from "./LogsDateFilter";
|
||||
@@ -31,7 +31,7 @@ type Props = {
|
||||
refetchInterval?: number;
|
||||
showFilters?: boolean;
|
||||
pageView?: boolean;
|
||||
project?: Workspace;
|
||||
project?: Project;
|
||||
};
|
||||
|
||||
const LogsSectionComponent = ({
|
||||
|
||||
@@ -48,7 +48,7 @@ import {
|
||||
useRequestProjectAccess,
|
||||
useSearchProjects
|
||||
} from "@app/hooks/api";
|
||||
import { ProjectType, Workspace, WorkspaceEnv } from "@app/hooks/api/workspace/types";
|
||||
import { ProjectType, Project, WorkspaceEnv } from "@app/hooks/api/workspace/types";
|
||||
import {
|
||||
ProjectListToggle,
|
||||
ProjectListView
|
||||
@@ -180,7 +180,7 @@ export const AllProjectView = ({
|
||||
offset,
|
||||
totalCount: searchedProjects?.totalCount || 0
|
||||
});
|
||||
const requestedWorkspaceDetails = (popUp.requestAccessConfirmation.data || {}) as Workspace;
|
||||
const requestedWorkspaceDetails = (popUp.requestAccessConfirmation.data || {}) as Project;
|
||||
|
||||
const handleToggleFilterByProjectType = (el: ProjectType) =>
|
||||
setProjectTypeFilter((state) => (state === el ? undefined : el));
|
||||
|
||||
@@ -43,7 +43,7 @@ import { useGetUserWorkspaces } from "@app/hooks/api";
|
||||
import { OrderByDirection } from "@app/hooks/api/generic/types";
|
||||
import { useUpdateUserProjectFavorites } from "@app/hooks/api/users/mutation";
|
||||
import { useGetUserProjectFavorites } from "@app/hooks/api/users/queries";
|
||||
import { ProjectType, Workspace } from "@app/hooks/api/workspace/types";
|
||||
import { ProjectType, Project } from "@app/hooks/api/workspace/types";
|
||||
import {
|
||||
ProjectListToggle,
|
||||
ProjectListView
|
||||
@@ -136,7 +136,7 @@ export const MyProjectView = ({
|
||||
|
||||
const { workspacesWithFaveProp } = useMemo(() => {
|
||||
const workspacesWithFav = filteredWorkspaces
|
||||
.map((w): Workspace & { isFavorite: boolean } => ({
|
||||
.map((w): Project & { isFavorite: boolean } => ({
|
||||
...w,
|
||||
isFavorite: Boolean(projectFavorites?.includes(w.id))
|
||||
}))
|
||||
@@ -188,7 +188,7 @@ export const MyProjectView = ({
|
||||
}
|
||||
};
|
||||
|
||||
const renderProjectGridItem = (workspace: Workspace, isFavorite: boolean) => (
|
||||
const renderProjectGridItem = (workspace: Project, isFavorite: boolean) => (
|
||||
// eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events
|
||||
<div
|
||||
onClick={() => {
|
||||
@@ -242,7 +242,7 @@ export const MyProjectView = ({
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
const renderProjectListItem = (workspace: Workspace, isFavorite: boolean, index: number) => (
|
||||
const renderProjectListItem = (workspace: Project, isFavorite: boolean, index: number) => (
|
||||
// eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events
|
||||
<div
|
||||
onClick={() => {
|
||||
|
||||
+1
-1
@@ -120,7 +120,7 @@ export const RollbackPreviewTab = (): JSX.Element => {
|
||||
] as const);
|
||||
|
||||
const { mutateAsync: rollback } = useCommitRollback({
|
||||
workspaceId: currentWorkspace.id,
|
||||
projectId: currentWorkspace.id,
|
||||
commitId: selectedCommitId,
|
||||
folderId,
|
||||
deepRollback,
|
||||
|
||||
+2
-2
@@ -414,7 +414,7 @@ export const SecretListView = ({
|
||||
queryKey: secretSnapshotKeys.count({ workspaceId, environment, directory: secretPath })
|
||||
});
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: commitKeys.count({ workspaceId, environment, directory: secretPath })
|
||||
queryKey: commitKeys.count({ projectId: workspaceId, environment, directory: secretPath })
|
||||
});
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: commitKeys.history({ workspaceId, environment, directory: secretPath })
|
||||
@@ -492,7 +492,7 @@ export const SecretListView = ({
|
||||
queryKey: secretSnapshotKeys.count({ workspaceId, environment, directory: secretPath })
|
||||
});
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: commitKeys.count({ workspaceId, environment, directory: secretPath })
|
||||
queryKey: commitKeys.count({ projectId: workspaceId, environment, directory: secretPath })
|
||||
});
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: commitKeys.history({ workspaceId, environment, directory: secretPath })
|
||||
|
||||
Reference in New Issue
Block a user