Skip to content

Conversation

@vgreb
Copy link
Collaborator

@vgreb vgreb commented Dec 9, 2025

J'ai un peu modifié la gestions des lignes de devis sur la page d'ajout/modification d'un devis. On peut maintenant rajouter une ligne au besoin.

Avant :
devis-avant

Après :
devis-après

La gestion des lignes est faite en javascript, pour pouvoir tester cel, j'ai dû rajouter la possibilité de faire des tests avec un vrai navigatuer. Les tests necessitant du javascript sont pilotés avec Behat via Panther sur le navigateur Chromium.

@vgreb vgreb self-assigned this Dec 9, 2025
@vgreb
Copy link
Collaborator Author

vgreb commented Dec 9, 2025

resolves #2002

@vgreb vgreb force-pushed the refacto/accounting-quotation-add-edit branch 6 times, most recently from 686683e to 15cc2a5 Compare December 16, 2025 20:40
@vgreb vgreb force-pushed the refacto/accounting-quotation-add-edit branch 8 times, most recently from 556dddb to 0034d1f Compare December 20, 2025 21:30
@vgreb vgreb marked this pull request as ready for review December 20, 2025 22:03
@vgreb vgreb requested review from Mopolo and stakovicz December 20, 2025 22:03
return $this;
}

public function isValid(): bool
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pourquoi ne pas utiliser une contrainte de validation ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm et en plus ça veut dire que la classe permet un état invalide, les colonnes en base ne sont pas nullables.

@vgreb vgreb force-pushed the refacto/accounting-quotation-add-edit branch from 0034d1f to eef10b5 Compare December 23, 2025 21:45
@vgreb vgreb force-pushed the refacto/accounting-quotation-add-edit branch from eef10b5 to 257149a Compare January 12, 2026 11:24
Copy link
Contributor

@stakovicz stakovicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gros boulot ! Bravo !
Il reste aussi des commentaires non résolus.

@vgreb vgreb force-pushed the refacto/accounting-quotation-add-edit branch 3 times, most recently from 1ff4e5c to 9f239ee Compare January 29, 2026 06:07
@vgreb vgreb force-pushed the refacto/accounting-quotation-add-edit branch from 9f239ee to 7e2ca90 Compare January 29, 2026 06:30
@vgreb
Copy link
Collaborator Author

vgreb commented Jan 29, 2026

@stakovicz @Mopolo j'ai implémenté une solution plus propre que le "wait Xs" dans les tests behat. Je retente l'assertion toutes les 100ms pendant un temps donné (cf. Afup\Tests\Behat\Bootstrap\WaitContext).

Copy link
Contributor

@Mopolo Mopolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C'est beaucoup mieux le wait que t'as fait là !

Faudra voir à l'usage si on besoin de setup du retry auto de ces tests.

Quelques remarques encore mais je trouve qu'on approche du merge :)

return $this;
}

public function isValid(): bool
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm et en plus ça veut dire que la classe permet un état invalide, les colonnes en base ne sont pas nullables.

'scale' => 2,
])->add('unitPrice', NumberType::class, [
'label' => 'Prix unitaire HT',
'required' => false,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vu que les lignes peuvent maintenant être ajoutées dynamiquement, pourquoi ne pas forcer les colonnes non-nullables ?

Là ça veut dire que si je clic sur le bouton pour en ajouter 3 et que j'en rempli 2, la 3ème sera ignorée.
Avec l'ancien système ça ne posait pas de soucis vu que les 5 étaient en dur. Mais là je trouve ça dommage et contre-intuitif, on n'est plus sûr de ce qui sera enregistré ou pas.

$idsToRemove = $this->invoicingDetailRepository->getRowsIdsPerInvoicingId($quotation->getId());
$existingIds = [];
$this->invoicingRepository->startTransaction();
$this->unitOfWork->pushSave($quotation);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je ne maitrise pas du tout Ting, c'est nécessaire ça vu qu'il y a ça plus bas ?

$this->invoicingRepository->save($quotation);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants