feat(directory) : add frontend DTOs for contacts, addresses, reports
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
export type Address = {
|
||||
id: number
|
||||
'@id'?: string
|
||||
label: string | null
|
||||
street: string | null
|
||||
streetComplement: string | null
|
||||
postalCode: string | null
|
||||
city: string | null
|
||||
country: string
|
||||
client?: string | null
|
||||
prospect?: string | null
|
||||
}
|
||||
|
||||
export type AddressWrite = {
|
||||
label: string | null
|
||||
street: string | null
|
||||
streetComplement: string | null
|
||||
postalCode: string | null
|
||||
city: string | null
|
||||
country: string
|
||||
client?: string | null
|
||||
prospect?: string | null
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
import type { ReportDocument } from './report-document'
|
||||
|
||||
export type ReportType = 'call' | 'meeting' | 'email' | 'note'
|
||||
|
||||
export type CommercialReport = {
|
||||
id: number
|
||||
'@id'?: string
|
||||
subject: string
|
||||
body: string | null
|
||||
occurredAt: string
|
||||
type: ReportType
|
||||
author?: { id: number, username: string } | null
|
||||
client?: string | null
|
||||
prospect?: string | null
|
||||
documents?: ReportDocument[]
|
||||
createdAt?: string
|
||||
updatedAt?: string
|
||||
}
|
||||
|
||||
export type CommercialReportWrite = {
|
||||
subject: string
|
||||
body: string | null
|
||||
occurredAt: string
|
||||
type: ReportType
|
||||
client?: string | null
|
||||
prospect?: string | null
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
export type Contact = {
|
||||
id: number
|
||||
'@id'?: string
|
||||
firstName: string | null
|
||||
lastName: string | null
|
||||
jobTitle: string | null
|
||||
email: string | null
|
||||
phonePrimary: string | null
|
||||
phoneSecondary: string | null
|
||||
client?: string | null
|
||||
prospect?: string | null
|
||||
}
|
||||
|
||||
export type ContactWrite = {
|
||||
firstName: string | null
|
||||
lastName: string | null
|
||||
jobTitle: string | null
|
||||
email: string | null
|
||||
phonePrimary: string | null
|
||||
phoneSecondary: string | null
|
||||
client?: string | null
|
||||
prospect?: string | null
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import type { UserData } from '~/services/dto/user-data'
|
||||
|
||||
export type ReportDocument = {
|
||||
'@id'?: string
|
||||
id: number
|
||||
commercialReport: string
|
||||
originalName: string
|
||||
fileName?: string | null
|
||||
mimeType: string
|
||||
size: number
|
||||
createdAt: string
|
||||
uploadedBy?: UserData | null
|
||||
}
|
||||
Reference in New Issue
Block a user