Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
b57969e
feat: add active column to club table
colombefioren Jun 23, 2026
f5e76a2
feat: add active field to JClub entity
colombefioren Jun 23, 2026
408b58a
feat: add active field to Club domain model
colombefioren Jun 23, 2026
39722f5
feat: map active field in JClubMapper
colombefioren Jun 23, 2026
af08691
feat: add active field to ClubStats record
colombefioren Jun 23, 2026
01abe89
test: update Club constructor calls with active parameter
colombefioren Jun 23, 2026
b7078bf
test: update ClubService tests with active parameter in Club constructor
colombefioren Jun 23, 2026
3394c04
feat: add active status indicator to club card
colombefioren Jun 23, 2026
09e28e7
feat: add active filter dropdown to dashboard
colombefioren Jun 23, 2026
0f6092c
feat: add active filter logic to dashboard JS
colombefioren Jun 23, 2026
b96316c
refactor: replace status dot with top-right Inactif label in club card
colombefioren Jun 23, 2026
fa1c3b9
fix: style select dropdown with custom chevron to fix arrow alignment
colombefioren Jun 23, 2026
4f1fac4
fix: match history icon height with payer cotisation button
colombefioren Jun 23, 2026
5d9c6a6
refactor: make Inactif label more visible and less flush to edge
colombefioren Jun 23, 2026
74c4f22
refactor: reduce Inactif label font weight from medium to normal
colombefioren Jun 23, 2026
c286f79
refactor: make Inactif label a subtle badge
colombefioren Jun 23, 2026
1b96804
style: darken inactif badge for less sublte look
colombefioren Jun 23, 2026
f19bebe
chore: format
colombefioren Jun 23, 2026
1799d53
refactor: put inactif instead of non actif for inactive club dropdown
colombefioren Jun 23, 2026
7cd1f4f
feat: add scope param to Psp interface
colombefioren Jun 24, 2026
4c73533
feat: pass scope in VolaPsp.create
colombefioren Jun 24, 2026
8d28241
feat: add scope param to VolaClient and PaymentControllerApi
colombefioren Jun 24, 2026
d587503
feat: pass club name as scope when creating payment
colombefioren Jun 24, 2026
e4683e9
Merge branch 'feat/club-status' into feat/scope
colombefioren Jun 24, 2026
ba919fc
Merge branch 'preprod' into feat/scope
TsioryJonathan Jun 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/java/school/hei/klioba/model/psp/Psp.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import school.hei.klioba.model.Payment;

