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