@micha.bigler/ui-core-micha 1.4.19 → 1.4.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -72,7 +72,7 @@ const SupportRecoveryRequestsTab = () => {
72
72
  }
73
73
  return (_jsxs(Box, { children: [_jsx(Typography, { variant: "h6", gutterBottom: true, children: t('Support.RECOVERY_REQUESTS_TITLE', 'Account recovery requests') }), _jsx(Typography, { variant: "body2", sx: { mb: 2 }, children: t('Support.RECOVERY_REQUESTS_DESCRIPTION', 'Users who cannot complete MFA can request support. You can review their request and approve or reject it.') }), errorKey && (_jsx(Alert, { severity: "error", sx: { mb: 2 }, children: t(errorKey) })), _jsxs(Stack, { direction: "row", spacing: 2, sx: { mb: 2 }, children: [_jsx(Button, { variant: statusFilter === 'pending' ? 'contained' : 'outlined', size: "small", onClick: () => setStatusFilter('pending'), children: t('Support.RECOVERY_FILTER_PENDING', 'Open') }), _jsx(Button, { variant: statusFilter === 'approved' ? 'contained' : 'outlined', size: "small", onClick: () => setStatusFilter('approved'), children: t('Support.RECOVERY_FILTER_APPROVED', 'Approved') }), _jsx(Button, { variant: statusFilter === 'rejected' ? 'contained' : 'outlined', size: "small", onClick: () => setStatusFilter('rejected'), children: t('Support.RECOVERY_FILTER_REJECTED', 'Rejected') })] }), requests.length === 0 ? (_jsx(Typography, { variant: "body2", children: t('Support.RECOVERY_REQUESTS_EMPTY', 'No recovery requests for this filter.') })) : (_jsx(TableContainer, { component: Paper, children: _jsxs(Table, { size: "small", children: [_jsx(TableHead, { children: _jsxs(TableRow, { children: [_jsx(TableCell, { children: t('Support.RECOVERY_COL_CREATED', 'Created') }), _jsx(TableCell, { children: t('Support.RECOVERY_USER', 'User') }), _jsx(TableCell, { children: t('Support.RECOVERY_COL_STATUS', 'Status') }), _jsx(TableCell, { children: t('Support.RECOVERY_COL_ACTIONS', 'Actions') })] }) }), _jsx(TableBody, { children: requests.map((req) => (_jsxs(TableRow, { children: [_jsx(TableCell, { children: req.created_at
74
74
  ? new Date(req.created_at).toLocaleString()
75
- : '-' }), _jsx(TableCell, { children: req.user_email || req.user }), _jsx(TableCell, { children: req.status }), _jsx(TableCell, { children: _jsx(Button, { variant: "contained", size: "small", onClick: () => openDialog(req), disabled: req.status !== 'pending', children: t('Support.RECOVERY_ACTION_REVIEW', 'Review') }) })] }, req.id))) })] }) })), _jsxs(Dialog, { open: dialogOpen, onClose: closeDialog, fullWidth: true, maxWidth: "sm", children: [_jsx(DialogTitle, { children: t('Support.RECOVERY_REVIEW_DIALOG_TITLE', 'Review recovery request') }), _jsxs(DialogContent, { dividers: true, children: [selectedRequest && (_jsxs(Box, { sx: { mb: 2 }, children: [_jsxs(Typography, { variant: "body2", sx: { mb: 1 }, children: [_jsxs("strong", { children: [t('Support.RECOVERY_USER', 'User'), ":"] }), ' ', selectedRequest.user_email || selectedRequest.user] }), _jsxs(Typography, { variant: "body2", sx: { mb: 1 }, children: [_jsxs("strong", { children: [t('Support.RECOVERY_REVIEW_CREATED', 'Requested at'), ":"] }), ' ', selectedRequest.created_at
75
+ : '-' }), _jsx(TableCell, { children: req.user_email || req.user }), _jsx(TableCell, { children: t(`Support.RECOVERY_STATUS_${req.status}`, req.status) }), _jsx(TableCell, { children: _jsx(Button, { variant: "contained", size: "small", onClick: () => openDialog(req), disabled: req.status !== 'pending', children: t('Support.RECOVERY_ACTION_REVIEW', 'Review') }) })] }, req.id))) })] }) })), _jsxs(Dialog, { open: dialogOpen, onClose: closeDialog, fullWidth: true, maxWidth: "sm", children: [_jsx(DialogTitle, { children: t('Support.RECOVERY_REVIEW_DIALOG_TITLE', 'Review recovery request') }), _jsxs(DialogContent, { dividers: true, children: [selectedRequest && (_jsxs(Box, { sx: { mb: 2 }, children: [_jsxs(Typography, { variant: "body2", sx: { mb: 1 }, children: [_jsxs("strong", { children: [t('Support.RECOVERY_USER', 'User'), ":"] }), ' ', selectedRequest.user_email || selectedRequest.user] }), _jsxs(Typography, { variant: "body2", sx: { mb: 1 }, children: [_jsxs("strong", { children: [t('Support.RECOVERY_REVIEW_CREATED', 'Requested at'), ":"] }), ' ', selectedRequest.created_at
76
76
  ? new Date(selectedRequest.created_at).toLocaleString()
77
77
  : '-'] }), _jsx(Typography, { variant: "body2", sx: { mb: 1 }, children: _jsxs("strong", { children: [t('Support.RECOVERY_REVIEW_MESSAGE', 'User’s explanation'), ":"] }) }), _jsx(Box, { sx: {
78
78
  border: 1,
@@ -931,4 +931,29 @@ export const authTranslations = {
931
931
  "fr": "Si un compte existe avec cette adresse e-mail, votre demande a été transmise au support.",
932
932
  "en": "If an account with this email exists, your request has been forwarded to support."
933
933
  },
934
+ "Support.RECOVERY_STATUS_pending": {
935
+ "de": "Offen",
936
+ "fr": "En attente",
937
+ "en": "Pending"
938
+ },
939
+ "Support.RECOVERY_STATUS_approved": {
940
+ "de": "Genehmigt",
941
+ "fr": "Approuvée",
942
+ "en": "Approved"
943
+ },
944
+ "Support.RECOVERY_STATUS_rejected": {
945
+ "de": "Abgelehnt",
946
+ "fr": "Refusée",
947
+ "en": "Rejected"
948
+ },
949
+ "Support.RECOVERY_STATUS_completed": {
950
+ "de": "Abgeschlossen",
951
+ "fr": "Terminée",
952
+ "en": "Completed"
953
+ },
954
+ "Support.RECOVERY_STATUS_expired": {
955
+ "de": "Abgelaufen",
956
+ "fr": "Expirée",
957
+ "en": "Expired"
958
+ }
934
959
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micha.bigler/ui-core-micha",
3
- "version": "1.4.19",
3
+ "version": "1.4.20",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "private": false,
@@ -175,7 +175,9 @@ const SupportRecoveryRequestsTab = () => {
175
175
  : '-'}
176
176
  </TableCell>
177
177
  <TableCell>{req.user_email || req.user}</TableCell>
178
- <TableCell>{req.status}</TableCell>
178
+ <TableCell>
179
+ {t(`Support.RECOVERY_STATUS_${req.status}`, req.status)}
180
+ </TableCell>
179
181
  <TableCell>
180
182
  <Button
181
183
  variant="contained"
@@ -978,4 +978,29 @@ export const authTranslations = {
978
978
  "fr": "Si un compte existe avec cette adresse e-mail, votre demande a été transmise au support.",
979
979
  "en": "If an account with this email exists, your request has been forwarded to support."
980
980
  },
981
+ "Support.RECOVERY_STATUS_pending": {
982
+ "de": "Offen",
983
+ "fr": "En attente",
984
+ "en": "Pending"
985
+ },
986
+ "Support.RECOVERY_STATUS_approved": {
987
+ "de": "Genehmigt",
988
+ "fr": "Approuvée",
989
+ "en": "Approved"
990
+ },
991
+ "Support.RECOVERY_STATUS_rejected": {
992
+ "de": "Abgelehnt",
993
+ "fr": "Refusée",
994
+ "en": "Rejected"
995
+ },
996
+ "Support.RECOVERY_STATUS_completed": {
997
+ "de": "Abgeschlossen",
998
+ "fr": "Terminée",
999
+ "en": "Completed"
1000
+ },
1001
+ "Support.RECOVERY_STATUS_expired": {
1002
+ "de": "Abgelaufen",
1003
+ "fr": "Expirée",
1004
+ "en": "Expired"
1005
+ }
981
1006
  };