Skip to content

Commit ed29ed1

Browse files
Added warning message for integration projects
1 parent a8028c9 commit ed29ed1

File tree

5 files changed

+9
-2
lines changed

5 files changed

+9
-2
lines changed

src/components/projects/ProjectCard.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ export default function ProjectCard(props: ProjectCardProps) {
6565
<span className="text-sm text-gray-900 ">{props.project.time}</span>
6666
</>}
6767
</div>}
68+
{props.project.is_integration_project && <div className="absolute bottom-0 left-2/4 flex flex-row flex-nowrap gap-x-1 bg-gray-100 px-1 rounded-br rounded-bl" style={{ 'transform': 'translate(-50%' }}>
69+
<span className="text-sm text-red-500">This is an integration project, please do not delete it unless the integration is deleted</span>
70+
</div>}
6871
{(isAdmin && props.project.status !== ProjectStatus.INIT_SAMPLE_PROJECT) &&
6972
<div className="absolute top-0 left-0 cursor-pointer" onClick={adminOpenOrDeleteProjectFunc}>
7073
<Tooltip content={TOOLTIPS_DICT.PROJECTS.QUICK_DELETE} color="invert" offset={2} placement="right">

src/components/projects/projectId/settings/ProjectMetaData.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ export default function ProjectMetaData() {
8585
<div className="text-gray-900 text-lg leading-6 font-medium">Danger zone</div>
8686
<div className="text-sm leading-5 font-normal mt-2 text-gray-500 inline-block">This action can not be reversed.
8787
Are you sure you want to delete this project?</div>
88+
{!project.is_integration_project && <div className="text-sm text-red-500 italic">
89+
This is an integration project, please do not delete it unless the integration is deleted
90+
</div>}
8891
<div className="form-control">
8992
<div className="flex space-x-2 items-center">
9093
<input className="h-9 w-full text-sm border-gray-300 rounded-md placeholder-italic border text-gray-900 pl-4 placeholder:text-gray-400 focus:outline-none focus:ring-2 focus:ring-gray-300 focus:ring-offset-2 focus:ring-offset-gray-100"

src/types/components/projects/projects-list.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export type Project = {
1414
timeStamp: string;
1515
date: string;
1616
time: string
17+
is_integration_project: boolean;
1718
}
1819

1920
export enum ProjectStatus {

0 commit comments

Comments
 (0)