public interface Psp {
Payment create(String kliobaId, PspType pspType, String pspId, String email);
Payment create(String kliobaId, PspType pspType, String pspId, String email, String scope);

Payment get(String kliobaId, PspType pspType, String pspId, String email);
}
5 changes: 3 additions & 2 deletions src/main/java/school/hei/klioba/model/psp/vola/VolaPsp.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ public class VolaPsp implements Psp {
private final VolaClient volaClient;

@Override
public Payment create(String kliobaId, PspType pspType, String pspId, String email) {
var volaPayment = volaClient.create(pspType, pspId, email);
public Payment create(
String kliobaId, PspType pspType, String pspId, String email, String scope) {
var volaPayment = volaClient.create(pspType, pspId, email, scope);
return toPayment(kliobaId, volaPayment);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ public VolaClient(String baseUrl, String apiKey) {
this.paymentControllerApi = new PaymentControllerApi(apiClient);
}

public Payment create(PspType pspType, String pspId, String email) {
return paymentControllerApi.createPayment(apiKey, email, pspType.toString(), pspId);
public Payment create(PspType pspType, String pspId, String email, String scope) {
return paymentControllerApi.createPayment(apiKey, email, pspType.toString(), pspId, scope);
}

public Payment get(PspType pspType, String pspId, String email) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ public void setApiClient(ApiClient apiClient) {
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public Payment createPayment(
String apiKey, String payerEmail, String pspType, String pspPaymentId)
String apiKey, String payerEmail, String pspType, String pspPaymentId, String scope)
throws RestClientException {
return createPaymentWithHttpInfo(apiKey, payerEmail, pspType, pspPaymentId).getBody();
return createPaymentWithHttpInfo(apiKey, payerEmail, pspType, pspPaymentId, scope).getBody();
}

/**
Expand All @@ -61,11 +61,12 @@ public Payment createPayment(
* @param payerEmail (required)
* @param pspType (required)
* @param pspPaymentId (required)
* @param scope (optional)
* @return ResponseEntity<Payment>
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<Payment> createPaymentWithHttpInfo(
String apiKey, String payerEmail, String pspType, String pspPaymentId)
String apiKey, String payerEmail, String pspType, String pspPaymentId, String scope)
throws RestClientException {
Object postBody = null;
// verify the required parameter 'apiKey' is set
Expand Down Expand Up @@ -101,6 +102,9 @@ public ResponseEntity<Payment> createPaymentWithHttpInfo(
queryParams.putAll(apiClient.parameterToMultiValueMap(null, "payerEmail", payerEmail));
queryParams.putAll(apiClient.parameterToMultiValueMap(null, "pspType", pspType));
queryParams.putAll(apiClient.parameterToMultiValueMap(null, "pspPaymentId", pspPaymentId));
if (scope != null) {
queryParams.putAll(apiClient.parameterToMultiValueMap(null, "scope", scope));
}

final String[] accepts = {"*/*"};
final List<MediaType> accept = apiClient.selectHeaderAccept(accepts);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,19 @@ public void accept(
throw new IllegalArgumentException("pspId format incorrect format");
}

var paymentCreatedInVola =
volaPsp.create(
randomUUID().toString(), pspType(), membershipFeeCreationForm.pspId(), email);
var payment = paymentRepository.save(paymentCreatedInVola);
var user = userFrom(membershipFeeCreationForm, email);
var club =
clubRepository
.findById(clubId)
.orElseThrow(() -> new NoSuchElementException("Club not found: " + clubId));
var paymentCreatedInVola =
volaPsp.create(
randomUUID().toString(),
pspType(),
membershipFeeCreationForm.pspId(),
email,
club.getName());
var payment = paymentRepository.save(paymentCreatedInVola);
var user = userFrom(membershipFeeCreationForm, email);
eventRepository.save(Event.from(randomUUID().toString(), payment, user, club, now(), ""));
assignUserToClub(user, clubId);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void create_then_confirm() {
var ref1 = generateValidPspId();
var newEmail = randomUUID() + "@cute.dev";

when(volaClientMock.create(any(), eq(ref1), eq(newEmail)))
when(volaClientMock.create(any(), eq(ref1), eq(newEmail), any()))
.thenReturn(VolaTestUtils.aVolaPayment(VERIFYING));
membershipCreationFormConsumer.accept(
new MembershipFeeCreationForm("Lou", "Andria", ref1), newEmail, "cuisine");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ void payFee_then_read_fees() {
var ref2 = generateValidPspId();
var newEmail = randomUUID() + "@cute.dev";

when(volaClientMock.create(any(), eq(ref1), eq(newEmail)))
when(volaClientMock.create(any(), eq(ref1), eq(newEmail), any()))
.thenReturn(VolaTestUtils.aVolaPayment(VerificationStatusEnum.VERIFYING, null, ref1));
when(volaClientMock.create(any(), eq(ref2), eq(newEmail)))
when(volaClientMock.create(any(), eq(ref2), eq(newEmail), any()))
.thenReturn(VolaTestUtils.aVolaPayment(VerificationStatusEnum.VERIFYING, null, ref2));

membershipCreationFormConsumer.accept(
Expand Down Expand Up @@ -86,7 +86,7 @@ void payFee_then_read_fees() {
void fees_cannot_have_same_pspId() {
String pspId = generateValidPspId();

when(volaClientMock.create(any(), any(), any()))
when(volaClientMock.create(any(), any(), any(), any()))
.thenReturn(VolaTestUtils.aVolaPayment(VerificationStatusEnum.VERIFYING, null, pspId));

membershipCreationFormConsumer.accept(
Expand Down
Loading