144a8a4685
LST-69 (3.2) front. Client portal UI on the phase-1 backend. - New frontend/modules/client-portal/ layer: /portal (project cards from the client's allowedProjects via /me), /portal/projects/[id] (tickets list, detail modal, create modal with document upload), client-tickets service + DTO, CT-XXX formatting. - Front tenancy: auth.global.ts redirects a pure ROLE_CLIENT to /portal and blocks internal routes; portal pages open to any authenticated user. - Admin: UserDrawer manages client accounts (ROLE_CLIENT + client + allowedProjects); new "Tickets client" admin tab (list, filters, status change with required comment on reject, detail modal). - Kanban/my-tasks: client-ticket icon + tooltip when task.clientTicket is set (data via task:read, no extra call). TaskDocument upload generalized with a clientTicketId prop. getContent uses native fetch (text response). - i18n portal/clientTicket keys; sidebar /portal item (module client-portal). nuxt build passes; /portal routes present, existing routes intact.
71 lines
2.0 KiB
TypeScript
71 lines
2.0 KiB
TypeScript
import type { TaskStatus } from './task-status'
|
|
import type { TaskEffort } from './task-effort'
|
|
import type { TaskPriority } from './task-priority'
|
|
import type { TaskTag } from './task-tag'
|
|
import type { TaskGroup } from './task-group'
|
|
import type { UserData } from '~/services/dto/user-data'
|
|
import type { Project } from './project'
|
|
import type { TaskDocument } from './task-document'
|
|
|
|
export type Task = {
|
|
id: number
|
|
'@id'?: string
|
|
number: number
|
|
title: string
|
|
description: string | null
|
|
status: TaskStatus | null
|
|
effort: TaskEffort | null
|
|
priority: TaskPriority | null
|
|
assignee: UserData | null
|
|
collaborators: UserData[]
|
|
group: TaskGroup | null
|
|
project: Project | null
|
|
tags: TaskTag[]
|
|
documents: TaskDocument[]
|
|
archived: boolean
|
|
scheduledStart: string | null
|
|
scheduledEnd: string | null
|
|
deadline: string | null
|
|
syncToCalendar: boolean
|
|
calendarSyncError: string | null
|
|
clientTicket: {
|
|
id: number
|
|
'@id'?: string
|
|
number: number
|
|
type: 'bug' | 'improvement' | 'other'
|
|
status: 'new' | 'in_progress' | 'done' | 'rejected'
|
|
title: string
|
|
} | null
|
|
recurrence: {
|
|
id: number
|
|
'@id'?: string
|
|
type: 'daily' | 'weekly' | 'monthly' | 'yearly'
|
|
interval: number
|
|
daysOfWeek: string[] | null
|
|
dayOfMonth: number | null
|
|
weekOfMonth: number | null
|
|
endDate: string | null
|
|
maxOccurrences: number | null
|
|
occurrenceCount: number
|
|
} | null
|
|
}
|
|
|
|
export type TaskWrite = {
|
|
title: string
|
|
description: string | null
|
|
status: string | null
|
|
effort: string | null
|
|
priority: string | null
|
|
assignee: string | null
|
|
collaborators?: string[]
|
|
group: string | null
|
|
project: string
|
|
tags: string[]
|
|
archived?: boolean
|
|
scheduledStart?: string | null
|
|
scheduledEnd?: string | null
|
|
deadline?: string | null
|
|
syncToCalendar?: boolean
|
|
recurrence?: string | null
|
|
}
|