From acbbc7a6d4a0056b796e2502e6e3728287a76f4e Mon Sep 17 00:00:00 2001 From: Killian Courvoisier Date: Tue, 31 Oct 2023 18:40:21 +0100 Subject: [PATCH] feat: Add qualifications for real estate and person insurance --- packages/cozy-client/src/assets/qualifications.json | 13 +++++++++++++ .../src/models/document/documentTypeData.js | 6 ++++-- .../cozy-client/src/models/document/locales/en.json | 2 ++ .../cozy-client/src/models/document/locales/fr.json | 2 ++ packages/cozy-client/src/types.js | 4 ++-- packages/cozy-client/types/types.d.ts | 6 +++--- 6 files changed, 26 insertions(+), 7 deletions(-) diff --git a/packages/cozy-client/src/assets/qualifications.json b/packages/cozy-client/src/assets/qualifications.json index 558e4c5e3a..57b938b469 100644 --- a/packages/cozy-client/src/assets/qualifications.json +++ b/packages/cozy-client/src/assets/qualifications.json @@ -488,6 +488,19 @@ "sourceSubCategory": "sport", "subjects": ["permit", "invoice"] }, + { + "label": "real_estate_insurance", + "purpose": "contract", + "sourceCategory": "insurance", + "sourceSubCategory": "real_estate", + "subjects": ["insurance"] + }, + { + "label": "person_insurance", + "purpose": "contract", + "sourceCategory": "insurance", + "subjects": ["insurance"] + }, { "label": "other_administrative_document" }, diff --git a/packages/cozy-client/src/models/document/documentTypeData.js b/packages/cozy-client/src/models/document/documentTypeData.js index b4dedd464a..5907cac324 100644 --- a/packages/cozy-client/src/models/document/documentTypeData.js +++ b/packages/cozy-client/src/models/document/documentTypeData.js @@ -49,7 +49,8 @@ const familyLabels = [ 'caf', 'payment_proof_family_allowance', 'note_family_document', - 'other_family_document' + 'other_family_document', + 'person_insurance' ] /** @@ -111,7 +112,8 @@ const homeLabels = [ 'house_insurance', 'work_quote', 'note_house_document', - 'other_house_document' + 'other_house_document', + 'real_estate_insurance' ] /** diff --git a/packages/cozy-client/src/models/document/locales/en.json b/packages/cozy-client/src/models/document/locales/en.json index f163309600..048fcd6998 100644 --- a/packages/cozy-client/src/models/document/locales/en.json +++ b/packages/cozy-client/src/models/document/locales/en.json @@ -88,10 +88,12 @@ "pay_sheet": "Pay sheet |||| Pay sheets", "payment_proof_family_allowance": "family allowance payment proof |||| family allowance payment proofs", "pension": "Pension |||| Pensions", + "person_insurance": "Individual insurance certificate |||| Individual insurance certificates", "personal_sporting_licence": "Sporting licence |||| Sporting licences", "phone_invoice": "Phone invoice |||| Phone invoices", "pregnancy_medical_certificate": "Certificate of pregnancy |||| Certificates of pregnancy", "prescription": "Prescription |||| Prescriptions", + "real_estate_insurance" : "Real estate insurance certificate |||| Real estate insurance certificates", "real_estate_tax": "Real estate tax |||| Real estate taxes", "receipt": "Receipt |||| Receipts", "rent_receipt": "Rent receipt |||| Rent receipts", diff --git a/packages/cozy-client/src/models/document/locales/fr.json b/packages/cozy-client/src/models/document/locales/fr.json index 8d242b085e..2d48aaf44a 100644 --- a/packages/cozy-client/src/models/document/locales/fr.json +++ b/packages/cozy-client/src/models/document/locales/fr.json @@ -88,10 +88,12 @@ "pay_sheet": "Fiche de paie |||| Fiches de paie", "payment_proof_family_allowance": "Attestation de paiement CAF |||| Attestations de paiement CAF", "pension": "Retraite |||| Retraites", + "person_insurance": "Attestation d'assurance individuelle |||| Attestations d'assurance individuelle", "personal_sporting_licence": "Licence sportive |||| Licences sportives", "phone_invoice": "Facture de téléphone |||| Factures de téléphone", "pregnancy_medical_certificate": "Certificat de grossesse |||| Certificats de grossesse", "prescription": "Ordonnance |||| Ordonnances", + "real_estate_insurance" : "Attestation d'assurance immobilière |||| Attestations d'assurance immobilière", "real_estate_tax": "Taxe foncière |||| Taxes foncières", "receipt": "Accusé de réception |||| Accusés de réception", "rent_receipt": "Quittance de loyer |||| Quittances de loyer", diff --git a/packages/cozy-client/src/types.js b/packages/cozy-client/src/types.js index 3a7e5af9f8..71c6a77d09 100644 --- a/packages/cozy-client/src/types.js +++ b/packages/cozy-client/src/types.js @@ -426,13 +426,13 @@ import { QueryDefinition } from './queries/dsl' /** * @typedef {'identity_photo'|'national_id_card'|'passport'|'residence_permit'|'family_record_book'|'birth_certificate'|'driver_license'|'other_identity_document'|'citizen_registration_certificate'|'personal_sporting_licence'|'electoral_card'|'note_identity_document'} IdentityLabel * - * @typedef {'family_record_book'|'birth_certificate'|'wedding'|'pacs'|'divorce'|'large_family_card'|'caf'|'other_family_document'|'payment_proof_family_allowance'|'single_parent_benefit'|'note_family_document'} FamilyLabel + * @typedef {'family_record_book'|'birth_certificate'|'wedding'|'pacs'|'divorce'|'large_family_card'|'caf'|'other_family_document'|'payment_proof_family_allowance'|'single_parent_benefit'|'note_family_document'|'person_insurance'} FamilyLabel * * @typedef {'diploma'|'work_contract'|'pay_sheet'|'unemployment_benefit'|'pension'|'gradebook'|'student_card'|'resume'|'motivation_letter'|'other_work_document'|'work_disability_recognition'|'school_attendance_certificate'|'employment_center_certificate'|'school_insurance_certificate'|'note_work_document'} WorkStudyLabels * * @typedef {'health_certificate'|'health_book'|'national_health_insurance_card'|'health_insurance_card'|'prescription'|'health_invoice'|'national_health_insurance_right_certificate'|'work_disability_recognition'|'pregnancy_medical_certificate'|'other_health_document'|'note_health_document'} HealthLabels * - * @typedef {'phone_invoice'|'isp_invoice'|'telecom_invoice'|'energy_invoice'|'water_invoice'|'other_invoice'|'house_sale_agreeement'|'building_permit'|'technical_diagnostic_record'|'lease'|'rent_receipt'|'house_insurance'|'work_quote'|'work_invoice'|'other_house_document'|'unfit_for_habitation_declaration'|'accommodation_proof'|'note_house_document'} HomeLabels + * @typedef {'phone_invoice'|'isp_invoice'|'telecom_invoice'|'energy_invoice'|'water_invoice'|'other_invoice'|'house_sale_agreeement'|'building_permit'|'technical_diagnostic_record'|'lease'|'rent_receipt'|'house_insurance'|'work_quote'|'work_invoice'|'other_house_document'|'unfit_for_habitation_declaration'|'accommodation_proof'|'note_house_document'|'real_estate_insurance'} HomeLabels * * @typedef {'driver_license'|'vehicle_registration'|'car_insurance'|'mechanic_invoice'|'transport_invoice'|'other_transport_document'|'transport_card'|'note_transport_document'} TransportLabels * diff --git a/packages/cozy-client/types/types.d.ts b/packages/cozy-client/types/types.d.ts index d1c2ef7f1d..517346bb81 100644 --- a/packages/cozy-client/types/types.d.ts +++ b/packages/cozy-client/types/types.d.ts @@ -724,16 +724,16 @@ export type QualificationAttributes = { subjects?: Array; }; export type IdentityLabel = "identity_photo" | "national_id_card" | "passport" | "residence_permit" | "family_record_book" | "birth_certificate" | "driver_license" | "other_identity_document" | "electoral_card" | "citizen_registration_certificate" | "personal_sporting_licence" | "note_identity_document"; -export type FamilyLabel = "family_record_book" | "birth_certificate" | "wedding" | "pacs" | "divorce" | "large_family_card" | "caf" | "other_family_document" | "single_parent_benefit" | "payment_proof_family_allowance" | "note_family_document"; +export type FamilyLabel = "family_record_book" | "birth_certificate" | "wedding" | "pacs" | "divorce" | "large_family_card" | "caf" | "other_family_document" | "single_parent_benefit" | "payment_proof_family_allowance" | "person_insurance" | "note_family_document"; export type WorkStudyLabels = "resume" | "diploma" | "work_contract" | "pay_sheet" | "employment_center_certificate" | "unemployment_benefit" | "pension" | "gradebook" | "student_card" | "motivation_letter" | "other_work_document" | "work_disability_recognition" | "school_attendance_certificate" | "school_insurance_certificate" | "note_work_document"; export type HealthLabels = "health_book" | "health_certificate" | "pregnancy_medical_certificate" | "work_disability_recognition" | "national_health_insurance_card" | "national_health_insurance_right_certificate" | "health_insurance_card" | "prescription" | "health_invoice" | "other_health_document" | "note_health_document"; -export type HomeLabels = "house_sale_agreeement" | "building_permit" | "technical_diagnostic_record" | "lease" | "rent_receipt" | "house_insurance" | "work_quote" | "work_invoice" | "other_house_document" | "phone_invoice" | "isp_invoice" | "telecom_invoice" | "energy_invoice" | "water_invoice" | "other_invoice" | "unfit_for_habitation_declaration" | "accommodation_proof" | "note_house_document"; +export type HomeLabels = "house_sale_agreeement" | "building_permit" | "technical_diagnostic_record" | "lease" | "rent_receipt" | "house_insurance" | "work_quote" | "work_invoice" | "other_house_document" | "phone_invoice" | "isp_invoice" | "telecom_invoice" | "energy_invoice" | "water_invoice" | "other_invoice" | "unfit_for_habitation_declaration" | "accommodation_proof" | "real_estate_insurance" | "note_house_document"; export type TransportLabels = "driver_license" | "transport_card" | "vehicle_registration" | "car_insurance" | "mechanic_invoice" | "transport_invoice" | "other_transport_document" | "note_transport_document"; export type FinanceLabels = "pay_sheet" | "single_parent_benefit" | "other_revenue" | "real_estate_tax" | "tax_return" | "tax_notice" | "tax_timetable" | "other_tax_document" | "bank_details" | "bank_statement" | "loan_agreement" | "other_bank_document" | "receipt" | "payment_proof_family_allowance" | "note_finance"; export type InvoiceLabels = "health_invoice" | "transport_invoice" | "work_invoice" | "phone_invoice" | "isp_invoice" | "telecom_invoice" | "energy_invoice" | "water_invoice" | "appliance_invoice" | "web_service_invoice" | "restaurant_invoice" | "other_invoice" | "note_invoice"; export type ActivityLabels = "fidelity_card" | "library_card" | "personal_sporting_licence" | "other_activity_document" | "note_activity_document"; export type OthersLabels = "other_administrative_document" | "note_other"; -export type ItemsLabels = "resume" | "identity_photo" | "national_id_card" | "passport" | "residence_permit" | "family_record_book" | "birth_certificate" | "driver_license" | "other_identity_document" | "wedding" | "pacs" | "divorce" | "large_family_card" | "caf" | "other_family_document" | "diploma" | "work_contract" | "pay_sheet" | "fidelity_card" | "library_card" | "single_parent_benefit" | "transport_card" | "electoral_card" | "employment_center_certificate" | "unemployment_benefit" | "pension" | "other_revenue" | "gradebook" | "student_card" | "motivation_letter" | "other_work_document" | "health_book" | "health_certificate" | "pregnancy_medical_certificate" | "work_disability_recognition" | "national_health_insurance_card" | "national_health_insurance_right_certificate" | "health_insurance_card" | "prescription" | "health_invoice" | "other_health_document" | "vehicle_registration" | "car_insurance" | "mechanic_invoice" | "transport_invoice" | "other_transport_document" | "house_sale_agreeement" | "real_estate_tax" | "building_permit" | "technical_diagnostic_record" | "lease" | "rent_receipt" | "house_insurance" | "work_quote" | "work_invoice" | "other_house_document" | "phone_invoice" | "isp_invoice" | "telecom_invoice" | "energy_invoice" | "water_invoice" | "appliance_invoice" | "web_service_invoice" | "restaurant_invoice" | "other_invoice" | "tax_return" | "tax_notice" | "tax_timetable" | "other_tax_document" | "bank_details" | "bank_statement" | "loan_agreement" | "other_bank_document" | "receipt" | "payment_proof_family_allowance" | "school_attendance_certificate" | "school_insurance_certificate" | "unfit_for_habitation_declaration" | "accommodation_proof" | "citizen_registration_certificate" | "personal_sporting_licence" | "other_activity_document" | "other_administrative_document" | "note_identity_document" | "note_family_document" | "note_work_document" | "note_health_document" | "note_house_document" | "note_transport_document" | "note_activity_document" | "note_finance" | "note_invoice" | "note_other"; +export type ItemsLabels = "resume" | "identity_photo" | "national_id_card" | "passport" | "residence_permit" | "family_record_book" | "birth_certificate" | "driver_license" | "other_identity_document" | "wedding" | "pacs" | "divorce" | "large_family_card" | "caf" | "other_family_document" | "diploma" | "work_contract" | "pay_sheet" | "fidelity_card" | "library_card" | "single_parent_benefit" | "transport_card" | "electoral_card" | "employment_center_certificate" | "unemployment_benefit" | "pension" | "other_revenue" | "gradebook" | "student_card" | "motivation_letter" | "other_work_document" | "health_book" | "health_certificate" | "pregnancy_medical_certificate" | "work_disability_recognition" | "national_health_insurance_card" | "national_health_insurance_right_certificate" | "health_insurance_card" | "prescription" | "health_invoice" | "other_health_document" | "vehicle_registration" | "car_insurance" | "mechanic_invoice" | "transport_invoice" | "other_transport_document" | "house_sale_agreeement" | "real_estate_tax" | "building_permit" | "technical_diagnostic_record" | "lease" | "rent_receipt" | "house_insurance" | "work_quote" | "work_invoice" | "other_house_document" | "phone_invoice" | "isp_invoice" | "telecom_invoice" | "energy_invoice" | "water_invoice" | "appliance_invoice" | "web_service_invoice" | "restaurant_invoice" | "other_invoice" | "tax_return" | "tax_notice" | "tax_timetable" | "other_tax_document" | "bank_details" | "bank_statement" | "loan_agreement" | "other_bank_document" | "receipt" | "payment_proof_family_allowance" | "school_attendance_certificate" | "school_insurance_certificate" | "unfit_for_habitation_declaration" | "accommodation_proof" | "citizen_registration_certificate" | "personal_sporting_licence" | "other_activity_document" | "real_estate_insurance" | "person_insurance" | "other_administrative_document" | "note_identity_document" | "note_family_document" | "note_work_document" | "note_health_document" | "note_house_document" | "note_transport_document" | "note_activity_document" | "note_finance" | "note_invoice" | "note_other"; /** * See https://github.com/cozy/DACC */