diff --git a/core/src/main/java/bisq/core/presentation/SupportTicketsPresentation.java b/core/src/main/java/bisq/core/presentation/SupportTicketsPresentation.java index be98548140a..7dea87cb6ed 100644 --- a/core/src/main/java/bisq/core/presentation/SupportTicketsPresentation.java +++ b/core/src/main/java/bisq/core/presentation/SupportTicketsPresentation.java @@ -19,6 +19,7 @@ import bisq.core.support.dispute.arbitration.ArbitrationManager; import bisq.core.support.dispute.mediation.MediationManager; +import bisq.core.support.dispute.refund.RefundManager; import javax.inject.Inject; @@ -42,6 +43,11 @@ public class SupportTicketsPresentation { @Getter private final BooleanProperty showOpenMediationTicketsNotification = new SimpleBooleanProperty(); + @Getter + private final StringProperty numOpenRefundTickets = new SimpleStringProperty(); + @Getter + private final BooleanProperty showOpenRefundTicketsNotification = new SimpleBooleanProperty(); + @Getter private final StringProperty numOpenSupportTickets = new SimpleStringProperty(); @Getter @@ -50,14 +56,19 @@ public class SupportTicketsPresentation { private final ArbitrationManager arbitrationManager; @org.jetbrains.annotations.NotNull private final MediationManager mediationManager; + private RefundManager refundManager; @Inject - public SupportTicketsPresentation(ArbitrationManager arbitrationManager, MediationManager mediationManager) { + public SupportTicketsPresentation(ArbitrationManager arbitrationManager, + MediationManager mediationManager, + RefundManager refundManager) { this.arbitrationManager = arbitrationManager; this.mediationManager = mediationManager; + this.refundManager = refundManager; arbitrationManager.getNumOpenDisputes().addListener((observable, oldValue, newValue) -> onChange()); mediationManager.getNumOpenDisputes().addListener((observable, oldValue, newValue) -> onChange()); + refundManager.getNumOpenDisputes().addListener((observable, oldValue, newValue) -> onChange()); } private void onChange() { @@ -71,7 +82,12 @@ private void onChange() { numOpenMediationTickets.set(String.valueOf(mediationTickets)); showOpenMediationTicketsNotification.set(mediationTickets > 0); - int supportTickets = arbitrationTickets + mediationTickets; + AtomicInteger openRefundDisputes = new AtomicInteger(refundManager.getNumOpenDisputes().get()); + int refundTickets = openRefundDisputes.get(); + numOpenRefundTickets.set(String.valueOf(refundTickets)); + showOpenRefundTicketsNotification.set(refundTickets > 0); + + int supportTickets = arbitrationTickets + mediationTickets + refundTickets; numOpenSupportTickets.set(String.valueOf(supportTickets)); showOpenSupportTicketsNotification.set(supportTickets > 0); } diff --git a/core/src/main/java/bisq/core/support/dispute/arbitration/ArbitrationManager.java b/core/src/main/java/bisq/core/support/dispute/arbitration/ArbitrationManager.java index b1393bb1585..4d2ef168436 100644 --- a/core/src/main/java/bisq/core/support/dispute/arbitration/ArbitrationManager.java +++ b/core/src/main/java/bisq/core/support/dispute/arbitration/ArbitrationManager.java @@ -147,8 +147,8 @@ public void cleanupDisputes() { @Override protected String getDisputeInfo(Dispute dispute) { - String role = Res.get("shared.arbitrator2").toLowerCase(); - String link = "https://bisq.network/docs/exchange/arbitration-system"; + String role = Res.get("shared.arbitrator").toLowerCase(); + String link = "https://docs.bisq.network/trading-rules.html#legacy-arbitration"; //TODO needs to be created return Res.get("support.initialInfo", role, role, link); } diff --git a/core/src/main/java/bisq/core/support/dispute/refund/RefundManager.java b/core/src/main/java/bisq/core/support/dispute/refund/RefundManager.java index a406cd64126..622306c0eb7 100644 --- a/core/src/main/java/bisq/core/support/dispute/refund/RefundManager.java +++ b/core/src/main/java/bisq/core/support/dispute/refund/RefundManager.java @@ -125,7 +125,7 @@ public void cleanupDisputes() { @Override protected String getDisputeInfo(Dispute dispute) { String role = Res.get("shared.refundAgent").toLowerCase(); - String link = "https://bisq.network/docs/exchange/refundAgent"; //todo create link + String link = "https://docs.bisq.network/trading-rules.html#arbitration"; return Res.get("support.initialInfo", role, role, link); } diff --git a/core/src/main/resources/i18n/displayStrings.properties b/core/src/main/resources/i18n/displayStrings.properties index 472845944e4..8404980cbad 100644 --- a/core/src/main/resources/i18n/displayStrings.properties +++ b/core/src/main/resources/i18n/displayStrings.properties @@ -156,7 +156,6 @@ shared.seller=seller shared.buyer=buyer shared.allEuroCountries=All Euro countries shared.acceptedTakerCountries=Accepted taker countries -shared.arbitrator=Selected arbitrator shared.tradePrice=Trade price shared.tradeAmount=Trade amount shared.tradeVolume=Trade volume @@ -208,9 +207,11 @@ shared.learnMore=Learn more shared.dismiss=Dismiss shared.selectedArbitrator=Selected arbitrator shared.selectedMediator=Selected mediator +shared.selectedRefundAgent=Selected arbitrator shared.mediator=Mediator -shared.arbitrator2=Arbitrator -shared.refundAgent=Refund agent +shared.arbitrator=Arbitrator +shared.refundAgent=Arbitrator +shared.refundAgentForSupportStaff=Refund agent shared.delayedPayoutTxId=Refund collateral transaction ID @@ -984,7 +985,7 @@ support.initialInfo=Please enter a description of your problem in the text field \t Sometimes the data directory gets corrupted and leads to strange bugs. \n\ \t See: https://docs.bisq.network/backup-recovery.html#switch-to-a-new-data-directory\n\n\ Please make yourself familiar with the basic rules for the dispute process:\n\ -\t● You need to respond to the {0}}''s requests within 2 days.\n\ +\t● You need to respond to the {0}''s requests within 2 days.\n\ \t● Mediators respond in between 2 days. Arbitrators respond in between 5 business days.\n\ \t● The maximum period for a dispute is 14 days.\n\ \t● You need to cooperate with the {1} and provide the information they request to make your case.\n\ diff --git a/desktop/src/main/java/bisq/desktop/main/account/register/arbitrator/ArbitratorRegistrationView.java b/desktop/src/main/java/bisq/desktop/main/account/register/arbitrator/ArbitratorRegistrationView.java index 713ebe53797..287a185bb1d 100644 --- a/desktop/src/main/java/bisq/desktop/main/account/register/arbitrator/ArbitratorRegistrationView.java +++ b/desktop/src/main/java/bisq/desktop/main/account/register/arbitrator/ArbitratorRegistrationView.java @@ -40,6 +40,6 @@ public ArbitratorRegistrationView(ArbitratorRegistrationViewModel model, @Override protected String getRole() { - return Res.get("shared.arbitrator2"); + return Res.get("shared.arbitrator"); } } diff --git a/desktop/src/main/java/bisq/desktop/main/account/register/refundagent/RefundAgentRegistrationView.java b/desktop/src/main/java/bisq/desktop/main/account/register/refundagent/RefundAgentRegistrationView.java index af42e6599d0..3b0b403436d 100644 --- a/desktop/src/main/java/bisq/desktop/main/account/register/refundagent/RefundAgentRegistrationView.java +++ b/desktop/src/main/java/bisq/desktop/main/account/register/refundagent/RefundAgentRegistrationView.java @@ -40,6 +40,6 @@ public RefundAgentRegistrationView(RefundAgentRegistrationViewModel model, @Override protected String getRole() { - return Res.get("shared.refundAgent"); + return Res.get("shared.refundAgentForSupportStaff"); } } diff --git a/desktop/src/main/java/bisq/desktop/main/overlays/windows/ContractWindow.java b/desktop/src/main/java/bisq/desktop/main/overlays/windows/ContractWindow.java index 181eab156eb..e91dfd98dda 100644 --- a/desktop/src/main/java/bisq/desktop/main/overlays/windows/ContractWindow.java +++ b/desktop/src/main/java/bisq/desktop/main/overlays/windows/ContractWindow.java @@ -192,8 +192,7 @@ private void addContent() { if (dispute.getSupportType() != null) { switch (dispute.getSupportType()) { case ARBITRATION: - // TODO update in next release to shared.selectedArbitrator and delete shared.arbitrator entry - title = Res.get("shared.arbitrator"); + title = Res.get("shared.selectedArbitrator"); break; case MEDIATION: title = Res.get("shared.selectedMediator"); @@ -201,7 +200,7 @@ private void addContent() { case TRADE: break; case REFUND: - title = Res.get("shared.refundAgent"); + title = Res.get("shared.selectedRefundAgent"); break; } } diff --git a/desktop/src/main/java/bisq/desktop/main/support/SupportView.java b/desktop/src/main/java/bisq/desktop/main/support/SupportView.java index cdf220f83ff..f739f27c8a4 100644 --- a/desktop/src/main/java/bisq/desktop/main/support/SupportView.java +++ b/desktop/src/main/java/bisq/desktop/main/support/SupportView.java @@ -184,13 +184,13 @@ private void updateAgentTabs() { // We might get that method called before we have the map is filled in the arbitratorManager if (arbitratorTab != null) { - arbitratorTab.setText(Res.get("support.tab.ArbitratorsSupportTickets", Res.get("shared.arbitrator2")).toUpperCase()); + arbitratorTab.setText(Res.get("support.tab.ArbitratorsSupportTickets", Res.get("shared.arbitrator")).toUpperCase()); } if (mediatorTab != null) { mediatorTab.setText(Res.get("support.tab.ArbitratorsSupportTickets", Res.get("shared.mediator")).toUpperCase()); } if (refundAgentTab != null) { - refundAgentTab.setText(Res.get("support.tab.ArbitratorsSupportTickets", Res.get("shared.refundAgent")).toUpperCase()); + refundAgentTab.setText(Res.get("support.tab.ArbitratorsSupportTickets", Res.get("shared.refundAgentForSupportStaff")).toUpperCase()); } }