in app/src/main/java/org/apache/fineract/ui/online/customers/customertasks/CustomerTasksBottomSheetPresenter.java [50:78]
public void changeCustomerStatus(String identifier, Customer customer, Command command) {
checkViewAttached();
getMvpView().showProgressbar();
try {
switch (Objects.requireNonNull(command.getAction())) {
case LOCK:
customer.setCurrentState(Customer.State.LOCKED);
break;
case REOPEN:
customer.setCurrentState(Customer.State.PENDING);
break;
case ACTIVATE:
case UNLOCK:
customer.setCurrentState(Customer.State.ACTIVE);
break;
case CLOSE:
customer.setCurrentState(Customer.State.CLOSED);
break;
}
synchronizationManager.updateDocument(identifier, GsonUtilsKt.serializeToMap(customer));
getMvpView().hideProgressbar();
getMvpView().statusChangedSuccessfully();
} catch (Exception e) {
getMvpView().hideProgressbar();
showExceptionError(e,
context.getString(R.string.error_updating_status));
Log.e("CustomerTasks", e.toString());
}
}