Opraveno vyhodnocení sestavy pro podpis, pokud je v agendě více sestav s podpisem.

Verze_3.0 3.2
Josef Rokos 9 years ago
parent 52cf63414b
commit d2aa1cbd9a

@ -151,6 +151,11 @@ public class Constants {
new ReportMapping(MOD_REQUIREMENTS, new Report(8, true, "Protokol o kontrole", "orderRequirement", false, true))
};
public final static Map<Class<?>, Integer> SIGN_REPORT_MAP = Collections.unmodifiableMap(new HashMap<Class<?>, Integer>() {{
put(TripBillApproval.class, 4);
put(TripRequirement.class, 7);
}});
public final static String REQTYPE_ORDER = "ORDER";
public final static String REQTYPE_BUSINESSTRIP = "BUSINESSTRIP";
public final static RequirementType REQTYPES[] = {

@ -542,11 +542,17 @@ public abstract class RequirementBaseServiceImpl<T extends RequirementBase> exte
private Report getSignReport(T entity) {
Module module = ModuleUtils.getModule(entityForSignReport(entity), servletContext);
Report report = null;
int reportId = Constants.SIGN_REPORT_MAP.get(entity.getClass()) == null ? 0 : Constants.SIGN_REPORT_MAP.get(entity.getClass());
for (Report r : module.getReports()) {
if (r.isSignable()) {
report = r;
break;
if (reportId == 0) {
report = r;
break;
} else if (reportId == r.getReportId()) {
report = r;
break;
}
}
}

@ -60,7 +60,7 @@
width="300px" />
<listbox id="users" model="@bind(vm.users)" height="380px" width="300px" multiple="true"
droppable="true" onDrop="@command('addMember', event=event)" selectedItems="@bind(vm.selectedUsers)"
itemRenderer="@load(vm.userItemRenderer)">
>
<listhead>
<listheader label="Uživatelé" sort="czech(fullName)"/>
</listhead>

Loading…
Cancel
Save