Skip to content

Commit 095f7d7

Browse files
committed
add rapprochement
1 parent c6d54fb commit 095f7d7

File tree

6 files changed

+290
-103
lines changed

6 files changed

+290
-103
lines changed

frontend/ultima-ng-19.0.0/src/app/pages/dashboard/agent-credit/rapprochement-caisse/rapprochement-caisse.component.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1167,7 +1167,8 @@ <h4>
11671167

11681168
<div class="details-wrapper">
11691169
<div class="details-content">
1170-
<pre class="report-text">{{ state().reconciliationResult?.details }}</pre>
1170+
<pre
1171+
class="report-text bold-report">{{ state().reconciliationResult?.details | formatReport }}</pre>
11711172

11721173
<div class="report-actions">
11731174
<p-button label="Exporter PDF" icon="pi pi-file-pdf" severity="danger" (onClick)="exportPDF()">

frontend/ultima-ng-19.0.0/src/app/pages/dashboard/agent-credit/rapprochement-caisse/rapprochement-caisse.component.scss

Lines changed: 107 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -615,29 +615,90 @@
615615
// Correction pour le débordement du rapport
616616
.details-wrapper {
617617
width: 100%;
618-
max-width: 100%;
619618
overflow: hidden;
620619

621620
.details-content {
622621
width: 100%;
622+
.report-text.bold-report {
623+
// Effet de surbrillance pour les montants
624+
::selection {
625+
background-color: #ffd700;
626+
color: #000;
627+
}
623628

624-
.report-text {
625-
background: #f8f9fa;
629+
// Animation subtile au scroll
630+
transition: box-shadow 0.3s ease;
631+
632+
&:hover {
633+
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
634+
}
635+
636+
// Style pour les sections importantes
637+
// Si votre rapport contient des marqueurs spéciaux
638+
&::first-line {
639+
font-size: 1rem;
640+
color: #0056b3;
641+
}
642+
}
643+
644+
// Boutons d'export avec meilleur style
645+
.report-actions {
646+
margin-top: 1.5rem;
647+
display: flex;
648+
gap: 1rem;
649+
justify-content: flex-end;
626650
padding: 1rem;
627-
border-radius: 4px;
628-
font-size: 0.875rem;
629-
color: #495057;
651+
background: #f8f9fa;
652+
border-radius: 8px;
653+
654+
.p-button {
655+
font-weight: 600;
656+
}
657+
}
658+
659+
.report-text {
660+
background: #ffffff; // Fond blanc pour meilleur contraste
661+
padding: 1.5rem;
662+
border-radius: 8px;
663+
font-size: 0.95rem; // Taille augmentée
664+
color: #212529; // Couleur plus foncée
630665
margin: 0;
631-
font-family: 'Courier New', monospace;
666+
font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
632667
white-space: pre-wrap;
633668
word-wrap: break-word;
634669
overflow-wrap: break-word;
635-
max-height: 600px;
670+
max-height: 700px; // Hauteur augmentée
636671
overflow-y: auto;
637672
overflow-x: hidden;
638-
display: block;
639673
width: 100%;
640674
box-sizing: border-box;
675+
border: 2px solid #dee2e6; // Bordure pour délimiter
676+
line-height: 1.8; // Meilleur espacement des lignes
677+
678+
// Styles pour le rapport en gras
679+
&.bold-report {
680+
font-weight: 600; // Semi-bold pour meilleure lisibilité
681+
letter-spacing: 0.3px; // Espacement léger entre caractères
682+
683+
// Style de la scrollbar
684+
&::-webkit-scrollbar {
685+
width: 10px;
686+
}
687+
688+
&::-webkit-scrollbar-track {
689+
background: #f1f1f1;
690+
border-radius: 5px;
691+
}
692+
693+
&::-webkit-scrollbar-thumb {
694+
background: #888;
695+
border-radius: 5px;
696+
697+
&:hover {
698+
background: #555;
699+
}
700+
}
701+
}
641702
}
642703
}
643704
}
@@ -1257,4 +1318,41 @@
12571318
justify-content: center;
12581319
}
12591320
}
1321+
1322+
/* Styles pour le rapport détaillé en gras */
1323+
.report-text.bold-text {
1324+
font-weight: bold;
1325+
font-size: 13px;
1326+
color: #212529;
1327+
line-height: 1.6;
1328+
}
1329+
1330+
/* Styles pour le résumé du tableau des transactions manquantes */
1331+
.table-summary {
1332+
background-color: #f8f9fa;
1333+
padding: 12px 16px;
1334+
border-top: 2px solid #dee2e6;
1335+
margin-top: 10px;
1336+
}
1337+
1338+
.table-summary .summary-content {
1339+
display: flex;
1340+
justify-content: space-between;
1341+
align-items: center;
1342+
font-weight: bold;
1343+
color: #495057;
1344+
}
1345+
1346+
/* Style pour la colonne de numérotation */
1347+
.text-center {
1348+
text-align: center;
1349+
}
1350+
1351+
.font-bold {
1352+
font-weight: bold;
1353+
}
1354+
1355+
.ml-4 {
1356+
margin-left: 1rem;
1357+
}
12601358
}

