Skip to content

Commit

Permalink
avniproject/avni-webapp#1209 | Rename the dashboard if it is voided t…
Browse files Browse the repository at this point in the history
…o support same name
  • Loading branch information
sachsk committed Jul 2, 2024
1 parent 4a63733 commit 9f6812b
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import org.avni.server.domain.*;
import org.avni.server.domain.app.dashboard.DashboardFilter;
import org.avni.server.util.BadRequestError;
import org.avni.server.util.ReactAdminUtil;
import org.avni.server.web.contract.reports.DashboardBundleContract;
import org.avni.server.web.contract.reports.DashboardSectionBundleContract;
import org.avni.server.web.contract.reports.DashboardSectionCardMappingBundleContract;
Expand Down Expand Up @@ -93,6 +94,7 @@ public Dashboard editDashboard(DashboardWebRequest dashboardRequest, Long dashbo

public void deleteDashboard(Dashboard dashboard) {
dashboard.setVoided(true);
dashboard.setName((ReactAdminUtil.getVoidedName(dashboard.getName(), dashboard.getId())));
dashboardRepository.save(dashboard);
}

Expand Down

0 comments on commit 9f6812b

Please sign in to comment.