aa
This commit is contained in:
@@ -121,6 +121,18 @@ public class Event implements Serializable {
|
|||||||
// this.editable = editable;
|
// this.editable = editable;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
private Boolean paid;
|
||||||
|
|
||||||
|
@JsonProperty("paid")
|
||||||
|
public Boolean getPaid() {
|
||||||
|
return paid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPaid(Boolean paid) {
|
||||||
|
this.paid = paid;
|
||||||
|
}
|
||||||
|
|
||||||
@Transient
|
@Transient
|
||||||
private Boolean charged;
|
private Boolean charged;
|
||||||
|
|
||||||
|
|||||||
@@ -131,7 +131,8 @@ public class EventService {
|
|||||||
LOG.debug("Request to get Event : {}", id);
|
LOG.debug("Request to get Event : {}", id);
|
||||||
Event event = eventRepository.findByIdWithTransactions(id);
|
Event event = eventRepository.findByIdWithTransactions(id);
|
||||||
event.setCurrent(id.equals(getCurrentEventId()));
|
event.setCurrent(id.equals(getCurrentEventId()));
|
||||||
event.setCharged(event.getTransactions().stream().anyMatch(t -> TransactionType.FIELDPAYMENT.equals(t.getType())));
|
event.setPaid(event.getTransactions().stream().anyMatch(t -> TransactionType.FIELDPAYMENT.equals(t.getType())));
|
||||||
|
event.setCharged(event.getTransactions().stream().anyMatch(t -> TransactionType.MATCH.equals(t.getType())));
|
||||||
event.setChargeTransactionId(
|
event.setChargeTransactionId(
|
||||||
event
|
event
|
||||||
.getTransactions()
|
.getTransactions()
|
||||||
|
|||||||
@@ -87,7 +87,8 @@
|
|||||||
v-if="
|
v-if="
|
||||||
((registration.id && registration.user?.id == currentUserId && isCurrentEvent) ||
|
((registration.id && registration.user?.id == currentUserId && isCurrentEvent) ||
|
||||||
hasAnyAuthority(['ROLE_ADMIN', 'ROLE_COUNTER'])) &&
|
hasAnyAuthority(['ROLE_ADMIN', 'ROLE_COUNTER'])) &&
|
||||||
registration.active !== false
|
registration.active !== false &&
|
||||||
|
(event.active || (event.editable && hasAnyAuthority(['ROLE_COUNTER'])) || hasAnyAuthority(['ROLE_ADMIN']))
|
||||||
"
|
"
|
||||||
v-b-modal.removeEntity
|
v-b-modal.removeEntity
|
||||||
>
|
>
|
||||||
@@ -169,7 +170,7 @@
|
|||||||
<font-awesome-icon icon="sync"></font-awesome-icon> <span>Rozlicz wydarzenie</span>
|
<font-awesome-icon icon="sync"></font-awesome-icon> <span>Rozlicz wydarzenie</span>
|
||||||
</button>
|
</button>
|
||||||
<router-link
|
<router-link
|
||||||
v-if="event.id && event.charged == false"
|
v-if="event.id && event.paid == false"
|
||||||
:to="{ name: 'TransactionFieldPayment', params: { paymentForFieldByEventId: event.id } }"
|
:to="{ name: 'TransactionFieldPayment', params: { paymentForFieldByEventId: event.id } }"
|
||||||
custom
|
custom
|
||||||
v-slot="{ navigate }"
|
v-slot="{ navigate }"
|
||||||
@@ -185,7 +186,7 @@
|
|||||||
</router-link>
|
</router-link>
|
||||||
|
|
||||||
<router-link
|
<router-link
|
||||||
v-if="event.transactions?.length > 0 && event.editable"
|
v-if="event.charged && event.editable"
|
||||||
:to="{ name: 'TransactionPaymentsForTransaction', params: { paymentsForTransactionId: event.chargeTransactionId } }"
|
:to="{ name: 'TransactionPaymentsForTransaction', params: { paymentsForTransactionId: event.chargeTransactionId } }"
|
||||||
custom
|
custom
|
||||||
v-slot="{ navigate }"
|
v-slot="{ navigate }"
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ export interface IEvent {
|
|||||||
editable?: boolean | false;
|
editable?: boolean | false;
|
||||||
deletable?: boolean | false;
|
deletable?: boolean | false;
|
||||||
charged?: boolean | false;
|
charged?: boolean | false;
|
||||||
|
paid?: boolean | false;
|
||||||
active?: boolean | false;
|
active?: boolean | false;
|
||||||
current?: boolean | false;
|
current?: boolean | false;
|
||||||
chargeTransactionId?: number | null;
|
chargeTransactionId?: number | null;
|
||||||
@@ -31,6 +32,7 @@ export class Event implements IEvent {
|
|||||||
public editable?: boolean | false,
|
public editable?: boolean | false,
|
||||||
public deletable?: boolean | false,
|
public deletable?: boolean | false,
|
||||||
public charged?: boolean | false,
|
public charged?: boolean | false,
|
||||||
|
public paid?: boolean | false,
|
||||||
public active?: boolean | false,
|
public active?: boolean | false,
|
||||||
public current?: boolean | false,
|
public current?: boolean | false,
|
||||||
public chargeTransactionId?: number | null,
|
public chargeTransactionId?: number | null,
|
||||||
|
|||||||
Reference in New Issue
Block a user