new features

This commit is contained in:
Ivan Rezchikov
2026-05-04 11:14:30 +03:00
parent 77d429c8ba
commit 5752d5b2b4
32 changed files with 1530 additions and 217 deletions
+75 -1
View File
@@ -36,6 +36,7 @@ export interface Consent {
export interface Permission {
id: string;
code: string;
name: string;
description: string;
created_at: string;
}
@@ -47,8 +48,81 @@ export interface Position {
permissions: Permission[];
}
export interface AdminUser {
id: string;
email: string;
first_name: string;
second_name: string;
is_admin: boolean;
positions: Position[];
}
export const localeMap = {
ru,
en: enUS,
it,
};
};
export interface Region {
id: string;
code: string;
name: string;
}
type FieldType = "text" | "date" | "select" | "masked"
export interface FieldOption {
value: string;
label: { en: string; ru: string };
}
export interface FieldTemplate {
id: string;
name: { en: string; ru: string };
type: FieldType;
required?: boolean;
mask?: string;
options?: FieldOption[];
generated?: boolean;
}
export interface DocumentType {
id: string;
code: string;
color: string;
fields: FieldTemplate[];
}
export type DocumentApplicationStatus = "pending" | "approved" | "rejected"
export interface DocumentApplication {
id: string;
userId: string;
documentTypeId: string;
documentType: DocumentType;
status: DocumentApplicationStatus;
reviewedBy?: string;
reviewedAt?: string;
rejectReason?: string;
data: Record<string, string>;
createdAt: string;
updatedAt: string;
}
export type DocumentStatus = "active" | "revoked"
export interface Document {
id: string;
userId: string;
documentTypeId: string;
documentType: DocumentType;
applicationId: string;
number: string;
issuedAt: string;
revokedAt?: string | null;
revokedBy?: string | null;
photo_url?: string | null;
data: Record<string, string>;
createdAt: string;
updatedAt: string;
}