diff --git a/src/client/stores/CalculationStore/Effects/reactions/tablesReactions.ts b/src/client/stores/CalculationStore/Effects/reactions/tablesReactions.ts index 01df5b8..b7e24bb 100644 --- a/src/client/stores/CalculationStore/Effects/reactions/tablesReactions.ts +++ b/src/client/stores/CalculationStore/Effects/reactions/tablesReactions.ts @@ -7,6 +7,7 @@ import { } from 'core/constants/stores/Calculation/filters'; import valuesConstants from 'core/constants/values'; import { shift, shiftRight } from 'core/tools/array'; +import { pipe } from 'core/tools/func'; import { IReactionEffect } from 'core/types/Calculation/Store/effect'; import { Process } from 'core/types/Calculation/Store/process'; import { toJS } from 'mobx'; @@ -837,10 +838,11 @@ export default [ (calculationStore, calculationProcess) => ({ expression: () => { - const { leaseObjectCategory } = calculationStore.values; - return leaseObjectCategory; + const { leaseObjectCategory, leasingWithoutKasko } = + calculationStore.values; + return { leaseObjectCategory, leasingWithoutKasko }; }, - effect: leaseObjectCategory => { + effect: ({ leaseObjectCategory, leasingWithoutKasko }) => { if (calculationProcess.hasProcess(Process.LoadKp)) { return; } @@ -878,7 +880,12 @@ export default [ true, )({ insuranceCompany: { - filter: insuranceOsagoDefaultFilter, + filter: leasingWithoutKasko + ? pipe( + insuranceOsagoDefaultFilter, + options => options.evo_evokasko_access === true, + ) + : insuranceOsagoDefaultFilter, value: isTrailer ? null : undefined, status: ElementStatus.Default, }, diff --git a/src/core/services/CrmService/graphql/query/options/insurance_options.graphql b/src/core/services/CrmService/graphql/query/options/insurance_options.graphql index 7058f20..52301f3 100644 --- a/src/core/services/CrmService/graphql/query/options/insurance_options.graphql +++ b/src/core/services/CrmService/graphql/query/options/insurance_options.graphql @@ -12,5 +12,6 @@ query GetInsuranceOptions($evo_account_type: [Int!], $statecode: Int) { evo_legal_region_calc evo_inn evo_osago_with_kasko + evo_evokasko_access } } diff --git a/src/core/services/CrmService/graphql/schema.graphql b/src/core/services/CrmService/graphql/schema.graphql index a9da930..18d77e7 100644 --- a/src/core/services/CrmService/graphql/schema.graphql +++ b/src/core/services/CrmService/graphql/schema.graphql @@ -80,6 +80,8 @@ type Query { evo_currencychanges(evo_coursedate_param: DateParamInput, evo_ref_transactioncurrency: Uuid, statecode: Int): [evo_currencychange] evo_debtwork_contract(debtworkContractId: Uuid!): evo_debtwork_contract evo_debtwork_contracts(evo_accountid: Uuid, evo_statuscodeid: Uuid, statecode: Int): [evo_debtwork_contract] + evo_documenttype(evo_documenttypeid: Uuid!): evo_documenttype + evo_documenttypes(evo_code_wm: String, statecode: Int): [evo_documenttype] evo_equipments(evo_modelid: Uuid, statecode: Int): [evo_equipment] evo_external_supplier_codes(evo_id: String, statecode: Int): [evo_external_supplier_code] evo_external_system_request(evo_external_system_requestid: Uuid!): evo_external_system_request @@ -103,6 +105,7 @@ type Query { evo_planpayments(evo_addproduct_typeid: Uuid, statecode: Int): [evo_planpayment] evo_product_risk(evo_product_riskid: Uuid!): evo_product_risk evo_product_risks(statecode: Int): [evo_product_risk] + evo_question_credit_committee(evo_question_credit_committeeid: Uuid!): evo_question_credit_committee evo_rate(evo_rateid: Uuid!): evo_rate evo_rates(evo_datefrom_param: DateParamInput, evo_dateto_param: DateParamInput, statecode: Int): [evo_rate] @@ -169,29 +172,23 @@ type Mutation { by(systemuserid: Uuid): MutationBy } -type evo_request_client { +type evo_typedocpackage { createdon: DateTime - evo_accountid: Uuid - evo_accountidData: account - evo_caseorigincode: Int - evo_caseorigincodename: String - evo_client_request_text: String - evo_comment: String - evo_documents: [evo_document] - evo_number: String - evo_owner_systemuserid: Uuid - evo_owner_systemuseridData: systemuser - evo_phonecallid: Uuid - evo_request_clientid: Uuid - evo_site_email: String - evo_site_name: String - evo_site_telephone: String - evo_site_text: String - evo_statuscodeid: Uuid - evo_statuscodeidData: evo_statuscode - evo_storage: String - incidents: [incidentGraphQL] - link: String + evo_account: Boolean + evo_addcontract: Boolean + evo_agency_agreement: Boolean + evo_contract: Boolean + evo_debtwork_contract: Boolean + evo_finegibdd: Boolean + evo_id: String + evo_incident: Boolean + evo_insurance_period: Boolean + evo_name: String + evo_opportunity: Boolean + evo_programsolution: [Int!] + evo_request_client: Boolean + evo_request_payment: Boolean + evo_typedocpackageid: Uuid modifiedon: DateTime toObjectString: String } @@ -238,65 +235,6 @@ input GuidParamInput { """The built-in `Decimal` scalar type.""" scalar Decimal -type evo_subject_incident { - createdon: DateTime - evo_group: Int - evo_groupname: String - evo_name: String - evo_subjectid: Uuid - evo_subject_incidentid: Uuid - evo_type_incident: Int - evo_type_incidentname: String - link: String - modifiedon: DateTime - toObjectString: String -} - -type incidentGraphQL { - caseorigincode: Int - createdon: DateTime - customerid: Uuid - customerid_account: Uuid - customerid_contact: Uuid - description: String - evo_accountid_new: Uuid - evo_cession_opportunityid: Uuid - evo_contracts: [evo_contract] - evo_creat_request_client: Uuid - evo_fast_advice: Boolean - evo_plan_execut_date: DateTime - evo_statuscodeid: Uuid - evo_statuscodeidData: evo_statuscode - evo_storage: String - evo_subject_incidentid: Uuid - evo_subject_incidentidData: evo_subject_incident - evo_taken_work_date: DateTime - evo_typedocpackageid: Uuid - incidentid: Uuid - link: String - modifiedon: DateTime - ownerid: Uuid - owneridData: systemuser - ownerid_systemuser: Uuid - ownerid_team: Uuid - subjectid: Uuid - subjectidData: subjectGraphQL - ticketnumber: String - title: String - toObjectString: String -} - -type entity_schema { - entity_id: String - entity_set_name: String - icon_large_name: String - icon_medium_name: String - icon_small_name: String - logical_name: String - object_type_code: Int! - picklists: [picklist] -} - type evo_debtwork_contract { createdon: DateTime evo_accountid: Uuid @@ -375,6 +313,107 @@ type evo_debtwork_contract { toObjectString: String } +type evo_request_client { + createdon: DateTime + evo_accountid: Uuid + evo_accountidData: account + evo_caseorigincode: Int + evo_caseorigincodename: String + evo_client_request_text: String + evo_comment: String + evo_documents: [evo_document] + evo_from_account: Uuid + evo_from_contact: Uuid + evo_number: String + evo_owner_systemuserid: Uuid + evo_owner_systemuseridData: systemuser + evo_phonecallid: Uuid + evo_request_clientid: Uuid + evo_site_email: String + evo_site_name: String + evo_site_telephone: String + evo_site_text: String + evo_statuscodeid: Uuid + evo_statuscodeidData: evo_statuscode + evo_storage: String + incidents: [incidentGraphQL] + link: String + modifiedon: DateTime + toObjectString: String +} + +type evo_subject_incident { + createdon: DateTime + evo_group: Int + evo_groupname: String + evo_name: String + evo_subjectid: Uuid + evo_subject_incidentid: Uuid + evo_type_incident: Int + evo_type_incidentname: String + link: String + modifiedon: DateTime + toObjectString: String +} + +type incidentGraphQL { + caseorigincode: Int + createdon: DateTime + customerid: Uuid + customerid_account: Uuid + customerid_contact: Uuid + description: String + evo_accountid_new: Uuid + evo_cession_opportunityid: Uuid + evo_contracts: [evo_contract] + evo_creat_request_client: Uuid + evo_fast_advice: Boolean + evo_plan_execut_date: DateTime + evo_statuscodeid: Uuid + evo_statuscodeidData: evo_statuscode + evo_storage: String + evo_subject_incidentid: Uuid + evo_subject_incidentidData: evo_subject_incident + evo_taken_work_date: DateTime + evo_typedocpackageid: Uuid + incidentid: Uuid + link: String + modifiedon: DateTime + ownerid: Uuid + owneridData: systemuser + ownerid_systemuser: Uuid + ownerid_team: Uuid + subjectid: Uuid + subjectidData: subjectGraphQL + ticketnumber: String + title: String + toObjectString: String +} + +type evo_question_credit_committee { + createdon: DateTime + evo_accountid: Uuid + evo_description_general_solution: String + evo_opportunityid: Uuid + evo_question_credit_committeeid: Uuid + evo_statuscodeid: Uuid + evo_summary_judgment: Int + modifiedon: DateTime + quotes: [quote] + toObjectString: String +} + +type entity_schema { + entity_id: String + entity_set_name: String + icon_large_name: String + icon_medium_name: String + icon_small_name: String + logical_name: String + object_type_code: Int! + picklists: [picklist] +} + type account { accountid: Uuid childcontacts(statecode: Int): [contact] @@ -407,6 +446,7 @@ type account { evo_economic_security_systemuserid: Uuid evo_edos: [evo_edo] evo_employee_count: Int + evo_evokasko_access: Boolean evo_fingap_number_rules: Int evo_fin_department_accountid: Uuid evo_fin_department_accountidData: account @@ -580,6 +620,7 @@ type evo_addproduct_type { evo_visible_calc: Boolean evo_whom_register: Int evo_who_register: Int + link: String modifiedon: DateTime statecode: Int toObjectString: String @@ -1042,6 +1083,7 @@ type quote { customerid_account: Uuid customerid_contact: Uuid evo_accept_control_addproduct_typeid: Uuid + evo_accept_control_addproduct_typeidData: evo_addproduct_type evo_accept_period: Int evo_accept_quoteid: Uuid evo_acquisition_costs: Decimal @@ -1097,6 +1139,7 @@ type quote { evo_dealer_reward_conditionid: Uuid evo_dealer_reward_summ: Decimal evo_dealer_reward_total: Decimal + evo_decision_on_kp: String evo_declaration_knd: String evo_declaration_period: Int evo_declaration_profit: Decimal @@ -1158,6 +1201,10 @@ type quote { evo_graphs: [evo_graph] evo_graph_irr: Decimal evo_graph_type: Int + evo_guarantee_fl: Boolean + evo_guarantee_flname: String + evo_guarantee_ul: Boolean + evo_guarantee_ulname: String evo_guarantor1_another_peyments: Decimal evo_guarantor1_declaration_year: Int evo_guarantor1_equity_capital: Decimal @@ -1195,6 +1242,7 @@ type quote { evo_kasko_price: Decimal evo_kasko_price_leasperiod: Decimal evo_key_return: Boolean + evo_key_returnname: String evo_kilometrage_limit: Int evo_kilometrage_limit_period: Int evo_last_payment_calc: Int @@ -1210,9 +1258,12 @@ type quote { evo_legal_regionid: Uuid evo_legal_townid: Uuid evo_lessor_bank_detailsid: Uuid + evo_lessor_bank_detailsidData: evo_bank_details evo_loan_appraisalid: Uuid evo_logid: Uuid evo_loss_kv: Decimal + evo_maximum_payment_day: Int + evo_maximum_percentage_av: Decimal evo_max_mass: Decimal evo_max_price_change: Decimal evo_max_speed: Decimal @@ -1277,6 +1328,7 @@ type quote { evo_registration_regionid: Uuid evo_report_year: Int evo_req_telematic: Int + evo_req_telematicname: String evo_req_telematic_accept: Int evo_return_leasing: Boolean evo_risk: Int @@ -1392,6 +1444,7 @@ type evo_subsidy { accounts: [account] createdon: DateTime evo_brands: [evo_brand] + evo_check_pts: Boolean evo_datefrom: DateTime evo_dateto: DateTime evo_get_subsidy_payment: Int @@ -1571,6 +1624,7 @@ type evo_request_payment { evo_finegibddidData: evo_finegibdd evo_id: String evo_inn: String + evo_insurance_addcontractid: Uuid evo_insurance_periodid: Uuid evo_insurance_policyid: Uuid evo_insurance_policyidData: evo_insurance_policy @@ -1611,6 +1665,33 @@ type evo_request_payment { toObjectString: String } +type evo_documenttype { + createdon: DateTime + evo_check_edo: Boolean + evo_code_wm: String + evo_comment: String + evo_documenttypeid: Uuid + evo_draftdoc: Boolean + evo_edit_namedoc: Boolean + evo_edo_documenttypeid: Uuid + evo_edo_documenttypeidData: evo_documenttype + evo_fill_docname: Boolean + evo_formalized: Boolean + evo_id: String + evo_name: String + evo_name_save_file: String + evo_original_id: String + evo_param_wm: String + evo_place_upload_doc: [Int!] + evo_sign_required: Boolean + evo_storagedoc: Int + evo_typedocpackages: [evo_typedocpackage] + evo_validitydoc: Int + modifiedon: DateTime + systemusers: [systemuser] + toObjectString: String +} + type evo_contract { createdon: DateTime emailaddress: String @@ -1711,6 +1792,7 @@ type evo_contract { evo_end_date_of_pledge_claim: DateTime evo_end_date_of_pledge_leasobject: DateTime evo_equip_price: Decimal + evo_evokasko_addproduct_typeid: Uuid evo_expinput_actual_date: DateTime evo_fedres_xml_date: DateTime evo_finegibdds: [evo_finegibdd] @@ -1769,6 +1851,7 @@ type evo_contract { evo_niatinception_msfo_actual: Decimal evo_ni_at_inception: Decimal evo_ni_at_inception_actual: Decimal + evo_ni_termination: Decimal evo_non_payment_count: Decimal evo_npvni_msfo: Decimal evo_npvni_msfo_final: Decimal @@ -1781,6 +1864,7 @@ type evo_contract { evo_payment_redemption_sum: Decimal evo_payment_redemption_sum_without_nds: Decimal evo_period: Int + evo_previous_accountid: Uuid evo_price_without_discount: Decimal evo_price_without_discount_supplier_currency: Decimal evo_price_wthout_discount_nds_sup_currency: Decimal @@ -1791,6 +1875,7 @@ type evo_contract { evo_rate: Decimal evo_rateid: Uuid evo_reason_change_account: Int + evo_redemption_archive_date: DateTime evo_ref_opportunityid: Uuid evo_region_director_bonus: Decimal evo_region_director_fingap_bonus: Decimal @@ -1806,9 +1891,11 @@ type evo_contract { evo_singdoc_systemuserid: Uuid evo_statuscodeid: Uuid evo_statuscodeidData: evo_statuscode + evo_step_statuscodeid: Uuid evo_storage: String evo_subsidyid: Uuid evo_subsidy_solution: Int + evo_subsidy_solution_com: String evo_subsidy_summ: Decimal evo_subsidy_validity_date: DateTime evo_supplier_accountid: Uuid @@ -2127,12 +2214,17 @@ type systemuser { createdon: DateTime defaultmailbox: Uuid domainname: String + evo_access_download_ni: Boolean + evo_access_exception_addcontract: Boolean evo_available_assignment_director: Boolean evo_baseproducts(statecode: Int): [evo_baseproduct] evo_callrecords_access: Boolean evo_can_export_cre: Boolean evo_can_import_sheduled_calls: Boolean evo_datebirth: DateTime + evo_edo: Boolean + evo_edo_department: [Int!] + evo_edo_departmentData: [picklist_value] evo_employee_id: String evo_fedresurs_rules: Boolean evo_identity_documents: [evo_identity_document] @@ -2364,6 +2456,7 @@ type evo_addcontract { evo_early_discount_perc: Decimal evo_early_partly_type: Int evo_early_redemption_change: Boolean + evo_early_sum: Decimal evo_ecological_class: Int evo_ecological_class_new: Int evo_economic: Decimal @@ -2382,6 +2475,9 @@ type evo_addcontract { evo_engine_volume_new: Decimal evo_equip_price: Decimal evo_equip_price_new: Decimal + evo_evokasko_addproduct_typeid: Uuid + evo_evokasko_addproduct_typeid_new: Uuid + evo_evokasko_price_new: Decimal evo_exp_drivers: Int evo_exp_drivers_new: Int evo_fin_department_reward: Decimal @@ -2408,6 +2504,8 @@ type evo_addcontract { evo_insurer_kasko_accountid_new: Uuid evo_insurer_osago_accountid: Uuid evo_insurer_osago_accountid_new: Uuid + evo_ins_period_evokasko_date: DateTime + evo_ins_period_evokasko_number: Int evo_ins_period_kasko_date: DateTime evo_ins_period_kasko_number: Int evo_ins_period_osago_date: DateTime @@ -2429,6 +2527,7 @@ type evo_addcontract { evo_leasingobject_specification_new: String evo_leasing_bonus_summ: Decimal evo_log_activdate_1c: String + evo_loss_kv: Decimal evo_maker: String evo_maker_new: String evo_max_mass: Decimal @@ -2482,6 +2581,8 @@ type evo_addcontract { evo_passport_seria_new: String evo_passport_type: Int evo_passport_type_new: Int + evo_payer_evokasko: Int + evo_payer_evokasko_new: Int evo_payer_kasko: Int evo_payer_kasko_new: Int evo_payer_osago: Int @@ -2611,6 +2712,7 @@ type evo_bank_details { evo_kbk: String evo_name: String evo_payment_account: String + link: String modifiedon: DateTime toObjectString: String } @@ -2635,27 +2737,6 @@ type template { toObjectString: String } -type evo_typedocpackage { - createdon: DateTime - evo_account: Boolean - evo_addcontract: Boolean - evo_agency_agreement: Boolean - evo_contract: Boolean - evo_debtwork_contract: Boolean - evo_finegibdd: Boolean - evo_id: String - evo_incident: Boolean - evo_insurance_period: Boolean - evo_name: String - evo_opportunity: Boolean - evo_programsolution: [Int!] - evo_request_client: Boolean - evo_request_payment: Boolean - evo_typedocpackageid: Uuid - modifiedon: DateTime - toObjectString: String -} - type MutationBy { associateBankDetailsAndAgencyAgreement_(evo_agency_agreementid: Uuid!, evo_bank_detailsid: Uuid!): Entity createEntity(data: EntityDataInput): Uuid! @@ -2665,33 +2746,6 @@ type MutationBy { updateEntity(data: EntityDataInput): Boolean! } -type evo_document { - createdon: DateTime - evo_accountid: Uuid - evo_changed_record_systemuserid: Uuid - evo_changed_record_systemuseridData: systemuser - evo_comment_original: String - evo_comment_previous: String - evo_comment_scan: String - evo_documentid: Uuid - evo_documenttypeid: Uuid - evo_documenttypeidData: evo_documenttype - evo_doc_number: String - evo_init_entity_id: String - evo_init_entity_name: String - evo_name: String - evo_original_correct: Boolean - evo_original_received: Boolean - evo_scan_correct: Boolean - evo_url: String - evo_validity_date: DateTime - evo_version: Int - modifiedon: DateTime - statecode: Int - statuscode: Int - toObjectString: String -} - """The `DateTime` scalar represents an ISO-8601 compliant date time type.""" scalar DateTime @@ -2713,6 +2767,49 @@ enum LogicOperation { OR } +type businessunit { + businessunitid: Uuid + createdon: DateTime + evo_addressid: Uuid + evo_boss_systemuserid: Uuid + evo_deputy_director_systemuserid: Uuid + evo_director_systemuserid: Uuid + evo_region_director_systgemuserid: Uuid + evo_region_director_systgemuseridname: String + modifiedon: DateTime + name: String + toObjectString: String +} + +type evo_document { + createdon: DateTime + evo_accountid: Uuid + evo_changed_record_systemuserid: Uuid + evo_changed_record_systemuseridData: systemuser + evo_comment_original: String + evo_comment_previous: String + evo_comment_scan: String + evo_documentid: Uuid + evo_documenttypeid: Uuid + evo_documenttypeidData: evo_documenttype + evo_doc_number: String + evo_edoid: Uuid + evo_edoidData: evo_edo + evo_init_entity_id: String + evo_init_entity_name: String + evo_name: String + evo_original_correct: Boolean + evo_original_received: Boolean + evo_scan_correct: Boolean + evo_url: String + evo_validity_date: DateTime + evo_version: Int + modifiedon: DateTime + statecode: Int + statuscode: Int + toObjectString: String +} + type subjectGraphQL { createdon: DateTime modifiedon: DateTime @@ -2726,19 +2823,6 @@ type picklist { values: [picklist_value] } -type businessunit { - businessunitid: Uuid - createdon: DateTime - evo_addressid: Uuid - evo_boss_systemuserid: Uuid - evo_director_systemuserid: Uuid - evo_region_director_systgemuserid: Uuid - evo_region_director_systgemuseridname: String - modifiedon: DateTime - name: String - toObjectString: String -} - type team { createdon: DateTime evo_baseproducts(statecode: Int): [evo_baseproduct] @@ -2759,15 +2843,24 @@ type evo_edo { evo_box_edoidData: evo_edo evo_box_id: String evo_box_name: String + evo_contractid: Uuid + evo_contractidData: evo_contract evo_documentid: Uuid + evo_documenttypeid: Uuid evo_edoid: Uuid + evo_edo_department: Int evo_edo_status: Int evo_edo_statusname: String evo_edo_type: Int evo_edo_typeename: String + evo_formalized: Boolean evo_invite_crm_status: Int evo_invite_crm_statusname: String + evo_legal_status: Int evo_name: String + evo_project_documenttypeid: Uuid + evo_signer_systemuserid: Uuid + evo_sign_required: Boolean evo_statuscodeid: Uuid evo_statuscodeidData: evo_statuscode modifiedon: DateTime @@ -2854,6 +2947,13 @@ type role { toObjectString: String } +type picklist_value { + color: String + label: String + order: Int! + value: Int! +} + type activityparty { addressused: String createdon: DateTime @@ -2878,24 +2978,6 @@ type Entity { logical_name: String } -type evo_documenttype { - createdon: DateTime - evo_comment: String - evo_documenttypeid: Uuid - evo_draftdoc: Boolean - evo_edit_namedoc: Boolean - evo_fill_docname: Boolean - evo_id: String - evo_name: String - evo_name_save_file: String - evo_place_upload_doc: [Int!] - evo_storagedoc: Int - evo_typedocpackages: [evo_typedocpackage] - evo_validitydoc: Int - modifiedon: DateTime - toObjectString: String -} - enum FilterOperation { ISNULL EQUAL @@ -2907,13 +2989,6 @@ enum FilterOperation { LESSOREQUALTHEN } -type picklist_value { - color: String - label: String - order: Int! - value: Int! -} - input EntityFieldInput { activitypartiesvalue: [activitypartyInput] boolvalue: Boolean diff --git a/src/core/services/CrmService/types/entities.ts b/src/core/services/CrmService/types/entities.ts index df372ed..47f6e00 100644 --- a/src/core/services/CrmService/types/entities.ts +++ b/src/core/services/CrmService/types/entities.ts @@ -62,6 +62,7 @@ export interface IAccount extends BaseEntity { evo_id_elt_osago?: string; evo_legal_region_calc?: boolean; evo_osago_with_kasko?: boolean; + evo_evokasko_access?: boolean; } export interface ISalonProvider extends IAccount {