Opraveno vyhodnocení sestavy pro podpis, pokud je v agendě více sestav s podpisem.
This commit is contained in:
@@ -151,6 +151,11 @@ public class Constants {
|
|||||||
new ReportMapping(MOD_REQUIREMENTS, new Report(8, true, "Protokol o kontrole", "orderRequirement", false, true))
|
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_ORDER = "ORDER";
|
||||||
public final static String REQTYPE_BUSINESSTRIP = "BUSINESSTRIP";
|
public final static String REQTYPE_BUSINESSTRIP = "BUSINESSTRIP";
|
||||||
public final static RequirementType REQTYPES[] = {
|
public final static RequirementType REQTYPES[] = {
|
||||||
|
|||||||
@@ -542,11 +542,17 @@ public abstract class RequirementBaseServiceImpl<T extends RequirementBase> exte
|
|||||||
private Report getSignReport(T entity) {
|
private Report getSignReport(T entity) {
|
||||||
Module module = ModuleUtils.getModule(entityForSignReport(entity), servletContext);
|
Module module = ModuleUtils.getModule(entityForSignReport(entity), servletContext);
|
||||||
Report report = null;
|
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()) {
|
for (Report r : module.getReports()) {
|
||||||
if (r.isSignable()) {
|
if (r.isSignable()) {
|
||||||
|
if (reportId == 0) {
|
||||||
report = r;
|
report = r;
|
||||||
break;
|
break;
|
||||||
|
} else if (reportId == r.getReportId()) {
|
||||||
|
report = r;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -60,7 +60,7 @@
|
|||||||
width="300px" />
|
width="300px" />
|
||||||
<listbox id="users" model="@bind(vm.users)" height="380px" width="300px" multiple="true"
|
<listbox id="users" model="@bind(vm.users)" height="380px" width="300px" multiple="true"
|
||||||
droppable="true" onDrop="@command('addMember', event=event)" selectedItems="@bind(vm.selectedUsers)"
|
droppable="true" onDrop="@command('addMember', event=event)" selectedItems="@bind(vm.selectedUsers)"
|
||||||
itemRenderer="@load(vm.userItemRenderer)">
|
>
|
||||||
<listhead>
|
<listhead>
|
||||||
<listheader label="Uživatelé" sort="czech(fullName)"/>
|
<listheader label="Uživatelé" sort="czech(fullName)"/>
|
||||||
</listhead>
|
</listhead>
|
||||||
|
|||||||
Reference in New Issue
Block a user