use of com.axelor.apps.base.db.AppMobile in project axelor-open-suite by axelor.
the class AppMobileController method getAppMobile.
public void getAppMobile(ActionRequest request, ActionResponse response) {
Map<String, Object> data = new HashMap<>();
AppService appService = Beans.get(AppService.class);
AppMobile appMobile = (AppMobile) appService.getApp("mobile");
data.put("isAppMobileEnable", appMobile.getApp().getActive());
data.put("isSaleAppEnable", appService.isApp("sale") ? appMobile.getIsSaleAppEnable() : false);
data.put("isCrmAppEnable", appService.isApp("crm") ? appMobile.getIsCrmAppEnable() : false);
data.put("isTimesheetAppEnable", appService.isApp("timesheet") ? appMobile.getIsTimesheetAppEnable() : false);
data.put("isLeaveAppEnable", appService.isApp("leave") ? appMobile.getIsLeaveAppEnable() : false);
data.put("isExpenseAppEnable", appService.isApp("expense") ? appMobile.getIsExpenseAppEnable() : false);
data.put("isTaskAppEnable", appService.isApp("project") ? appMobile.getIsTaskAppEnable() : false);
data.put("isQualityAppEnable", appService.isApp("quality") ? appMobile.getIsQualityAppEnable() : false);
data.put("isStockAppEnable", appService.isApp("stock") ? appMobile.getIsStockAppEnable() : false);
boolean isProductionAppEnable = appService.isApp("production") ? appMobile.getIsProductionAppEnable() : false;
data.put("isProductionAppEnable", isProductionAppEnable);
if (isProductionAppEnable) {
data.put("mOFilterOnStockDetailStatusSelect", appMobile.getmOFilterOnStockDetailStatusSelect());
}
data.put("offlineRecordLimit", appMobile.getOfflineRecordLimit());
data.put("partnerSet", convertToData(appMobile.getPartnerSet()));
data.put("partnerContactSet", convertToData(appMobile.getPartnerContactSet()));
data.put("projectSet", convertToData(appMobile.getProjectSet()));
data.put("leadSet", convertToData(appMobile.getLeadSet()));
data.put("productSet", convertToData(appMobile.getProductSet()));
response.setData(data);
}
Aggregations