frontend/ultima-ng-19.0.0/src/app/pages/dashboard/agent-credit/rapprochement-caisse/rapprochement-caisse.component.ts

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import { ReconciliationResultDTO } from '@/interface/ReconciliationResultDTO';
3333
import { ExcelExportService } from '@/service/TransactionManquante';
3434
import { IUser } from '@/interface/user';
3535
import { PdfExportService } from '@/service/PdfExportService';
36+
import { FormatReportPipe } from '@/pipes/FormatReportPipe';
3637

3738
@Component({
3839
selector: 'app-rapprochement-caisse',
@@ -61,7 +62,8 @@ import { PdfExportService } from '@/service/PdfExportService';
6162
DropdownModule,
6263
IconFieldModule,
6364
InputIconModule,
64-
CalendarModule // Ajout du CalendarModule pour les filtres de date
65+
CalendarModule,
66+
FormatReportPipe
6567
],
6668
providers: [MessageService, ExcelExportService],
6769
templateUrl: './rapprochement-caisse.component.html',
@@ -113,7 +115,7 @@ export class RapprochementCaisseComponent implements OnDestroy {
113115

114116
// Initialiser le formulaire directement
115117
reconciliationForm: FormGroup = this.fb.group({
116-
dateDebut: [new Date(Date.now() - 7 * 24 * 60 * 60 * 1000), Validators.required],
118+
dateDebut: [new Date(), Validators.required],
117119
dateFin: [new Date(), Validators.required]
118120
});
119121

@@ -167,6 +169,17 @@ export class RapprochementCaisseComponent implements OnDestroy {
167169
return result && result.transactionsManquantes && result.transactionsManquantes.length > 0;
168170
});
169171

172+
/**
173+
* Calcule le montant total des transactions manquantes
174+
*/
175+
getTotalMontantManquant(): number {
176+
const result = this.state().reconciliationResult;
177+
if (!result || !result.transactionsManquantes) {
178+
return 0;
179+
}
180+
return result.transactionsManquantes.reduce((total, trans) => total + (trans.montant || 0), 0);
181+
}
182+
170183
constructor() {
171184
// Le formulaire est déjà initialisé en tant que propriété
172185
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { Pipe, PipeTransform } from '@angular/core';
2+
3+
@Pipe({
4+
name: 'formatReport',
5+
standalone: true
6+
})
7+
export class FormatReportPipe implements PipeTransform {
8+
transform(value: string | null | undefined): string {
9+
if (!value) return '';
10+
11+
// Remplace les tirets de séparation par des lignes plus visibles
12+
let formatted = value.replace(/[-]{3,}/g, '━'.repeat(50));
13+
formatted = formatted.replace(/[=]{3,}/g, '═'.repeat(50));
14+
15+
return formatted;
16+
}
17+
}

0 commit comments

Comments
 (0)