Skip to content

Commit

Permalink
Fix/project page (#514)
Browse files Browse the repository at this point in the history
  • Loading branch information
idamand authored Jul 30, 2024
1 parent e263636 commit cc76acb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
17 changes: 12 additions & 5 deletions frontend/src/app/[organisation]/prosjekt/[project]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ export default async function Project({
}${weekSpan ? `${selectedWeek ? "&" : "?"}WeekSpan=${weekSpan}` : ""}`,
)) ?? [];

const isInternalProject = project?.customerName === "Variant";

if (project) {
return (
<ConsultantFilterProvider
Expand All @@ -50,11 +52,16 @@ export default async function Project({
<Sidebar project={project} />
<div className="main p-4 pt-5 w-full flex flex-col gap-8">
<div className="flex flex-col gap-2">
<EditEngagementName
engagementName={project.projectName}
engagementId={project.projectId}
organisationName={params.organisation}
/>
{isInternalProject ? (
<h1>{project.projectName}</h1>
) : (
<EditEngagementName
engagementName={project.projectName}
engagementId={project.projectId}
organisationName={params.organisation}
/>
)}

<h2>{project.customerName}</h2>
</div>

Expand Down
6 changes: 4 additions & 2 deletions frontend/src/components/EditEngagementName.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,10 @@ export default function EditEngagementName({
setNewEngagementName(e.target.value);
setInputIsInvalid(false);
}}
className={`h1 w-full px-2 ${
inputIsInvalid ? " text-error focus:outline-error" : ""
className={`h1 w-full px-2 rounded ${
inputIsInvalid
? " text-error focus:outline-error focus:outline focus:outline-2"
: ""
}`}
autoFocus
onBlur={() => {
Expand Down

0 comments on commit cc76acb

Please sign in to comment.