This commit is contained in:
zandercymatics 2025-01-15 12:05:58 -07:00
parent 036c10e53d
commit 3aa493d15e
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
5 changed files with 32 additions and 7 deletions

View file

@ -462,10 +462,7 @@ 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();
@ -492,6 +489,12 @@ 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 => {

View file

@ -66,7 +66,14 @@ export class MembersTable extends BaseTable {
}; };
} }
addRow(dataObject, tbody, customTableOptions) { 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 = false) {
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
@ -81,6 +88,9 @@ export class MembersTable extends BaseTable {
const kebabHTML = customTableOptions.needsAdditionalColumn ? generateKebabHTML('remove-member', unique_id, cancelInvitationButton, `for ${member.name}`): ''; const kebabHTML = customTableOptions.needsAdditionalColumn ? generateKebabHTML('remove-member', unique_id, cancelInvitationButton, `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)

View file

@ -8,7 +8,7 @@
:root, :root,
html[data-theme="light"] { html[data-theme="light"] {
--primary: #{$theme-color-primary}; --primary: #{$theme-color-primary};
--secondary: #{$theme-color-error}; --secondary: #{$theme-color-primary-darkest};
--accent: #{$theme-color-accent-cool}; --accent: #{$theme-color-accent-cool};
// --primary-fg: #fff; // --primary-fg: #fff;

View file

@ -253,6 +253,10 @@ a.text-secondary:hover {
color: $theme-color-error; color: $theme-color-error;
} }
button.usa-button.usa-button--secondary, a.usa-button.usa-button--secondary {
background-color: $theme-color-error;
}
.usa-button--show-more-button { .usa-button--show-more-button {
font-size: size('ui', 'xs'); font-size: size('ui', 'xs');
text-decoration: none; text-decoration: none;

View file

@ -41,6 +41,14 @@ th {
} }
} }
.members__table-wrapper .dotgov-table {
tr:not(.hide-td-borders):not(:last-of-type) {
td, th {
border-bottom: 1px solid color('base-lighter');
}
}
}
.dotgov-table { .dotgov-table {
width: 100%; width: 100%;
@ -56,7 +64,7 @@ th {
border: none; border: none;
} }
tr:not(.hide-td-borders):not(:last-of-type) { tr:not(.hide-td-borders) {
td, th { td, th {
border-bottom: 1px solid color('base-lighter'); border-bottom: 1px solid color('base-lighter');
} }