From 7c3cb25712ac5cf607385758dd46f35128704704 Mon Sep 17 00:00:00 2001 From: JF-Cozy Date: Mon, 13 Nov 2023 14:45:03 +0100 Subject: [PATCH] feat: Add expense claim qualification for invoice, finance and workstudy --- docs/api/cozy-client/modules/models.document.themes.md | 2 +- packages/cozy-client/src/assets/qualifications.json | 4 ++++ .../cozy-client/src/models/document/documentTypeData.js | 3 +++ packages/cozy-client/src/models/document/locales/en.json | 1 + packages/cozy-client/src/models/document/locales/fr.json | 3 ++- packages/cozy-client/src/types.js | 6 +++--- packages/cozy-client/types/types.d.ts | 8 ++++---- 7 files changed, 18 insertions(+), 9 deletions(-) diff --git a/docs/api/cozy-client/modules/models.document.themes.md b/docs/api/cozy-client/modules/models.document.themes.md index 36a225d44..09d307d90 100644 --- a/docs/api/cozy-client/modules/models.document.themes.md +++ b/docs/api/cozy-client/modules/models.document.themes.md @@ -12,4 +12,4 @@ *Defined in* -[packages/cozy-client/src/models/document/documentTypeData.js:190](https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/models/document/documentTypeData.js#L190) +[packages/cozy-client/src/models/document/documentTypeData.js:193](https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/models/document/documentTypeData.js#L193) diff --git a/packages/cozy-client/src/assets/qualifications.json b/packages/cozy-client/src/assets/qualifications.json index 558e4c5e3..d2e9829d1 100644 --- a/packages/cozy-client/src/assets/qualifications.json +++ b/packages/cozy-client/src/assets/qualifications.json @@ -491,6 +491,10 @@ { "label": "other_administrative_document" }, + { + "label": "expense_claim", + "purpose": "invoice" + }, { "label": "note_identity_document" }, diff --git a/packages/cozy-client/src/models/document/documentTypeData.js b/packages/cozy-client/src/models/document/documentTypeData.js index b4dedd464..21f893715 100644 --- a/packages/cozy-client/src/models/document/documentTypeData.js +++ b/packages/cozy-client/src/models/document/documentTypeData.js @@ -69,6 +69,7 @@ const workStudyLabels = [ 'school_insurance_certificate', 'resume', 'motivation_letter', + 'expense_claim', 'note_work_document', 'other_work_document' ] @@ -156,6 +157,7 @@ const financeLabels = [ 'loan_agreement', 'payment_proof_family_allowance', 'note_finance', + 'expense_claim', 'other_bank_document', 'other_revenue' ] @@ -176,6 +178,7 @@ const invoiceLabels = [ 'transport_invoice', 'health_invoice', 'note_invoice', + 'expense_claim', 'other_invoice' ] diff --git a/packages/cozy-client/src/models/document/locales/en.json b/packages/cozy-client/src/models/document/locales/en.json index f16330960..a0795b0f1 100644 --- a/packages/cozy-client/src/models/document/locales/en.json +++ b/packages/cozy-client/src/models/document/locales/en.json @@ -35,6 +35,7 @@ "employment_center_certificate": "Employment center certificate |||| Employment center certificates", "energy_contract": "Energy provider contract |||| Energy provider contracts", "energy_invoice": "Energy invoice |||| Energy invoices", + "expense_claim": "Expense claim |||| Expense claims", "family_record_book": "Family record book |||| Family record books", "family": "Family", "fidelity_card": "Fidelity card |||| Fidelity cards", diff --git a/packages/cozy-client/src/models/document/locales/fr.json b/packages/cozy-client/src/models/document/locales/fr.json index 8d242b085..46ebcbdce 100644 --- a/packages/cozy-client/src/models/document/locales/fr.json +++ b/packages/cozy-client/src/models/document/locales/fr.json @@ -35,6 +35,7 @@ "employment_center_certificate": "Attestation de Pôle emploi |||| Attestations de Pôle emploi", "energy_contract": "Contrat de fournisseur d'énergies |||| Contrats de fournisseur d'énergies", "energy_invoice": "Facture d'énergie |||| Factures d'énergie", + "expense_claim": "Note de frais |||| Notes de frais", "family_record_book": "Livret de famille |||| Livrets de famille", "family": "Famille", "fidelity_card": "Carte de fidélité |||| Cartes de fidélité", @@ -122,7 +123,7 @@ "work_quote": "Devis de travaux", "work_study": "Travail & Études" }, - "attributes":{ + "attributes": { "contractType": { "cdi": "CDI", "cdd": "CDD", diff --git a/packages/cozy-client/src/types.js b/packages/cozy-client/src/types.js index 3a7e5af9f..63d3cf439 100644 --- a/packages/cozy-client/src/types.js +++ b/packages/cozy-client/src/types.js @@ -428,7 +428,7 @@ import { QueryDefinition } from './queries/dsl' * * @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 {'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 {'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'|'expense_claim'} 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 * @@ -436,9 +436,9 @@ import { QueryDefinition } from './queries/dsl' * * @typedef {'driver_license'|'vehicle_registration'|'car_insurance'|'mechanic_invoice'|'transport_invoice'|'other_transport_document'|'transport_card'|'note_transport_document'} TransportLabels * - * @typedef {'tax_return'|'tax_notice'|'tax_timetable'|'pay_sheet'|'receipt'|'other_tax_document'|'bank_details'|'bank_statement'|'loan_agreement'|'other_bank_document'|'payment_proof_family_allowance'|'other_revenue'|'single_parent_benefit'|'real_estate_tax'|'note_finance'} FinanceLabels + * @typedef {'tax_return'|'tax_notice'|'tax_timetable'|'pay_sheet'|'receipt'|'other_tax_document'|'bank_details'|'bank_statement'|'loan_agreement'|'other_bank_document'|'payment_proof_family_allowance'|'other_revenue'|'single_parent_benefit'|'real_estate_tax'|'note_finance'|'expense_claim'} FinanceLabels * - * @typedef {'phone_invoice'|'isp_invoice'|'telecom_invoice'|'energy_invoice'|'water_invoice'|'appliance_invoice'|'web_service_invoice'|'restaurant_invoice'|'work_invoice'|'transport_invoice'|'health_invoice'|'other_invoice'|'note_invoice'} InvoiceLabels + * @typedef {'phone_invoice'|'isp_invoice'|'telecom_invoice'|'energy_invoice'|'water_invoice'|'appliance_invoice'|'web_service_invoice'|'restaurant_invoice'|'work_invoice'|'transport_invoice'|'health_invoice'|'other_invoice'|'note_invoice'|'expense_claim'} InvoiceLabels * * @typedef {'personal_sporting_licence'|'other_activity_document'|'fidelity_card'|'library_card'|'note_activity_document'} ActivityLabels * diff --git a/packages/cozy-client/types/types.d.ts b/packages/cozy-client/types/types.d.ts index d1c2ef7f1..206bf5f95 100644 --- a/packages/cozy-client/types/types.d.ts +++ b/packages/cozy-client/types/types.d.ts @@ -725,15 +725,15 @@ export type QualificationAttributes = { }; 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 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 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" | "expense_claim" | "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 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 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" | "expense_claim" | "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" | "expense_claim" | "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" | "other_administrative_document" | "expense_claim" | "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 */