Skip to content

Commit

Permalink
fix bgColor and make team required
Browse files Browse the repository at this point in the history
  • Loading branch information
Mailn Nifeli Snieske committed Oct 30, 2024
1 parent 7ade01f commit 961d763
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/components/function-card-edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export function FunctionCardEdit({ functionId }: { functionId: number }) {
}

return (
<Flex flexDirection="column" paddingLeft="10px" p="2">
<Flex flexDirection="column" paddingLeft="10px" p="2" bgColor="white">
<Text fontSize="xs" fontWeight="700" mb="4px">
Funksjonsnavn*
</Text>
Expand All @@ -76,7 +76,7 @@ export function FunctionCardEdit({ functionId }: { functionId: number }) {
}}
/>
<Text fontSize="xs" fontWeight="700" mb="4px">
Ansvarlig team for denne funksjonen?
Ansvarlig team for denne funksjonen?*
</Text>
<Skeleton isLoaded={!!teams.data} fitContent>
<Select
Expand All @@ -87,7 +87,6 @@ export function FunctionCardEdit({ functionId }: { functionId: number }) {
borderRadius="5px"
defaultValue={currentTeam.data?.id}
>
<option value="no-team">Ingen team</option>
{teams.data?.map((team) => (
<option key={team.id} value={team.id}>
{team.displayName}
Expand All @@ -99,7 +98,7 @@ export function FunctionCardEdit({ functionId }: { functionId: number }) {
Svar på sikkerhetsspørsmål som er relevant for denne funksjonen
</Text>
<SchemaButton functionId={functionId} />
<Flex gap="12px" mt="32px">
<Flex gap="10px" mt="32px">
<Button
aria-label="decline"
variant="secondary"
Expand Down Expand Up @@ -129,6 +128,7 @@ export function FunctionCardEdit({ functionId }: { functionId: number }) {
leftIcon="delete"
size="sm"
colorScheme="blue"
ml="auto"
onClick={onOpen}
>
Slett funksjon
Expand Down
4 changes: 3 additions & 1 deletion src/components/function-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ export function FunctionCard({
style={{ borderRadius: "inherit" }}
>
<Flex
bgColor={selected ? "blue.50" : undefined}
bgColor={
selected && search.edit === undefined ? "blue.50" : undefined
}
display="flex"
borderRadius="inherit"
alignItems="center"
Expand Down
13 changes: 10 additions & 3 deletions src/components/function-column.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,13 @@ export function FunctionColumn({ functionId }: FunctionFolderProps) {
Funksjon nivå {currentLevel + 1}
</Text>
</Box>
<Box border="1px" p="20px" borderColor="gray.400" minH="100%">
<Box
border="1px"
p="20px"
borderColor="gray.400"
minH="100%"
backgroundColor="white"
>
<Skeleton isLoaded={!!children.data} minH={60}>
<List display="flex" flexDirection="column" gap={2} marginBottom="2">
{children.data?.map((child) => (
Expand Down Expand Up @@ -115,10 +121,10 @@ export function FunctionColumn({ functionId }: FunctionFolderProps) {
size="sm"
borderRadius="5px"
mb="20px"
autoFocus
autoFocus
/>
<Text fontSize="xs" fontWeight="700" mb="4px">
Ansvarlig team for denne funksjonen?
Ansvarlig team for denne funksjonen?*
</Text>
<Skeleton isLoaded={!!teams.data} fitContent>
<Select
Expand All @@ -128,6 +134,7 @@ export function FunctionColumn({ functionId }: FunctionFolderProps) {
mb="30px"
size="sm"
borderRadius="5px"
required
>
{teams.data?.map((team) => (
<option key={team.id} value={team.id}>
Expand Down

0 comments on commit 961d763

Please sign in to comment.