diff --git a/src/main/java/info/bukova/isspst/data/Address.java b/src/main/java/info/bukova/isspst/data/Address.java index d263970f..5ea4cfe9 100644 --- a/src/main/java/info/bukova/isspst/data/Address.java +++ b/src/main/java/info/bukova/isspst/data/Address.java @@ -1,5 +1,10 @@ package info.bukova.isspst.data; +import info.bukova.isspst.StringUtils; + +import java.util.ArrayList; +import java.util.List; + import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Table; @@ -10,126 +15,326 @@ import org.hibernate.validator.constraints.NotEmpty; import org.hibernate.validator.constraints.URL; @Entity -@Table(name="ADDRESS") -public class Address extends BaseData { - - @Column(name="COMPANY") +@Table(name = "ADDRESS") +public class Address extends BaseData +{ + + @Column(name = "COMPANY") private String company; - @Column(name="DEPARTMENT") + @Column(name = "DEPARTMENT") private String department; - @Column(name="CONTACT_NAME") + @Column(name = "CONTACT_NAME") private String contactName; - @Column(name="STREET") + @Column(name = "STREET") private String street; - @Column(name="HOUSE_NUMBER") + @Column(name = "HOUSE_NUMBER") private String houseNumber; - @Column(name="ZIP_CODE") + @Column(name = "ZIP_CODE") private String zipCode; - @Column(name="CITY") + @Column(name = "CITY") private String city; - @Column(name="STATE") + @Column(name = "STATE") private String state; - @Column(name="IC") + @Column(name = "IC") private long ic; - @Column(name="DIC") + @Column(name = "DIC") private String dic; - @Column(name="PHONE") + @Column(name = "PHONE") private String phone; - @Column(name="EMAIL") + @Column(name = "EMAIL") private String email; - @Column(name="WEB") + @Column(name = "WEB") private String web; - @Column(name="DESCRIPTION") + @Column(name = "DESCRIPTION") private String description; - + @NotNull(message = "Zadejte firmu") @NotEmpty(message = "Zadejte firmu") - public String getCompany() { + public String getCompany() + { return company; } - public void setCompany(String company) { + + public void setCompany(String company) + { this.company = company; } - public String getDepartment() { + + public String getDepartment() + { return department; } - public void setDepartment(String department) { + + public void setDepartment(String department) + { this.department = department; } - public String getContactName() { + + public String getContactName() + { return contactName; } - public void setContactName(String contactName) { + + public void setContactName(String contactName) + { this.contactName = contactName; } - public String getStreet() { + + public String getStreet() + { return street; } - public void setStreet(String street) { + + public void setStreet(String street) + { this.street = street; } - public String getHouseNumber() { + + public String getHouseNumber() + { return houseNumber; } - public void setHouseNumber(String houseNumber) { + + public void setHouseNumber(String houseNumber) + { this.houseNumber = houseNumber; } - public String getZipCode() { + + public String getZipCode() + { return zipCode; } - public void setZipCode(String zipCode) { + + public void setZipCode(String zipCode) + { this.zipCode = zipCode; } + @NotNull(message = "Zadejte město") @NotEmpty(message = "Zadejte město") - public String getCity() { + public String getCity() + { return city; } - public void setCity(String city) { + + public void setCity(String city) + { this.city = city; } - public String getState() { + + public String getState() + { return state; } - public void setState(String state) { + + public void setState(String state) + { this.state = state; } - public long getIc() { + + public long getIc() + { return ic; } - public void setIc(long ic) { + + public void setIc(long ic) + { this.ic = ic; } - public String getDic() { + + public String getDic() + { return dic; } - public void setDic(String dic) { + + public void setDic(String dic) + { this.dic = dic; } - public String getPhone() { + + public String getPhone() + { return phone; } - public void setPhone(String phone) { + + public void setPhone(String phone) + { this.phone = phone; } + @Email(message = "Špatný formát adresy") - public String getEmail() { + public String getEmail() + { return email; } - public void setEmail(String email) { + + public void setEmail(String email) + { this.email = email; } + @URL(message = "Špatný formát adresy") - public String getWeb() { + public String getWeb() + { return web; } - public void setWeb(String web) { + + public void setWeb(String web) + { this.web = web; } - public String getDescription() { + + public String getDescription() + { return description; } - public void setDescription(String description) { + + public void setDescription(String description) + { this.description = description; } + + public String toString() + { + String str, street; + + List listStreet = new ArrayList(); + if (this.street != null) + listStreet.add(this.street); + if (this.houseNumber != null) + listStreet.add(this.houseNumber); + street = StringUtils.join(listStreet, " "); + + List list = new ArrayList(); + if (this.company != null) + list.add(this.company); + if (street != null) + list.add(street); + if (this.city != null) + list.add(this.city); + list.add(Long.toString(this.ic)); + str = StringUtils.join(list, ", "); + return str; + } + + @Override + public boolean equals(Object obj) + { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + Address other = (Address) obj; + + if (other.getId() == this.getId()) + { + if (other.getId() == 0) + { + // Protože globální nastavení je serializováno (není v DB), nemá + // vyplněno ID - musíme porovnávat jinak - obsahově + if (city == null) + { + if (other.city != null) + return false; + } + else if (!city.equals(other.city)) + return false; + if (company == null) + { + if (other.company != null) + return false; + } + else if (!company.equals(other.company)) + return false; + if (contactName == null) + { + if (other.contactName != null) + return false; + } + else if (!contactName.equals(other.contactName)) + return false; + if (department == null) + { + if (other.department != null) + return false; + } + else if (!department.equals(other.department)) + return false; + if (description == null) + { + if (other.description != null) + return false; + } + else if (!description.equals(other.description)) + return false; + if (dic == null) + { + if (other.dic != null) + return false; + } + else if (!dic.equals(other.dic)) + return false; + if (email == null) + { + if (other.email != null) + return false; + } + else if (!email.equals(other.email)) + return false; + if (houseNumber == null) + { + if (other.houseNumber != null) + return false; + } + else if (!houseNumber.equals(other.houseNumber)) + return false; + if (ic != other.ic) + return false; + if (phone == null) + { + if (other.phone != null) + return false; + } + else if (!phone.equals(other.phone)) + return false; + if (state == null) + { + if (other.state != null) + return false; + } + else if (!state.equals(other.state)) + return false; + if (street == null) + { + if (other.street != null) + return false; + } + else if (!street.equals(other.street)) + return false; + if (web == null) + { + if (other.web != null) + return false; + } + else if (!web.equals(other.web)) + return false; + if (zipCode == null) + { + if (other.zipCode != null) + return false; + } + else if (!zipCode.equals(other.zipCode)) + return false; + return true; + } + else + { + return true; + } + } + + return false; + } } diff --git a/src/main/java/info/bukova/isspst/data/AddressEmb.java b/src/main/java/info/bukova/isspst/data/AddressEmb.java index 0e112588..fa00f14d 100644 --- a/src/main/java/info/bukova/isspst/data/AddressEmb.java +++ b/src/main/java/info/bukova/isspst/data/AddressEmb.java @@ -5,6 +5,7 @@ import javax.persistence.Embeddable; @Embeddable public class AddressEmb { + private int id; private String company; private String department; private String contactName; @@ -24,7 +25,14 @@ public class AddressEmb { super(); } - public AddressEmb(Address address) { + public AddressEmb(Address address) + { + if (address == null) + { + return; + } + + this.id = address.getId(); this.company = address.getCompany(); this.department = address.getDepartment(); this.contactName = address.getContactName(); @@ -41,6 +49,39 @@ public class AddressEmb { this.description = address.getDescription(); } + public Address getAddress() + { + Address address = new Address(); + + address.setId(this.id); + address.setCompany(this.company); + address.setDepartment(this.department); + address.setContactName(this.contactName); + address.setStreet(this.street); + address.setHouseNumber(this.houseNumber); + address.setZipCode(this.zipCode); + address.setCity(this.city); + address.setState(this.state); + address.setIc(this.ic); + address.setDic(this.dic); + address.setPhone(this.phone); + address.setEmail(this.email); + address.setWeb(this.web); + address.setDescription(this.description); + + return address; + } + + public int getId() + { + return id; + } + + public void setId(int id) + { + this.id = id; + } + public String getCompany() { return company; } diff --git a/src/main/java/info/bukova/isspst/data/Order.java b/src/main/java/info/bukova/isspst/data/Order.java index c25d59d5..60bc8614 100644 --- a/src/main/java/info/bukova/isspst/data/Order.java +++ b/src/main/java/info/bukova/isspst/data/Order.java @@ -29,6 +29,7 @@ public class Order extends BaseData { @Embedded @AttributeOverrides({ + @AttributeOverride(name = "id", column = @Column(name = "SUPPLIER_ID")), @AttributeOverride(name = "city", column = @Column(name = "SUPPLIER_CITY")), @AttributeOverride(name = "company", column = @Column(name = "SUPPLIER_COMPANY")), @AttributeOverride(name = "contactName", column = @Column(name = "SUPPLIER_CONTACT_NAME")), @@ -48,6 +49,7 @@ public class Order extends BaseData { @Embedded @AttributeOverrides({ + @AttributeOverride(name = "id", column = @Column(name = "INVOICE_ID")), @AttributeOverride(name = "city", column = @Column(name = "INVOICE_CITY")), @AttributeOverride(name = "company", column = @Column(name = "INVOICE_COMPANY")), @AttributeOverride(name = "contactName", column = @Column(name = "INVOICE_CONTACT_NAME")), @@ -67,6 +69,7 @@ public class Order extends BaseData { @Embedded @AttributeOverrides({ + @AttributeOverride(name = "id", column = @Column(name = "DELIVERY_ID")), @AttributeOverride(name = "city", column = @Column(name = "DELIVERY_CITY")), @AttributeOverride(name = "company", column = @Column(name = "DELIVERY_COMPANY")), @AttributeOverride(name = "contactName", column = @Column(name = "DELIVERY_CONTACT_NAME")), diff --git a/src/main/java/info/bukova/isspst/data/SettingsData.java b/src/main/java/info/bukova/isspst/data/SettingsData.java index 3e152952..d7795714 100644 --- a/src/main/java/info/bukova/isspst/data/SettingsData.java +++ b/src/main/java/info/bukova/isspst/data/SettingsData.java @@ -1,13 +1,13 @@ package info.bukova.isspst.data; +import info.bukova.isspst.mail.MailMessage; + import java.math.BigDecimal; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import info.bukova.isspst.mail.MailMessage; - public class SettingsData { private boolean enableRequirements; @@ -76,6 +76,17 @@ public class SettingsData { return shippingAddrs; } + /** + * @return Seznam všech doručovacích adres včetně hlavní fakturační adresy + */ + public List
getAllShippingAddrs() + { + List
list = new ArrayList
(); + list.add(this.mainAddress); + list.addAll(this.getShippingAddrs()); + return list; + } + public void setShippingAddrs(List
shippingAddrs) { this.shippingAddrs = shippingAddrs; } diff --git a/src/main/java/info/bukova/isspst/data/User.java b/src/main/java/info/bukova/isspst/data/User.java index 133be197..65c75770 100644 --- a/src/main/java/info/bukova/isspst/data/User.java +++ b/src/main/java/info/bukova/isspst/data/User.java @@ -205,18 +205,12 @@ public class User extends Member implements UserDetails, DataModel { public static boolean isEqualByUserForFilter(User value, User search) { - if (search == null) + if ((search == null) || search.getFullName().isEmpty()) { return true; } - else if (value != null) { - if (search.getFullName().isEmpty()) - { - return true; - } - String valueS = value.getFullName(); String searchS = search.getFullName(); return (valueS.compareTo(searchS) == 0); diff --git a/src/main/java/info/bukova/isspst/data/Workgroup.java b/src/main/java/info/bukova/isspst/data/Workgroup.java index 28654853..b2efd95e 100644 --- a/src/main/java/info/bukova/isspst/data/Workgroup.java +++ b/src/main/java/info/bukova/isspst/data/Workgroup.java @@ -154,18 +154,12 @@ public class Workgroup extends Member implements OwnedDataModel, Serializable { public static boolean isEqualByWorkgroupForFilter(Workgroup value, Workgroup search) { - if (search == null) + if ((search == null) || search.getFullName().isEmpty()) { return true; } - else if (value != null) { - if (search.getFullName().isEmpty()) - { - return true; - } - String valueS = value.getFullName(); String searchS = search.getFullName(); return (valueS.compareTo(searchS) == 0); diff --git a/src/main/java/info/bukova/isspst/ui/DocumentViewModel.java b/src/main/java/info/bukova/isspst/ui/DocumentViewModel.java new file mode 100644 index 00000000..e6811dd2 --- /dev/null +++ b/src/main/java/info/bukova/isspst/ui/DocumentViewModel.java @@ -0,0 +1,52 @@ +package info.bukova.isspst.ui; + +import org.zkoss.bind.annotation.BindingParam; +import org.zkoss.bind.annotation.Command; +import org.zkoss.bind.annotation.Init; +import org.zkoss.zk.ui.event.Events; +import org.zkoss.zk.ui.event.KeyEvent; +import org.zkoss.zul.Combobox; + +public class DocumentViewModel +{ + protected BigDecimalConverter standardBigDecimalConverter; + + public BigDecimalConverter getStandardBigDecimalConverter() + { + return standardBigDecimalConverter; + } + + public void setStandardBigDecimalConverter(BigDecimalConverter standardBigDecimalConverter) + { + this.standardBigDecimalConverter = standardBigDecimalConverter; + } + + @Init + public void initDocumentViewModel() + { + this.standardBigDecimalConverter = new BigDecimalConverter(); + } + + @Command + public void handleComboKeyFilter(@BindingParam("ctrl") Combobox cb, @BindingParam("keyEvent") KeyEvent keyEvent) + { + if (cb == null) + { + return; + } + + int keyCode = keyEvent.getKeyCode(); + + switch (keyCode) + { + case 46: // del + // Zrušit jakoukoli vybranou položku + cb.setSelectedIndex(-1); + // Zavřít listbox + cb.close(); + // Vyvolat událost změny + Events.postEvent("onChange", cb, null); + break; + } + } +} diff --git a/src/main/java/info/bukova/isspst/ui/FormViewModel.java b/src/main/java/info/bukova/isspst/ui/FormViewModel.java index f16ed5d9..45faff34 100644 --- a/src/main/java/info/bukova/isspst/ui/FormViewModel.java +++ b/src/main/java/info/bukova/isspst/ui/FormViewModel.java @@ -20,7 +20,7 @@ import org.zkoss.bind.annotation.NotifyChange; import org.zkoss.zul.Messagebox; import org.zkoss.zul.Window; -public class FormViewModel +public class FormViewModel extends DocumentViewModel { private T dataBean; @@ -32,6 +32,8 @@ public class FormViewModel @Init public void init(@ExecutionArgParam("selected") T selected, @ExecutionArgParam("service") Service service) { + super.initDocumentViewModel(); + this.dataBean = selected; this.service = service; constraint = new ServiceConstraint(); diff --git a/src/main/java/info/bukova/isspst/ui/ListViewModel.java b/src/main/java/info/bukova/isspst/ui/ListViewModel.java index 008789cc..10ce1e39 100644 --- a/src/main/java/info/bukova/isspst/ui/ListViewModel.java +++ b/src/main/java/info/bukova/isspst/ui/ListViewModel.java @@ -23,7 +23,8 @@ import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zul.Messagebox; import org.zkoss.zul.Window; -public class ListViewModel { +public class ListViewModel extends DocumentViewModel +{ private boolean confirmDelete = false; private boolean filter = false; diff --git a/src/main/java/info/bukova/isspst/ui/main/approved/ApprovedList.java b/src/main/java/info/bukova/isspst/ui/main/approved/ApprovedList.java index e52f1b47..1bb8fa7e 100644 --- a/src/main/java/info/bukova/isspst/ui/main/approved/ApprovedList.java +++ b/src/main/java/info/bukova/isspst/ui/main/approved/ApprovedList.java @@ -1,20 +1,27 @@ package info.bukova.isspst.ui.main.approved; import info.bukova.isspst.data.JoinedItem; +import info.bukova.isspst.data.Order; import info.bukova.isspst.data.User; import info.bukova.isspst.data.Workgroup; import info.bukova.isspst.filters.JoinedItemFilter; import info.bukova.isspst.services.approved.ApprovedService; +import info.bukova.isspst.services.approved.OrderService; import info.bukova.isspst.services.users.UserService; import info.bukova.isspst.services.workgroups.WorkgroupService; import info.bukova.isspst.ui.BigDecimalConverter; import info.bukova.isspst.ui.ListViewModel; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; +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 ApprovedList extends ListViewModel { @@ -27,8 +34,13 @@ public class ApprovedList extends ListViewModel @WireVariable protected UserService userService; + @WireVariable + protected OrderService orderService; + private BigDecimalConverter bigDecimalConverter; + protected List selectedItems; + @Init public void initApprovedList() { @@ -37,6 +49,7 @@ public class ApprovedList extends ListViewModel // formZul = "form.zul"; dataFilter = new JoinedItemFilter(getFilterTemplate()); bigDecimalConverter = new BigDecimalConverter(); + selectedItems = new ArrayList(); } public BigDecimalConverter getBigDecimalConverter() @@ -49,15 +62,19 @@ public class ApprovedList extends ListViewModel return approvedService.getAll(); } + public List getSelectedItems() + { + return this.selectedItems; + } + + public void setSelectedItems(List selectedItems) + { + this.selectedItems = selectedItems; + } + public List getWorkgroups() { - Workgroup empty = new Workgroup(); - empty.setCode(""); - empty.setName(""); - List list = new ArrayList(); - list.add(empty); - list.addAll(this.workgroupService.getWorkgroups()); - return list; + return this.workgroupService.getWorkgroups(); } public List getCenters() @@ -69,4 +86,28 @@ public class ApprovedList extends ListViewModel { return this.userService.getAll(); } + + @Command + // @NotifyChange({ "selectedItems" }) + public void onCreateOrder() + { + if (this.selectedItems == null) + { + return; + } + + if (this.selectedItems.size() == 0) + { + return; + } + + Order order = orderService.createOrder(this.selectedItems); + + Map params = new HashMap(); + params.put("selected", order); + params.put("service", orderService); + + Window orderForm = (Window) Executions.createComponents("/main/orders/created/orderForm.zul", null, params); + orderForm.doModal(); + } } diff --git a/src/main/java/info/bukova/isspst/ui/main/orders/created/OrderForm.java b/src/main/java/info/bukova/isspst/ui/main/orders/created/OrderForm.java new file mode 100644 index 00000000..8d925dc3 --- /dev/null +++ b/src/main/java/info/bukova/isspst/ui/main/orders/created/OrderForm.java @@ -0,0 +1,144 @@ +package info.bukova.isspst.ui.main.orders.created; + +import info.bukova.isspst.data.Address; +import info.bukova.isspst.data.AddressEmb; +import info.bukova.isspst.data.Order; +import info.bukova.isspst.data.OrderItem; +import info.bukova.isspst.services.addressbook.AdbService; +import info.bukova.isspst.services.settings.GlobalSettingsService; +import info.bukova.isspst.ui.FormViewModel; +import info.bukova.isspst.validators.OrderFormValidator; + +import java.util.List; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.zkoss.bind.annotation.Command; +import org.zkoss.bind.annotation.Init; +import org.zkoss.bind.annotation.NotifyChange; +import org.zkoss.zk.ui.select.annotation.WireVariable; + +public class OrderForm extends FormViewModel +{ + @SuppressWarnings("unused") + private final static Logger log = LoggerFactory.getLogger(OrderForm.class.getName()); + + @WireVariable + protected AdbService adbService; + + @WireVariable + protected GlobalSettingsService settingsService; + + protected OrderFormValidator orderFormValidator; + + protected OrderItem selectedItem; + + protected Address selectedSuppAddrItem; + + protected Address selectedDeliveryAddrItem; + + @Init(superclass = true) + public void initOrderForm() + { + this.orderFormValidator = new OrderFormValidator(); + this.selectedDeliveryAddrItem = this.getDataBean().getDeliveryAddress().getAddress(); + + if (this.getDataBean().getSuplier() == null) + { + this.getDataBean().setSuplier(new AddressEmb()); + } + + if (this.getDataBean().getDeliveryAddress() == null) + { + this.getDataBean().setDeliveryAddress(new AddressEmb()); + } + + if (this.getDataBean().getAddress() == null) + { + this.getDataBean().setAddress(new AddressEmb()); + } + } + + public OrderFormValidator getOrderFormValidator() + { + return orderFormValidator; + } + + public void setOrderFormValidator(OrderFormValidator orderFormValidator) + { + this.orderFormValidator = orderFormValidator; + } + + public List
getSuppAddresses() + { + return adbService.getAll(); + } + + public List
getDeliveryAddresses() + { + return settingsService.getSettings().getAllShippingAddrs(); + } + + public Address getInvoiceAddress() + { + return settingsService.getSettings().getMainAddress(); + } + + public OrderItem getSelectedItem() + { + return this.selectedItem; + } + + public void setSelectedItem(OrderItem selectedItem) + { + this.selectedItem = selectedItem; + } + + public Address getSelectedSuppAddrItem() + { + return selectedSuppAddrItem; + } + + public void setSelectedSuppAddrItem(Address selectedSuppAddrItem) + { + this.selectedSuppAddrItem = selectedSuppAddrItem; + } + + public Address getSelectedDeliveryAddrItem() + { + return selectedDeliveryAddrItem; + } + + public void setSelectedDeliveryAddrItem(Address selectedDeliveryAddrItem) + { + this.selectedDeliveryAddrItem = selectedDeliveryAddrItem; + } + + @Command + @NotifyChange("dataBean") + public void doFillSuppAddress() + { + if (this.selectedSuppAddrItem == null) + { + return; + } + + // Naplnit pole podle vybrané adresy z comba + AddressEmb supplier = new AddressEmb(this.selectedSuppAddrItem); + this.getDataBean().setSuplier(supplier); + } + + @Command + @NotifyChange("dataBean") + public void doFillDeliveryAddress() + { + if (this.selectedDeliveryAddrItem == null) + { + return; + } + + // Naplnit pole podle vybrané adresy z comba + AddressEmb delivery = new AddressEmb(this.selectedDeliveryAddrItem); + this.getDataBean().setDeliveryAddress(delivery); + } +} diff --git a/src/main/java/info/bukova/isspst/validators/OrderFormValidator.java b/src/main/java/info/bukova/isspst/validators/OrderFormValidator.java new file mode 100644 index 00000000..86e5f9cd --- /dev/null +++ b/src/main/java/info/bukova/isspst/validators/OrderFormValidator.java @@ -0,0 +1,30 @@ +package info.bukova.isspst.validators; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.zkoss.bind.ValidationContext; + +public class OrderFormValidator extends BaseValidator +{ + private final static Logger log = LoggerFactory.getLogger(OrderFormValidator.class.getName()); + + @Override + protected Logger getLogger() + { + return log; + } + + @Override + public void validate(ValidationContext ctx) + { + // Property propertyCentre = ctx.getProperties("centre")[0]; + // Workgroup workgroup = (Workgroup) propertyCentre.getValue(); + // + // if (workgroup == null) + // { + // this.errorMsg(ctx, StringUtils.localize("RequirementCenterIsEmpty"), + // "idReqCenter"); + // return; + // } + } +} diff --git a/src/main/webapp/WEB-INF/locales/zk-label.properties b/src/main/webapp/WEB-INF/locales/zk-label.properties index 577f5bd8..4546bc7f 100644 --- a/src/main/webapp/WEB-INF/locales/zk-label.properties +++ b/src/main/webapp/WEB-INF/locales/zk-label.properties @@ -269,6 +269,7 @@ false=Ne Information=Informace +Order=Objednávka Orders=Objednávky MaterialRequirement=Požadavek na materiál @@ -303,6 +304,19 @@ RemoveItem=Smazat Amount=Částka Owner=Vlastník CreateOrder=Vytvořit objednávku +NotYetFilled=Zatím nevyplněno +DeliveryAddress=Dodací adresa +BillingAddress=Fakturační adresa + +OrderFormNumber=Číslo objednávky +OrderFormOrderDate=Datum objednávky +OrderFormTotal=Celkem +OrderFormDescription=Popis +OrderFormOrdered=Objednáno +OrderFormDeliveredDate=Dodáno dne +OrderFormInvoiceNumber=Číslo faktury + +HandleComboKeyFilter=#del WorkgroupFormUserIsCenterMember=Uživatel je členem střediska, jehož je komise členem! WorkgroupFormMemberIsCenterMember=Některý ze členů přidávané komise je členem tohoto střediska! diff --git a/src/main/webapp/app/formButtons.zul b/src/main/webapp/app/formButtons.zul index 22886104..2ec40429 100644 --- a/src/main/webapp/app/formButtons.zul +++ b/src/main/webapp/app/formButtons.zul @@ -1,9 +1,22 @@ - -
-
\ No newline at end of file diff --git a/src/main/webapp/css/zk-modify.css b/src/main/webapp/css/zk-modify.css index a9d4cb44..0a491830 100644 --- a/src/main/webapp/css/zk-modify.css +++ b/src/main/webapp/css/zk-modify.css @@ -8,6 +8,12 @@ text-shadow: 2px 2px 2px #000000; } +.addScrollbar { + + overflow: auto; + +} + .find-grid-cell { display: table; width: 100%; diff --git a/src/main/webapp/main/orders/approved/grid.zul b/src/main/webapp/main/orders/approved/grid.zul index 7239043f..09653dc2 100644 --- a/src/main/webapp/main/orders/approved/grid.zul +++ b/src/main/webapp/main/orders/approved/grid.zul @@ -26,7 +26,7 @@ multiple="true" checkmark="true" vflex="1" - context="popupMenu" + selectedItems="@bind(vm.selectedItems)" model="@load(vm.dataList)"> @@ -182,11 +182,13 @@
+ readonly="true"> @@ -201,11 +203,13 @@
+ readonly="true"> @@ -220,11 +224,13 @@
+ readonly="true"> @@ -251,7 +257,7 @@ + + + - - - \ No newline at end of file diff --git a/src/main/webapp/main/orders/created/orderForm.zul b/src/main/webapp/main/orders/created/orderForm.zul new file mode 100644 index 00000000..e58714f1 --- /dev/null +++ b/src/main/webapp/main/orders/created/orderForm.zul @@ -0,0 +1,537 @@ + + + + + + + + + + + + + + + + + + + + ${labels.OrderFormNumber} : + + + + + + ${labels.OrderFormOrderDate} : + + + + + + ${labels.OrderFormTotal} : + + + + + + ${labels.RequirementsFormDeliveryDate} : + + + + + + ${labels.OrderFormDeliveredDate} : + + + + + + ${labels.OrderFormInvoiceNumber} : + + + + + + ${labels.OrderFormDescription} : + + + + + + + + + + + + + + + + + + + + + + + + + + + ${labels.SuppliersFormCompany} : + + + + + + + + ${labels.SuppliersFormIC} : + + + + ${labels.SuppliersFormDIC} : + + + + + + ${labels.SuppliersFormDepartment} : + + + + ${labels.SuppliersFormContact} : + + + + + + ${labels.SuppliersFormStreet} : + + + + ${labels.SuppliersFormNo} : + + + + + + ${labels.SuppliersFormCity} : + + + + ${labels.SuppliersFormZIP} : + + + + + + ${labels.SuppliersFormPhone} : + + + + ${labels.SuppliersFormEmail} : + + + + + + ${labels.SuppliersFormWWW} : + + + + + + + + + + + + + + + + + + ${labels.SuppliersFormCompany} : + + + + + + + + ${labels.SuppliersFormIC} : + + + + ${labels.SuppliersFormDIC} : + + + + + + ${labels.SuppliersFormDepartment} : + + + + ${labels.SuppliersFormContact} : + + + + + + ${labels.SuppliersFormStreet} : + + + + ${labels.SuppliersFormNo} : + + + + + + ${labels.SuppliersFormCity} : + + + + ${labels.SuppliersFormZIP} : + + + + + + ${labels.SuppliersFormPhone} : + + + + ${labels.SuppliersFormEmail} : + + + + + + ${labels.SuppliersFormWWW} : + + + + + + + + + + + + + + + + + + ${labels.SuppliersFormCompany} : + + + + + + ${labels.SuppliersFormIC} : + + + + ${labels.SuppliersFormDIC} : + + + + + + ${labels.SuppliersFormDepartment} : + + + + ${labels.SuppliersFormContact} : + + + + + + ${labels.SuppliersFormStreet} : + + + + ${labels.SuppliersFormNo} : + + + + + + ${labels.SuppliersFormCity} : + + + + ${labels.SuppliersFormZIP} : + + + + + + ${labels.SuppliersFormPhone} : + + + + ${labels.SuppliersFormEmail} : + + + + + + ${labels.SuppliersFormWWW} : + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/main/orders/requirements/reqForm.zul b/src/main/webapp/main/orders/requirements/reqForm.zul index 3b871242..7e74970a 100644 --- a/src/main/webapp/main/orders/requirements/reqForm.zul +++ b/src/main/webapp/main/orders/requirements/reqForm.zul @@ -68,7 +68,7 @@ - ${labels.RequirementsFormDescription} : + ${labels.Description} :