mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-23 01:32:25 +02:00
Fix bugs
This commit is contained in:
parent
036c10e53d
commit
3aa493d15e
5 changed files with 32 additions and 7 deletions
|
@ -462,10 +462,7 @@ export class BaseTable {
|
|||
|
||||
let dataObjects = this.getDataObjects(data);
|
||||
let customTableOptions = this.customizeTable(data);
|
||||
|
||||
dataObjects.forEach(dataObject => {
|
||||
this.addRow(dataObject, tbody, customTableOptions);
|
||||
});
|
||||
this.loadRows(dataObjects, tbody, customTableOptions)
|
||||
|
||||
this.initShowMoreButtons();
|
||||
this.initCheckboxListeners();
|
||||
|
@ -492,6 +489,12 @@ 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,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;
|
||||
// member is based on either a UserPortfolioPermission or a PortfolioInvitation
|
||||
// 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 row = document.createElement('tr');
|
||||
if (isLastRow) {
|
||||
row.classList.add("hide-td-borders");
|
||||
}
|
||||
|
||||
let admin_tagHTML = ``;
|
||||
if (member.is_admin)
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
:root,
|
||||
html[data-theme="light"] {
|
||||
--primary: #{$theme-color-primary};
|
||||
--secondary: #{$theme-color-error};
|
||||
--secondary: #{$theme-color-primary-darkest};
|
||||
--accent: #{$theme-color-accent-cool};
|
||||
// --primary-fg: #fff;
|
||||
|
||||
|
|
|
@ -253,6 +253,10 @@ a.text-secondary:hover {
|
|||
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 {
|
||||
font-size: size('ui', 'xs');
|
||||
text-decoration: none;
|
||||
|
|
|
@ -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 {
|
||||
width: 100%;
|
||||
|
||||
|
@ -56,7 +64,7 @@ th {
|
|||
border: none;
|
||||
}
|
||||
|
||||
tr:not(.hide-td-borders):not(:last-of-type) {
|
||||
tr:not(.hide-td-borders) {
|
||||
td, th {
|
||||
border-bottom: 1px solid color('base-lighter');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue