Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/project page #514

Merged
merged 2 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading