Skip to content

Commit

Permalink
feat: #8489 main admin dev portal (#8873)
Browse files Browse the repository at this point in the history
* feat: #8489 set member as main contact

* feat: #8489 adds main admin update to dev portal
  • Loading branch information
willmcvay authored Apr 12, 2023
1 parent c3f267c commit 1dc9ee4
Show file tree
Hide file tree
Showing 5 changed files with 158 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Object {
class="ec47sgk-el-mb11 ejadz4k-el-table"
data-has-call-to-action="false"
data-has-expandable-action="true"
data-num-columns-excl-action-col="4"
data-num-columns-excl-action-col="5"
>
<div
class="e1ijk5il-el-table-headers-row"
Expand All @@ -57,6 +57,11 @@ Object {
>
Role
</div>
<div
class="e1co3p83-el-table-header"
>
Main Contact
</div>
<div
class="e1co3p83-el-table-header"
>
Expand Down Expand Up @@ -128,6 +133,20 @@ Object {
Admin
</div>
</div>
<div
class="e4zpaja-el-table-cell"
>
<div
class="e1t8i3z1-el-table-cell-content"
data-narrow-label="Main Contact"
>
<span
class="e1vxext9-el-intent-danger ej9yrfo-el-icon"
>
<svg />
</span>
</div>
</div>
<div
class="e1fmntjl-el-table-expandable-row-trigger-cell"
>
Expand Down Expand Up @@ -175,6 +194,14 @@ Object {
class="e1q1vabn-el-button-loader"
/>
</button>
<button
class="epibvz0-el-intent-secondary e1tqqdf9-el-button"
>
Set As Main Contact
<div
class="e1q1vabn-el-button-loader"
/>
</button>
<button
class="e1vxext9-el-intent-danger e1tqqdf9-el-button"
>
Expand Down Expand Up @@ -255,7 +282,7 @@ Object {
class="ec47sgk-el-mb11 ejadz4k-el-table"
data-has-call-to-action="false"
data-has-expandable-action="true"
data-num-columns-excl-action-col="4"
data-num-columns-excl-action-col="5"
>
<div
class="e1ijk5il-el-table-headers-row"
Expand All @@ -280,6 +307,11 @@ Object {
>
Role
</div>
<div
class="e1co3p83-el-table-header"
>
Main Contact
</div>
<div
class="e1co3p83-el-table-header"
>
Expand Down Expand Up @@ -351,6 +383,20 @@ Object {
Admin
</div>
</div>
<div
class="e4zpaja-el-table-cell"
>
<div
class="e1t8i3z1-el-table-cell-content"
data-narrow-label="Main Contact"
>
<span
class="e1vxext9-el-intent-danger ej9yrfo-el-icon"
>
<svg />
</span>
</div>
</div>
<div
class="e1fmntjl-el-table-expandable-row-trigger-cell"
>
Expand Down Expand Up @@ -398,6 +444,14 @@ Object {
class="e1q1vabn-el-button-loader"
/>
</button>
<button
class="epibvz0-el-intent-secondary e1tqqdf9-el-button"
>
Set As Main Contact
<div
class="e1q1vabn-el-button-loader"
/>
</button>
<button
class="e1vxext9-el-intent-danger e1tqqdf9-el-button"
>
Expand Down Expand Up @@ -556,7 +610,7 @@ Object {
class="ec47sgk-el-mb11 ejadz4k-el-table"
data-has-call-to-action="false"
data-has-expandable-action="true"
data-num-columns-excl-action-col="4"
data-num-columns-excl-action-col="5"
>
<div
class="e1ijk5il-el-table-headers-row"
Expand All @@ -581,6 +635,11 @@ Object {
>
Role
</div>
<div
class="e1co3p83-el-table-header"
>
Main Contact
</div>
<div
class="e1co3p83-el-table-header"
>
Expand Down Expand Up @@ -652,6 +711,20 @@ Object {
Admin
</div>
</div>
<div
class="e4zpaja-el-table-cell"
>
<div
class="e1t8i3z1-el-table-cell-content"
data-narrow-label="Main Contact"
>
<span
class="e1vxext9-el-intent-danger ej9yrfo-el-icon"
>
<svg />
</span>
</div>
</div>
<div
class="e1fmntjl-el-table-expandable-row-trigger-cell"
>
Expand Down Expand Up @@ -699,6 +772,14 @@ Object {
class="e1q1vabn-el-button-loader"
/>
</button>
<button
class="epibvz0-el-intent-secondary e1tqqdf9-el-button"
>
Set As Main Contact
<div
class="e1q1vabn-el-button-loader"
/>
</button>
<button
class="e1vxext9-el-intent-danger e1tqqdf9-el-button"
>
Expand Down Expand Up @@ -795,7 +876,7 @@ Object {
class="ec47sgk-el-mb11 ejadz4k-el-table"
data-has-call-to-action="false"
data-has-expandable-action="true"
data-num-columns-excl-action-col="4"
data-num-columns-excl-action-col="5"
>
<div
class="e1ijk5il-el-table-headers-row"
Expand All @@ -820,6 +901,11 @@ Object {
>
Role
</div>
<div
class="e1co3p83-el-table-header"
>
Main Contact
</div>
<div
class="e1co3p83-el-table-header"
>
Expand Down Expand Up @@ -891,6 +977,20 @@ Object {
Admin
</div>
</div>
<div
class="e4zpaja-el-table-cell"
>
<div
class="e1t8i3z1-el-table-cell-content"
data-narrow-label="Main Contact"
>
<span
class="e1vxext9-el-intent-danger ej9yrfo-el-icon"
>
<svg />
</span>
</div>
</div>
<div
class="e1fmntjl-el-table-expandable-row-trigger-cell"
>
Expand Down Expand Up @@ -938,6 +1038,14 @@ Object {
class="e1q1vabn-el-button-loader"
/>
</button>
<button
class="epibvz0-el-intent-secondary e1tqqdf9-el-button"
>
Set As Main Contact
<div
class="e1q1vabn-el-button-loader"
/>
</button>
<button
class="e1vxext9-el-intent-danger e1tqqdf9-el-button"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ Object {
class="e1q1vabn-el-button-loader"
/>
</button>
<button
class="epibvz0-el-intent-secondary e1tqqdf9-el-button"
>
Set As Main Contact
<div
class="e1q1vabn-el-button-loader"
/>
</button>
<button
class="e1vxext9-el-intent-danger e1tqqdf9-el-button"
>
Expand Down Expand Up @@ -86,6 +94,14 @@ Object {
class="e1q1vabn-el-button-loader"
/>
</button>
<button
class="epibvz0-el-intent-secondary e1tqqdf9-el-button"
>
Set As Main Contact
<div
class="e1q1vabn-el-button-loader"
/>
</button>
<button
class="e1vxext9-el-intent-danger e1tqqdf9-el-button"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
ButtonGroup,
elMb11,
FlexContainer,
Icon,
Loader,
Pagination,
StatusIndicator,
Expand Down Expand Up @@ -125,6 +126,18 @@ export const SettingsMembersPage: FC = () => {
showLabel: true,
},
},
{
label: 'Main Contact',
value: (
<Icon
icon={member.isMainContact ? 'checkSystem' : 'closeSystem'}
intent={member.isMainContact ? 'success' : 'danger'}
/>
),
narrowTable: {
showLabel: true,
},
},
],
expandableContent: {
content: <MemberUpdateControls member={member} refreshMembers={refreshMembers} />,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,19 @@ export const MemberUpdateControls: FC<MemberUpdateControlsProps> = ({ member, re
Disable
</Button>
)}
{!member.isMainContact && (
<Button
intent="secondary"
disabled={isLoading}
loading={isLoading}
onClick={handleUpdateMember(updateMember, {
...member,
isMainContact: true,
})}
>
Set As Main Contact
</Button>
)}
<Button intent="danger" disabled={isDisabled} loading={isLoading} onClick={handleDeleteMember(deleteMember)}>
Delete
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2139,4 +2139,8 @@ export interface UpdateMemberModel {
* The status of the member (active/inactive/pending/rejected)
*/
status?: string
/**
* A flag to determine if the member is the main contact
*/
isMainContact?: boolean
}

0 comments on commit 1dc9ee4

Please sign in to comment.