Skip to content

Commit

Permalink
Revert "Remove surveyor from assignment button (#644)"
Browse files Browse the repository at this point in the history
This reverts commit b1d167a.
  • Loading branch information
Andrewy-gh authored Nov 11, 2024
1 parent b1d167a commit 0ab9719
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
1 change: 1 addition & 0 deletions backend/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ GEM
rubocop (>= 1.52.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
ruby_http_client (3.5.5)
sendgrid-actionmailer (3.2.0)
mail (~> 2.7)
Expand Down
23 changes: 10 additions & 13 deletions frontend/front/src/pages/Admin/assignment/AssignTable.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box, Button, Chip, MenuItem, Stack } from "@mui/material";
import { Box, Button, MenuItem, Stack } from "@mui/material";
import React, { useMemo, useState } from "react";
import {
useAddAssignmentsToSurveyorMutation,
Expand Down Expand Up @@ -135,24 +135,21 @@ const AssignTable = () => {
maxWidth="100%"
justifyContent="flex-start"
overflow="scroll"
sx={{ overflowY: "auto", overflowX: "auto", pl: 2 }}
sx={{ overflowY: "auto", overflowX: "auto" }}
flexWrap="wrap"
>
{params.row.surveyorData.map((surveyor) => {
return (
<Chip
<Button
key={`surveyor-${surveyor.id}`}
label={`${surveyor.firstname} ${surveyor.lastname}`}
color="primary"
variant="outlined"
onClick={() => handleUserLink(surveyor)}
onDelete={() =>
removeAssignmentsFromSurveyor({
surveyorId: surveyor.id,
assignmentIds: [params.row.id],
})
}
/>
sx={{
textAlign: "left",
minWidth: "max-content",
}}
>
{`${surveyor.firstname} ${surveyor.lastname}`}
</Button>
);
})}
</Stack>
Expand Down

0 comments on commit 0ab9719

Please sign in to comment.