Commit e4d9f6fd authored by peterhegman's avatar peterhegman

Refactor how fields are declared

Based on reviewer feedback
parent cdc562c7
......@@ -28,23 +28,22 @@ document.addEventListener('DOMContentLoaded', () => {
const SHARED_FIELDS = ['account', 'expires', 'maxRole', 'expiration', 'actions'];
initGroupMembersApp(document.querySelector('.js-group-members-list'), [
...SHARED_FIELDS,
'source',
'granted',
]);
initGroupMembersApp(document.querySelector('.js-group-linked-list'), [
...SHARED_FIELDS,
'granted',
]);
initGroupMembersApp(document.querySelector('.js-group-invited-members-list'), [
...SHARED_FIELDS,
'invited',
]);
initGroupMembersApp(document.querySelector('.js-group-access-requests-list'), [
...SHARED_FIELDS,
'requested',
]);
initGroupMembersApp(
document.querySelector('.js-group-members-list'),
SHARED_FIELDS.concat(['source', 'granted']),
);
initGroupMembersApp(
document.querySelector('.js-group-linked-list'),
SHARED_FIELDS.concat(['granted']),
);
initGroupMembersApp(
document.querySelector('.js-group-invited-members-list'),
SHARED_FIELDS.concat(['invited']),
);
initGroupMembersApp(
document.querySelector('.js-group-access-requests-list'),
SHARED_FIELDS.concat(['requested']),
);
new Members(); // eslint-disable-line no-new
new UsersSelect(); // eslint-disable-line no-new
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment