Compare commits
32 Commits
dev
...
migration/
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
36d86e6c62 | ||
|
|
653b154f2a | ||
|
|
2029397158 | ||
|
|
681bd8a38e | ||
|
|
8d7cac66b5 | ||
|
|
c6471798ab | ||
|
|
870a9b5d75 | ||
|
|
99d7af4ac6 | ||
|
|
d5b5dbba12 | ||
|
|
bfabdbac39 | ||
|
|
b9fced4d70 | ||
|
|
ae6f0a8a68 | ||
|
|
6c3cc2a96b | ||
|
|
40932ae489 | ||
|
|
0e337a498a | ||
|
|
28d99c15b4 | ||
|
|
3269a499db | ||
|
|
b4c5152df3 | ||
|
|
3f34e6707a | ||
|
|
311b4cb953 | ||
|
|
13e46b1b64 | ||
|
|
0529ae7487 | ||
|
|
be53b42aa0 | ||
|
|
2e74b1a23c | ||
|
|
622f4e75ed | ||
|
|
9f7776243f | ||
|
|
79b8c491e9 | ||
|
|
971684d97e | ||
|
|
e20e8457e7 | ||
|
|
501c818119 | ||
|
|
86bdfe961e | ||
|
|
e0be27a5b9 |
@ -7,7 +7,7 @@ export const rows: FormTabRows = [
|
|||||||
[['selectProduct'], { gridTemplateColumns: '1fr' }],
|
[['selectProduct'], { gridTemplateColumns: '1fr' }],
|
||||||
[['tbxLeaseObjectPrice', 'tbxVATInLeaseObjectPrice', 'tbxLeaseObjectPriceWthtVAT']],
|
[['tbxLeaseObjectPrice', 'tbxVATInLeaseObjectPrice', 'tbxLeaseObjectPriceWthtVAT']],
|
||||||
[['selectSupplierCurrency', 'tbxSupplierDiscountRub', 'tbxSupplierDiscountPerc']],
|
[['selectSupplierCurrency', 'tbxSupplierDiscountRub', 'tbxSupplierDiscountPerc']],
|
||||||
[['tbxFirstPaymentPerc', 'tbxFirstPaymentRub', 'cbxSupplierFinancing']],
|
[['tbxFirstPaymentPerc', 'tbxFirstPaymentRub']],
|
||||||
[['tbxLeasingPeriod', 'tbxSaleBonus']],
|
[['tbxLeasingPeriod', 'tbxSaleBonus']],
|
||||||
[['selectSubsidy', 'tbxSubsidySum'], { gridTemplateColumns: '2fr 1fr' }],
|
[['selectSubsidy', 'tbxSubsidySum'], { gridTemplateColumns: '2fr 1fr' }],
|
||||||
[['selectImportProgram', 'tbxImportProgramSum', 'tbxAddEquipmentPrice']],
|
[['selectImportProgram', 'tbxImportProgramSum', 'tbxAddEquipmentPrice']],
|
||||||
|
|||||||
@ -9,4 +9,5 @@ export const rows: FormTabRows = [
|
|||||||
[['tbxMinPriceChange', 'tbxMaxPriceChange']],
|
[['tbxMinPriceChange', 'tbxMaxPriceChange']],
|
||||||
[['tbxImporterRewardPerc', 'tbxImporterRewardRub']],
|
[['tbxImporterRewardPerc', 'tbxImporterRewardRub']],
|
||||||
[['tbxBonusCoefficient', 'tbxComissionRub', 'tbxComissionPerc']],
|
[['tbxBonusCoefficient', 'tbxComissionRub', 'tbxComissionPerc']],
|
||||||
|
[['cbxSupplierFinancing']],
|
||||||
];
|
];
|
||||||
|
|||||||
@ -21,7 +21,7 @@ export const RequestCreateKPSchema = z.object({
|
|||||||
),
|
),
|
||||||
domainName: z.string(),
|
domainName: z.string(),
|
||||||
finGAP: RiskSchema.array(),
|
finGAP: RiskSchema.array(),
|
||||||
insurance: RowSchema.array(),
|
insurance: RowSchema.extend({ key: z.string() }).array(),
|
||||||
});
|
});
|
||||||
|
|
||||||
export type RequestCreateKP = z.infer<typeof RequestCreateKPSchema>;
|
export type RequestCreateKP = z.infer<typeof RequestCreateKPSchema>;
|
||||||
|
|||||||
@ -193,6 +193,10 @@ export const radioCalcType = [
|
|||||||
label: 'Суммы',
|
label: 'Суммы',
|
||||||
value: 100_000_001,
|
value: 100_000_001,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: 'PI',
|
||||||
|
value: 100_000_099,
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
export const selectRequirementTelematic = [
|
export const selectRequirementTelematic = [
|
||||||
|
|||||||
@ -111,7 +111,7 @@ const defaultValues: CalculationValues = {
|
|||||||
quoteUrl: null,
|
quoteUrl: null,
|
||||||
rate: null,
|
rate: null,
|
||||||
recalcWithRevision: false,
|
recalcWithRevision: false,
|
||||||
redemptionPaymentSum: 0,
|
redemptionPaymentSum: null,
|
||||||
regionRegistration: null,
|
regionRegistration: null,
|
||||||
registration: null,
|
registration: null,
|
||||||
registrationDescription: '-',
|
registrationDescription: '-',
|
||||||
|
|||||||
@ -98,7 +98,7 @@ const ValuesSchema = z.object({
|
|||||||
quoteRedemptionGraph: z.boolean(),
|
quoteRedemptionGraph: z.boolean(),
|
||||||
rate: z.string().nullable(),
|
rate: z.string().nullable(),
|
||||||
recalcWithRevision: z.boolean(),
|
recalcWithRevision: z.boolean(),
|
||||||
redemptionPaymentSum: z.number(),
|
redemptionPaymentSum: z.number().nullable(),
|
||||||
regionRegistration: z.string().nullable(),
|
regionRegistration: z.string().nullable(),
|
||||||
registration: z.string().nullable(),
|
registration: z.string().nullable(),
|
||||||
registrationQuote: z.boolean(),
|
registrationQuote: z.boolean(),
|
||||||
|
|||||||
@ -178,6 +178,9 @@ query GetProducts($currentDate: DateTime) {
|
|||||||
label: evo_name
|
label: evo_name
|
||||||
value: evo_baseproductid
|
value: evo_baseproductid
|
||||||
evo_baseproductid
|
evo_baseproductid
|
||||||
|
systemusers {
|
||||||
|
systemuserid
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -385,6 +388,7 @@ query GetDealer($dealerId: Uuid!) {
|
|||||||
dealer: account(accountid: $dealerId) {
|
dealer: account(accountid: $dealerId) {
|
||||||
evo_return_leasing_dealer
|
evo_return_leasing_dealer
|
||||||
evo_broker_accountid
|
evo_broker_accountid
|
||||||
|
evo_supplier_financing_accept
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -446,12 +450,12 @@ query GetSotCoefficientType($evo_id: String) {
|
|||||||
evo_sot_coefficient_typeid
|
evo_sot_coefficient_typeid
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
query GetCoefficients($currentDate: DateTime, $jobTitleId: Uuid!) {
|
|
||||||
|
query GetCoefficients($currentDate: DateTime) {
|
||||||
evo_coefficients(
|
evo_coefficients(
|
||||||
statecode: 0
|
statecode: 0
|
||||||
evo_datefrom_param: { lte: $currentDate }
|
evo_datefrom_param: { lte: $currentDate }
|
||||||
evo_dateto_param: { gte: $currentDate }
|
evo_dateto_param: { gte: $currentDate }
|
||||||
evo_job_titleid: $jobTitleId
|
|
||||||
) {
|
) {
|
||||||
evo_job_titleid
|
evo_job_titleid
|
||||||
evo_sot_coefficient_typeid
|
evo_sot_coefficient_typeid
|
||||||
@ -483,6 +487,7 @@ query GetSystemUser($domainname: String) {
|
|||||||
roles {
|
roles {
|
||||||
name
|
name
|
||||||
}
|
}
|
||||||
|
systemuserid
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -210,7 +210,7 @@ export type GetProductsQueryVariables = Exact<{
|
|||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
|
||||||
export type GetProductsQuery = { __typename?: 'Query', evo_baseproducts: Array<{ __typename?: 'evo_baseproduct', evo_baseproductid: string | null, label: string | null, value: string | null } | null> | null };
|
export type GetProductsQuery = { __typename?: 'Query', evo_baseproducts: Array<{ __typename?: 'evo_baseproduct', evo_baseproductid: string | null, label: string | null, value: string | null, systemusers: Array<{ __typename?: 'systemuser', systemuserid: string | null } | null> | null } | null> | null };
|
||||||
|
|
||||||
export type GetProductQueryVariables = Exact<{
|
export type GetProductQueryVariables = Exact<{
|
||||||
productId: Scalars['Uuid'];
|
productId: Scalars['Uuid'];
|
||||||
@ -333,7 +333,7 @@ export type GetDealerQueryVariables = Exact<{
|
|||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
|
||||||
export type GetDealerQuery = { __typename?: 'Query', dealer: { __typename?: 'account', evo_return_leasing_dealer: boolean | null, evo_broker_accountid: string | null } | null };
|
export type GetDealerQuery = { __typename?: 'Query', dealer: { __typename?: 'account', evo_return_leasing_dealer: boolean | null, evo_broker_accountid: string | null, evo_supplier_financing_accept: boolean | null } | null };
|
||||||
|
|
||||||
export type GetDealerPersonsQueryVariables = Exact<{
|
export type GetDealerPersonsQueryVariables = Exact<{
|
||||||
dealerId: Scalars['Uuid'];
|
dealerId: Scalars['Uuid'];
|
||||||
@ -380,7 +380,6 @@ export type GetSotCoefficientTypeQuery = { __typename?: 'Query', evo_sot_coeffic
|
|||||||
|
|
||||||
export type GetCoefficientsQueryVariables = Exact<{
|
export type GetCoefficientsQueryVariables = Exact<{
|
||||||
currentDate: InputMaybe<Scalars['DateTime']>;
|
currentDate: InputMaybe<Scalars['DateTime']>;
|
||||||
jobTitleId: Scalars['Uuid'];
|
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
|
||||||
@ -391,7 +390,7 @@ export type GetSystemUserQueryVariables = Exact<{
|
|||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
|
||||||
export type GetSystemUserQuery = { __typename?: 'Query', systemuser: { __typename?: 'systemuser', evo_job_titleid: string | null, businessunitid: string | null, roles: Array<{ __typename?: 'role', name: string | null } | null> | null } | null };
|
export type GetSystemUserQuery = { __typename?: 'Query', systemuser: { __typename?: 'systemuser', evo_job_titleid: string | null, businessunitid: string | null, systemuserid: string | null, roles: Array<{ __typename?: 'role', name: string | null } | null> | null } | null };
|
||||||
|
|
||||||
export type CoreAddProductTypesFieldsFragment = { __typename?: 'evo_addproduct_type', evo_graph_price: number | null, label: string | null, value: string | null };
|
export type CoreAddProductTypesFieldsFragment = { __typename?: 'evo_addproduct_type', evo_graph_price: number | null, label: string | null, value: string | null };
|
||||||
|
|
||||||
@ -526,13 +525,6 @@ export type GetQuoteGibddDataQueryVariables = Exact<{
|
|||||||
|
|
||||||
export type GetQuoteGibddDataQuery = { __typename?: 'Query', quote: { __typename?: 'quote', evo_db_accept_registration: number | null, evo_object_registration: number | null, evo_pts_type: number | null, evo_vehicle_tax_year: number | null, evo_vehicle_tax_approved: number | null, evo_category_tr: number | null, evo_vehicle_type_tax: number | null, evo_regionid: string | null, evo_townid: string | null, evo_legal_regionid: string | null, evo_legal_townid: string | null, evo_registration_regionid: string | null, evo_req_telematic: number | null, evo_req_telematic_accept: number | null } | null };
|
export type GetQuoteGibddDataQuery = { __typename?: 'Query', quote: { __typename?: 'quote', evo_db_accept_registration: number | null, evo_object_registration: number | null, evo_pts_type: number | null, evo_vehicle_tax_year: number | null, evo_vehicle_tax_approved: number | null, evo_category_tr: number | null, evo_vehicle_type_tax: number | null, evo_regionid: string | null, evo_townid: string | null, evo_legal_regionid: string | null, evo_legal_townid: string | null, evo_registration_regionid: string | null, evo_req_telematic: number | null, evo_req_telematic_accept: number | null } | null };
|
||||||
|
|
||||||
export type GetQuoteRegionTownQueryVariables = Exact<{
|
|
||||||
quoteId: Scalars['Uuid'];
|
|
||||||
}>;
|
|
||||||
|
|
||||||
|
|
||||||
export type GetQuoteRegionTownQuery = { __typename?: 'Query', quote: { __typename?: 'quote', evo_regionid: string | null, evo_townid: string | null, evo_legal_regionid: string | null, evo_legal_townid: string | null } | null };
|
|
||||||
|
|
||||||
export type GetQuoteInsuranceDataQueryVariables = Exact<{
|
export type GetQuoteInsuranceDataQueryVariables = Exact<{
|
||||||
quoteId: Scalars['Uuid'];
|
quoteId: Scalars['Uuid'];
|
||||||
}>;
|
}>;
|
||||||
@ -617,7 +609,7 @@ export const GetTarifsDocument = {"kind":"Document","definitions":[{"kind":"Oper
|
|||||||
export const GetTarifDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetTarif"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"tarifId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_tarif"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_tarifid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"tarifId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_irr"}},{"kind":"Field","name":{"kind":"Name","value":"evo_graphtype_exception"}},{"kind":"Field","name":{"kind":"Name","value":"evo_seasons_type_exception"}},{"kind":"Field","name":{"kind":"Name","value":"evo_min_decreasing_perc"}},{"kind":"Field","name":{"kind":"Name","value":"evo_min_irr"}},{"kind":"Field","name":{"kind":"Name","value":"evo_cut_irr_with_bonus_coefficient"}},{"kind":"Field","name":{"kind":"Name","value":"evo_max_irr"}},{"kind":"Field","name":{"kind":"Name","value":"evo_rates"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_datefrom"}},{"kind":"Field","name":{"kind":"Name","value":"evo_rateid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_irr_plan"}},{"kind":"Field","name":{"kind":"Name","value":"evo_margin_min"}}]}}]}}]} as unknown as DocumentNode<GetTarifQuery, GetTarifQueryVariables>;
|
export const GetTarifDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetTarif"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"tarifId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_tarif"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_tarifid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"tarifId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_irr"}},{"kind":"Field","name":{"kind":"Name","value":"evo_graphtype_exception"}},{"kind":"Field","name":{"kind":"Name","value":"evo_seasons_type_exception"}},{"kind":"Field","name":{"kind":"Name","value":"evo_min_decreasing_perc"}},{"kind":"Field","name":{"kind":"Name","value":"evo_min_irr"}},{"kind":"Field","name":{"kind":"Name","value":"evo_cut_irr_with_bonus_coefficient"}},{"kind":"Field","name":{"kind":"Name","value":"evo_max_irr"}},{"kind":"Field","name":{"kind":"Name","value":"evo_rates"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_datefrom"}},{"kind":"Field","name":{"kind":"Name","value":"evo_rateid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_irr_plan"}},{"kind":"Field","name":{"kind":"Name","value":"evo_margin_min"}}]}}]}}]} as unknown as DocumentNode<GetTarifQuery, GetTarifQueryVariables>;
|
||||||
export const GetRatesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetRates"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"DateTime"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_rates"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}},{"kind":"Argument","name":{"kind":"Name","value":"evo_datefrom_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"lte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}},{"kind":"Argument","name":{"kind":"Name","value":"evo_dateto_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"gte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"evo_name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"evo_rateid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_id"}},{"kind":"Field","name":{"kind":"Name","value":"evo_tarifs"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_tarifid"}}]}}]}}]}}]} as unknown as DocumentNode<GetRatesQuery, GetRatesQueryVariables>;
|
export const GetRatesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetRates"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"DateTime"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_rates"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}},{"kind":"Argument","name":{"kind":"Name","value":"evo_datefrom_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"lte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}},{"kind":"Argument","name":{"kind":"Name","value":"evo_dateto_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"gte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"evo_name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"evo_rateid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_id"}},{"kind":"Field","name":{"kind":"Name","value":"evo_tarifs"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_tarifid"}}]}}]}}]}}]} as unknown as DocumentNode<GetRatesQuery, GetRatesQueryVariables>;
|
||||||
export const GetRateDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetRate"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"rateId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_rate"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_rateid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"rateId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_base_rate"}},{"kind":"Field","name":{"kind":"Name","value":"evo_credit_period"}},{"kind":"Field","name":{"kind":"Name","value":"evo_id"}}]}}]}}]} as unknown as DocumentNode<GetRateQuery, GetRateQueryVariables>;
|
export const GetRateDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetRate"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"rateId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_rate"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_rateid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"rateId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_base_rate"}},{"kind":"Field","name":{"kind":"Name","value":"evo_credit_period"}},{"kind":"Field","name":{"kind":"Name","value":"evo_id"}}]}}]}}]} as unknown as DocumentNode<GetRateQuery, GetRateQueryVariables>;
|
||||||
export const GetProductsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetProducts"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"DateTime"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_baseproducts"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}},{"kind":"Argument","name":{"kind":"Name","value":"evo_relation"},"value":{"kind":"ListValue","values":[{"kind":"IntValue","value":"100000000"}]}},{"kind":"Argument","name":{"kind":"Name","value":"evo_datefrom_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"lte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}},{"kind":"Argument","name":{"kind":"Name","value":"evo_dateto_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"gte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"evo_name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"evo_baseproductid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_baseproductid"}}]}}]}}]} as unknown as DocumentNode<GetProductsQuery, GetProductsQueryVariables>;
|
export const GetProductsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetProducts"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"DateTime"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_baseproducts"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}},{"kind":"Argument","name":{"kind":"Name","value":"evo_relation"},"value":{"kind":"ListValue","values":[{"kind":"IntValue","value":"100000000"}]}},{"kind":"Argument","name":{"kind":"Name","value":"evo_datefrom_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"lte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}},{"kind":"Argument","name":{"kind":"Name","value":"evo_dateto_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"gte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"evo_name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"evo_baseproductid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_baseproductid"}},{"kind":"Field","name":{"kind":"Name","value":"systemusers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"systemuserid"}}]}}]}}]}}]} as unknown as DocumentNode<GetProductsQuery, GetProductsQueryVariables>;
|
||||||
export const GetProductDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetProduct"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"productId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_baseproduct"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_baseproductid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"productId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_leasingobject_types"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_leasingobject_typeid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_calculation_method"}},{"kind":"Field","name":{"kind":"Name","value":"evo_baseproducts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_baseproductid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_brands"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_brandid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_sale_without_nds"}},{"kind":"Field","name":{"kind":"Name","value":"evo_cut_proportion_bonus_director"}},{"kind":"Field","name":{"kind":"Name","value":"evo_cut_irr_with_bonus"}},{"kind":"Field","name":{"kind":"Name","value":"evo_sale_without_nds"}},{"kind":"Field","name":{"kind":"Name","value":"evo_id"}},{"kind":"Field","name":{"kind":"Name","value":"evo_supplier_financing_accept"}},{"kind":"Field","name":{"kind":"Name","value":"accounts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"accountid"}}]}}]}}]}}]} as unknown as DocumentNode<GetProductQuery, GetProductQueryVariables>;
|
export const GetProductDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetProduct"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"productId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_baseproduct"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_baseproductid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"productId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_leasingobject_types"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_leasingobject_typeid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_calculation_method"}},{"kind":"Field","name":{"kind":"Name","value":"evo_baseproducts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_baseproductid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_brands"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_brandid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_sale_without_nds"}},{"kind":"Field","name":{"kind":"Name","value":"evo_cut_proportion_bonus_director"}},{"kind":"Field","name":{"kind":"Name","value":"evo_cut_irr_with_bonus"}},{"kind":"Field","name":{"kind":"Name","value":"evo_sale_without_nds"}},{"kind":"Field","name":{"kind":"Name","value":"evo_id"}},{"kind":"Field","name":{"kind":"Name","value":"evo_supplier_financing_accept"}},{"kind":"Field","name":{"kind":"Name","value":"accounts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"accountid"}}]}}]}}]}}]} as unknown as DocumentNode<GetProductQuery, GetProductQueryVariables>;
|
||||||
export const GetSubsidiesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetSubsidies"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"DateTime"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_subsidies"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}},{"kind":"Argument","name":{"kind":"Name","value":"evo_datefrom_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"lte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}},{"kind":"Argument","name":{"kind":"Name","value":"evo_dateto_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"gte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"evo_name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"evo_subsidyid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_subsidy_type"}}]}}]}}]} as unknown as DocumentNode<GetSubsidiesQuery, GetSubsidiesQueryVariables>;
|
export const GetSubsidiesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetSubsidies"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"DateTime"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_subsidies"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}},{"kind":"Argument","name":{"kind":"Name","value":"evo_datefrom_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"lte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}},{"kind":"Argument","name":{"kind":"Name","value":"evo_dateto_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"gte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"evo_name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"evo_subsidyid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_subsidy_type"}}]}}]}}]} as unknown as DocumentNode<GetSubsidiesQuery, GetSubsidiesQueryVariables>;
|
||||||
export const GetSubsidyDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetSubsidy"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"subsidyId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_subsidy"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_subsidyid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"subsidyId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_leasingobject_types"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_leasingobject_typeid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"accounts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"accountid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_brands"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_brandid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_models"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_modelid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_subsidy_summ"}},{"kind":"Field","name":{"kind":"Name","value":"evo_percent_subsidy"}},{"kind":"Field","name":{"kind":"Name","value":"evo_max_subsidy_summ"}},{"kind":"Field","name":{"kind":"Name","value":"evo_get_subsidy_payment"}},{"kind":"Field","name":{"kind":"Name","value":"evo_delivery_time"}}]}}]}}]} as unknown as DocumentNode<GetSubsidyQuery, GetSubsidyQueryVariables>;
|
export const GetSubsidyDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetSubsidy"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"subsidyId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_subsidy"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_subsidyid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"subsidyId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_leasingobject_types"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_leasingobject_typeid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"accounts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"accountid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_brands"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_brandid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_models"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_modelid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_subsidy_summ"}},{"kind":"Field","name":{"kind":"Name","value":"evo_percent_subsidy"}},{"kind":"Field","name":{"kind":"Name","value":"evo_max_subsidy_summ"}},{"kind":"Field","name":{"kind":"Name","value":"evo_get_subsidy_payment"}},{"kind":"Field","name":{"kind":"Name","value":"evo_delivery_time"}}]}}]}}]} as unknown as DocumentNode<GetSubsidyQuery, GetSubsidyQueryVariables>;
|
||||||
@ -636,15 +628,15 @@ export const GetModelDocument = {"kind":"Document","definitions":[{"kind":"Opera
|
|||||||
export const GetConfigurationsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetConfigurations"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"modelId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_equipments"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}},{"kind":"Argument","name":{"kind":"Name","value":"evo_modelid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"modelId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"evo_name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"evo_equipmentid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_start_production_year"}}]}}]}}]} as unknown as DocumentNode<GetConfigurationsQuery, GetConfigurationsQueryVariables>;
|
export const GetConfigurationsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetConfigurations"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"modelId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_equipments"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}},{"kind":"Argument","name":{"kind":"Name","value":"evo_modelid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"modelId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"evo_name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"evo_equipmentid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_start_production_year"}}]}}]}}]} as unknown as DocumentNode<GetConfigurationsQuery, GetConfigurationsQueryVariables>;
|
||||||
export const GetConfigurationDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetConfiguration"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"configurationId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_equipment"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_equipmentid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"configurationId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_impairment_groupidData"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_name"}}]}}]}}]}}]} as unknown as DocumentNode<GetConfigurationQuery, GetConfigurationQueryVariables>;
|
export const GetConfigurationDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetConfiguration"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"configurationId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_equipment"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_equipmentid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"configurationId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_impairment_groupidData"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_name"}}]}}]}}]}}]} as unknown as DocumentNode<GetConfigurationQuery, GetConfigurationQueryVariables>;
|
||||||
export const GetDealersDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetDealers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"dealers"},"name":{"kind":"Name","value":"accounts"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_account_type"},"value":{"kind":"ListValue","values":[{"kind":"IntValue","value":"100000001"}]}},{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}},{"kind":"Argument","name":{"kind":"Name","value":"evo_legal_form"},"value":{"kind":"IntValue","value":"100000001"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"accountid"}},{"kind":"Field","name":{"kind":"Name","value":"accountid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_supplier_financing_accept"}}]}}]}}]} as unknown as DocumentNode<GetDealersQuery, GetDealersQueryVariables>;
|
export const GetDealersDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetDealers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"dealers"},"name":{"kind":"Name","value":"accounts"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_account_type"},"value":{"kind":"ListValue","values":[{"kind":"IntValue","value":"100000001"}]}},{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}},{"kind":"Argument","name":{"kind":"Name","value":"evo_legal_form"},"value":{"kind":"IntValue","value":"100000001"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"accountid"}},{"kind":"Field","name":{"kind":"Name","value":"accountid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_supplier_financing_accept"}}]}}]}}]} as unknown as DocumentNode<GetDealersQuery, GetDealersQueryVariables>;
|
||||||
export const GetDealerDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetDealer"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"dealerId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"dealer"},"name":{"kind":"Name","value":"account"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"accountid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"dealerId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_return_leasing_dealer"}},{"kind":"Field","name":{"kind":"Name","value":"evo_broker_accountid"}}]}}]}}]} as unknown as DocumentNode<GetDealerQuery, GetDealerQueryVariables>;
|
export const GetDealerDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetDealer"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"dealerId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"dealer"},"name":{"kind":"Name","value":"account"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"accountid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"dealerId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_return_leasing_dealer"}},{"kind":"Field","name":{"kind":"Name","value":"evo_broker_accountid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_supplier_financing_accept"}}]}}]}}]} as unknown as DocumentNode<GetDealerQuery, GetDealerQueryVariables>;
|
||||||
export const GetDealerPersonsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetDealerPersons"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"dealerId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"dealerPersons"},"name":{"kind":"Name","value":"salon_providers"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}},{"kind":"Argument","name":{"kind":"Name","value":"salonaccountid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"dealerId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"accountid"}},{"kind":"Field","name":{"kind":"Name","value":"accountid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_inn"}},{"kind":"Field","name":{"kind":"Name","value":"evo_kpp"}},{"kind":"Field","name":{"kind":"Name","value":"evo_supplier_financing_accept"}}]}}]}}]} as unknown as DocumentNode<GetDealerPersonsQuery, GetDealerPersonsQueryVariables>;
|
export const GetDealerPersonsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetDealerPersons"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"dealerId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"dealerPersons"},"name":{"kind":"Name","value":"salon_providers"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}},{"kind":"Argument","name":{"kind":"Name","value":"salonaccountid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"dealerId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"accountid"}},{"kind":"Field","name":{"kind":"Name","value":"accountid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_inn"}},{"kind":"Field","name":{"kind":"Name","value":"evo_kpp"}},{"kind":"Field","name":{"kind":"Name","value":"evo_supplier_financing_accept"}}]}}]}}]} as unknown as DocumentNode<GetDealerPersonsQuery, GetDealerPersonsQueryVariables>;
|
||||||
export const GetDealerPersonDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetDealerPerson"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"dealerPersonId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"account"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"accountid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"dealerPersonId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_supplier_type"}},{"kind":"Field","name":{"kind":"Name","value":"evo_supplier_financing_accept"}}]}}]}}]} as unknown as DocumentNode<GetDealerPersonQuery, GetDealerPersonQueryVariables>;
|
export const GetDealerPersonDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetDealerPerson"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"dealerPersonId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"account"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"accountid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"dealerPersonId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_supplier_type"}},{"kind":"Field","name":{"kind":"Name","value":"evo_supplier_financing_accept"}}]}}]}}]} as unknown as DocumentNode<GetDealerPersonQuery, GetDealerPersonQueryVariables>;
|
||||||
export const GetAgentDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetAgent"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"agentid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agent"},"name":{"kind":"Name","value":"account"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"accountid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"agentid"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"accountid"}}]}}]}}]} as unknown as DocumentNode<GetAgentQuery, GetAgentQueryVariables>;
|
export const GetAgentDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetAgent"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"agentid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agent"},"name":{"kind":"Name","value":"account"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"accountid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"agentid"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"accountid"}}]}}]}}]} as unknown as DocumentNode<GetAgentQuery, GetAgentQueryVariables>;
|
||||||
export const GetRewardConditionsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetRewardConditions"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"agentid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"DateTime"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_reward_conditions"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_agent_accountid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"agentid"}}},{"kind":"Argument","name":{"kind":"Name","value":"evo_datefrom_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"lte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}},{"kind":"Argument","name":{"kind":"Name","value":"evo_dateto_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"gte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}},{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}},{"kind":"Argument","name":{"kind":"Name","value":"evo_agency_agreementid_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"has"},"value":{"kind":"BooleanValue","value":true}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"evo_name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"evo_reward_conditionid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_reward_summ"}}]}}]}}]} as unknown as DocumentNode<GetRewardConditionsQuery, GetRewardConditionsQueryVariables>;
|
export const GetRewardConditionsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetRewardConditions"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"agentid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"DateTime"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_reward_conditions"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_agent_accountid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"agentid"}}},{"kind":"Argument","name":{"kind":"Name","value":"evo_datefrom_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"lte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}},{"kind":"Argument","name":{"kind":"Name","value":"evo_dateto_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"gte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}},{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}},{"kind":"Argument","name":{"kind":"Name","value":"evo_agency_agreementid_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"has"},"value":{"kind":"BooleanValue","value":true}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"evo_name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"evo_reward_conditionid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_reward_summ"}}]}}]}}]} as unknown as DocumentNode<GetRewardConditionsQuery, GetRewardConditionsQueryVariables>;
|
||||||
export const GetRewardConditionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetRewardCondition"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"conditionId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_reward_condition"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_reward_conditionid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"conditionId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_reward_summ"}},{"kind":"Field","name":{"kind":"Name","value":"evo_reduce_reward"}},{"kind":"Field","name":{"kind":"Name","value":"evo_min_reward_summ"}},{"kind":"Field","name":{"kind":"Name","value":"evo_agency_agreementidData"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_required_reward"}},{"kind":"Field","name":{"kind":"Name","value":"evo_reward_without_other_agent"}},{"kind":"Field","name":{"kind":"Name","value":"evo_leasingobject_price"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_calc_reward_rules"}}]}}]}}]} as unknown as DocumentNode<GetRewardConditionQuery, GetRewardConditionQueryVariables>;
|
export const GetRewardConditionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetRewardCondition"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"conditionId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_reward_condition"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_reward_conditionid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"conditionId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_reward_summ"}},{"kind":"Field","name":{"kind":"Name","value":"evo_reduce_reward"}},{"kind":"Field","name":{"kind":"Name","value":"evo_min_reward_summ"}},{"kind":"Field","name":{"kind":"Name","value":"evo_agency_agreementidData"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_required_reward"}},{"kind":"Field","name":{"kind":"Name","value":"evo_reward_without_other_agent"}},{"kind":"Field","name":{"kind":"Name","value":"evo_leasingobject_price"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_calc_reward_rules"}}]}}]}}]} as unknown as DocumentNode<GetRewardConditionQuery, GetRewardConditionQueryVariables>;
|
||||||
export const GetSotCoefficientTypeDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetSotCoefficientType"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"evo_id"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_sot_coefficient_type"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"evo_id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_sot_coefficient_typeid"}}]}}]}}]} as unknown as DocumentNode<GetSotCoefficientTypeQuery, GetSotCoefficientTypeQueryVariables>;
|
export const GetSotCoefficientTypeDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetSotCoefficientType"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"evo_id"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_sot_coefficient_type"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"evo_id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_sot_coefficient_typeid"}}]}}]}}]} as unknown as DocumentNode<GetSotCoefficientTypeQuery, GetSotCoefficientTypeQueryVariables>;
|
||||||
export const GetCoefficientsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetCoefficients"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"DateTime"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"jobTitleId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_coefficients"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}},{"kind":"Argument","name":{"kind":"Name","value":"evo_datefrom_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"lte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}},{"kind":"Argument","name":{"kind":"Name","value":"evo_dateto_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"gte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}},{"kind":"Argument","name":{"kind":"Name","value":"evo_job_titleid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"jobTitleId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_job_titleid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_sot_coefficient_typeid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_baseproducts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_baseproductid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_sot_coefficient"}},{"kind":"Field","name":{"kind":"Name","value":"evo_corfficient_type"}},{"kind":"Field","name":{"kind":"Name","value":"evo_sot_coefficient_typeidData"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_correction_coefficient"}},{"kind":"Field","name":{"kind":"Name","value":"evo_min_period"}},{"kind":"Field","name":{"kind":"Name","value":"evo_max_period"}},{"kind":"Field","name":{"kind":"Name","value":"evo_season_type"}},{"kind":"Field","name":{"kind":"Name","value":"evo_graph_type"}},{"kind":"Field","name":{"kind":"Name","value":"evo_businessunits"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_sale_businessunitid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_risk_delta"}}]}}]}}]} as unknown as DocumentNode<GetCoefficientsQuery, GetCoefficientsQueryVariables>;
|
export const GetCoefficientsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetCoefficients"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"DateTime"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_coefficients"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}},{"kind":"Argument","name":{"kind":"Name","value":"evo_datefrom_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"lte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}},{"kind":"Argument","name":{"kind":"Name","value":"evo_dateto_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"gte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_job_titleid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_sot_coefficient_typeid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_baseproducts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_baseproductid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_sot_coefficient"}},{"kind":"Field","name":{"kind":"Name","value":"evo_corfficient_type"}},{"kind":"Field","name":{"kind":"Name","value":"evo_sot_coefficient_typeidData"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_correction_coefficient"}},{"kind":"Field","name":{"kind":"Name","value":"evo_min_period"}},{"kind":"Field","name":{"kind":"Name","value":"evo_max_period"}},{"kind":"Field","name":{"kind":"Name","value":"evo_season_type"}},{"kind":"Field","name":{"kind":"Name","value":"evo_graph_type"}},{"kind":"Field","name":{"kind":"Name","value":"evo_businessunits"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_sale_businessunitid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_risk_delta"}}]}}]}}]} as unknown as DocumentNode<GetCoefficientsQuery, GetCoefficientsQueryVariables>;
|
||||||
export const GetSystemUserDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetSystemUser"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"domainname"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"systemuser"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"domainname"},"value":{"kind":"Variable","name":{"kind":"Name","value":"domainname"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_job_titleid"}},{"kind":"Field","name":{"kind":"Name","value":"businessunitid"}},{"kind":"Field","name":{"kind":"Name","value":"roles"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]}}]} as unknown as DocumentNode<GetSystemUserQuery, GetSystemUserQueryVariables>;
|
export const GetSystemUserDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetSystemUser"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"domainname"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"systemuser"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"domainname"},"value":{"kind":"Variable","name":{"kind":"Name","value":"domainname"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_job_titleid"}},{"kind":"Field","name":{"kind":"Name","value":"businessunitid"}},{"kind":"Field","name":{"kind":"Name","value":"roles"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"systemuserid"}}]}}]}}]} as unknown as DocumentNode<GetSystemUserQuery, GetSystemUserQueryVariables>;
|
||||||
export const GetAddproductTypesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetAddproductTypes"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"DateTime"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_addproduct_types"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}},{"kind":"Argument","name":{"kind":"Name","value":"evo_datefrom_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"lte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}},{"kind":"Argument","name":{"kind":"Name","value":"evo_dateto_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"gte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CoreAddProductTypesFields"}},{"kind":"Field","name":{"kind":"Name","value":"evo_product_type"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CoreAddProductTypesFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"evo_addproduct_type"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_graph_price"}},{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"evo_name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"evo_addproduct_typeid"}}]}}]} as unknown as DocumentNode<GetAddproductTypesQuery, GetAddproductTypesQueryVariables>;
|
export const GetAddproductTypesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetAddproductTypes"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"DateTime"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_addproduct_types"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}},{"kind":"Argument","name":{"kind":"Name","value":"evo_datefrom_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"lte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}},{"kind":"Argument","name":{"kind":"Name","value":"evo_dateto_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"gte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CoreAddProductTypesFields"}},{"kind":"Field","name":{"kind":"Name","value":"evo_product_type"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CoreAddProductTypesFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"evo_addproduct_type"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_graph_price"}},{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"evo_name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"evo_addproduct_typeid"}}]}}]} as unknown as DocumentNode<GetAddproductTypesQuery, GetAddproductTypesQueryVariables>;
|
||||||
export const GetAddProductTypeDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetAddProductType"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"addproductTypeId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_addproduct_type"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_addproduct_typeid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"addproductTypeId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_description"}},{"kind":"Field","name":{"kind":"Name","value":"evo_helpcard_type"}},{"kind":"Field","name":{"kind":"Name","value":"evo_planpayments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_name"}},{"kind":"Field","name":{"kind":"Name","value":"evo_cost_price_telematics_withoutnds"}},{"kind":"Field","name":{"kind":"Name","value":"evo_cost_equipment_withoutnds"}},{"kind":"Field","name":{"kind":"Name","value":"evo_cost_telematics_withoutnds"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_graph_price_withoutnds"}},{"kind":"Field","name":{"kind":"Name","value":"evo_cost_service_provider_withoutnds"}},{"kind":"Field","name":{"kind":"Name","value":"evo_retro_bonus_withoutnds"}},{"kind":"Field","name":{"kind":"Name","value":"evo_evokasko_calc_type"}},{"kind":"Field","name":{"kind":"Name","value":"evo_loss_kv"}},{"kind":"Field","name":{"kind":"Name","value":"evo_price_service_provider_withoutnds"}},{"kind":"Field","name":{"kind":"Name","value":"evo_graph_price"}}]}}]}}]} as unknown as DocumentNode<GetAddProductTypeQuery, GetAddProductTypeQueryVariables>;
|
export const GetAddProductTypeDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetAddProductType"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"addproductTypeId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_addproduct_type"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_addproduct_typeid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"addproductTypeId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_description"}},{"kind":"Field","name":{"kind":"Name","value":"evo_helpcard_type"}},{"kind":"Field","name":{"kind":"Name","value":"evo_planpayments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_name"}},{"kind":"Field","name":{"kind":"Name","value":"evo_cost_price_telematics_withoutnds"}},{"kind":"Field","name":{"kind":"Name","value":"evo_cost_equipment_withoutnds"}},{"kind":"Field","name":{"kind":"Name","value":"evo_cost_telematics_withoutnds"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_graph_price_withoutnds"}},{"kind":"Field","name":{"kind":"Name","value":"evo_cost_service_provider_withoutnds"}},{"kind":"Field","name":{"kind":"Name","value":"evo_retro_bonus_withoutnds"}},{"kind":"Field","name":{"kind":"Name","value":"evo_evokasko_calc_type"}},{"kind":"Field","name":{"kind":"Name","value":"evo_loss_kv"}},{"kind":"Field","name":{"kind":"Name","value":"evo_price_service_provider_withoutnds"}},{"kind":"Field","name":{"kind":"Name","value":"evo_graph_price"}}]}}]}}]} as unknown as DocumentNode<GetAddProductTypeQuery, GetAddProductTypeQueryVariables>;
|
||||||
export const GetRegistrationTypesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetRegistrationTypes"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"DateTime"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_addproduct_types"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}},{"kind":"Argument","name":{"kind":"Name","value":"evo_datefrom_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"lte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}},{"kind":"Argument","name":{"kind":"Name","value":"evo_dateto_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"gte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}},{"kind":"Argument","name":{"kind":"Name","value":"evo_product_type"},"value":{"kind":"IntValue","value":"100000001"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CoreAddProductTypesFields"}},{"kind":"Field","name":{"kind":"Name","value":"evo_leasingobject_types"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_leasingobject_typeid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_whom_register"}},{"kind":"Field","name":{"kind":"Name","value":"evo_gibdd_region"}},{"kind":"Field","name":{"kind":"Name","value":"evo_pts_type"}},{"kind":"Field","name":{"kind":"Name","value":"evo_accountid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_towtruck"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CoreAddProductTypesFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"evo_addproduct_type"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_graph_price"}},{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"evo_name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"evo_addproduct_typeid"}}]}}]} as unknown as DocumentNode<GetRegistrationTypesQuery, GetRegistrationTypesQueryVariables>;
|
export const GetRegistrationTypesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetRegistrationTypes"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"DateTime"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_addproduct_types"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}},{"kind":"Argument","name":{"kind":"Name","value":"evo_datefrom_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"lte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}},{"kind":"Argument","name":{"kind":"Name","value":"evo_dateto_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"gte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}},{"kind":"Argument","name":{"kind":"Name","value":"evo_product_type"},"value":{"kind":"IntValue","value":"100000001"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CoreAddProductTypesFields"}},{"kind":"Field","name":{"kind":"Name","value":"evo_leasingobject_types"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_leasingobject_typeid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_whom_register"}},{"kind":"Field","name":{"kind":"Name","value":"evo_gibdd_region"}},{"kind":"Field","name":{"kind":"Name","value":"evo_pts_type"}},{"kind":"Field","name":{"kind":"Name","value":"evo_accountid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_towtruck"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CoreAddProductTypesFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"evo_addproduct_type"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_graph_price"}},{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"evo_name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"evo_addproduct_typeid"}}]}}]} as unknown as DocumentNode<GetRegistrationTypesQuery, GetRegistrationTypesQueryVariables>;
|
||||||
@ -664,7 +656,6 @@ export const GetQuoteCreateKpDataDocument = {"kind":"Document","definitions":[{"
|
|||||||
export const GetQuoteFingapDataDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetQuoteFingapData"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"quoteId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"quote"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"quoteId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"quoteId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_product_risks"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_addproduct_typeid"}}]}}]}}]}}]} as unknown as DocumentNode<GetQuoteFingapDataQuery, GetQuoteFingapDataQueryVariables>;
|
export const GetQuoteFingapDataDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetQuoteFingapData"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"quoteId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"quote"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"quoteId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"quoteId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_product_risks"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_addproduct_typeid"}}]}}]}}]}}]} as unknown as DocumentNode<GetQuoteFingapDataQuery, GetQuoteFingapDataQueryVariables>;
|
||||||
export const GetFinGapAddProductTypesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetFinGAPAddProductTypes"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"DateTime"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_addproduct_types"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}},{"kind":"Argument","name":{"kind":"Name","value":"evo_datefrom_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"lte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}},{"kind":"Argument","name":{"kind":"Name","value":"evo_dateto_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"gte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}},{"kind":"Argument","name":{"kind":"Name","value":"evo_product_type"},"value":{"kind":"IntValue","value":"100000006"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_addproduct_typeid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_name"}},{"kind":"Field","name":{"kind":"Name","value":"evo_type_calc_cerebellum"}},{"kind":"Field","name":{"kind":"Name","value":"evo_cost_service_provider_withoutnds"}},{"kind":"Field","name":{"kind":"Name","value":"evo_addproduct_types"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_addproduct_typeid"}}]}}]}}]}}]} as unknown as DocumentNode<GetFinGapAddProductTypesQuery, GetFinGapAddProductTypesQueryVariables>;
|
export const GetFinGapAddProductTypesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetFinGAPAddProductTypes"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"DateTime"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_addproduct_types"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}},{"kind":"Argument","name":{"kind":"Name","value":"evo_datefrom_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"lte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}},{"kind":"Argument","name":{"kind":"Name","value":"evo_dateto_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"gte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}},{"kind":"Argument","name":{"kind":"Name","value":"evo_product_type"},"value":{"kind":"IntValue","value":"100000006"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_addproduct_typeid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_name"}},{"kind":"Field","name":{"kind":"Name","value":"evo_type_calc_cerebellum"}},{"kind":"Field","name":{"kind":"Name","value":"evo_cost_service_provider_withoutnds"}},{"kind":"Field","name":{"kind":"Name","value":"evo_addproduct_types"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_addproduct_typeid"}}]}}]}}]}}]} as unknown as DocumentNode<GetFinGapAddProductTypesQuery, GetFinGapAddProductTypesQueryVariables>;
|
||||||
export const GetQuoteGibddDataDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetQuoteGibddData"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"quoteId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"quote"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"quoteId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"quoteId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_db_accept_registration"}},{"kind":"Field","name":{"kind":"Name","value":"evo_object_registration"}},{"kind":"Field","name":{"kind":"Name","value":"evo_pts_type"}},{"kind":"Field","name":{"kind":"Name","value":"evo_vehicle_tax_year"}},{"kind":"Field","name":{"kind":"Name","value":"evo_vehicle_tax_approved"}},{"kind":"Field","name":{"kind":"Name","value":"evo_category_tr"}},{"kind":"Field","name":{"kind":"Name","value":"evo_vehicle_type_tax"}},{"kind":"Field","name":{"kind":"Name","value":"evo_regionid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_townid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_legal_regionid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_legal_townid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_registration_regionid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_req_telematic"}},{"kind":"Field","name":{"kind":"Name","value":"evo_req_telematic_accept"}}]}}]}}]} as unknown as DocumentNode<GetQuoteGibddDataQuery, GetQuoteGibddDataQueryVariables>;
|
export const GetQuoteGibddDataDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetQuoteGibddData"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"quoteId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"quote"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"quoteId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"quoteId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_db_accept_registration"}},{"kind":"Field","name":{"kind":"Name","value":"evo_object_registration"}},{"kind":"Field","name":{"kind":"Name","value":"evo_pts_type"}},{"kind":"Field","name":{"kind":"Name","value":"evo_vehicle_tax_year"}},{"kind":"Field","name":{"kind":"Name","value":"evo_vehicle_tax_approved"}},{"kind":"Field","name":{"kind":"Name","value":"evo_category_tr"}},{"kind":"Field","name":{"kind":"Name","value":"evo_vehicle_type_tax"}},{"kind":"Field","name":{"kind":"Name","value":"evo_regionid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_townid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_legal_regionid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_legal_townid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_registration_regionid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_req_telematic"}},{"kind":"Field","name":{"kind":"Name","value":"evo_req_telematic_accept"}}]}}]}}]} as unknown as DocumentNode<GetQuoteGibddDataQuery, GetQuoteGibddDataQueryVariables>;
|
||||||
export const GetQuoteRegionTownDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetQuoteRegionTown"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"quoteId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"quote"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"quoteId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"quoteId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_regionid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_townid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_legal_regionid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_legal_townid"}}]}}]}}]} as unknown as DocumentNode<GetQuoteRegionTownQuery, GetQuoteRegionTownQueryVariables>;
|
|
||||||
export const GetQuoteInsuranceDataDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetQuoteInsuranceData"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"quoteId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"quote"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"quoteId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"quoteId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_osago_accountid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_osago_payer"}},{"kind":"Field","name":{"kind":"Name","value":"evo_osago_price"}},{"kind":"Field","name":{"kind":"Name","value":"evo_kasko_accountid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_kasko_payer"}},{"kind":"Field","name":{"kind":"Name","value":"evo_kasko_price"}},{"kind":"Field","name":{"kind":"Name","value":"evo_insurance_period"}},{"kind":"Field","name":{"kind":"Name","value":"evo_fingap_accountid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_fingap_payer"}},{"kind":"Field","name":{"kind":"Name","value":"evo_fingap_period"}},{"kind":"Field","name":{"kind":"Name","value":"evo_gps_brandid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_gps_modelid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_insurance_decentral"}},{"kind":"Field","name":{"kind":"Name","value":"evo_franchise"}},{"kind":"Field","name":{"kind":"Name","value":"evo_unlimit_drivers"}},{"kind":"Field","name":{"kind":"Name","value":"evo_age_drivers"}},{"kind":"Field","name":{"kind":"Name","value":"evo_exp_drivers"}}]}}]}}]} as unknown as DocumentNode<GetQuoteInsuranceDataQuery, GetQuoteInsuranceDataQueryVariables>;
|
export const GetQuoteInsuranceDataDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetQuoteInsuranceData"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"quoteId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"quote"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"quoteId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"quoteId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_osago_accountid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_osago_payer"}},{"kind":"Field","name":{"kind":"Name","value":"evo_osago_price"}},{"kind":"Field","name":{"kind":"Name","value":"evo_kasko_accountid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_kasko_payer"}},{"kind":"Field","name":{"kind":"Name","value":"evo_kasko_price"}},{"kind":"Field","name":{"kind":"Name","value":"evo_insurance_period"}},{"kind":"Field","name":{"kind":"Name","value":"evo_fingap_accountid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_fingap_payer"}},{"kind":"Field","name":{"kind":"Name","value":"evo_fingap_period"}},{"kind":"Field","name":{"kind":"Name","value":"evo_gps_brandid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_gps_modelid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_insurance_decentral"}},{"kind":"Field","name":{"kind":"Name","value":"evo_franchise"}},{"kind":"Field","name":{"kind":"Name","value":"evo_unlimit_drivers"}},{"kind":"Field","name":{"kind":"Name","value":"evo_age_drivers"}},{"kind":"Field","name":{"kind":"Name","value":"evo_exp_drivers"}}]}}]}}]} as unknown as DocumentNode<GetQuoteInsuranceDataQuery, GetQuoteInsuranceDataQueryVariables>;
|
||||||
export const GetLeadUrlDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetLeadUrl"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"entity"},"name":{"kind":"Name","value":"lead"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"leadid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"link"}}]}}]}}]} as unknown as DocumentNode<GetLeadUrlQuery, GetLeadUrlQueryVariables>;
|
export const GetLeadUrlDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetLeadUrl"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"entity"},"name":{"kind":"Name","value":"lead"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"leadid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"link"}}]}}]}}]} as unknown as DocumentNode<GetLeadUrlQuery, GetLeadUrlQueryVariables>;
|
||||||
export const GetOpportunityUrlDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetOpportunityUrl"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"entity"},"name":{"kind":"Name","value":"opportunity"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"opportunityid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"link"}}]}}]}}]} as unknown as DocumentNode<GetOpportunityUrlQuery, GetOpportunityUrlQueryVariables>;
|
export const GetOpportunityUrlDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetOpportunityUrl"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"entity"},"name":{"kind":"Name","value":"opportunity"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"opportunityid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"link"}}]}}]}}]} as unknown as DocumentNode<GetOpportunityUrlQuery, GetOpportunityUrlQueryVariables>;
|
||||||
|
|||||||
@ -22,7 +22,7 @@ export default function reactions({ store, apolloClient }: ProcessContext) {
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const currentDate = dayjs().utc(false).format('YYYY-MM-DD');
|
const currentDate = dayjs().utc(false).toISOString();
|
||||||
|
|
||||||
const {
|
const {
|
||||||
data: { evo_addproduct_types },
|
data: { evo_addproduct_types },
|
||||||
@ -79,7 +79,7 @@ export default function reactions({ store, apolloClient }: ProcessContext) {
|
|||||||
reaction(
|
reaction(
|
||||||
() => $calculation.$values.getValues(['leasingPeriod', 'leaseObjectType']),
|
() => $calculation.$values.getValues(['leasingPeriod', 'leaseObjectType']),
|
||||||
async ({ leasingPeriod, leaseObjectType }) => {
|
async ({ leasingPeriod, leaseObjectType }) => {
|
||||||
const currentDate = dayjs().utc(false).format('YYYY-MM-DD');
|
const currentDate = dayjs().utc(false).toISOString();
|
||||||
|
|
||||||
const {
|
const {
|
||||||
data: { evo_addproduct_types },
|
data: { evo_addproduct_types },
|
||||||
@ -163,7 +163,7 @@ export default function reactions({ store, apolloClient }: ProcessContext) {
|
|||||||
leasingPeriod,
|
leasingPeriod,
|
||||||
plPriceRub,
|
plPriceRub,
|
||||||
}) => {
|
}) => {
|
||||||
const currentDate = dayjs().utc(false).format('YYYY-MM-DD');
|
const currentDate = dayjs().utc(false).toISOString();
|
||||||
|
|
||||||
const {
|
const {
|
||||||
data: { evo_addproduct_types },
|
data: { evo_addproduct_types },
|
||||||
@ -175,14 +175,14 @@ export default function reactions({ store, apolloClient }: ProcessContext) {
|
|||||||
const options = evo_addproduct_types?.filter(
|
const options = evo_addproduct_types?.filter(
|
||||||
(x) =>
|
(x) =>
|
||||||
x &&
|
x &&
|
||||||
Boolean(x?.evo_max_period && x.evo_max_period >= leasingPeriod) &&
|
Boolean(x?.evo_max_period !== null && x.evo_max_period >= leasingPeriod) &&
|
||||||
Boolean(x?.evo_min_period && x.evo_min_period <= leasingPeriod) &&
|
Boolean(x?.evo_min_period !== null && x.evo_min_period <= leasingPeriod) &&
|
||||||
Boolean(
|
Boolean(
|
||||||
x?.evo_max_price &&
|
x?.evo_max_price !== null &&
|
||||||
x.evo_max_price >= plPriceRub - discountRub - importProgramSum + addEquipmentPrice
|
x.evo_max_price >= plPriceRub - discountRub - importProgramSum + addEquipmentPrice
|
||||||
) &&
|
) &&
|
||||||
Boolean(
|
Boolean(
|
||||||
x?.evo_min_price &&
|
x?.evo_min_price !== null &&
|
||||||
x.evo_min_price <= plPriceRub - discountRub - importProgramSum + addEquipmentPrice
|
x.evo_min_price <= plPriceRub - discountRub - importProgramSum + addEquipmentPrice
|
||||||
) &&
|
) &&
|
||||||
x.evo_leasingobject_types?.find(
|
x.evo_leasingobject_types?.find(
|
||||||
@ -191,9 +191,13 @@ export default function reactions({ store, apolloClient }: ProcessContext) {
|
|||||||
) &&
|
) &&
|
||||||
x.evo_visible_calc &&
|
x.evo_visible_calc &&
|
||||||
Boolean(
|
Boolean(
|
||||||
x.evo_min_first_payment_perc && x.evo_min_first_payment_perc <= firstPaymentPerc
|
x.evo_min_first_payment_perc !== null &&
|
||||||
|
x.evo_min_first_payment_perc <= firstPaymentPerc
|
||||||
) &&
|
) &&
|
||||||
Boolean(x.evo_max_first_payment_perc && x.evo_max_first_payment_perc >= firstPaymentPerc)
|
Boolean(
|
||||||
|
x.evo_max_first_payment_perc !== null &&
|
||||||
|
x.evo_max_first_payment_perc >= firstPaymentPerc
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$calculation.element('selectInsNSIB').setOptions(normalizeOptions(options));
|
$calculation.element('selectInsNSIB').setOptions(normalizeOptions(options));
|
||||||
@ -242,7 +246,7 @@ export default function reactions({ store, apolloClient }: ProcessContext) {
|
|||||||
reaction(
|
reaction(
|
||||||
() => $calculation.$values.getValues(['requirementTelematic', 'recalcWithRevision']),
|
() => $calculation.$values.getValues(['requirementTelematic', 'recalcWithRevision']),
|
||||||
async ({ requirementTelematic, recalcWithRevision }) => {
|
async ({ requirementTelematic, recalcWithRevision }) => {
|
||||||
const currentDate = dayjs().utc(false).format('YYYY-MM-DD');
|
const currentDate = dayjs().utc(false).toISOString();
|
||||||
const {
|
const {
|
||||||
data: { evo_addproduct_types: trackerTypes },
|
data: { evo_addproduct_types: trackerTypes },
|
||||||
} = await apolloClient.query({
|
} = await apolloClient.query({
|
||||||
|
|||||||
@ -25,7 +25,7 @@ export default function helper({ apolloClient, user }: ValidationContext) {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const currentDate = dayjs().utc(false).format('YYYY-MM-DD');
|
const currentDate = dayjs().utc(false).toISOString();
|
||||||
|
|
||||||
const {
|
const {
|
||||||
data: { evo_coefficients },
|
data: { evo_coefficients },
|
||||||
@ -39,6 +39,7 @@ export default function helper({ apolloClient, user }: ValidationContext) {
|
|||||||
|
|
||||||
return evo_coefficients?.find(
|
return evo_coefficients?.find(
|
||||||
(evo_coefficient) =>
|
(evo_coefficient) =>
|
||||||
|
evo_coefficient?.evo_job_titleid === systemuser.evo_job_titleid &&
|
||||||
evo_coefficient?.evo_sot_coefficient_typeidData?.evo_id === 'BONUS_LEASING' &&
|
evo_coefficient?.evo_sot_coefficient_typeidData?.evo_id === 'BONUS_LEASING' &&
|
||||||
evo_coefficient?.evo_baseproducts?.some((x) => x?.evo_baseproductid === productId)
|
evo_coefficient?.evo_baseproducts?.some((x) => x?.evo_baseproductid === productId)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -26,7 +26,7 @@ export default function reactions(context: ProcessContext) {
|
|||||||
() => $calculation.element('selectProduct').getValue(),
|
() => $calculation.element('selectProduct').getValue(),
|
||||||
async (productId) => {
|
async (productId) => {
|
||||||
if (!productId) {
|
if (!productId) {
|
||||||
$calculation.element('tbxSaleBonus').resetValue().block();
|
$calculation.element('tbxSaleBonus').resetValue();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -34,19 +34,38 @@ export default function reactions(context: ProcessContext) {
|
|||||||
const coefficient = await getCoefficient(productId);
|
const coefficient = await getCoefficient(productId);
|
||||||
|
|
||||||
if (!coefficient?.evo_sot_coefficient) {
|
if (!coefficient?.evo_sot_coefficient) {
|
||||||
$calculation.element('tbxSaleBonus').resetValue().block();
|
$calculation.element('tbxSaleBonus').resetValue();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const maxBonus = (coefficient?.evo_sot_coefficient || 0) * 100;
|
const maxBonus = (coefficient?.evo_sot_coefficient || 0) * 100;
|
||||||
$calculation.element('tbxSaleBonus').setValue(maxBonus).unblock();
|
$calculation.element('tbxSaleBonus').setValue(maxBonus);
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fireImmediately: true,
|
fireImmediately: true,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
reaction(
|
||||||
|
() => $calculation.element('selectProduct').getValue(),
|
||||||
|
async (productId) => {
|
||||||
|
if (!productId) {
|
||||||
|
$calculation.element('tbxSaleBonus').block();
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const coefficient = await getCoefficient(productId);
|
||||||
|
|
||||||
|
if (coefficient?.evo_sot_coefficient) {
|
||||||
|
$calculation.element('tbxSaleBonus').unblock();
|
||||||
|
} else {
|
||||||
|
$calculation.element('tbxSaleBonus').block();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* если в Продукте evo_cut_proportion_bonus_director " = Да,
|
* если в Продукте evo_cut_proportion_bonus_director " = Да,
|
||||||
* то tbxBonusCoefficient = tbxSaleBonus/evo_sot_coefficient,
|
* то tbxBonusCoefficient = tbxSaleBonus/evo_sot_coefficient,
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import { diff } from 'radash';
|
|||||||
|
|
||||||
dayjs.extend(utc);
|
dayjs.extend(utc);
|
||||||
|
|
||||||
export default function reactions({ store, apolloClient }: ProcessContext) {
|
export default function reactions({ store, apolloClient, user }: ProcessContext) {
|
||||||
const { $calculation } = store;
|
const { $calculation } = store;
|
||||||
|
|
||||||
reaction(
|
reaction(
|
||||||
@ -302,8 +302,10 @@ export default function reactions({ store, apolloClient }: ProcessContext) {
|
|||||||
reaction(
|
reaction(
|
||||||
() => $calculation.element('selectProduct').getValue(),
|
() => $calculation.element('selectProduct').getValue(),
|
||||||
async (productId) => {
|
async (productId) => {
|
||||||
|
const IRRCalcTypeOptions = radioCalcType.filter((x) => x.value === 100_000_000);
|
||||||
|
|
||||||
if (!productId) {
|
if (!productId) {
|
||||||
$calculation.element('radioCalcType').resetOptions();
|
$calculation.element('radioCalcType').setOptions(IRRCalcTypeOptions);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -323,8 +325,11 @@ export default function reactions({ store, apolloClient }: ProcessContext) {
|
|||||||
);
|
);
|
||||||
$calculation.element('radioCalcType').setOptions(filteredCalcTypeOptions);
|
$calculation.element('radioCalcType').setOptions(filteredCalcTypeOptions);
|
||||||
} else {
|
} else {
|
||||||
$calculation.element('radioCalcType').resetOptions();
|
$calculation.element('radioCalcType').setOptions(IRRCalcTypeOptions);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fireImmediately: true,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -337,9 +342,9 @@ export default function reactions({ store, apolloClient }: ProcessContext) {
|
|||||||
reaction(
|
reaction(
|
||||||
() => $calculation.element('selectQuote').getValue(),
|
() => $calculation.element('selectQuote').getValue(),
|
||||||
async (quoteId) => {
|
async (quoteId) => {
|
||||||
const currentDate = dayjs().utc(false).format('YYYY-MM-DD');
|
const currentDate = dayjs().utc(false).toISOString();
|
||||||
|
|
||||||
const {
|
let {
|
||||||
data: { evo_baseproducts },
|
data: { evo_baseproducts },
|
||||||
} = await apolloClient.query({
|
} = await apolloClient.query({
|
||||||
fetchPolicy: 'network-only',
|
fetchPolicy: 'network-only',
|
||||||
@ -349,6 +354,28 @@ export default function reactions({ store, apolloClient }: ProcessContext) {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (user && evo_baseproducts) {
|
||||||
|
const {
|
||||||
|
data: { systemuser },
|
||||||
|
} = await apolloClient.query({
|
||||||
|
fetchPolicy: 'network-only',
|
||||||
|
query: CRMTypes.GetSystemUserDocument,
|
||||||
|
variables: {
|
||||||
|
domainname: user?.domainName,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
evo_baseproducts = evo_baseproducts?.filter(
|
||||||
|
(x) =>
|
||||||
|
!x?.systemusers?.length ||
|
||||||
|
x?.systemusers?.some(
|
||||||
|
(evo_baseproduct_systemuser) =>
|
||||||
|
systemuser?.systemuserid &&
|
||||||
|
evo_baseproduct_systemuser?.systemuserid === systemuser?.systemuserid
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (!$calculation.element('cbxRecalcWithRevision').getValue()) {
|
if (!$calculation.element('cbxRecalcWithRevision').getValue()) {
|
||||||
$calculation.element('selectProduct').setOptions(normalizeOptions(evo_baseproducts));
|
$calculation.element('selectProduct').setOptions(normalizeOptions(evo_baseproducts));
|
||||||
|
|
||||||
@ -392,6 +419,9 @@ export default function reactions({ store, apolloClient }: ProcessContext) {
|
|||||||
} else {
|
} else {
|
||||||
$calculation.element('selectProduct').setOptions(normalizeOptions(evo_baseproducts));
|
$calculation.element('selectProduct').setOptions(normalizeOptions(evo_baseproducts));
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fireImmediately: true,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,7 @@ export default function valuesReactions({ store, apolloClient }: ProcessContext)
|
|||||||
lastPaymentPerc,
|
lastPaymentPerc,
|
||||||
leaseObjectType: leaseObjectTypeId,
|
leaseObjectType: leaseObjectTypeId,
|
||||||
}) => {
|
}) => {
|
||||||
const currentDate = dayjs().utc(false).format('YYYY-MM-DD');
|
const currentDate = dayjs().utc(false).toISOString();
|
||||||
|
|
||||||
let {
|
let {
|
||||||
data: { evo_tarifs = [] },
|
data: { evo_tarifs = [] },
|
||||||
@ -137,7 +137,7 @@ export default function valuesReactions({ store, apolloClient }: ProcessContext)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const currentDate = dayjs().utc(false).format('YYYY-MM-DD');
|
const currentDate = dayjs().utc(false).toISOString();
|
||||||
|
|
||||||
const {
|
const {
|
||||||
data: { evo_rates },
|
data: { evo_rates },
|
||||||
|
|||||||
@ -14,4 +14,22 @@ export function common({ store }: ProcessContext) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
reaction(
|
||||||
|
() => $calculation.element('cbxPriceWithDiscount').getValue(),
|
||||||
|
(priceWithDiscount) => {
|
||||||
|
if (priceWithDiscount === true) {
|
||||||
|
$calculation.element('cbxFullPriceWithDiscount').setValue(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
reaction(
|
||||||
|
() => $calculation.element('cbxFullPriceWithDiscount').getValue(),
|
||||||
|
(fullPriceWithDiscount) => {
|
||||||
|
if (fullPriceWithDiscount === true) {
|
||||||
|
$calculation.element('cbxPriceWithDiscount').setValue(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -148,7 +148,7 @@ export default function reactions({ store, apolloClient, queryClient }: ProcessC
|
|||||||
>({
|
>({
|
||||||
query: QUERY_GET_FINGAP_ADDPRODUCT_TYPES,
|
query: QUERY_GET_FINGAP_ADDPRODUCT_TYPES,
|
||||||
variables: {
|
variables: {
|
||||||
currentDate: dayjs().utc(false).format('YYYY-MM-DD'),
|
currentDate: dayjs().utc(false).toISOString(),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable sonarjs/cognitive-complexity */
|
||||||
import type { GetQuoteInputData, GetQuoteProcessData } from '../load-kp/types';
|
import type { GetQuoteInputData, GetQuoteProcessData } from '../load-kp/types';
|
||||||
import helper from './lib/helper';
|
import helper from './lib/helper';
|
||||||
import initializeApollo from '@/apollo/client';
|
import initializeApollo from '@/apollo/client';
|
||||||
@ -5,6 +6,7 @@ import defaultValues from '@/config/default-values';
|
|||||||
import * as CRMTypes from '@/graphql/crm.types';
|
import * as CRMTypes from '@/graphql/crm.types';
|
||||||
import { gql } from '@apollo/client';
|
import { gql } from '@apollo/client';
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
const QUERY_GET_QUOTE_GIBDD_DATA = gql`
|
const QUERY_GET_QUOTE_GIBDD_DATA = gql`
|
||||||
query GetQuoteGibddData($quoteId: Uuid!) {
|
query GetQuoteGibddData($quoteId: Uuid!) {
|
||||||
quote(quoteId: $quoteId) {
|
quote(quoteId: $quoteId) {
|
||||||
@ -40,52 +42,57 @@ export async function getKPData({ values }: GetQuoteInputData): Promise<GetQuote
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const { getLegalRegion, getLegalTown, getRegion, getTown } = helper({
|
const { getData } = helper({
|
||||||
apolloClient,
|
apolloClient,
|
||||||
});
|
});
|
||||||
|
|
||||||
const legalRegionId = await getLegalRegion({
|
const { account } = await getData({
|
||||||
lead: leadId,
|
lead: leadId,
|
||||||
opportunity: opportunityId,
|
opportunity: opportunityId,
|
||||||
quote: quoteId,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const legalTownId = await getLegalTown({
|
const objectRegistration = recalcWithRevision
|
||||||
lead: leadId,
|
? quote?.evo_db_accept_registration
|
||||||
opportunity: opportunityId,
|
: quote?.evo_object_registration;
|
||||||
quote: quoteId,
|
|
||||||
regionId: legalRegionId,
|
|
||||||
});
|
|
||||||
|
|
||||||
const regionId = await getRegion({
|
const typePTS = objectRegistration === 100_000_000 ? defaultValues.typePTS : quote?.evo_pts_type;
|
||||||
lead: leadId,
|
|
||||||
opportunity: opportunityId,
|
|
||||||
quote: quoteId,
|
|
||||||
});
|
|
||||||
|
|
||||||
const townId = await getTown({
|
// region
|
||||||
lead: leadId,
|
let legalClientRegion = quote?.evo_legal_regionid ?? defaultValues.legalClientRegion;
|
||||||
opportunity: opportunityId,
|
if (account?.evo_legal_regionid) {
|
||||||
quote: quoteId,
|
legalClientRegion = account.evo_legal_regionid;
|
||||||
regionId,
|
}
|
||||||
});
|
|
||||||
|
let regionRegistration = quote?.evo_regionid ?? defaultValues.regionRegistration;
|
||||||
|
if (objectRegistration === 100_000_000 && account?.evo_legal_regionid) {
|
||||||
|
regionRegistration = account.evo_legal_regionid;
|
||||||
|
}
|
||||||
|
|
||||||
|
// town
|
||||||
|
let legalClientTown = quote?.evo_legal_townid ?? defaultValues.legalClientTown;
|
||||||
|
if (account?.evo_legal_townid) {
|
||||||
|
legalClientTown = account?.evo_legal_townid;
|
||||||
|
}
|
||||||
|
|
||||||
|
let townRegistration = quote?.evo_townid ?? defaultValues.townRegistration;
|
||||||
|
if (objectRegistration === 100_000_000 && account?.evo_legal_townid) {
|
||||||
|
townRegistration = account?.evo_legal_townid;
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
values: {
|
values: {
|
||||||
legalClientRegion: legalRegionId,
|
legalClientRegion,
|
||||||
legalClientTown: legalTownId,
|
legalClientTown,
|
||||||
objectCategoryTax: quote?.evo_category_tr,
|
objectCategoryTax: quote?.evo_category_tr,
|
||||||
objectRegionRegistration: quote?.evo_registration_regionid,
|
objectRegionRegistration: quote?.evo_registration_regionid,
|
||||||
objectRegistration: recalcWithRevision
|
objectRegistration,
|
||||||
? quote?.evo_db_accept_registration
|
|
||||||
: quote?.evo_object_registration,
|
|
||||||
objectTypeTax: quote?.evo_vehicle_type_tax,
|
objectTypeTax: quote?.evo_vehicle_type_tax,
|
||||||
regionRegistration: regionId,
|
regionRegistration,
|
||||||
requirementTelematic:
|
requirementTelematic:
|
||||||
(recalcWithRevision ? quote?.evo_req_telematic_accept : quote?.evo_req_telematic) ??
|
(recalcWithRevision ? quote?.evo_req_telematic_accept : quote?.evo_req_telematic) ??
|
||||||
defaultValues.requirementTelematic,
|
defaultValues.requirementTelematic,
|
||||||
townRegistration: townId,
|
townRegistration,
|
||||||
typePTS: quote?.evo_pts_type,
|
typePTS,
|
||||||
vehicleTaxInYear:
|
vehicleTaxInYear:
|
||||||
(recalcWithRevision ? quote?.evo_vehicle_tax_approved : quote?.evo_vehicle_tax_year) ??
|
(recalcWithRevision ? quote?.evo_vehicle_tax_approved : quote?.evo_vehicle_tax_year) ??
|
||||||
defaultValues.vehicleTaxInYear,
|
defaultValues.vehicleTaxInYear,
|
||||||
|
|||||||
@ -1,287 +1,84 @@
|
|||||||
import * as CRMTypes from '@/graphql/crm.types';
|
import * as CRMTypes from '@/graphql/crm.types';
|
||||||
import type { ProcessContext } from '@/process/types';
|
import type { ProcessContext } from '@/process/types';
|
||||||
import type { CalculationValues } from '@/stores/calculation/values/types';
|
import type { CalculationValues } from '@/stores/calculation/values/types';
|
||||||
import { gql } from '@apollo/client';
|
|
||||||
|
|
||||||
const QUERY_GET_QUOTE_REGION_TOWN = gql`
|
|
||||||
query GetQuoteRegionTown($quoteId: Uuid!) {
|
|
||||||
quote(quoteId: $quoteId) {
|
|
||||||
evo_regionid
|
|
||||||
evo_townid
|
|
||||||
evo_legal_regionid
|
|
||||||
evo_legal_townid
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`;
|
|
||||||
|
|
||||||
export default function helper({ apolloClient }: Pick<ProcessContext, 'apolloClient'>) {
|
export default function helper({ apolloClient }: Pick<ProcessContext, 'apolloClient'>) {
|
||||||
|
async function getRegionByFias(evo_region_fias_id: string) {
|
||||||
|
const {
|
||||||
|
data: { evo_regions },
|
||||||
|
} = await apolloClient.query({
|
||||||
|
query: CRMTypes.GetRegionsDocument,
|
||||||
|
});
|
||||||
|
|
||||||
|
return evo_regions?.find((x) => x?.evo_fias_id === evo_region_fias_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function getTownByFias(regionId: string, evo_town_fias_id: string) {
|
||||||
|
const {
|
||||||
|
data: { evo_towns },
|
||||||
|
} = await apolloClient.query({
|
||||||
|
query: CRMTypes.GetTownsDocument,
|
||||||
|
variables: {
|
||||||
|
regionId,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
return evo_towns?.find((x) => x?.evo_fias_id === evo_town_fias_id);
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
async getLegalRegion({
|
async getData({
|
||||||
lead: leadid,
|
lead: leadid,
|
||||||
opportunity: opportunityid,
|
opportunity: opportunityid,
|
||||||
quote: quoteId,
|
}: Pick<CalculationValues, 'lead' | 'opportunity'>) {
|
||||||
}: Pick<CalculationValues, 'lead' | 'opportunity' | 'quote'>) {
|
let lead: CRMTypes.GetLeadQuery['lead'] = null;
|
||||||
let regionId: string | null | undefined;
|
let opportunity: CRMTypes.GetOpportunityQuery['opportunity'] = null;
|
||||||
|
|
||||||
const {
|
|
||||||
data: { evo_regions },
|
|
||||||
} = await apolloClient.query({
|
|
||||||
query: CRMTypes.GetRegionsDocument,
|
|
||||||
});
|
|
||||||
|
|
||||||
if (leadid) {
|
if (leadid) {
|
||||||
const {
|
const { data } = await apolloClient.query({
|
||||||
data: { lead },
|
|
||||||
} = await apolloClient.query({
|
|
||||||
query: CRMTypes.GetLeadDocument,
|
query: CRMTypes.GetLeadDocument,
|
||||||
variables: { leadid },
|
variables: { leadid },
|
||||||
});
|
});
|
||||||
if (lead?.accountidData?.evo_address_legalidData?.evo_region_fias_id) {
|
({ lead } = data);
|
||||||
const region = evo_regions?.find(
|
|
||||||
(x) =>
|
|
||||||
x?.evo_fias_id === lead?.accountidData?.evo_address_legalidData?.evo_region_fias_id
|
|
||||||
);
|
|
||||||
regionId = region?.value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (opportunityid) {
|
if (opportunityid) {
|
||||||
const {
|
const { data } = await apolloClient.query({
|
||||||
data: { opportunity },
|
|
||||||
} = await apolloClient.query({
|
|
||||||
query: CRMTypes.GetOpportunityDocument,
|
query: CRMTypes.GetOpportunityDocument,
|
||||||
variables: { opportunityid },
|
variables: { opportunityid },
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!regionId && opportunity?.accountidData?.evo_address_legalidData?.evo_region_fias_id) {
|
({ opportunity } = data);
|
||||||
const region = evo_regions?.find(
|
|
||||||
(x) =>
|
|
||||||
x?.evo_fias_id ===
|
|
||||||
opportunity?.accountidData?.evo_address_legalidData?.evo_region_fias_id
|
|
||||||
);
|
|
||||||
regionId = region?.value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!regionId && quoteId) {
|
// region
|
||||||
const {
|
let region: Awaited<ReturnType<typeof getRegionByFias>> = null;
|
||||||
data: { quote },
|
const evo_region_fias_id =
|
||||||
} = await apolloClient.query<
|
lead?.accountidData?.evo_address_legalidData?.evo_region_fias_id ||
|
||||||
CRMTypes.GetQuoteRegionTownQuery,
|
opportunity?.accountidData?.evo_address_legalidData?.evo_region_fias_id;
|
||||||
CRMTypes.GetQuoteRegionTownQueryVariables
|
|
||||||
>({
|
if (evo_region_fias_id) {
|
||||||
query: QUERY_GET_QUOTE_REGION_TOWN,
|
region = await getRegionByFias(evo_region_fias_id);
|
||||||
variables: { quoteId },
|
|
||||||
});
|
|
||||||
regionId = quote?.evo_legal_regionid;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return regionId;
|
// town
|
||||||
},
|
let town: Awaited<ReturnType<typeof getTownByFias>> = null;
|
||||||
|
const evo_city_fias_id =
|
||||||
|
lead?.accountidData?.evo_address_legalidData?.evo_city_fias_id ||
|
||||||
|
opportunity?.accountidData?.evo_address_legalidData?.evo_city_fias_id;
|
||||||
|
|
||||||
async getLegalTown({
|
if (region?.value && evo_city_fias_id) {
|
||||||
lead: leadid,
|
town = await getTownByFias(region?.value, evo_city_fias_id);
|
||||||
opportunity: opportunityid,
|
|
||||||
quote: quoteId,
|
|
||||||
regionId,
|
|
||||||
}: Pick<CalculationValues, 'lead' | 'opportunity' | 'quote'> & {
|
|
||||||
regionId: string | null | undefined;
|
|
||||||
}) {
|
|
||||||
if (!regionId) {
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let townId: string | null | undefined;
|
return {
|
||||||
|
account: {
|
||||||
const {
|
evo_legal_regionid: region?.value,
|
||||||
data: { evo_towns },
|
evo_legal_townid: town?.value,
|
||||||
} = await apolloClient.query({
|
evo_regionid: region?.value,
|
||||||
query: CRMTypes.GetTownsDocument,
|
evo_townid: town?.value,
|
||||||
variables: { regionId },
|
},
|
||||||
});
|
};
|
||||||
|
|
||||||
if (leadid) {
|
|
||||||
const {
|
|
||||||
data: { lead },
|
|
||||||
} = await apolloClient.query({
|
|
||||||
query: CRMTypes.GetLeadDocument,
|
|
||||||
variables: { leadid },
|
|
||||||
});
|
|
||||||
if (lead?.accountidData?.evo_address_legalidData?.evo_city_fias_id) {
|
|
||||||
const town = evo_towns?.find(
|
|
||||||
(x) => x?.evo_fias_id === lead?.accountidData?.evo_address_legalidData?.evo_city_fias_id
|
|
||||||
);
|
|
||||||
townId = town?.value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (opportunityid) {
|
|
||||||
const {
|
|
||||||
data: { opportunity },
|
|
||||||
} = await apolloClient.query({
|
|
||||||
query: CRMTypes.GetOpportunityDocument,
|
|
||||||
variables: { opportunityid },
|
|
||||||
});
|
|
||||||
|
|
||||||
if (!townId && opportunity?.accountidData?.evo_address_legalidData?.evo_city_fias_id) {
|
|
||||||
const town = evo_towns?.find(
|
|
||||||
(x) =>
|
|
||||||
x?.evo_fias_id ===
|
|
||||||
opportunity?.accountidData?.evo_address_legalidData?.evo_city_fias_id
|
|
||||||
);
|
|
||||||
townId = town?.value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!townId && quoteId) {
|
|
||||||
const {
|
|
||||||
data: { quote },
|
|
||||||
} = await apolloClient.query<
|
|
||||||
CRMTypes.GetQuoteRegionTownQuery,
|
|
||||||
CRMTypes.GetQuoteRegionTownQueryVariables
|
|
||||||
>({
|
|
||||||
query: QUERY_GET_QUOTE_REGION_TOWN,
|
|
||||||
variables: { quoteId },
|
|
||||||
});
|
|
||||||
townId = quote?.evo_legal_townid;
|
|
||||||
}
|
|
||||||
|
|
||||||
return townId;
|
|
||||||
},
|
|
||||||
|
|
||||||
async getRegion({
|
|
||||||
lead: leadid,
|
|
||||||
opportunity: opportunityid,
|
|
||||||
quote: quoteId,
|
|
||||||
}: Pick<CalculationValues, 'lead' | 'opportunity' | 'quote'>) {
|
|
||||||
let regionId: string | null | undefined;
|
|
||||||
|
|
||||||
const {
|
|
||||||
data: { evo_regions },
|
|
||||||
} = await apolloClient.query({
|
|
||||||
query: CRMTypes.GetRegionsDocument,
|
|
||||||
});
|
|
||||||
|
|
||||||
if (leadid) {
|
|
||||||
const {
|
|
||||||
data: { lead },
|
|
||||||
} = await apolloClient.query({
|
|
||||||
query: CRMTypes.GetLeadDocument,
|
|
||||||
variables: { leadid },
|
|
||||||
});
|
|
||||||
if (lead?.accountidData?.evo_address_legalidData?.evo_region_fias_id) {
|
|
||||||
const region = evo_regions?.find(
|
|
||||||
(x) =>
|
|
||||||
x?.evo_fias_id === lead?.accountidData?.evo_address_legalidData?.evo_region_fias_id
|
|
||||||
);
|
|
||||||
regionId = region?.value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (opportunityid) {
|
|
||||||
const {
|
|
||||||
data: { opportunity },
|
|
||||||
} = await apolloClient.query({
|
|
||||||
query: CRMTypes.GetOpportunityDocument,
|
|
||||||
variables: { opportunityid },
|
|
||||||
});
|
|
||||||
|
|
||||||
if (!regionId && opportunity?.accountidData?.evo_address_legalidData?.evo_region_fias_id) {
|
|
||||||
const region = evo_regions?.find(
|
|
||||||
(x) =>
|
|
||||||
x?.evo_fias_id ===
|
|
||||||
opportunity?.accountidData?.evo_address_legalidData?.evo_region_fias_id
|
|
||||||
);
|
|
||||||
regionId = region?.value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!regionId && quoteId) {
|
|
||||||
const {
|
|
||||||
data: { quote },
|
|
||||||
} = await apolloClient.query<
|
|
||||||
CRMTypes.GetQuoteRegionTownQuery,
|
|
||||||
CRMTypes.GetQuoteRegionTownQueryVariables
|
|
||||||
>({
|
|
||||||
query: QUERY_GET_QUOTE_REGION_TOWN,
|
|
||||||
variables: { quoteId },
|
|
||||||
});
|
|
||||||
regionId = quote?.evo_regionid;
|
|
||||||
}
|
|
||||||
|
|
||||||
return regionId;
|
|
||||||
},
|
|
||||||
|
|
||||||
async getTown({
|
|
||||||
lead: leadid,
|
|
||||||
opportunity: opportunityid,
|
|
||||||
quote: quoteId,
|
|
||||||
regionId,
|
|
||||||
}: Pick<CalculationValues, 'lead' | 'opportunity' | 'quote'> & {
|
|
||||||
regionId: string | null | undefined;
|
|
||||||
}) {
|
|
||||||
if (!regionId) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
let townId: string | null | undefined;
|
|
||||||
|
|
||||||
const {
|
|
||||||
data: { evo_towns },
|
|
||||||
} = await apolloClient.query({
|
|
||||||
query: CRMTypes.GetTownsDocument,
|
|
||||||
variables: { regionId },
|
|
||||||
});
|
|
||||||
|
|
||||||
if (leadid) {
|
|
||||||
const {
|
|
||||||
data: { lead },
|
|
||||||
} = await apolloClient.query({
|
|
||||||
query: CRMTypes.GetLeadDocument,
|
|
||||||
variables: { leadid },
|
|
||||||
});
|
|
||||||
if (lead?.accountidData?.evo_address_legalidData?.evo_city_fias_id) {
|
|
||||||
const town = evo_towns?.find(
|
|
||||||
(x) => x?.evo_fias_id === lead?.accountidData?.evo_address_legalidData?.evo_city_fias_id
|
|
||||||
);
|
|
||||||
townId = town?.value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (opportunityid) {
|
|
||||||
const {
|
|
||||||
data: { opportunity },
|
|
||||||
} = await apolloClient.query({
|
|
||||||
query: CRMTypes.GetOpportunityDocument,
|
|
||||||
variables: { opportunityid },
|
|
||||||
});
|
|
||||||
|
|
||||||
if (!townId && opportunity?.accountidData?.evo_address_legalidData?.evo_city_fias_id) {
|
|
||||||
const town = evo_towns?.find(
|
|
||||||
(x) =>
|
|
||||||
x?.evo_fias_id ===
|
|
||||||
opportunity?.accountidData?.evo_address_legalidData?.evo_city_fias_id
|
|
||||||
);
|
|
||||||
townId = town?.value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (quoteId) {
|
|
||||||
const {
|
|
||||||
data: { quote },
|
|
||||||
} = await apolloClient.query<
|
|
||||||
CRMTypes.GetQuoteRegionTownQuery,
|
|
||||||
CRMTypes.GetQuoteRegionTownQueryVariables
|
|
||||||
>({
|
|
||||||
query: QUERY_GET_QUOTE_REGION_TOWN,
|
|
||||||
variables: { quoteId },
|
|
||||||
});
|
|
||||||
if (!townId && quote?.evo_townid) {
|
|
||||||
townId = quote?.evo_townid;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return townId;
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -202,7 +202,7 @@ export function common({ store, apolloClient, queryClient }: ProcessContext) {
|
|||||||
},
|
},
|
||||||
context
|
context
|
||||||
);
|
);
|
||||||
const { tax, error } = await queryClient.fetchQuery(
|
const { tax } = await queryClient.fetchQuery(
|
||||||
['1c', 'trans-tax', carCategory, leaseObjectMotorPower, leaseObjectYear],
|
['1c', 'trans-tax', carCategory, leaseObjectMotorPower, leaseObjectYear],
|
||||||
request,
|
request,
|
||||||
{
|
{
|
||||||
@ -210,7 +210,7 @@ export function common({ store, apolloClient, queryClient }: ProcessContext) {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!error && tax) {
|
if (tax) {
|
||||||
$calculation.element('tbxVehicleTaxInYear').setValue(tax);
|
$calculation.element('tbxVehicleTaxInYear').setValue(tax);
|
||||||
} else {
|
} else {
|
||||||
$calculation.element('tbxVehicleTaxInYear').resetValue();
|
$calculation.element('tbxVehicleTaxInYear').resetValue();
|
||||||
@ -241,7 +241,7 @@ export function common({ store, apolloClient, queryClient }: ProcessContext) {
|
|||||||
leaseObjectType,
|
leaseObjectType,
|
||||||
// eslint-disable-next-line sonarjs/cognitive-complexity
|
// eslint-disable-next-line sonarjs/cognitive-complexity
|
||||||
}) => {
|
}) => {
|
||||||
const currentDate = dayjs().utc(false).format('YYYY-MM-DD');
|
const currentDate = dayjs().utc(false).toISOString();
|
||||||
|
|
||||||
let evo_region: CRMTypes.GetRegionQuery['evo_region'];
|
let evo_region: CRMTypes.GetRegionQuery['evo_region'];
|
||||||
if (objectRegionRegistrationId) {
|
if (objectRegionRegistrationId) {
|
||||||
@ -377,117 +377,52 @@ export function common({ store, apolloClient, queryClient }: ProcessContext) {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
const { getLegalRegion, getLegalTown, getRegion, getTown } = helper({ apolloClient });
|
const { getData } = helper({ apolloClient });
|
||||||
|
|
||||||
reaction(
|
reaction(
|
||||||
() => $calculation.$values.getValues(['lead', 'opportunity']),
|
() => $calculation.$values.getValues(['lead', 'opportunity']),
|
||||||
async ({ lead, opportunity }) => {
|
async ({ lead, opportunity }) => {
|
||||||
if (!lead && !opportunity) {
|
const { account } = await getData({ lead, opportunity });
|
||||||
$calculation.element('selectLegalClientRegion').resetValue().unblock();
|
|
||||||
$calculation.element('selectRegionRegistration').resetValue().unblock();
|
|
||||||
|
|
||||||
return;
|
if (account.evo_legal_regionid) {
|
||||||
}
|
$calculation
|
||||||
|
.element('selectLegalClientRegion')
|
||||||
const quote = $calculation.element('selectQuote').getValue();
|
.setValue(account.evo_legal_regionid)
|
||||||
|
.block();
|
||||||
const legalRegionId = await getLegalRegion({
|
|
||||||
lead,
|
|
||||||
opportunity,
|
|
||||||
quote,
|
|
||||||
});
|
|
||||||
if (legalRegionId) {
|
|
||||||
$calculation.element('selectLegalClientRegion').setValue(legalRegionId).block();
|
|
||||||
} else {
|
} else {
|
||||||
$calculation.element('selectLegalClientRegion').resetValue().unblock();
|
$calculation.element('selectLegalClientRegion').resetValue().unblock();
|
||||||
}
|
}
|
||||||
|
|
||||||
const regionId = await getRegion({
|
if (account.evo_legal_townid) {
|
||||||
lead,
|
$calculation.element('selectLegalClientTown').setValue(account.evo_legal_townid).block();
|
||||||
opportunity,
|
|
||||||
quote,
|
|
||||||
});
|
|
||||||
if (regionId) {
|
|
||||||
$calculation.element('selectRegionRegistration').setValue(regionId).block();
|
|
||||||
} else {
|
} else {
|
||||||
$calculation.element('selectRegionRegistration').resetValue().unblock();
|
$calculation.element('selectLegalClientTown').resetValue().unblock();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
delay: 10,
|
delay: 50,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
reaction(
|
reaction(
|
||||||
() => $calculation.element('selectLegalClientRegion').getValue(),
|
() => $calculation.$values.getValues(['lead', 'opportunity', 'objectRegistration']),
|
||||||
async (regionId) => {
|
async ({ lead, objectRegistration, opportunity }) => {
|
||||||
if (!regionId) {
|
const { account } = await getData({ lead, opportunity });
|
||||||
$calculation.element('selectLegalClientTown').resetValue().unblock();
|
|
||||||
|
|
||||||
return;
|
if (objectRegistration === 100_000_000 && account.evo_regionid) {
|
||||||
}
|
$calculation.element('selectRegionRegistration').setValue(account.evo_regionid).block();
|
||||||
|
|
||||||
const lead = $calculation.element('selectLead').getValue();
|
|
||||||
const opportunity = $calculation.element('selectOpportunity').getValue();
|
|
||||||
const quote = $calculation.element('selectQuote').getValue();
|
|
||||||
|
|
||||||
const townId = await getLegalTown({
|
|
||||||
lead,
|
|
||||||
opportunity,
|
|
||||||
quote,
|
|
||||||
regionId,
|
|
||||||
});
|
|
||||||
if (townId) {
|
|
||||||
$calculation.element('selectLegalClientTown').setValue(townId).block();
|
|
||||||
} else {
|
} else {
|
||||||
$calculation.element('selectLegalClientTown').resetValue().unblock();
|
$calculation.element('selectRegionRegistration').unblock();
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
reaction(
|
|
||||||
() => $calculation.$values.getValues(['regionRegistration', 'objectRegistration']),
|
|
||||||
async ({ regionRegistration: regionId, objectRegistration }) => {
|
|
||||||
if (!regionId) {
|
|
||||||
$calculation.element('selectTownRegistration').resetValue().unblock();
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const lead = $calculation.element('selectLead').getValue();
|
if (objectRegistration === 100_000_000 && account.evo_townid) {
|
||||||
const opportunity = $calculation.element('selectOpportunity').getValue();
|
$calculation.element('selectTownRegistration').setValue(account.evo_townid).block();
|
||||||
const quote = $calculation.element('selectQuote').getValue();
|
|
||||||
|
|
||||||
const townId = await getTown({
|
|
||||||
lead,
|
|
||||||
opportunity,
|
|
||||||
quote,
|
|
||||||
regionId,
|
|
||||||
});
|
|
||||||
|
|
||||||
if (townId && objectRegistration === 100_000_000) {
|
|
||||||
$calculation.element('selectTownRegistration').setValue(townId).block();
|
|
||||||
} else {
|
} else {
|
||||||
$calculation.element('selectTownRegistration').resetValue().unblock();
|
$calculation.element('selectTownRegistration').unblock();
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
reaction(
|
|
||||||
() => $calculation.element('radioObjectRegistration').getValue(),
|
|
||||||
async (objectRegistration) => {
|
|
||||||
const {
|
|
||||||
data: { evo_regions },
|
|
||||||
} = await apolloClient.query({
|
|
||||||
query: CRMTypes.GetRegionsDocument,
|
|
||||||
});
|
|
||||||
|
|
||||||
if (objectRegistration === 100_000_001) {
|
|
||||||
const regions = evo_regions?.filter((x) => x?.evo_businessunit_evolution === true);
|
|
||||||
$calculation.element('selectRegionRegistration').setOptions(normalizeOptions(regions));
|
|
||||||
} else {
|
|
||||||
$calculation.element('selectRegionRegistration').setOptions(normalizeOptions(evo_regions));
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
delay: 50,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -117,7 +117,7 @@ export function createValidationSchema({ apolloClient }: ValidationContext) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (objectRegistration === 100_000_000 && !townRegistration)
|
if (!townRegistration)
|
||||||
ctx.addIssue({
|
ctx.addIssue({
|
||||||
code: z.ZodIssueCode.custom,
|
code: z.ZodIssueCode.custom,
|
||||||
message: 'Не заполнено поле',
|
message: 'Не заполнено поле',
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import { useEffect } from 'react';
|
|||||||
|
|
||||||
dayjs.extend(utc);
|
dayjs.extend(utc);
|
||||||
|
|
||||||
const currentDate = dayjs().utc(false).format('YYYY-MM-DD');
|
const currentDate = dayjs().utc(false).toISOString();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -19,9 +19,6 @@ const currentDate = dayjs().utc(false).format('YYYY-MM-DD');
|
|||||||
function getMainData({ query }, onCompleted) {
|
function getMainData({ query }, onCompleted) {
|
||||||
query({
|
query({
|
||||||
query: CRMTypes.GetLeaseObjectTypesDocument,
|
query: CRMTypes.GetLeaseObjectTypesDocument,
|
||||||
variables: {
|
|
||||||
currentDate,
|
|
||||||
},
|
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
onCompleted({
|
onCompleted({
|
||||||
selectLeaseObjectType: data?.evo_leasingobject_types,
|
selectLeaseObjectType: data?.evo_leasingobject_types,
|
||||||
|
|||||||
@ -5,11 +5,11 @@ import { createValidationSchema } from './validation';
|
|||||||
import { selectLeaseObjectUseFor } from '@/config/default-options';
|
import { selectLeaseObjectUseFor } from '@/config/default-options';
|
||||||
import * as CRMTypes from '@/graphql/crm.types';
|
import * as CRMTypes from '@/graphql/crm.types';
|
||||||
import { normalizeOptions } from '@/utils/entity';
|
import { normalizeOptions } from '@/utils/entity';
|
||||||
import { debouncedReaction } from '@/utils/mobx';
|
import { debouncedReaction, disposableReaction } from '@/utils/mobx';
|
||||||
import { reaction } from 'mobx';
|
import { reaction } from 'mobx';
|
||||||
|
|
||||||
export function common({ store, apolloClient }: ProcessContext) {
|
export function common({ store, apolloClient }: ProcessContext) {
|
||||||
const { $calculation, $tables } = store;
|
const { $calculation, $tables, $process } = store;
|
||||||
|
|
||||||
reaction(
|
reaction(
|
||||||
() => $calculation.element('selectGPSBrand').getValue(),
|
() => $calculation.element('selectGPSBrand').getValue(),
|
||||||
@ -146,6 +146,7 @@ export function common({ store, apolloClient }: ProcessContext) {
|
|||||||
$tables.insurance
|
$tables.insurance
|
||||||
.row('kasko')
|
.row('kasko')
|
||||||
.setOptions('insuranceCompany', normalizeOptions(defaultKaskoOptions))
|
.setOptions('insuranceCompany', normalizeOptions(defaultKaskoOptions))
|
||||||
|
.unblock('insuranceCompany')
|
||||||
.unblock('insCost');
|
.unblock('insCost');
|
||||||
|
|
||||||
if (leasingPeriod < 12) {
|
if (leasingPeriod < 12) {
|
||||||
@ -229,7 +230,8 @@ export function common({ store, apolloClient }: ProcessContext) {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
reaction(
|
disposableReaction(
|
||||||
|
() => $process.has('LoadKP'),
|
||||||
() => $calculation.element('selectBrand').getValue(),
|
() => $calculation.element('selectBrand').getValue(),
|
||||||
async (brandId) => {
|
async (brandId) => {
|
||||||
if (!brandId) {
|
if (!brandId) {
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable sonarjs/cognitive-complexity */
|
||||||
/* eslint-disable zod/require-strict */
|
/* eslint-disable zod/require-strict */
|
||||||
import type { ValidationContext } from '../types';
|
import type { ValidationContext } from '../types';
|
||||||
import type * as Insurance from '@/Components/Calculation/Form/Insurance/InsuranceTable/types';
|
import type * as Insurance from '@/Components/Calculation/Form/Insurance/InsuranceTable/types';
|
||||||
@ -8,6 +9,7 @@ import { z } from 'zod';
|
|||||||
|
|
||||||
export function createValidationSchema({ apolloClient }: ValidationContext) {
|
export function createValidationSchema({ apolloClient }: ValidationContext) {
|
||||||
return ValuesSchema.pick({
|
return ValuesSchema.pick({
|
||||||
|
brand: true,
|
||||||
insDecentral: true,
|
insDecentral: true,
|
||||||
leasingPeriod: true,
|
leasingPeriod: true,
|
||||||
leasingWithoutKasko: true,
|
leasingWithoutKasko: true,
|
||||||
@ -27,6 +29,7 @@ export function createValidationSchema({ apolloClient }: ValidationContext) {
|
|||||||
leasingWithoutKasko,
|
leasingWithoutKasko,
|
||||||
insDecentral,
|
insDecentral,
|
||||||
insurance,
|
insurance,
|
||||||
|
brand: brandId,
|
||||||
},
|
},
|
||||||
ctx
|
ctx
|
||||||
) => {
|
) => {
|
||||||
@ -63,7 +66,7 @@ export function createValidationSchema({ apolloClient }: ValidationContext) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (insCost > 0 && !insuranceCompany) {
|
if (!insuranceCompany) {
|
||||||
ctx.addIssue({
|
ctx.addIssue({
|
||||||
code: z.ZodIssueCode.custom,
|
code: z.ZodIssueCode.custom,
|
||||||
message: `Укажите страховую компанию ${policyType}`,
|
message: `Укажите страховую компанию ${policyType}`,
|
||||||
@ -71,7 +74,7 @@ export function createValidationSchema({ apolloClient }: ValidationContext) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (insCost > 0 && !insTerm) {
|
if (!insTerm) {
|
||||||
ctx.addIssue({
|
ctx.addIssue({
|
||||||
code: z.ZodIssueCode.custom,
|
code: z.ZodIssueCode.custom,
|
||||||
message: `Укажите срок страхования ${policyType}`,
|
message: `Укажите срок страхования ${policyType}`,
|
||||||
@ -79,7 +82,7 @@ export function createValidationSchema({ apolloClient }: ValidationContext) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (insCost > 0 && !insured) {
|
if (!insured) {
|
||||||
ctx.addIssue({
|
ctx.addIssue({
|
||||||
code: z.ZodIssueCode.custom,
|
code: z.ZodIssueCode.custom,
|
||||||
message: `Укажите плательщика ${policyType}`,
|
message: `Укажите плательщика ${policyType}`,
|
||||||
@ -110,6 +113,41 @@ export function createValidationSchema({ apolloClient }: ValidationContext) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (brandId) {
|
||||||
|
const {
|
||||||
|
data: { evo_brand },
|
||||||
|
} = await apolloClient.query({
|
||||||
|
query: CRMTypes.GetBrandDocument,
|
||||||
|
variables: { brandId },
|
||||||
|
});
|
||||||
|
|
||||||
|
const {
|
||||||
|
data: { accounts },
|
||||||
|
} = await apolloClient.query({
|
||||||
|
query: CRMTypes.GetInsuranceCompaniesDocument,
|
||||||
|
});
|
||||||
|
|
||||||
|
const defaultKaskoOptions = accounts?.filter((x) =>
|
||||||
|
x?.evo_type_ins_policy?.includes(100_000_000)
|
||||||
|
);
|
||||||
|
|
||||||
|
if (evo_brand?.evo_id === 'BRAND49') {
|
||||||
|
const renessansCompany = defaultKaskoOptions?.find((x) => x?.evo_inn === '7725497022');
|
||||||
|
|
||||||
|
if (
|
||||||
|
renessansCompany &&
|
||||||
|
insurance.values.kasko.insuranceCompany !== renessansCompany.value
|
||||||
|
) {
|
||||||
|
ctx.addIssue({
|
||||||
|
code: z.ZodIssueCode.custom,
|
||||||
|
message:
|
||||||
|
'Для Harley-Davidson СК для КАСКО может быть только ' + renessansCompany.label,
|
||||||
|
path: ['insurance'],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
/* eslint-disable sonarjs/cognitive-complexity */
|
||||||
|
/* eslint-disable complexity */
|
||||||
import type { ValidationContext } from '../types';
|
import type { ValidationContext } from '../types';
|
||||||
import ValuesSchema from '@/config/schema/values';
|
import ValuesSchema from '@/config/schema/values';
|
||||||
import * as CRMTypes from '@/graphql/crm.types';
|
import * as CRMTypes from '@/graphql/crm.types';
|
||||||
@ -5,13 +7,16 @@ import { z } from 'zod';
|
|||||||
|
|
||||||
export function createValidationSchema({ apolloClient }: ValidationContext) {
|
export function createValidationSchema({ apolloClient }: ValidationContext) {
|
||||||
return ValuesSchema.pick({
|
return ValuesSchema.pick({
|
||||||
|
brand: true,
|
||||||
countSeats: true,
|
countSeats: true,
|
||||||
engineType: true,
|
engineType: true,
|
||||||
engineVolume: true,
|
engineVolume: true,
|
||||||
leaseObjectCategory: true,
|
leaseObjectCategory: true,
|
||||||
leaseObjectMotorPower: true,
|
leaseObjectMotorPower: true,
|
||||||
leaseObjectType: true,
|
leaseObjectType: true,
|
||||||
|
leaseObjectUseFor: true,
|
||||||
maxMass: true,
|
maxMass: true,
|
||||||
|
model: true,
|
||||||
}).superRefine(
|
}).superRefine(
|
||||||
async (
|
async (
|
||||||
{
|
{
|
||||||
@ -22,9 +27,44 @@ export function createValidationSchema({ apolloClient }: ValidationContext) {
|
|||||||
countSeats,
|
countSeats,
|
||||||
maxMass,
|
maxMass,
|
||||||
leaseObjectCategory,
|
leaseObjectCategory,
|
||||||
|
brand,
|
||||||
|
model,
|
||||||
|
leaseObjectUseFor,
|
||||||
},
|
},
|
||||||
ctx
|
ctx
|
||||||
) => {
|
) => {
|
||||||
|
if (!leaseObjectTypeId) {
|
||||||
|
ctx.addIssue({
|
||||||
|
code: z.ZodIssueCode.custom,
|
||||||
|
message: 'Не заполнено поле',
|
||||||
|
path: ['selectLeaseObjectType'],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!brand) {
|
||||||
|
ctx.addIssue({
|
||||||
|
code: z.ZodIssueCode.custom,
|
||||||
|
message: 'Не заполнено поле',
|
||||||
|
path: ['selectBrand'],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!model) {
|
||||||
|
ctx.addIssue({
|
||||||
|
code: z.ZodIssueCode.custom,
|
||||||
|
message: 'Не заполнено поле',
|
||||||
|
path: ['selectModel'],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!leaseObjectUseFor) {
|
||||||
|
ctx.addIssue({
|
||||||
|
code: z.ZodIssueCode.custom,
|
||||||
|
message: 'Не заполнено поле',
|
||||||
|
path: ['selectLeaseObjectUseFor'],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (leaseObjectTypeId) {
|
if (leaseObjectTypeId) {
|
||||||
const {
|
const {
|
||||||
data: { evo_leasingobject_type },
|
data: { evo_leasingobject_type },
|
||||||
|
|||||||
@ -66,7 +66,7 @@ export function common({ store, apolloClient }: ProcessContext) {
|
|||||||
firstPaymentPerc,
|
firstPaymentPerc,
|
||||||
model: modelId,
|
model: modelId,
|
||||||
}) => {
|
}) => {
|
||||||
const currentDate = dayjs().utc(false).format('YYYY-MM-DD');
|
const currentDate = dayjs().utc(false).toISOString();
|
||||||
|
|
||||||
const {
|
const {
|
||||||
data: { evo_addproduct_types },
|
data: { evo_addproduct_types },
|
||||||
|
|||||||
@ -72,7 +72,9 @@ export function common({ store, trpcClient }: ProcessContext) {
|
|||||||
$calculation.element('selectQuote').resetValue();
|
$calculation.element('selectQuote').resetValue();
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
$process.delete('LoadKP');
|
setTimeout(() => {
|
||||||
|
$process.delete('LoadKP');
|
||||||
|
}, 100);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
@ -8,7 +8,9 @@ import { z } from 'zod';
|
|||||||
export function createValidationSchema({ apolloClient }: ValidationContext) {
|
export function createValidationSchema({ apolloClient }: ValidationContext) {
|
||||||
return ValuesSchema.pick({
|
return ValuesSchema.pick({
|
||||||
VATInLeaseObjectPrice: true,
|
VATInLeaseObjectPrice: true,
|
||||||
|
balanceHolder: true,
|
||||||
firstPaymentRub: true,
|
firstPaymentRub: true,
|
||||||
|
lastPaymentPerc: true,
|
||||||
leaseObjectPriceWthtVAT: true,
|
leaseObjectPriceWthtVAT: true,
|
||||||
plPriceRub: true,
|
plPriceRub: true,
|
||||||
product: true,
|
product: true,
|
||||||
@ -24,6 +26,8 @@ export function createValidationSchema({ apolloClient }: ValidationContext) {
|
|||||||
plPriceRub,
|
plPriceRub,
|
||||||
firstPaymentRub,
|
firstPaymentRub,
|
||||||
subsidySum,
|
subsidySum,
|
||||||
|
balanceHolder,
|
||||||
|
lastPaymentPerc,
|
||||||
},
|
},
|
||||||
ctx
|
ctx
|
||||||
) => {
|
) => {
|
||||||
@ -74,6 +78,23 @@ export function createValidationSchema({ apolloClient }: ValidationContext) {
|
|||||||
path: ['tbxFirstPaymentRub'],
|
path: ['tbxFirstPaymentRub'],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (balanceHolder === 100_000_001) {
|
||||||
|
if (lastPaymentPerc < 1) {
|
||||||
|
ctx.addIssue({
|
||||||
|
code: z.ZodIssueCode.custom,
|
||||||
|
message:
|
||||||
|
'При балансе лизингодатель последний платеж не может быть меньше 1%! Увеличьте значение.',
|
||||||
|
path: ['tbxLastPaymentPerc'],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else if (lastPaymentPerc === 0) {
|
||||||
|
ctx.addIssue({
|
||||||
|
code: z.ZodIssueCode.custom,
|
||||||
|
message: 'Последний платеж не может быть равен 0. Увеличьте значение',
|
||||||
|
path: ['tbxLastPaymentPerc'],
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,7 +9,6 @@ import { z } from 'zod';
|
|||||||
export function createValidationSchema({ apolloClient }: ValidationContext) {
|
export function createValidationSchema({ apolloClient }: ValidationContext) {
|
||||||
return ValuesSchema.pick({
|
return ValuesSchema.pick({
|
||||||
addEquipmentPrice: true,
|
addEquipmentPrice: true,
|
||||||
balanceHolder: true,
|
|
||||||
countSeats: true,
|
countSeats: true,
|
||||||
dealerPerson: true,
|
dealerPerson: true,
|
||||||
discountRub: true,
|
discountRub: true,
|
||||||
@ -45,7 +44,6 @@ export function createValidationSchema({ apolloClient }: ValidationContext) {
|
|||||||
countSeats,
|
countSeats,
|
||||||
leaseObjectYear,
|
leaseObjectYear,
|
||||||
lastPaymentPerc,
|
lastPaymentPerc,
|
||||||
balanceHolder,
|
|
||||||
leaseObjectCategory,
|
leaseObjectCategory,
|
||||||
},
|
},
|
||||||
ctx
|
ctx
|
||||||
@ -87,54 +85,39 @@ export function createValidationSchema({ apolloClient }: ValidationContext) {
|
|||||||
const maxCondition1 =
|
const maxCondition1 =
|
||||||
leaseObjectUsed === false &&
|
leaseObjectUsed === false &&
|
||||||
dealerPerson?.evo_supplier_type !== 100_000_001 &&
|
dealerPerson?.evo_supplier_type !== 100_000_001 &&
|
||||||
|
quote?.evo_max_price_change &&
|
||||||
!evo_baseproduct?.evo_sale_without_nds &&
|
!evo_baseproduct?.evo_sale_without_nds &&
|
||||||
Boolean(
|
plPriceRub - discountRub + addEquipmentPrice - importProgramSum >
|
||||||
quote?.evo_max_price_change &&
|
quote.evo_max_price_change;
|
||||||
plPriceRub - discountRub + addEquipmentPrice - importProgramSum >
|
|
||||||
quote.evo_max_price_change
|
|
||||||
);
|
|
||||||
|
|
||||||
const maxCondition2 =
|
const maxCondition2 =
|
||||||
leaseObjectUsed === false &&
|
leaseObjectUsed === false &&
|
||||||
dealerPerson?.evo_supplier_type !== 100_000_001 &&
|
dealerPerson?.evo_supplier_type !== 100_000_001 &&
|
||||||
Boolean(evo_baseproduct?.evo_sale_without_nds) &&
|
quote?.evo_max_price_change &&
|
||||||
Boolean(
|
evo_baseproduct?.evo_sale_without_nds &&
|
||||||
quote?.evo_nds_in_price_supplier_currency &&
|
leaseObjectPriceWthtVAT >
|
||||||
quote?.evo_max_price_change &&
|
quote.evo_max_price_change - (quote.evo_nds_in_price_supplier_currency || 0);
|
||||||
leaseObjectPriceWthtVAT >
|
|
||||||
quote.evo_max_price_change - quote.evo_nds_in_price_supplier_currency
|
|
||||||
);
|
|
||||||
|
|
||||||
const maxCondition3 =
|
const maxCondition3 =
|
||||||
(leaseObjectUsed === true || dealerPerson?.evo_supplier_type === 100_000_001) &&
|
(leaseObjectUsed === true || dealerPerson?.evo_supplier_type === 100_000_001) &&
|
||||||
Boolean(
|
quote?.evo_supplier_currency_price &&
|
||||||
quote?.evo_supplier_currency_price &&
|
plPriceRub - discountRub + addEquipmentPrice - importProgramSum >
|
||||||
quote.evo_discount_supplier_currency &&
|
quote.evo_supplier_currency_price -
|
||||||
quote.evo_equip_price &&
|
(quote.evo_discount_supplier_currency || 0) +
|
||||||
quote.evo_program_import_subsidy_sum &&
|
(quote.evo_equip_price || 0) -
|
||||||
plPriceRub - discountRub + addEquipmentPrice - importProgramSum >
|
(quote.evo_program_import_subsidy_sum || 0);
|
||||||
quote?.evo_supplier_currency_price -
|
|
||||||
quote.evo_discount_supplier_currency +
|
|
||||||
quote.evo_equip_price -
|
|
||||||
quote.evo_program_import_subsidy_sum
|
|
||||||
);
|
|
||||||
|
|
||||||
const minCondition1 =
|
const minCondition1 =
|
||||||
!evo_baseproduct?.evo_sale_without_nds &&
|
!evo_baseproduct?.evo_sale_without_nds &&
|
||||||
Boolean(
|
quote?.evo_min_change_price &&
|
||||||
quote?.evo_min_change_price &&
|
plPriceRub - discountRub + addEquipmentPrice - importProgramSum <
|
||||||
plPriceRub - discountRub + addEquipmentPrice - importProgramSum <
|
quote.evo_min_change_price;
|
||||||
quote.evo_min_change_price
|
|
||||||
);
|
|
||||||
|
|
||||||
const minCondition2 =
|
const minCondition2 =
|
||||||
Boolean(evo_baseproduct?.evo_sale_without_nds) &&
|
evo_baseproduct?.evo_sale_without_nds &&
|
||||||
Boolean(
|
quote?.evo_min_change_price &&
|
||||||
quote?.evo_nds_in_price_supplier_currency &&
|
leaseObjectPriceWthtVAT <
|
||||||
quote?.evo_min_change_price &&
|
quote.evo_min_change_price - (quote.evo_nds_in_price_supplier_currency || 0);
|
||||||
leaseObjectPriceWthtVAT <
|
|
||||||
quote.evo_min_change_price - quote.evo_nds_in_price_supplier_currency
|
|
||||||
);
|
|
||||||
|
|
||||||
if (maxCondition1 || maxCondition2) {
|
if (maxCondition1 || maxCondition2) {
|
||||||
ctx.addIssue({
|
ctx.addIssue({
|
||||||
@ -236,23 +219,6 @@ export function createValidationSchema({ apolloClient }: ValidationContext) {
|
|||||||
path: ['tbxLastPaymentPerc'],
|
path: ['tbxLastPaymentPerc'],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (balanceHolder === 100_000_001) {
|
|
||||||
if (lastPaymentPerc < 1) {
|
|
||||||
ctx.addIssue({
|
|
||||||
code: z.ZodIssueCode.custom,
|
|
||||||
message:
|
|
||||||
'При балансе лизингодатель последний платеж не может быть меньше 1%! Увеличьте значение.',
|
|
||||||
path: ['tbxLastPaymentPerc'],
|
|
||||||
});
|
|
||||||
}
|
|
||||||
} else if (lastPaymentPerc === 0) {
|
|
||||||
ctx.addIssue({
|
|
||||||
code: z.ZodIssueCode.custom,
|
|
||||||
message: 'Последний платеж не может быть равен 0. Увеличьте значение',
|
|
||||||
path: ['tbxLastPaymentPerc'],
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
@ -35,7 +35,7 @@ export function fillAgentRewardReaction(
|
|||||||
query: CRMTypes.GetRewardConditionsDocument,
|
query: CRMTypes.GetRewardConditionsDocument,
|
||||||
variables: {
|
variables: {
|
||||||
agentid,
|
agentid,
|
||||||
currentDate: dayjs().utc(false).format('YYYY-MM-DD'),
|
currentDate: dayjs().utc(false).toISOString(),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -61,9 +61,8 @@ export function common({ store, apolloClient }: ProcessContext) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const value = dealerPersons.at(0)?.value;
|
const value = dealerPersons.at(0)?.value;
|
||||||
if (!$process.has('LoadKP') && value) {
|
if (!$process.has('LoadKP') && value && !dealer?.evo_supplier_financing_accept)
|
||||||
$calculation.element('selectDealerPerson').setValue(value);
|
$calculation.element('selectDealerPerson').setValue(value);
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
$calculation.element('selectDealerPerson').reset();
|
$calculation.element('selectDealerPerson').reset();
|
||||||
}
|
}
|
||||||
@ -158,10 +157,9 @@ export function common({ store, apolloClient }: ProcessContext) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
reaction(
|
reaction(
|
||||||
() => $calculation.$values.getValues(['product', 'dealerPerson']),
|
() => $calculation.$values.getValues(['product']),
|
||||||
async ({ product: productId, dealerPerson: dealerPersonId }) => {
|
async ({ product: productId }) => {
|
||||||
let evo_baseproduct: CRMTypes.GetProductQuery['evo_baseproduct'] = null;
|
let evo_baseproduct: CRMTypes.GetProductQuery['evo_baseproduct'] = null;
|
||||||
let dealerPerson: CRMTypes.GetDealerPersonQuery['account'] = null;
|
|
||||||
|
|
||||||
if (productId) {
|
if (productId) {
|
||||||
const { data } = await apolloClient.query({
|
const { data } = await apolloClient.query({
|
||||||
@ -172,23 +170,9 @@ export function common({ store, apolloClient }: ProcessContext) {
|
|||||||
({ evo_baseproduct } = data);
|
({ evo_baseproduct } = data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dealerPersonId) {
|
$calculation
|
||||||
const { data } = await apolloClient.query({
|
.element('cbxSupplierFinancing')
|
||||||
query: CRMTypes.GetDealerPersonDocument,
|
.setValue(Boolean(evo_baseproduct?.evo_supplier_financing_accept));
|
||||||
variables: { dealerPersonId },
|
|
||||||
});
|
|
||||||
|
|
||||||
({ account: dealerPerson } = data);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (
|
|
||||||
evo_baseproduct?.evo_supplier_financing_accept &&
|
|
||||||
dealerPerson?.evo_supplier_financing_accept
|
|
||||||
) {
|
|
||||||
$calculation.element('cbxSupplierFinancing').unblock();
|
|
||||||
} else {
|
|
||||||
$calculation.element('cbxSupplierFinancing').setValue(false).block();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,7 +32,7 @@ function helper({ apolloClient, ctx }: ValidationContext & { ctx: RefinementCtx
|
|||||||
query: CRMTypes.GetRewardConditionsDocument,
|
query: CRMTypes.GetRewardConditionsDocument,
|
||||||
variables: {
|
variables: {
|
||||||
agentid,
|
agentid,
|
||||||
currentDate: dayjs().utc(false).format('YYYY-MM-DD'),
|
currentDate: dayjs().utc(false).toISOString(),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -369,6 +369,12 @@ export function createValidationSchema(context: ValidationContext) {
|
|||||||
message: 'Не заполнено поле',
|
message: 'Не заполнено поле',
|
||||||
path: ['selectDealerPerson'],
|
path: ['selectDealerPerson'],
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
ctx.addIssue({
|
||||||
|
code: z.ZodIssueCode.custom,
|
||||||
|
message: 'Не заполнено поле',
|
||||||
|
path: ['selectDealer'],
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const { validateRewardSum, validateRewardWithoutOtherAgent } = helper({ ...context, ctx });
|
const { validateRewardSum, validateRewardWithoutOtherAgent } = helper({ ...context, ctx });
|
||||||
|
|||||||
@ -52,7 +52,7 @@ export function createValidationReaction<T extends ZodTypeAny>(
|
|||||||
|
|
||||||
if (validationResult.success === false) {
|
if (validationResult.success === false) {
|
||||||
validationResult.error.errors.forEach(({ path, message }) => {
|
validationResult.error.errors.forEach(({ path, message }) => {
|
||||||
(path as Array<Elements & ('insurance' | 'insurance')>).forEach((elementName) => {
|
(path as Array<Elements & ('insurance' | 'payments')>).forEach((elementName) => {
|
||||||
if (elementName === 'insurance') {
|
if (elementName === 'insurance') {
|
||||||
const removeError = $tables.insurance.setError({ key, message });
|
const removeError = $tables.insurance.setError({ key, message });
|
||||||
if (removeError) helper.add(removeError);
|
if (removeError) helper.add(removeError);
|
||||||
|
|||||||
@ -156,6 +156,9 @@ export function common({ store, apolloClient }: ProcessContext) {
|
|||||||
} else {
|
} else {
|
||||||
$calculation.element('tbxMileage').resetValue().block();
|
$calculation.element('tbxMileage').resetValue().block();
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fireImmediately: true,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -247,13 +250,13 @@ export function common({ store, apolloClient }: ProcessContext) {
|
|||||||
reaction(
|
reaction(
|
||||||
() => $calculation.$values.getValues(['subsidy', 'supplierFinancing']),
|
() => $calculation.$values.getValues(['subsidy', 'supplierFinancing']),
|
||||||
({ subsidy: subsidyId, supplierFinancing }) => {
|
({ subsidy: subsidyId, supplierFinancing }) => {
|
||||||
if (subsidyId || supplierFinancing) {
|
if (subsidyId) {
|
||||||
$calculation.element('tbxLeaseObjectCount').setValue(1).block();
|
$calculation.element('tbxLeaseObjectCount').setValue(1).block();
|
||||||
} else {
|
} else {
|
||||||
$calculation.element('tbxLeaseObjectCount').unblock();
|
$calculation.element('tbxLeaseObjectCount').unblock();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (subsidyId) {
|
if (subsidyId || supplierFinancing) {
|
||||||
$calculation.element('cbxLeaseObjectUsed').setValue(false).block();
|
$calculation.element('cbxLeaseObjectUsed').setValue(false).block();
|
||||||
} else {
|
} else {
|
||||||
$calculation.element('cbxLeaseObjectUsed').unblock();
|
$calculation.element('cbxLeaseObjectUsed').unblock();
|
||||||
|
|||||||
@ -65,6 +65,11 @@ export const calculateRouter = router({
|
|||||||
responseCalculate: calculateResult,
|
responseCalculate: calculateResult,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// TEMP
|
||||||
|
if (ctx.unlimited) {
|
||||||
|
result.__calculateResult = calculateResult;
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
data: result,
|
data: result,
|
||||||
success: true,
|
success: true,
|
||||||
|
|||||||
@ -45,7 +45,7 @@ export async function createRequestData({
|
|||||||
})),
|
})),
|
||||||
};
|
};
|
||||||
|
|
||||||
const currentUTCDate = dayjs().utc(false);
|
const currentDate = dayjs().utc(false);
|
||||||
|
|
||||||
let systemuser: CRMTypes.GetSystemUserQuery['systemuser'] = null;
|
let systemuser: CRMTypes.GetSystemUserQuery['systemuser'] = null;
|
||||||
|
|
||||||
@ -98,8 +98,7 @@ export async function createRequestData({
|
|||||||
await apolloClient.query({
|
await apolloClient.query({
|
||||||
query: CRMTypes.GetCoefficientsDocument,
|
query: CRMTypes.GetCoefficientsDocument,
|
||||||
variables: {
|
variables: {
|
||||||
currentDate: currentUTCDate.format('YYYY-MM-DD'),
|
currentDate: currentDate.toISOString(),
|
||||||
jobTitleId: systemuser?.evo_job_titleid,
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
).data.evo_coefficients
|
).data.evo_coefficients
|
||||||
@ -183,18 +182,23 @@ export async function createRequestData({
|
|||||||
|
|
||||||
async bonusFinGAP() {
|
async bonusFinGAP() {
|
||||||
const evo_coefficient = evo_coefficients?.find(
|
const evo_coefficient = evo_coefficients?.find(
|
||||||
(x) => x?.evo_sot_coefficient_typeidData?.evo_id === 'BONUS_FINGAP_PR'
|
(x) =>
|
||||||
|
x?.evo_job_titleid === systemuser?.evo_job_titleid &&
|
||||||
|
x?.evo_sot_coefficient_typeidData?.evo_id === 'BONUS_FINGAP_PR'
|
||||||
);
|
);
|
||||||
|
|
||||||
return (evo_coefficient?.evo_sot_coefficient || 0) + insurance.values.fingap.insCost;
|
return (evo_coefficient?.evo_sot_coefficient || 0) * insurance.values.fingap.insCost;
|
||||||
},
|
},
|
||||||
|
|
||||||
async bonusFix() {
|
async bonusFix() {
|
||||||
const evo_coefficient = evo_coefficients?.find(
|
const evo_coefficient = evo_coefficients?.find(
|
||||||
(x) =>
|
(x) =>
|
||||||
|
x?.evo_job_titleid === systemuser?.evo_job_titleid &&
|
||||||
x?.evo_sot_coefficient_typeidData?.evo_id === 'BONUS_FIX' &&
|
x?.evo_sot_coefficient_typeidData?.evo_id === 'BONUS_FIX' &&
|
||||||
Boolean(values.product) &&
|
values.product &&
|
||||||
x.evo_baseproducts?.some((evo_baseproduct) => evo_baseproduct?.evo_id === values.product)
|
x.evo_baseproducts?.some(
|
||||||
|
(evo_baseproduct) => evo_baseproduct?.evo_baseproductid === values.product
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
return evo_coefficient?.evo_sot_coefficient || 0;
|
return evo_coefficient?.evo_sot_coefficient || 0;
|
||||||
@ -273,7 +277,7 @@ export async function createRequestData({
|
|||||||
},
|
},
|
||||||
|
|
||||||
async calcDate() {
|
async calcDate() {
|
||||||
return currentUTCDate.toDate();
|
return currentDate.toDate();
|
||||||
},
|
},
|
||||||
|
|
||||||
async calcType() {
|
async calcType() {
|
||||||
@ -305,12 +309,12 @@ export async function createRequestData({
|
|||||||
},
|
},
|
||||||
|
|
||||||
async deliverySum() {
|
async deliverySum() {
|
||||||
if (values.calcDoubleAgentRewardCondition) {
|
if (values.dealerRewardCondition) {
|
||||||
const {
|
const {
|
||||||
data: { evo_reward_condition },
|
data: { evo_reward_condition },
|
||||||
} = await apolloClient.query({
|
} = await apolloClient.query({
|
||||||
query: CRMTypes.GetRewardConditionDocument,
|
query: CRMTypes.GetRewardConditionDocument,
|
||||||
variables: { conditionId: values.calcDoubleAgentRewardCondition },
|
variables: { conditionId: values.dealerRewardCondition },
|
||||||
});
|
});
|
||||||
|
|
||||||
if (evo_reward_condition?.evo_calc_reward_rules === 100_000_001) {
|
if (evo_reward_condition?.evo_calc_reward_rules === 100_000_001) {
|
||||||
@ -348,10 +352,15 @@ export async function createRequestData({
|
|||||||
|
|
||||||
async directorBonus() {
|
async directorBonus() {
|
||||||
const evo_coefficient = evo_coefficients?.find(
|
const evo_coefficient = evo_coefficients?.find(
|
||||||
(x) => x?.evo_sot_coefficient_typeidData?.evo_id === 'DIRECTOR_BONUS'
|
(x) =>
|
||||||
|
x?.evo_sot_coefficient_typeidData?.evo_id === 'DIRECTOR_BONUS' &&
|
||||||
|
values.product &&
|
||||||
|
x.evo_baseproducts?.some(
|
||||||
|
(evo_baseproduct) => evo_baseproduct?.evo_baseproductid === values.product
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
return (evo_coefficient?.evo_sot_coefficient || 0) + insurance.values.fingap.insCost;
|
return evo_coefficient?.evo_sot_coefficient || 0;
|
||||||
},
|
},
|
||||||
|
|
||||||
async directorBonusFinGAP() {
|
async directorBonusFinGAP() {
|
||||||
@ -359,15 +368,20 @@ export async function createRequestData({
|
|||||||
(x) => x?.evo_sot_coefficient_typeidData?.evo_id === 'DIRECTOR_BONUS_FINGAP'
|
(x) => x?.evo_sot_coefficient_typeidData?.evo_id === 'DIRECTOR_BONUS_FINGAP'
|
||||||
);
|
);
|
||||||
|
|
||||||
return (evo_coefficient?.evo_sot_coefficient || 0) + insurance.values.fingap.insCost;
|
return (evo_coefficient?.evo_sot_coefficient || 0) * insurance.values.fingap.insCost;
|
||||||
},
|
},
|
||||||
|
|
||||||
async directorBonusFix() {
|
async directorBonusFix() {
|
||||||
const evo_coefficient = evo_coefficients?.find(
|
const evo_coefficient = evo_coefficients?.find(
|
||||||
(x) => x?.evo_sot_coefficient_typeidData?.evo_id === 'DIRECTOR_BONUS_FIX'
|
(x) =>
|
||||||
|
x?.evo_sot_coefficient_typeidData?.evo_id === 'DIRECTOR_BONUS_FIX' &&
|
||||||
|
values.product &&
|
||||||
|
x.evo_baseproducts?.some(
|
||||||
|
(evo_baseproduct) => evo_baseproduct?.evo_baseproductid === values.product
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
return (evo_coefficient?.evo_sot_coefficient || 0) + insurance.values.fingap.insCost;
|
return evo_coefficient?.evo_sot_coefficient || 0;
|
||||||
},
|
},
|
||||||
|
|
||||||
async directorBonusNsib() {
|
async directorBonusNsib() {
|
||||||
@ -375,15 +389,20 @@ export async function createRequestData({
|
|||||||
(x) => x?.evo_sot_coefficient_typeidData?.evo_id === 'DIRECTOR_BONUS_NSIB'
|
(x) => x?.evo_sot_coefficient_typeidData?.evo_id === 'DIRECTOR_BONUS_NSIB'
|
||||||
);
|
);
|
||||||
|
|
||||||
return (evo_coefficient?.evo_sot_coefficient || 0) + insurance.values.fingap.insCost;
|
return evo_coefficient?.evo_sot_coefficient || 0;
|
||||||
},
|
},
|
||||||
|
|
||||||
async directorExtraBonus() {
|
async directorExtraBonus() {
|
||||||
const evo_coefficient = evo_coefficients?.find(
|
const evo_coefficient = evo_coefficients?.find(
|
||||||
(x) => x?.evo_sot_coefficient_typeidData?.evo_id === 'DIRECTOR_EXTRA_BONUS'
|
(x) =>
|
||||||
|
x?.evo_sot_coefficient_typeidData?.evo_id === 'DIRECTOR_EXTRA_BONUS' &&
|
||||||
|
values.product &&
|
||||||
|
x.evo_baseproducts?.some(
|
||||||
|
(evo_baseproduct) => evo_baseproduct?.evo_baseproductid === values.product
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
return (evo_coefficient?.evo_sot_coefficient || 0) + insurance.values.fingap.insCost;
|
return evo_coefficient?.evo_sot_coefficient || 0;
|
||||||
},
|
},
|
||||||
|
|
||||||
async discount() {
|
async discount() {
|
||||||
@ -406,11 +425,11 @@ export async function createRequestData({
|
|||||||
(x) => x?.evo_sot_coefficient_typeidData?.evo_id === 'DISTRICT_RATE'
|
(x) => x?.evo_sot_coefficient_typeidData?.evo_id === 'DISTRICT_RATE'
|
||||||
);
|
);
|
||||||
|
|
||||||
return (evo_coefficient?.evo_sot_coefficient || 0) + insurance.values.fingap.insCost;
|
return evo_coefficient?.evo_sot_coefficient || 0;
|
||||||
},
|
},
|
||||||
|
|
||||||
async dogDate() {
|
async dogDate() {
|
||||||
return currentUTCDate.toDate();
|
return currentDate.toDate();
|
||||||
},
|
},
|
||||||
|
|
||||||
async doubleAgentsSum() {
|
async doubleAgentsSum() {
|
||||||
@ -445,10 +464,16 @@ export async function createRequestData({
|
|||||||
|
|
||||||
async extraBonus() {
|
async extraBonus() {
|
||||||
const evo_coefficient = evo_coefficients?.find(
|
const evo_coefficient = evo_coefficients?.find(
|
||||||
(x) => x?.evo_sot_coefficient_typeidData?.evo_id === 'EXTRA_BONUS'
|
(x) =>
|
||||||
|
x?.evo_job_titleid === systemuser?.evo_job_titleid &&
|
||||||
|
x?.evo_sot_coefficient_typeidData?.evo_id === 'EXTRA_BONUS' &&
|
||||||
|
values.product &&
|
||||||
|
x.evo_baseproducts?.some(
|
||||||
|
(evo_baseproduct) => evo_baseproduct?.evo_baseproductid === values.product
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
return (evo_coefficient?.evo_sot_coefficient || 0) + insurance.values.fingap.insCost;
|
return evo_coefficient?.evo_sot_coefficient || 0;
|
||||||
},
|
},
|
||||||
|
|
||||||
async financialDeptOfDeliverySum() {
|
async financialDeptOfDeliverySum() {
|
||||||
@ -461,18 +486,18 @@ export async function createRequestData({
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (evo_reward_condition?.evo_calc_reward_rules === 100_000_001) {
|
if (evo_reward_condition?.evo_calc_reward_rules === 100_000_001) {
|
||||||
return values.dealerRewardSumm / (1 + VAT);
|
return values.finDepartmentRewardSumm / (1 + VAT);
|
||||||
} else if (
|
} else if (
|
||||||
evo_reward_condition?.evo_agency_agreementidData?.evo_leasingobject_price === 100_000_001
|
evo_reward_condition?.evo_agency_agreementidData?.evo_leasingobject_price === 100_000_001
|
||||||
) {
|
) {
|
||||||
const discount = await this.discount();
|
const discount = await this.discount();
|
||||||
const plPriceWithVAT = await this.plPriceWithVAT();
|
const plPriceWithVAT = await this.plPriceWithVAT();
|
||||||
|
|
||||||
return (values.dealerRewardSumm / 100) * (plPriceWithVAT - discount * (1 + VAT));
|
return (values.finDepartmentRewardSumm / 100) * (plPriceWithVAT - discount * (1 + VAT));
|
||||||
} else {
|
} else {
|
||||||
const acceptSum = await this.acceptSum();
|
const acceptSum = await this.acceptSum();
|
||||||
|
|
||||||
return (values.dealerRewardSumm / 100) * acceptSum;
|
return (values.finDepartmentRewardSumm / 100) * acceptSum;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -583,9 +608,11 @@ export async function createRequestData({
|
|||||||
},
|
},
|
||||||
|
|
||||||
async importerSum() {
|
async importerSum() {
|
||||||
|
if (values.importerRewardRub > 0) return values.importerRewardRub;
|
||||||
|
|
||||||
const acceptSum = await this.acceptSum();
|
const acceptSum = await this.acceptSum();
|
||||||
|
|
||||||
return values.importerRewardRub || (values.importerRewardPerc / 100) * acceptSum;
|
return (values.importerRewardPerc / 100) * acceptSum;
|
||||||
},
|
},
|
||||||
|
|
||||||
async insuranceBonus() {
|
async insuranceBonus() {
|
||||||
@ -806,7 +833,9 @@ export async function createRequestData({
|
|||||||
|
|
||||||
async nsBonus() {
|
async nsBonus() {
|
||||||
const evo_coefficient = evo_coefficients?.find(
|
const evo_coefficient = evo_coefficients?.find(
|
||||||
(x) => x?.evo_sot_coefficient_typeidData?.evo_id === 'BONUS_NS_PR'
|
(x) =>
|
||||||
|
x?.evo_job_titleid === systemuser?.evo_job_titleid &&
|
||||||
|
x?.evo_sot_coefficient_typeidData?.evo_id === 'BONUS_NS_PR'
|
||||||
);
|
);
|
||||||
|
|
||||||
return evo_coefficient?.evo_sot_coefficient || 0;
|
return evo_coefficient?.evo_sot_coefficient || 0;
|
||||||
@ -848,7 +877,9 @@ export async function createRequestData({
|
|||||||
|
|
||||||
async nsibBonus() {
|
async nsibBonus() {
|
||||||
const evo_coefficient = evo_coefficients?.find(
|
const evo_coefficient = evo_coefficients?.find(
|
||||||
(x) => x?.evo_sot_coefficient_typeidData?.evo_id === 'BONUS_NSIB_PR'
|
(x) =>
|
||||||
|
x?.evo_job_titleid === systemuser?.evo_job_titleid &&
|
||||||
|
x?.evo_sot_coefficient_typeidData?.evo_id === 'BONUS_NSIB_PR'
|
||||||
);
|
);
|
||||||
const nsibBrutto = await this.nsibBrutto();
|
const nsibBrutto = await this.nsibBrutto();
|
||||||
|
|
||||||
@ -980,7 +1011,9 @@ export async function createRequestData({
|
|||||||
|
|
||||||
async ratBonus() {
|
async ratBonus() {
|
||||||
const evo_coefficient = evo_coefficients?.find(
|
const evo_coefficient = evo_coefficients?.find(
|
||||||
(x) => x?.evo_sot_coefficient_typeidData?.evo_id === 'BONUS_RAT_PR'
|
(x) =>
|
||||||
|
x?.evo_job_titleid === systemuser?.evo_job_titleid &&
|
||||||
|
x?.evo_sot_coefficient_typeidData?.evo_id === 'BONUS_RAT_PR'
|
||||||
);
|
);
|
||||||
const rats = await this.rats();
|
const rats = await this.rats();
|
||||||
|
|
||||||
@ -1004,7 +1037,12 @@ export async function createRequestData({
|
|||||||
|
|
||||||
async regionalDirectorBonus() {
|
async regionalDirectorBonus() {
|
||||||
const evo_coefficient = evo_coefficients?.find(
|
const evo_coefficient = evo_coefficients?.find(
|
||||||
(x) => x?.evo_sot_coefficient_typeidData?.evo_id === 'REGIONAL_DIRECTOR_BONUS'
|
(x) =>
|
||||||
|
x?.evo_sot_coefficient_typeidData?.evo_id === 'REGIONAL_DIRECTOR_BONUS' &&
|
||||||
|
values.product &&
|
||||||
|
x.evo_baseproducts?.some(
|
||||||
|
(evo_baseproduct) => evo_baseproduct?.evo_baseproductid === values.product
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
return evo_coefficient?.evo_sot_coefficient || 0;
|
return evo_coefficient?.evo_sot_coefficient || 0;
|
||||||
@ -1014,14 +1052,18 @@ export async function createRequestData({
|
|||||||
const evo_coefficient = evo_coefficients?.find(
|
const evo_coefficient = evo_coefficients?.find(
|
||||||
(x) => x?.evo_sot_coefficient_typeidData?.evo_id === 'REGIONAL_DIRECTOR_BONUS_FINGAP'
|
(x) => x?.evo_sot_coefficient_typeidData?.evo_id === 'REGIONAL_DIRECTOR_BONUS_FINGAP'
|
||||||
);
|
);
|
||||||
const { insCost } = insurance.values.fingap;
|
|
||||||
|
|
||||||
return (evo_coefficient?.evo_sot_coefficient || 0) * insCost;
|
return (evo_coefficient?.evo_sot_coefficient || 0) * insurance.values.fingap.insCost;
|
||||||
},
|
},
|
||||||
|
|
||||||
async regionalDirectorBonusFix() {
|
async regionalDirectorBonusFix() {
|
||||||
const evo_coefficient = evo_coefficients?.find(
|
const evo_coefficient = evo_coefficients?.find(
|
||||||
(x) => x?.evo_sot_coefficient_typeidData?.evo_id === 'REGIONAL_DIRECTOR_BONUS_FIX'
|
(x) =>
|
||||||
|
x?.evo_sot_coefficient_typeidData?.evo_id === 'REGIONAL_DIRECTOR_BONUS_FIX' &&
|
||||||
|
values.product &&
|
||||||
|
x.evo_baseproducts?.some(
|
||||||
|
(evo_baseproduct) => evo_baseproduct?.evo_baseproductid === values.product
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
return evo_coefficient?.evo_sot_coefficient || 0;
|
return evo_coefficient?.evo_sot_coefficient || 0;
|
||||||
@ -1040,8 +1082,10 @@ export async function createRequestData({
|
|||||||
const evo_coefficient = evo_coefficients?.find(
|
const evo_coefficient = evo_coefficients?.find(
|
||||||
(x) =>
|
(x) =>
|
||||||
x?.evo_sot_coefficient_typeidData?.evo_id === 'REGIONAL_DIRECTOR_EXTRA_BONUS' &&
|
x?.evo_sot_coefficient_typeidData?.evo_id === 'REGIONAL_DIRECTOR_EXTRA_BONUS' &&
|
||||||
Boolean(values.product) &&
|
values.product &&
|
||||||
x.evo_baseproducts?.some((evo_baseproduct) => evo_baseproduct?.evo_id === values.product)
|
x.evo_baseproducts?.some(
|
||||||
|
(evo_baseproduct) => evo_baseproduct?.evo_baseproductid === values.product
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
return evo_coefficient?.evo_sot_coefficient || 0;
|
return evo_coefficient?.evo_sot_coefficient || 0;
|
||||||
@ -1086,7 +1130,7 @@ export async function createRequestData({
|
|||||||
(x) => x?.evo_sot_coefficient_typeidData?.evo_id === 'SALARY_RATE'
|
(x) => x?.evo_sot_coefficient_typeidData?.evo_id === 'SALARY_RATE'
|
||||||
);
|
);
|
||||||
|
|
||||||
return (evo_coefficient?.evo_sot_coefficient || 0) + insurance.values.fingap.insCost;
|
return evo_coefficient?.evo_sot_coefficient || 0;
|
||||||
},
|
},
|
||||||
|
|
||||||
async scheduleOfPayments() {
|
async scheduleOfPayments() {
|
||||||
|
|||||||
@ -18,6 +18,7 @@ export const CalculateInputSchema = z
|
|||||||
export type CalculateInput = z.infer<typeof CalculateInputSchema>;
|
export type CalculateInput = z.infer<typeof CalculateInputSchema>;
|
||||||
|
|
||||||
export const OutputDataSchema = z.object({
|
export const OutputDataSchema = z.object({
|
||||||
|
__calculateResult: z.any().optional(),
|
||||||
resultPayments: ResultPaymentsSchema,
|
resultPayments: ResultPaymentsSchema,
|
||||||
resultValues: ResultValuesSchema,
|
resultValues: ResultValuesSchema,
|
||||||
values: ValuesSchema.pick({
|
values: ValuesSchema.pick({
|
||||||
|
|||||||
@ -13,6 +13,7 @@ import {
|
|||||||
} from './types';
|
} from './types';
|
||||||
import { calculate } from '@/api/core/query';
|
import { calculate } from '@/api/core/query';
|
||||||
import { createKP } from '@/api/crm/query';
|
import { createKP } from '@/api/crm/query';
|
||||||
|
import type { RequestCreateKP } from '@/api/crm/types';
|
||||||
import type { User } from '@/api/user/types';
|
import type { User } from '@/api/user/types';
|
||||||
import initializeApollo from '@/apollo/client';
|
import initializeApollo from '@/apollo/client';
|
||||||
import defaultValues from '@/config/default-values';
|
import defaultValues from '@/config/default-values';
|
||||||
@ -133,7 +134,7 @@ export const quoteRouter = router({
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
const createKPResult = await createKP({
|
const requestCreateKP = compatRequestCreateKP({
|
||||||
domainName: user.domainName,
|
domainName: user.domainName,
|
||||||
finGAP: input.fingap,
|
finGAP: input.fingap,
|
||||||
insurance: Object.values(input.insurance.values),
|
insurance: Object.values(input.insurance.values),
|
||||||
@ -145,6 +146,8 @@ export const quoteRouter = router({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const createKPResult = await createKP(requestCreateKP);
|
||||||
|
|
||||||
if (createKPResult.success === false) {
|
if (createKPResult.success === false) {
|
||||||
return {
|
return {
|
||||||
success: false,
|
success: false,
|
||||||
@ -171,6 +174,15 @@ export const quoteRouter = router({
|
|||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function compatRequestCreateKP(request: RequestCreateKP) {
|
||||||
|
const fingapIndex = request.insurance.findIndex((x) => x.key === 'fingap');
|
||||||
|
if (fingapIndex >= 0) {
|
||||||
|
request.insurance[fingapIndex].key = 'finGAP';
|
||||||
|
}
|
||||||
|
|
||||||
|
return request;
|
||||||
|
}
|
||||||
|
|
||||||
async function compatValues(
|
async function compatValues(
|
||||||
values: CalculationValues,
|
values: CalculationValues,
|
||||||
{ apolloClient }: Pick<Context, 'apolloClient'>
|
{ apolloClient }: Pick<Context, 'apolloClient'>
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import type RootStore from '../root';
|
import type RootStore from '../root';
|
||||||
import type { RemoveError, ValidationConfig, ValidationError, ValidationParams } from './types';
|
import type { RemoveError, ValidationConfig, ValidationError, ValidationParams } from './types';
|
||||||
import { makeAutoObservable } from 'mobx';
|
import { makeAutoObservable } from 'mobx';
|
||||||
|
import { isServer } from 'tools';
|
||||||
import { notification } from 'ui/elements';
|
import { notification } from 'ui/elements';
|
||||||
|
|
||||||
export default class Validation {
|
export default class Validation {
|
||||||
@ -35,14 +36,13 @@ export default class Validation {
|
|||||||
|
|
||||||
this.errors.add({ key, message });
|
this.errors.add({ key, message });
|
||||||
|
|
||||||
if (!silent) {
|
if (!silent && !isServer())
|
||||||
notification.open({
|
notification.open({
|
||||||
description: message,
|
description: message,
|
||||||
key: this.params.err_key,
|
key: this.params.err_key,
|
||||||
message: this.params.err_title,
|
message: this.params.err_title,
|
||||||
type: this.root.$process.has('Unlimited') ? 'warning' : 'error',
|
type: this.root.$process.has('Unlimited') ? 'warning' : 'error',
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
return (() => this.removeError({ key })) as RemoveError;
|
return (() => this.removeError({ key })) as RemoveError;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -36,7 +36,7 @@ export function createCurrencyUtility({ apolloClient }: Context) {
|
|||||||
fetchPolicy: 'network-only',
|
fetchPolicy: 'network-only',
|
||||||
query: CRMTypes.GetCurrencyChangesDocument,
|
query: CRMTypes.GetCurrencyChangesDocument,
|
||||||
variables: {
|
variables: {
|
||||||
currentDate: dayjs().utc(false).format('YYYY-MM-DD'),
|
currentDate: dayjs().utc(false).toISOString(),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user