fix: Use StatutFacture and TypeFacture enums instead of string literals

This commit is contained in:
dahoud
2025-10-13 18:43:23 +00:00
parent bed5c8dced
commit 2b6fb084d3

View File

@@ -18,6 +18,7 @@ import { factureService, clientService } from '../../../services/api';
import { formatDate, formatCurrency } from '../../../utils/formatters'; import { formatDate, formatCurrency } from '../../../utils/formatters';
import { ErrorHandler } from '../../../services/errorHandler'; import { ErrorHandler } from '../../../services/errorHandler';
import type { Facture } from '../../../types/btp'; import type { Facture } from '../../../types/btp';
import { StatutFacture, TypeFacture } from '../../../types/btp';
import { import {
ActionButtonGroup, ActionButtonGroup,
ViewButton, ViewButton,
@@ -46,8 +47,8 @@ const FacturesPage = () => {
montantHT: 0, montantHT: 0,
montantTTC: 0, montantTTC: 0,
tauxTVA: 20, tauxTVA: 20,
statut: 'BROUILLON', statut: StatutFacture.BROUILLON,
type: 'FACTURE', type: TypeFacture.FACTURE,
actif: true, actif: true,
client: null, client: null,
chantier: null, chantier: null,
@@ -121,8 +122,8 @@ const FacturesPage = () => {
montantHT: 0, montantHT: 0,
montantTTC: 0, montantTTC: 0,
tauxTVA: 20, tauxTVA: 20,
statut: 'BROUILLON', statut: StatutFacture.BROUILLON,
type: 'FACTURE', type: TypeFacture.FACTURE,
actif: true, actif: true,
client: null, client: null,
chantier: null, chantier: null,
@@ -228,8 +229,8 @@ const FacturesPage = () => {
montantHT: 0, montantHT: 0,
montantTTC: 0, montantTTC: 0,
tauxTVA: 20, tauxTVA: 20,
statut: 'BROUILLON', statut: StatutFacture.BROUILLON,
type: 'FACTURE', type: TypeFacture.FACTURE,
actif: true, actif: true,
client: null, client: null,
chantier: null, chantier: null,