Skip to content

Commit

Permalink
fix: solve issue
Browse files Browse the repository at this point in the history
  • Loading branch information
EmmanuelDemey committed Dec 17, 2024
1 parent 211dbcf commit 4ce5b1b
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 16 deletions.
1 change: 0 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export default [
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-extraneous-class': 'off',
'@typescript-eslint/no-confusing-non-null-assertion': 'off',
'@typescript-eslint/no-empty-function': 'off'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Facture arrêtée à la somme de <%= SPONSORING_NUMBER %>€ TTC.
TVA non applicable, article 261 du Code général des impôts.
</div>
<div style="font-size: 8px">
Paiement par virement (RIB : 30027 17015 00020671801 21, IBAN FR7630027170150002067180121, BIC CMCIFRPP) à réception de cette facture.
Paiement par virement (IBAN FR76 1695 8000 0172 9071 8946 558, BIC QNTOFRP1XXX) à réception de cette facture.
</div>
<div style="font-size: 8px"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
<button id="relance" type="button" mat-raised-button color="primary" (click)="relance()">Relancer ces partenaires</button>
}

<mat-card appearance="outlined">
<mat-card-content>Il y a {{ filteredPartners().length }} partenaires dans cette liste </mat-card-content>
</mat-card>

<table matSort mat-table [dataSource]="dataSource()" class="mat-elevation-z8 full-width">
<ng-container matColumnDef="creationDate">
<th mat-header-cell mat-sort-header *matHeaderCellDef>Date Enregistrement</th>
Expand Down
4 changes: 2 additions & 2 deletions public/src/app/ui/admin-paid/admin-paid.component.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@if (company().invoiceUrl) {
@if (companySignal().invoiceUrl) {
<cms-files [files]="files"></cms-files>
}
@if (company().status?.[step().key] !== 'done') {
@if (companySignal().status?.[stepSignal().key] !== 'done') {
<div class="inline-bloc">
<button mat-raised-button color="primary" (click)="setDone()">
<mat-icon>done</mat-icon>
Expand Down
18 changes: 11 additions & 7 deletions public/src/app/ui/admin-paid/admin-paid.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CommonModule } from '@angular/common';
import { Component, inject, input } from '@angular/core';
import { Component, computed, inject, input } from '@angular/core';
import { MatButtonModule } from '@angular/material/button';
import { MatIconModule } from '@angular/material/icon';

Expand All @@ -21,22 +21,26 @@ export class AdminPaidComponent {
readonly id = input.required<string>();
files = {};

idSignal = computed(() => this.id as unknown as string);
stepSignal = computed(() => this.step as unknown as WorkflowStep);
companySignal = computed(() => this.company as unknown as Company);

private readonly partnerService = inject(PartnerService);
private readonly storageService = inject(StorageService);

ngOnInit() {
this.storageService.getInvoice(this.id()).then((invoice) => {
this.storageService.getInvoice(this.idSignal()).then((invoice) => {
this.files = {
Facture: invoice
};
});
}

updateStatus(status: State) {
this.partnerService.update(this.id(), {
this.partnerService.update(this.idSignal(), {
status: {
...this.company().status,
[this.step().key]: status
...this.companySignal().status,
[this.stepSignal().key]: status
}
});
}
Expand All @@ -47,8 +51,8 @@ export class AdminPaidComponent {
this.updateStatus('done');
}
uploadInvoice(file: Blob) {
this.storageService.uploadInvoice(this.id(), file).then((url) => {
this.partnerService.update(this.id(), {
this.storageService.uploadInvoice(this.idSignal(), file).then((url) => {
this.partnerService.update(this.idSignal(), {
invoiceUrl: url
});
});
Expand Down
7 changes: 3 additions & 4 deletions public/src/app/ui/filled/filled.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import { Component } from '@angular/core';
@Component({
selector: 'cms-filled',
imports: [],
template: ` <p>{{ message }}</p> `
template: ` <p>Nous avons bien pris en compte votre souhait de devenir partenaire et nous vous en remercions.</p> `
})
export class FilledComponent {
message = 'Nous avons bien pris en compte votre souhait de devenir partenaire et nous vous en remercions.';
}
// eslint-disable-next-line @typescript-eslint/no-extraneous-class
export class FilledComponent {}
1 change: 1 addition & 0 deletions public/src/app/ui/loader/loader.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ import { Component } from '@angular/core';
templateUrl: './loader.component.html',
styleUrls: ['./loader.component.css']
})
// eslint-disable-next-line @typescript-eslint/no-extraneous-class
export class LoaderComponent {}
2 changes: 1 addition & 1 deletion public/src/app/ui/signed/signed.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export class SignedComponent {
this.partnerService.update(this.id as unknown as string, {
status: {
...this.companySignal().status,
[this.step().key]: status
[this.stepSignal().key]: status
}
});
}
Expand Down

0 comments on commit 4ce5b1b

Please sign in to comment.