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

Separate establishment names in list view #92

Merged
merged 6 commits into from
May 13, 2019
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
8 changes: 8 additions & 0 deletions assets/sass/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,11 @@ td .govuk-button {
padding-left: 0;
}
}

.govuk-table {
.establishments p,
.inspector p,
.spoc p {
margin: 0;
}
}
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"homepage": "https://github.com/UKHomeOffice/asl-internal-ui#readme",
"dependencies": {
"@asl/components": "^3.14.0",
"@asl/pages": "^15.37.0",
"@asl/pages": "^15.38.0",
"@asl/projects": "^3.4.1",
"@asl/service": "^7.6.1",
"@babel/core": "^7.3.3",
Expand Down
2 changes: 1 addition & 1 deletion pages/asru-assignment/schema/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const schema = {

const mapSchema = (profiles, schema) => {
const options = profiles.map(({ firstName, lastName, id }) => ({
label: `${firstName} ${lastName}`,
label: `${lastName}, ${firstName}`,
value: id
}));

Expand Down
16 changes: 11 additions & 5 deletions pages/search/views/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@ const formatters = {
},
inspector: {
format: (inspector, establishment) => {
return establishment.asru.filter(p => p.asruInspector).map(({ firstName, lastName }) => (`${firstName} ${lastName}`));
return establishment.asru.filter(p => p.asruInspector).map(profile => (
<p key={profile.id}>{`${profile.firstName} ${profile.lastName}`}</p>
));
}
},
spoc: {
format: (spoc, establishment) => {
return establishment.asru.filter(p => p.asruLicensing).map(({ firstName, lastName }) => (`${firstName} ${lastName}`));
return establishment.asru.filter(p => p.asruLicensing).map(profile => (
<p key={profile.id}>{`${profile.firstName} ${profile.lastName}`}</p>
));
}
}
},
Expand All @@ -32,9 +36,11 @@ const formatters = {
if (profile.asruUser) {
return 'ASRU';
}
return establishments.map(establishment =>
<Link page="establishment.dashboard" establishmentId={establishment.id} label={establishment.name} key={establishment.id}/>
);
return establishments.map(establishment => (
<p key={establishment.id}>
<Link page="establishment.dashboard" establishmentId={establishment.id} label={establishment.name} />
</p>
));
}
}
},
Expand Down