Skip to content

Commit

Permalink
fix(credential request): ui improvements (#866)
Browse files Browse the repository at this point in the history
  • Loading branch information
nidhigarg-bmw authored Jun 6, 2024
1 parent 28767af commit 2b0d76b
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 31 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
- Company Application Registraion Detail Overlay
- UI improvements
- Add correct registration application checklist items
- Credential Request
- UI Improvements

### Feature

Expand Down
2 changes: 2 additions & 0 deletions src/assets/locales/de/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -1852,6 +1852,8 @@
"companyInfo": "Company Info",
"certificate": "Zertifikat",
"document": "Dokumente",
"status": "Status",
"action": "Aktion",
"type": {
"TRACEABILITY_FRAMEWORK": "Traceability",
"PCF_FRAMEWORK": "PCF Framework",
Expand Down
2 changes: 2 additions & 0 deletions src/assets/locales/en/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -1928,6 +1928,8 @@
"companyInfo": "Company Info",
"certificate": "Certificate",
"document": "Document",
"status": "Status",
"action": "Action",
"type": {
"TRACEABILITY_FRAMEWORK": "Traceability",
"PCF_FRAMEWORK": "PCF Framework",
Expand Down
6 changes: 6 additions & 0 deletions src/components/pages/AdminCredential/AdminCredential.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@
transform: translateX(-50%);
}

.recommended-main {
.MuiDataGrid-cell {
font-size: 14px;
}
}

.documenticon-main {
position: relative;
display: flex;
Expand Down
57 changes: 26 additions & 31 deletions src/components/pages/AdminCredential/AdminCredentialElements.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,28 @@ export default function AdminCredentialElements() {
</Button>
</div>
)
} else if (
UserService.hasRole(ROLES.REVOKE_CREDENTIALS_ISSUER) &&
row.participantStatus === StatusEnum.ACTIVE
) {
return (
<Tooltips
additionalStyles={{
cursor: 'pointer',
}}
tooltipPlacement="top-start"
tooltipText={t('content.adminCertificate.table.revoke')}
children={
<SettingsBackupRestoreIcon
className="revokeBtn"
onClick={() => {
setOpenRevokeOverlay(true)
setCredentialData(row)
}}
/>
}
/>
)
}
}

Expand Down Expand Up @@ -275,7 +297,7 @@ export default function AdminCredentialElements() {
},
{
field: 'credentialDetailId',
headerName: '',
headerName: t('content.adminCertificate.table.status'),
flex: 2,
renderCell: ({ row }: { row: CredentialData }) => (
<StatusTag
Expand All @@ -292,39 +314,11 @@ export default function AdminCredentialElements() {
},
{
field: 'approveDecline',
headerName: '',
flex: 2,
headerName: t('content.adminCertificate.table.action'),
flex: 2.5,
renderCell: ({ row }: { row: CredentialData }) =>
renderApproveDeclineBtn(row),
},
{
field: '',
headerName: '',
flex: 1,
renderCell: ({ row }: { row: CredentialData }) => (
<>
{UserService.hasRole(ROLES.REVOKE_CREDENTIALS_ISSUER) &&
row.participantStatus === StatusEnum.ACTIVE && (
<Tooltips
additionalStyles={{
cursor: 'pointer',
}}
tooltipPlacement="top-start"
tooltipText={t('content.adminCertificate.table.revoke')}
children={
<SettingsBackupRestoreIcon
className="revokeBtn"
onClick={() => {
setOpenRevokeOverlay(true)
setCredentialData(row)
}}
/>
}
/>
)}
</>
),
},
]

const handleRevokeConfirm = async (credentialId: string) => {
Expand Down Expand Up @@ -430,6 +424,7 @@ export default function AdminCredentialElements() {
onSortClick={(value) => {
setSortOption(value)
}}
disableColumnSelector={true}
/>
</div>
</>
Expand Down

0 comments on commit 2b0d76b

Please sign in to comment.