mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-26 04:28:39 +02:00
Attempt to fix border-bottom
This commit is contained in:
parent
9b1d1d1530
commit
241b43e815
3 changed files with 8 additions and 26 deletions
|
@ -473,7 +473,9 @@ export class BaseTable {
|
|||
|
||||
let dataObjects = this.getDataObjects(data);
|
||||
let customTableOptions = this.customizeTable(data);
|
||||
this.loadRows(dataObjects, tbody, customTableOptions)
|
||||
dataObjects.forEach(dataObject => {
|
||||
this.addRow(dataObject, tbody, customTableOptions);
|
||||
});
|
||||
|
||||
this.initShowMoreButtons();
|
||||
this.initCheckboxListeners();
|
||||
|
@ -501,12 +503,6 @@ export class BaseTable {
|
|||
.catch(error => console.error('Error fetching objects:', error));
|
||||
}
|
||||
|
||||
loadRows(dataObjects, tbody, customTableOptions) {
|
||||
dataObjects.forEach(dataObject => {
|
||||
this.addRow(dataObject, tbody, customTableOptions);
|
||||
});
|
||||
}
|
||||
|
||||
// Add event listeners to table headers for sorting
|
||||
initializeTableHeaders() {
|
||||
this.tableHeaders.forEach(header => {
|
||||
|
|
|
@ -66,14 +66,7 @@ export class MembersTable extends BaseTable {
|
|||
};
|
||||
}
|
||||
|
||||
loadRows(dataObjects, tbody, customTableOptions) {
|
||||
dataObjects.forEach((dataObject, index) => {
|
||||
const isLastRow = index === dataObjects.length - 1;
|
||||
this.addRow(dataObject, tbody, customTableOptions, isLastRow);
|
||||
});
|
||||
}
|
||||
|
||||
addRow(dataObject, tbody, customTableOptions, isLastRow) {
|
||||
addRow(dataObject, tbody, customTableOptions) {
|
||||
const member = dataObject;
|
||||
// member is based on either a UserPortfolioPermission or a PortfolioInvitation
|
||||
// and also includes information from related domains; the 'id' of the org_member
|
||||
|
@ -88,10 +81,6 @@ export class MembersTable extends BaseTable {
|
|||
const kebabHTML = customTableOptions.hasAdditionalActions ? generateKebabHTML('remove-member', unique_id, cancelInvitationButton, `Expand for more options for ${member.name}`): '';
|
||||
|
||||
const row = document.createElement('tr');
|
||||
if (isLastRow) {
|
||||
row.classList.add("hide-td-borders");
|
||||
}
|
||||
|
||||
let admin_tagHTML = ``;
|
||||
if (member.is_admin)
|
||||
admin_tagHTML = `<span class="usa-tag margin-left-1 bg-primary-dark text-semibold">Admin</span>`
|
||||
|
|
|
@ -41,12 +41,9 @@ th {
|
|||
}
|
||||
}
|
||||
|
||||
.members__table-wrapper .dotgov-table {
|
||||
tr:not(.hide-td-borders):not(:last-of-type) {
|
||||
td, th {
|
||||
border-bottom: 1px solid color('base-lighter');
|
||||
}
|
||||
}
|
||||
.members__table-wrapper .dotgov-table tr:nth-last-child(2) td,
|
||||
.members__table-wrapper .dotgov-table tr:nth-last-child(2) th {
|
||||
border-bottom: none !important;
|
||||
}
|
||||
|
||||
.dotgov-table {
|
||||
|
@ -64,7 +61,7 @@ th {
|
|||
border: none;
|
||||
}
|
||||
|
||||
tr:not(.hide-td-borders) {
|
||||
tr:not(.hide-td-borders):not(:last-of-type) {
|
||||
td, th {
|
||||
border-bottom: 1px solid color('base-lighter');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue