fix permissions
This commit is contained in:
@@ -27,6 +27,9 @@ import type { Issue, IssueComment, IssueTyp, CreateIssuePayload, UpdateIssuePayl
|
||||
const formatDate = (iso?: string) =>
|
||||
iso ? new Date(iso).toLocaleDateString('de-DE', { day: '2-digit', month: '2-digit', year: 'numeric', hour: '2-digit', minute: '2-digit' }) : '-';
|
||||
|
||||
const formatIssueId = (issue: Issue) =>
|
||||
`${new Date(issue.created_at).getFullYear()}/${issue.id}`;
|
||||
|
||||
const STATUS_COLORS: Record<Issue['status'], 'info' | 'warning' | 'success' | 'error'> = {
|
||||
offen: 'info',
|
||||
in_bearbeitung: 'warning',
|
||||
@@ -217,7 +220,7 @@ function IssueRow({
|
||||
sx={{ cursor: 'pointer', '& > *': { borderBottom: expanded ? 'unset' : undefined } }}
|
||||
onClick={() => setExpanded(!expanded)}
|
||||
>
|
||||
<TableCell sx={{ width: 50 }}>#{issue.id}</TableCell>
|
||||
<TableCell sx={{ width: 80 }}>{formatIssueId(issue)}</TableCell>
|
||||
<TableCell>
|
||||
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>
|
||||
{getTypIcon(issue.typ_icon, issue.typ_farbe)}
|
||||
@@ -341,7 +344,7 @@ function IssueRow({
|
||||
{/* Reopen Dialog */}
|
||||
<Dialog open={reopenOpen} onClose={() => setReopenOpen(false)} maxWidth="sm" fullWidth>
|
||||
<DialogTitle>Issue wiedereröffnen</DialogTitle>
|
||||
<DialogContent sx={{ display: 'flex', flexDirection: 'column', gap: 2, mt: 1 }}>
|
||||
<DialogContent sx={{ display: 'flex', flexDirection: 'column', gap: 2, pt: '20px !important' }}>
|
||||
<TextField
|
||||
label="Kommentar (Pflicht)"
|
||||
required
|
||||
@@ -685,7 +688,7 @@ function IssueTypeAdmin() {
|
||||
{/* Create Type Dialog */}
|
||||
<Dialog open={createOpen} onClose={() => setCreateOpen(false)} maxWidth="sm" fullWidth>
|
||||
<DialogTitle>Neue Kategorie erstellen</DialogTitle>
|
||||
<DialogContent sx={{ display: 'flex', flexDirection: 'column', gap: 2, mt: 1 }}>
|
||||
<DialogContent sx={{ display: 'flex', flexDirection: 'column', gap: 2, pt: '20px !important' }}>
|
||||
<TextField label="Name" required fullWidth value={createData.name || ''} onChange={(e) => setCreateData({ ...createData, name: e.target.value })} autoFocus />
|
||||
<FormControl fullWidth>
|
||||
<InputLabel>Übergeordnete Kategorie</InputLabel>
|
||||
@@ -876,7 +879,7 @@ export default function Issues() {
|
||||
{/* Create Issue Dialog */}
|
||||
<Dialog open={createOpen} onClose={() => setCreateOpen(false)} maxWidth="sm" fullWidth>
|
||||
<DialogTitle>Neues Issue erstellen</DialogTitle>
|
||||
<DialogContent sx={{ display: 'flex', flexDirection: 'column', gap: 2, mt: 1 }}>
|
||||
<DialogContent sx={{ display: 'flex', flexDirection: 'column', gap: 2, pt: '20px !important' }}>
|
||||
<TextField
|
||||
label="Titel"
|
||||
required
|
||||
@@ -931,7 +934,7 @@ export default function Issues() {
|
||||
</Dialog>
|
||||
|
||||
{/* FAB */}
|
||||
{canCreate && (
|
||||
{canCreate && activeTab === 'mine' && (
|
||||
<ChatAwareFab
|
||||
color="primary"
|
||||
aria-label="Neues Issue"
|
||||
|
||||
Reference in New Issue
Block a user