This commit is contained in:
che
2026-07-25 10:31:32 +05:00
parent 42029533fd
commit 860ba21dd0
15 changed files with 1362 additions and 230 deletions
+5
View File
@@ -8,6 +8,10 @@ import type {
ContractApplicationFileCreate,
ContractApplicationFileUpdate,
ContractApplicationFileListParams,
ContractCategory,
ContractCategoryCreate,
ContractCategoryUpdate,
ContractCategoryListParams,
Counterparty,
CounterpartyCreate,
CounterpartyUpdate,
@@ -40,6 +44,7 @@ import type {
export const contractApi = createModelApi<Contract, ContractCreate, ContractUpdate, ContractListParams>("contract");
export const contractApplicationFileApi = createModelApi<ContractApplicationFile, ContractApplicationFileCreate, ContractApplicationFileUpdate, ContractApplicationFileListParams>("contract_application_file");
export const contractCategoryApi = createModelApi<ContractCategory, ContractCategoryCreate, ContractCategoryUpdate, ContractCategoryListParams>("contract_category");
export const counterpartyApi = createModelApi<Counterparty, CounterpartyCreate, CounterpartyUpdate, CounterpartyListParams>("counterparty");
export const employeeApi = createModelApi<Employee, EmployeeCreate, EmployeeUpdate, EmployeeListParams>("employee");
export const frcApi = createModelApi<Frc, FrcCreate, FrcUpdate, FrcListParams>("frc");
+41
View File
@@ -7,6 +7,7 @@ export interface Contract {
absolute_url: string;
contract_type: string;
category: string;
category_id: number | null;
amount_total_display: string;
amount_by_ds: string;
comment: string;
@@ -30,6 +31,7 @@ export interface Contract {
project_id: number | null;
frc_id: number | null;
employee_id: number | null;
category_ref: ContractCategory | null;
counterparty: Counterparty | null;
project: Project | null;
frc: Frc | null;
@@ -42,6 +44,7 @@ export interface ContractCreate {
absolute_url: string;
contract_type: string;
category: string;
category_id?: number | null;
amount_total_display: string;
amount_by_ds: string;
comment: string;
@@ -73,6 +76,7 @@ export interface ContractUpdate {
absolute_url?: string;
contract_type?: string;
category?: string;
category_id?: number | null;
amount_total_display?: string;
amount_by_ds?: string;
comment?: string;
@@ -112,6 +116,7 @@ export interface ContractListParams extends ListParams {
contract_type__contains?: string;
category?: string;
category__contains?: string;
category_id?: number | null;
counterparty_name__contains?: string;
name_of_product__contains?: string;
counterparty_id?: number | null;
@@ -182,6 +187,42 @@ export interface ContractApplicationFileListParams extends ListParams {
status?: string;
}
export interface ContractCategory {
id: number;
name: string;
name_group: string;
template: string | null;
is_questionnair: boolean;
parent: number | null;
secure_group: number | null;
}
export interface ContractCategoryCreate {
name: string;
name_group: string;
template?: string | null;
is_questionnair: boolean;
parent?: number | null;
secure_group?: number | null;
}
export interface ContractCategoryUpdate {
name?: string;
name_group?: string;
template?: string | null;
is_questionnair?: boolean;
parent?: number | null;
secure_group?: number | null;
}
export interface ContractCategoryListParams extends ListParams {
id?: number;
name?: string;
name__contains?: string;
name_group?: string;
name_group__contains?: string;
}
export interface Counterparty {
id: number;
name: string;