6 Commits

Author SHA1 Message Date
pepa b1818546c0 Uživatele a komisi nelze smazat, pokud jsou členem některého střediska,
nebo komise.
closes #178
2014-12-12 14:43:11 +01:00
pepa bc5a7a7c4c Uživateli už nelze odebrat roli "Uživatel"
closes #177
2014-12-08 14:17:36 +01:00
pepa 966c9033ef Opraveno generování URL záznamu do e-mailových zpráv.
closes #179
2014-12-08 14:13:25 +01:00
pepa 08dfb177ef Byla přidána sestava požadavků.
closes #175
2014-11-30 19:43:25 +01:00
pepa 3c3cf5d46f Opravena kontrola práv při otvírání formuláře pro úpravu práv na roli.
closes #176
2014-11-28 10:15:56 +01:00
pepa 26e733a537 Pokud je nastaveno přihlašování proti AD nebo LDAP serveru, tak zmizí
nabídka "Změnit heslo".
closes #174
2014-11-26 15:24:42 +01:00
23 changed files with 595 additions and 9 deletions
@@ -123,7 +123,8 @@ public class Constants {
new ReportMapping(MOD_ADDRESSBOOK, new Report("Adresa", "address", false, true)),
new ReportMapping(MOD_TRIPBILL, new Report("Žádost", "tripRequirement", false, true)),
new ReportMapping(MOD_TRIPBILL, new Report("Vyúčtování", "tripBill", false, true)),
new ReportMapping(MOD_ORDER, new Report("Objednávka", "order", true, true))
new ReportMapping(MOD_ORDER, new Report("Objednávka", "order", true, true)),
new ReportMapping(MOD_REQUIREMENTS, new Report("Požadavky", "requirements"))
};
public final static String REQTYPE_ORDER = "ORDER";
@@ -30,9 +30,9 @@ public class RequirementUrlResolver implements EntityUrlResolver {
Requirement req = (Requirement)entity;
if (req.getKind() == Constants.REQ_TYPE_MATERIAL) {
return defaultUrl + Constants.URL_MAP.get(req) + "material/?select=" + String.valueOf(req.getId());
return defaultUrl + Constants.URL_MAP.get(req.getClass()) + "material/?select=" + String.valueOf(req.getId());
} else {
return defaultUrl + Constants.URL_MAP.get(req) + "services/?select=" + String.valueOf(req.getId());
return defaultUrl + Constants.URL_MAP.get(req.getClass()) + "services/?select=" + String.valueOf(req.getId());
}
}
@@ -126,5 +126,21 @@ public class RequirementBase extends BaseData implements FilterableRequirement {
public void setWorkflow(List<Workflow> workflow) {
this.workflow = workflow;
}
public User getLastApprover() {
if (authorization.isEmpty()) {
return null;
}
return authorization.get(authorization.size() - 1).getApprover();
}
public Date getLastApproveDate() {
if (authorization.isEmpty()) {
return null;
}
return authorization.get(authorization.size() - 1).getAuthDate();
}
}
@@ -0,0 +1,9 @@
package info.bukova.isspst.security;
public enum AuthMethod {
DATABASE,
LDAP,
AD
}
@@ -23,6 +23,7 @@ public class AuthPopulator implements LdapAuthoritiesPopulator {
public AuthPopulator(UserService userService, RoleService roleService) {
this.userService = userService;
this.roleService = roleService;
userService.setAuthMethod(AuthMethod.LDAP);
}
@Override
@@ -2,6 +2,7 @@ package info.bukova.isspst.services.users;
import info.bukova.isspst.Constants;
import info.bukova.isspst.data.User;
import info.bukova.isspst.security.AuthMethod;
import java.util.Collection;
@@ -33,6 +34,7 @@ public class AdUserCtxMapper implements UserDetailsContextMapper {
public AdUserCtxMapper(UserService userService, RoleService roleService) {
this.userService = userService;
this.roleService = roleService;
userService.setAuthMethod(AuthMethod.AD);
}
@Override
@@ -0,0 +1,17 @@
package info.bukova.isspst.services.users;
import info.bukova.isspst.services.IsspstException;
public class DeleteUserException extends IsspstException {
/**
*
*/
private static final long serialVersionUID = -5326664758639660224L;
public DeleteUserException(String message) {
super(message);
setReason(message);
}
}
@@ -1,10 +1,13 @@
package info.bukova.isspst.services.users;
import java.util.List;
import info.bukova.isspst.data.Permission;
import info.bukova.isspst.services.Service;
public interface PermissionService extends Service<Permission> {
public Permission getPermissionByModule(String moduleId, String permission);
public List<Permission> getAllPermissions();
}
@@ -1,10 +1,12 @@
package info.bukova.isspst.services.users;
import org.springframework.transaction.annotation.Transactional;
import info.bukova.isspst.data.Permission;
import info.bukova.isspst.services.AbstractService;
import java.util.List;
import org.springframework.transaction.annotation.Transactional;
public class PermissionServiceImpl extends AbstractService<Permission> implements PermissionService {
@Override
@@ -13,5 +15,10 @@ public class PermissionServiceImpl extends AbstractService<Permission> implement
return selectSingle("from Permission where MODULE = '" + moduleId + "' and AUTHORITY = '" + permission + "'");
}
@Override
@Transactional
public List<Permission> getAllPermissions() {
return dao.getAll();
}
}
@@ -5,6 +5,7 @@ import java.util.List;
import info.bukova.isspst.data.Role;
import info.bukova.isspst.data.User;
import info.bukova.isspst.data.UserSettingsData;
import info.bukova.isspst.security.AuthMethod;
import info.bukova.isspst.services.Service;
import org.springframework.security.core.userdetails.UserDetailsService;
@@ -24,4 +25,7 @@ public interface UserService extends UserDetailsService, Service<User> {
public UserSettingsData getUserSettings(User user);
public UserSettingsData getUserSettings();
public void setUserSettings(UserSettingsData settings);
public void setAuthMethod(AuthMethod method);
public AuthMethod getAuthMethod();
}
@@ -4,10 +4,13 @@ import info.bukova.isspst.Constants;
import info.bukova.isspst.data.Role;
import info.bukova.isspst.data.User;
import info.bukova.isspst.data.UserSettingsData;
import info.bukova.isspst.security.AuthMethod;
import info.bukova.isspst.services.AbstractService;
import info.bukova.isspst.services.StringXmlMarshaller;
//import info.bukova.isspst.services.LazyLoader;
import info.bukova.isspst.services.workgroups.WorkgroupService;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
@@ -33,10 +36,14 @@ public class UserServiceImpl extends AbstractService<User> implements UserServic
private PasswordEncoder encoder;
@Autowired
private RoleService roleService;
@Autowired
private WorkgroupService workgroupService;
private StringXmlMarshaller<UserSettingsData> marshaller;
private AuthMethod authMethod;
public UserServiceImpl(Marshaller marshaller, Unmarshaller unmarshaller) {
this.marshaller = new StringXmlMarshaller<UserSettingsData>(marshaller, unmarshaller, UserSettingsData.class);
authMethod = AuthMethod.DATABASE;
}
public void setEncoder(PasswordEncoder encoder) {
@@ -202,4 +209,25 @@ public class UserServiceImpl extends AbstractService<User> implements UserServic
return Constants.PERM_EDIT_OWN;
}
@Override
public void setAuthMethod(AuthMethod method) {
this.authMethod = method;
}
@Override
public AuthMethod getAuthMethod() {
return authMethod;
}
@Override
public void delete(User entity) {
workgroupService.loadParents(entity);
if (entity.getParents().isEmpty()) {
super.delete(entity);
} else {
throw new DeleteUserException("UserIsInWorkgroup");
}
}
}
@@ -13,9 +13,11 @@ public class WorkgroupException extends IsspstException {
public final static String MSUT_HAS_CENTER = "RoleMustHasCentre";
public final static String MUST_HAS_WORKGROUP = "WorkgroupMustHasCentre";
public final static String CYCLIC_MEMBER = "CyclicMembership";
public final static String HAS_PARENT = "WorkgroupIsInWorkgroup";
public WorkgroupException(String message) {
super(message);
setReason(message);
}
}
@@ -248,6 +248,11 @@ public class WorkgroupServiceImpl extends AbstractOwnedService<Workgroup> implem
@Transactional
@PreAuthorize("hasPermission(this, 'PERM_DELETE')")
public void delete(Workgroup entity) {
Workgroup dbWg = dao.getById(entity.getId());
if (!dbWg.getParents().isEmpty()) {
throw new WorkgroupException(WorkgroupException.HAS_PARENT);
}
loadMembers(entity);
for (JobMapping m : entity.getMembers()) {
loadParents(m.getMember());
@@ -3,6 +3,7 @@ package info.bukova.isspst.ui;
import info.bukova.isspst.StringUtils;
import info.bukova.isspst.data.DataModel;
import info.bukova.isspst.filters.Filter;
import info.bukova.isspst.services.IsspstException;
import info.bukova.isspst.services.Service;
import java.util.ArrayList;
@@ -202,6 +203,18 @@ public class ListViewModel<T extends DataModel> extends DocumentViewModel
BindUtils.postNotifyChange(null, null,
ListViewModel.this, "dataBean");
BindUtils.postGlobalCommand(null, null, "reloadRelated", null);
} catch (IsspstException e) {
if (e.getReason() != null) {
Messagebox.show(
StringUtils.localize(e.getReason()),
StringUtils.localize("Error"),
Messagebox.OK, Messagebox.ERROR);
} else {
Messagebox.show(
StringUtils.localize("DbSaveError"),
StringUtils.localize("Error"),
Messagebox.OK, Messagebox.ERROR);
}
} catch (DataIntegrityViolationException e) {
Messagebox.show(StringUtils.localize("DbCannotDelete"), StringUtils.localize("Error"), Messagebox.OK, Messagebox.ERROR);
} catch (AccessDeniedException e) {
@@ -1,8 +1,12 @@
package info.bukova.isspst.ui;
import info.bukova.isspst.security.AuthMethod;
import info.bukova.isspst.services.users.UserService;
import org.zkoss.bind.annotation.Command;
import org.zkoss.bind.annotation.Init;
import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.select.annotation.WireVariable;
import org.zkoss.zul.Window;
public class MainMenu
@@ -10,6 +14,8 @@ public class MainMenu
private String contextPath;
private String moduleUrl;
@WireVariable
private UserService userService;
@Init
public void init()
@@ -55,4 +61,8 @@ public class MainMenu
Window window = (Window) Executions.createComponents("/settings/userSettings.zul", null, null);
window.doModal();
}
public boolean isCanChangePassword() {
return userService.getAuthMethod() == AuthMethod.DATABASE;
}
}
@@ -30,7 +30,7 @@ public class PermissionForm extends FormViewModel<Role> {
@Init(superclass = true)
public void init() {
rolePerms = new RolePermissions(getDataBean(), permissionService.getAll());
rolePerms = new RolePermissions(getDataBean(), permissionService.getAllPermissions()); // Pro PermissionService nelze nastavit práva, musí se volat jiná metoda než getAll()
canChangeWorkgroup = roleService.canChangeWorkgroup(getDataBean());
canChangeCentre = roleService.canChangeCenter(getDataBean());
inWorkflow = roleService.isInWorkflow(getDataBean());
@@ -117,6 +117,7 @@ UsersGridColumnLogin=Login
UsersGridColumnPersonalID=Osobní číslo
UsersGridColumnFirstName=Jméno
UsersGridColumnSureName=Příjmení
UserIsInWorkgroup=Uživatele nelze smazat, protože je členem některé pracovní skupiny
AgendaMaterial=Skupiny materiálu
MaterialFormTitle=Skupina materiálu
@@ -125,7 +126,7 @@ AgendaServices=Skupiny služeb
ServiceFormTitle=Skupina služeb
AgendaWorkgroups=Střediska / komise
WorkgroupFormTitle=Pracvní skupina
WorkgroupFormTitle=Pracovní skupina
AgendaWorkflow=Procesy schválení
RequirementType=Typ požadavku:
@@ -354,3 +355,4 @@ WorkgroupFormMemberIsCenterMember=Některý ze členů přidávané komise je č
WorkgroupFormCannotAddUser=Uživatele nelze přidat
WorkgroupFormCannotAddWorkgroup=Komisi nelze přidat
WorkgroupFormOrderLimit=Limit nákupů
WorkgroupIsInWorkgroup=Komisi nelze smazat, protože je členem některého střediska
@@ -0,0 +1,187 @@
<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="requirementItems" pageWidth="752" pageHeight="572" orientation="Landscape" columnWidth="752" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="39bdb56a-7585-42f6-b3bb-38ef677ea503">
<property name="ireport.zoom" value="3.0"/>
<property name="ireport.x" value="1315"/>
<property name="ireport.y" value="0"/>
<queryString>
<![CDATA[]]>
</queryString>
<field name="requirement" class="info.bukova.isspst.data.Requirement">
<fieldDescription><![CDATA[requirement]]></fieldDescription>
</field>
<field name="description" class="java.lang.String">
<fieldDescription><![CDATA[description]]></fieldDescription>
</field>
<field name="textItem" class="java.lang.String">
<fieldDescription><![CDATA[textItem]]></fieldDescription>
</field>
<field name="munit" class="info.bukova.isspst.data.MUnitEmb">
<fieldDescription><![CDATA[munit]]></fieldDescription>
</field>
<field name="name" class="java.lang.String">
<fieldDescription><![CDATA[name]]></fieldDescription>
</field>
<field name="unitPrice" class="java.math.BigDecimal">
<fieldDescription><![CDATA[unitPrice]]></fieldDescription>
</field>
<field name="code" class="java.lang.String">
<fieldDescription><![CDATA[code]]></fieldDescription>
</field>
<field name="total" class="java.math.BigDecimal">
<fieldDescription><![CDATA[total]]></fieldDescription>
</field>
<field name="delivered" class="java.lang.Boolean">
<fieldDescription><![CDATA[delivered]]></fieldDescription>
</field>
<field name="reqSubject" class="info.bukova.isspst.data.RequirementSubject">
<fieldDescription><![CDATA[reqSubject]]></fieldDescription>
</field>
<field name="quantity" class="java.math.BigDecimal">
<fieldDescription><![CDATA[quantity]]></fieldDescription>
</field>
<field name="orderNum" class="java.lang.String">
<fieldDescription><![CDATA[orderNum]]></fieldDescription>
</field>
<field name="paid" class="java.lang.Boolean">
<fieldDescription><![CDATA[paid]]></fieldDescription>
</field>
<background>
<band splitType="Stretch"/>
</background>
<columnHeader>
<band height="21" splitType="Stretch">
<staticText>
<reportElement uuid="cdcab41b-7289-4296-938b-b32308d24f16" x="0" y="0" width="69" height="20"/>
<textElement verticalAlignment="Middle">
<font isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Kód]]></text>
</staticText>
<staticText>
<reportElement uuid="3534e91f-0027-4d48-93d8-c86fc2a4fd16" x="69" y="0" width="131" height="20"/>
<textElement verticalAlignment="Middle">
<font isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Název skupiny]]></text>
</staticText>
<staticText>
<reportElement uuid="e429a2f9-c611-4d67-8094-350fb3ab061b" x="200" y="0" width="170" height="20"/>
<textElement verticalAlignment="Middle">
<font isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Text]]></text>
</staticText>
<staticText>
<reportElement uuid="ccba7a2d-dee2-49fa-83d4-307b5481b2da" x="370" y="0" width="170" height="20"/>
<textElement verticalAlignment="Middle">
<font isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Popis]]></text>
</staticText>
<staticText>
<reportElement uuid="843f6e2a-c33f-4119-be82-7376659bcce2" x="540" y="0" width="37" height="20"/>
<textElement verticalAlignment="Middle">
<font isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Jed.]]></text>
</staticText>
<staticText>
<reportElement uuid="bf77f7e6-de45-40b3-945d-6c57900a619c" x="577" y="0" width="37" height="20"/>
<textElement verticalAlignment="Middle">
<font isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Počet]]></text>
</staticText>
<staticText>
<reportElement uuid="3cb5e074-11d8-44c2-aa43-7b1e03603792" x="614" y="0" width="69" height="20"/>
<textElement verticalAlignment="Middle">
<font isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Cena za jed.]]></text>
</staticText>
<staticText>
<reportElement uuid="6488d844-77c2-4fa6-af45-cd1de81aff7e" x="683" y="0" width="69" height="20"/>
<textElement verticalAlignment="Middle">
<font isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Celkem]]></text>
</staticText>
<line>
<reportElement uuid="0c7974e8-1f0e-42b7-a8cc-d00d259c78f3" x="0" y="0" width="752" height="1"/>
<graphicElement>
<pen lineStyle="Solid"/>
</graphicElement>
</line>
</band>
</columnHeader>
<detail>
<band height="20" splitType="Stretch">
<textField>
<reportElement uuid="bcac6a10-ecc5-4c18-b537-6737451f8804" x="0" y="0" width="69" height="20"/>
<textElement>
<font pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{code}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement uuid="b289f77b-69f1-4dc6-8313-fe396515c545" x="69" y="0" width="131" height="20"/>
<textElement>
<font pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{name}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement uuid="ecfec3da-cfcd-47f1-b3f5-eb08570d907b" x="200" y="0" width="170" height="20"/>
<textElement>
<font pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{textItem}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement uuid="751d41ee-e9c8-40e8-a097-601dc31ad54c" x="370" y="0" width="170" height="20"/>
<textElement>
<font pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{description}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement uuid="27c9eb42-84d4-43ee-920d-c6bbef41d2c0" x="540" y="0" width="37" height="20"/>
<textElement>
<font pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{munit}]]></textFieldExpression>
</textField>
<textField pattern="###0;-###0">
<reportElement uuid="2e109827-d941-41a6-87bc-60d25859c443" x="577" y="0" width="37" height="20"/>
<textElement textAlignment="Right">
<font pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{quantity}]]></textFieldExpression>
</textField>
<textField pattern="###0.00;-###0.00">
<reportElement uuid="c27d8f6c-f79d-4761-ae45-db8cfb2de53e" x="614" y="0" width="69" height="20"/>
<textElement textAlignment="Right">
<font pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{unitPrice}]]></textFieldExpression>
</textField>
<textField pattern="###0.00;-###0.00">
<reportElement uuid="b943199c-923a-4b6f-9ab2-09490fd7b36f" x="683" y="0" width="69" height="20"/>
<textElement textAlignment="Right">
<font pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{total}]]></textFieldExpression>
</textField>
</band>
</detail>
<columnFooter>
<band height="3">
<line>
<reportElement uuid="cd18eee2-1c13-419e-9816-193b87d4f5a2" x="0" y="0" width="752" height="1"/>
<graphicElement>
<pen lineStyle="Solid"/>
</graphicElement>
</line>
</band>
</columnFooter>
</jasperReport>
Binary file not shown.
@@ -0,0 +1,278 @@
<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="requirements" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="12ae9a20-4929-4de7-9d72-b7792ac83a22">
<property name="ireport.zoom" value="2.0"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false">
<defaultValueExpression><![CDATA["/home/pepa/Dokumenty/dev/java/isspst/"]]></defaultValueExpression>
</parameter>
<queryString>
<![CDATA[]]>
</queryString>
<field name="numser" class="java.lang.String">
<fieldDescription><![CDATA[numser]]></fieldDescription>
</field>
<field name="project" class="java.lang.Boolean">
<fieldDescription><![CDATA[project]]></fieldDescription>
</field>
<field name="modifiedBy" class="info.bukova.isspst.data.User">
<fieldDescription><![CDATA[modifiedBy]]></fieldDescription>
</field>
<field name="workgroup" class="info.bukova.isspst.data.Workgroup">
<fieldDescription><![CDATA[workgroup]]></fieldDescription>
</field>
<field name="modified" class="java.util.Date">
<fieldDescription><![CDATA[modified]]></fieldDescription>
</field>
<field name="description" class="java.lang.String">
<fieldDescription><![CDATA[description]]></fieldDescription>
</field>
<field name="kind" class="java.lang.Long">
<fieldDescription><![CDATA[kind]]></fieldDescription>
</field>
<field name="created" class="java.util.Date">
<fieldDescription><![CDATA[created]]></fieldDescription>
</field>
<field name="sumTotal" class="java.math.BigDecimal">
<fieldDescription><![CDATA[sumTotal]]></fieldDescription>
</field>
<field name="ownedBy" class="info.bukova.isspst.data.User">
<fieldDescription><![CDATA[ownedBy]]></fieldDescription>
</field>
<field name="centre" class="info.bukova.isspst.data.Workgroup">
<fieldDescription><![CDATA[centre]]></fieldDescription>
</field>
<field name="state" class="info.bukova.isspst.data.RequirementState">
<fieldDescription><![CDATA[state]]></fieldDescription>
</field>
<field name="reqDate" class="java.util.Date">
<fieldDescription><![CDATA[reqDate]]></fieldDescription>
</field>
<field name="type" class="info.bukova.isspst.data.RequirementType">
<fieldDescription><![CDATA[type]]></fieldDescription>
</field>
<field name="authorization" class="java.util.List">
<fieldDescription><![CDATA[authorization]]></fieldDescription>
</field>
<field name="deliveryDate" class="java.util.Date">
<fieldDescription><![CDATA[deliveryDate]]></fieldDescription>
</field>
<field name="items" class="java.util.List">
<fieldDescription><![CDATA[items]]></fieldDescription>
</field>
<field name="lastApproveDate" class="java.util.Date">
<fieldDescription><![CDATA[lastApproveDate]]></fieldDescription>
</field>
<field name="lastApprover" class="info.bukova.isspst.data.User">
<fieldDescription><![CDATA[lastApprover]]></fieldDescription>
</field>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="24" splitType="Stretch">
<staticText>
<reportElement uuid="564e6b0f-e303-4761-b178-228b1852bf94" x="0" y="0" width="802" height="20"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="14" isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Požadavky]]></text>
</staticText>
</band>
</title>
<columnHeader>
<band height="23" splitType="Stretch">
<line>
<reportElement uuid="9df136f1-4d6a-4ef0-9637-80e08f97b60c" x="0" y="0" width="802" height="1"/>
<graphicElement>
<pen lineStyle="Double"/>
</graphicElement>
</line>
<staticText>
<reportElement uuid="65e7b02a-c1e3-4fe0-a1c8-09623e9f75a7" x="0" y="1" width="70" height="20"/>
<textElement verticalAlignment="Middle">
<font isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Číslo]]></text>
</staticText>
<line>
<reportElement uuid="0c6d2376-d8fa-4691-b9b6-bfaf851ad5b5" x="0" y="21" width="802" height="1"/>
<graphicElement>
<pen lineStyle="Double"/>
</graphicElement>
</line>
<staticText>
<reportElement uuid="4111e50c-2fc5-4b85-9e73-796158afd772" x="70" y="0" width="60" height="20"/>
<textElement verticalAlignment="Middle">
<font isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Datum]]></text>
</staticText>
<staticText>
<reportElement uuid="8fa42d62-21e2-4b5f-b352-c94159122412" x="130" y="0" width="100" height="20"/>
<textElement verticalAlignment="Middle">
<font isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Středisko]]></text>
</staticText>
<staticText>
<reportElement uuid="9092422f-c03c-4fcb-95a6-4013d7df0e17" x="230" y="0" width="100" height="20"/>
<textElement verticalAlignment="Middle">
<font isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Komise]]></text>
</staticText>
<staticText>
<reportElement uuid="aee76e66-a57a-4ad0-8295-60cafca915f5" x="330" y="0" width="66" height="20"/>
<textElement verticalAlignment="Middle">
<font isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Dat. dodání]]></text>
</staticText>
<staticText>
<reportElement uuid="b3f3e621-33a4-4f98-a625-0d8a3678a335" x="397" y="0" width="110" height="20"/>
<textElement verticalAlignment="Middle">
<font isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Popis]]></text>
</staticText>
<staticText>
<reportElement uuid="d1a75f0c-7517-4582-b76e-dbf20ee3870d" x="507" y="0" width="50" height="20"/>
<textElement verticalAlignment="Middle">
<font isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Cena]]></text>
</staticText>
<staticText>
<reportElement uuid="74f3f3cd-c919-42ec-931a-09721241e96a" x="557" y="0" width="140" height="20"/>
<textElement verticalAlignment="Middle">
<font isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Žadatel]]></text>
</staticText>
<staticText>
<reportElement uuid="64c3c995-97cb-49a4-a961-3956a1aea398" x="697" y="1" width="100" height="20"/>
<textElement verticalAlignment="Middle">
<font isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Stav]]></text>
</staticText>
</band>
</columnHeader>
<detail>
<band height="82" splitType="Stretch">
<textField>
<reportElement uuid="8771c2b5-96ac-453e-aa04-e43763e73041" x="0" y="0" width="70" height="20"/>
<textElement>
<font pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{numser}]]></textFieldExpression>
</textField>
<textField pattern="dd.MM.yyyy">
<reportElement uuid="6c4089fa-da4f-4c00-8e51-9564dcddd8c5" x="70" y="0" width="60" height="20"/>
<textElement>
<font pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{reqDate}]]></textFieldExpression>
</textField>
<textField pattern="dd.MM.yyyy" isBlankWhenNull="true">
<reportElement uuid="3bfa0b1f-464f-4f5b-aa69-761d3277094f" x="330" y="0" width="66" height="20"/>
<textElement>
<font pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{deliveryDate}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement uuid="9ac05563-474b-407a-8074-1a2a0d406e1e" x="230" y="0" width="100" height="20"/>
<textElement>
<font pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{workgroup}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement uuid="70e918b8-d195-4d6b-b5eb-f156e89db6e4" x="130" y="0" width="100" height="20"/>
<textElement>
<font pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression><![CDATA[""+$F{centre}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement uuid="1be2e76d-4f9b-425d-adef-5b2d5f497037" x="397" y="0" width="110" height="20"/>
<textElement>
<font pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{description}]]></textFieldExpression>
</textField>
<textField pattern="###0.00;-###0.00" isBlankWhenNull="true">
<reportElement uuid="76cf9400-0d39-4061-b897-d59da4b3287b" x="507" y="0" width="50" height="20"/>
<textElement>
<font pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{sumTotal}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="100abac3-9ed6-4368-896d-aabc6e70cec6" x="557" y="0" width="140" height="20"/>
<textElement>
<font pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression><![CDATA[""+$F{ownedBy}]]></textFieldExpression>
</textField>
<subreport>
<reportElement uuid="4bd85a98-44c0-4d17-93af-b13612181418" x="30" y="39" width="772" height="41"/>
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{items})]]></dataSourceExpression>
<subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "requirementItems.jasper"]]></subreportExpression>
</subreport>
<textField>
<reportElement uuid="d20ec05f-4b65-4e5f-8026-e18f323c1a15" x="697" y="0" width="105" height="20"/>
<textElement>
<font pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{state} == info.bukova.isspst.data.RequirementState.NEW ? "Neschváleno" :
$F{state} == info.bukova.isspst.data.RequirementState.PARTIALLY ? "Částečně schváleno" :
"Schváleno"]]></textFieldExpression>
</textField>
<staticText>
<reportElement uuid="ddbc957b-4a8d-4f69-ba7a-5135ee2c8de9" x="0" y="19" width="70" height="20">
<printWhenExpression><![CDATA[$F{state} == info.bukova.isspst.data.RequirementState.APPROVED]]></printWhenExpression>
</reportElement>
<textElement verticalAlignment="Middle">
<font isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Schválil:]]></text>
</staticText>
<textField isBlankWhenNull="true">
<reportElement uuid="dbb701b8-20ab-4671-b8f6-a0d7e76d6fb6" x="70" y="19" width="100" height="20">
<printWhenExpression><![CDATA[$F{state} == info.bukova.isspst.data.RequirementState.APPROVED]]></printWhenExpression>
</reportElement>
<textElement verticalAlignment="Middle">
<font pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{lastApprover}]]></textFieldExpression>
</textField>
<textField pattern="dd.MM.yyyy">
<reportElement uuid="9c8def10-5b0c-4d71-bfbf-31f3ff78be1a" x="170" y="19" width="60" height="20">
<printWhenExpression><![CDATA[$F{state} == info.bukova.isspst.data.RequirementState.APPROVED]]></printWhenExpression>
</reportElement>
<textElement verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{lastApproveDate}]]></textFieldExpression>
</textField>
<line>
<reportElement uuid="fe25985d-4ac9-4658-a7cb-910b192b1fee" x="0" y="20" width="802" height="1"/>
</line>
</band>
</detail>
<pageFooter>
<band height="24" splitType="Stretch">
<textField>
<reportElement uuid="4b0dedf5-d888-478f-8a8c-6624bf19d81a" x="772" y="0" width="25" height="20"/>
<textElement textAlignment="Right" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
<staticText>
<reportElement uuid="f6eb7d19-80f0-4934-b4dd-a6853c3dc1f1" x="730" y="0" width="42" height="20"/>
<textElement verticalAlignment="Middle"/>
<text><![CDATA[Strana:]]></text>
</staticText>
</band>
</pageFooter>
</jasperReport>
+1 -1
View File
@@ -96,7 +96,7 @@
<checkbox
label="@load(each.role.description)"
checked="@bind(each.checked)"
disabled="@load(vm.dataBean.username eq 'admin')" />
disabled="@load((vm.dataBean.username eq 'admin') or (each.role.authority eq 'ROLE_USER'))" />
</template>
</vbox>
</groupbox>
+2 -1
View File
@@ -125,7 +125,8 @@
<menuitem
image=""
label="${labels.ChangePassword}…"
onClick="@command('passwd')" />
onClick="@command('passwd')"
visible="@load(vm.canChangePassword)" />
<menuitem
image="/img/unlock-016.png"
label="${labels.Logout}"