From: elgekko Date: Thu, 18 May 2023 21:51:59 +0000 (+0200) Subject: v0.1.0 X-Git-Url: http://git.useribm.hu/?a=commitdiff_plain;h=f84ff5dcef4d9510f3156435cb0880517cf352c9;p=sly-crm.git v0.1.0 --- diff --git a/TODO.txt b/TODO.txt index d8a843b..bb936d9 100644 --- a/TODO.txt +++ b/TODO.txt @@ -37,17 +37,19 @@ * Munkalaphoz: Aláírt munkalap feltöltésének lehetősége. Feltöltéskor kerüljön át a státusz "aláírt"-ba. * Az oszlopszélesség minden listában állítható * Treasury műveletek mentésénél nullpointer exception jön -- Munkalapon: "normális" elrendezés, nézzen ki jól -- Minden szám: legyen jobbra igazítva, oszlop fejlécek pedig középen; mindenhol két tizedes pontossággal -- Projekt: kell egy "státusz" mező: - Legyen rendszerparaméter, és egy lista amiből választani lehet és a sorrend is legyen változtatható a listaban, - (pl.: Új, Terv, Készül az ajánlat, Ajánlat kiküldve, Megrendelve, Számlázható, Kiszámlázva, Elbuktuk) de db-ből -- Projektekhez: Legyen kicsit normálisabb elrendezésű. -- Nem jól kalkulálódik az "óradíj" a munkalapon -- A projektekhez valos treasury karolytol -- A projektben a munkalap osszesitve jelenjen meg személyenként,de navigáljon el bontott nézetbe kattintásra -- A munkalapok lista szűrhető projektre és résztvevőre. Ezt használjuk ki, amikor a projekt összevont nézetből a munkalap - bontást szeretnénk látni +* A projektekhez valos treasury karolytol +* Projekt: kell egy "státusz" mező: + Legyen rendszerparaméter, és egy lista amiből választani lehet; a sorrend is legyen változtatható + (pl.: Új, Terv, Készül az ajánlat, Ajánlat kiküldve, Megrendelve, Számlázható, Kiszámlázva, Elbuktuk) +* Nem jól kalkulálódik az "óradíj" a munkalapon +* Minden szám: legyen jobbra igazítva, oszlop fejlécek pedig középen; mindenhol két tizedes pontossággal last 0 + ez az oszlop fejlécre nem jön össze +* A résztvevők az adatok tab helyett egy külön kinyitható panelban jelenjenek meg +* Munkalap szerkesztő: ergonómikusabb elrendezés +* Lista fejlécre duplán kattintva NullPointerException-t dob +* A munkalapok lista szűrhető projektre és résztvevőre. Ezt használjuk ki, amikor a projekt összevont nézetből a munkalap bontást szeretnénk látni +* A projektben a munkalap összesitve jelenjen meg személyenként, de navigáljon el bontott nézetbe kattintásra +* Projekt szerkesztő: ergonómikusabb elrendezés - A projekt szerkesztés/részletezés tetején az adatok legyenek bal oldalon bekeretezve. A jobb oldalon pedig legyen látható a projekt árrése. Az árrés annyi sorból áll ahány devizanem van a projekt számláiban. Egy adott devizanem esetén a számolás: @@ -55,6 +57,7 @@ - Számla kiegyenlítés +- droppable="head" draggable="head" https://zkfiddle.org/sample/4k499d/1-Reorder-Columns-in-Listbox#source-2 - Minden kívülről leszipkázható adat jöjjön módosítható legyen REST API-n: szla kiegyenlítés, bejövő/kimenő számlák, munkalap Ez emiatt kell, a szinkronizációt egy külső app végzi? - Autentikáció: AD és helyi diff --git a/lis-app/pom.xml b/lis-app/pom.xml index f33aa88..e4b4744 100644 --- a/lis-app/pom.xml +++ b/lis-app/pom.xml @@ -4,7 +4,7 @@ 4.0.0 hu.user lis-app - 0.0.9-SNAPSHOT + 0.1.0-SNAPSHOT hu.user lis diff --git a/lis-db/src/main/java/hu/user/lis/db/Project.java b/lis-db/src/main/java/hu/user/lis/db/Project.java index 222b127..84a4a99 100644 --- a/lis-db/src/main/java/hu/user/lis/db/Project.java +++ b/lis-db/src/main/java/hu/user/lis/db/Project.java @@ -11,6 +11,7 @@ import java.util.List; @NoArgsConstructor public class Project { String id; + String projectStatusId; String name; String humanId; String contactName; diff --git a/lis-services/src/main/java/hu/user/lis/services/data/PartnerService.java b/lis-services/src/main/java/hu/user/lis/services/data/PartnerService.java index 8430123..faa1783 100644 --- a/lis-services/src/main/java/hu/user/lis/services/data/PartnerService.java +++ b/lis-services/src/main/java/hu/user/lis/services/data/PartnerService.java @@ -14,7 +14,7 @@ public interface PartnerService { Partner getById(String id); - Partner copy(Partner sourceEntity) throws JsonProcessingException; + Partner copy(Partner sourceEntity); void replace(Partner targetEntity, Partner replacementEntity); diff --git a/lis-services/src/main/java/hu/user/lis/services/data/ProjectServiceImpl.java b/lis-services/src/main/java/hu/user/lis/services/data/ProjectServiceImpl.java index 7738e7d..cdd557e 100644 --- a/lis-services/src/main/java/hu/user/lis/services/data/ProjectServiceImpl.java +++ b/lis-services/src/main/java/hu/user/lis/services/data/ProjectServiceImpl.java @@ -27,6 +27,8 @@ public class ProjectServiceImpl extends DataServiceImpl implements Proj InvoiceService invoiceService; @Autowired TreasuryService treasuryService; + @Autowired + ProjectStatusService projectStatusService; private List entities; @Override @@ -52,7 +54,9 @@ public class ProjectServiceImpl extends DataServiceImpl implements Proj public Project createNew() { String id = RandomStringUtils.random(8, "0123456789abcdef"); String humanId = dataGeneratorService.faker().code().isbn13(true); + String projectStatusId = projectStatusService.getAll().get(0).getId(); return Project.builder() + .projectStatusId(projectStatusId) .id(id) .humanId(humanId) .incomingInvoices(new ArrayList<>()) @@ -84,6 +88,7 @@ public class ProjectServiceImpl extends DataServiceImpl implements Proj DateFormat dateFormat = new SimpleDateFormat("yyyy"); for (int i = 0; i < 20; i++) { String id = RandomStringUtils.random(8, "0123456789abcdef"); + String projectStatusId = projectStatusService.getAll().get(0).getId(); String name = dataGeneratorService.faker().commerce().productName(); Date dt = dataGeneratorService.faker().date().past(i + 1, TimeUnit.DAYS); String humanId = String.format("%s-%s", dateFormat.format(dt), String.format("%04d", i)); @@ -91,6 +96,7 @@ public class ProjectServiceImpl extends DataServiceImpl implements Proj Partner partner = partnerService.getRandom(); Project entity = Project.builder() .id(id) + .projectStatusId(projectStatusId) .active(true) .humanId(humanId) .name(name) @@ -98,7 +104,7 @@ public class ProjectServiceImpl extends DataServiceImpl implements Proj .partner(partner) .incomingInvoices(invoiceService.getRandom(true)) .outgoingInvoices(invoiceService.getRandom(false)) - .treasuries(treasuryService.getRandom()) + //.treasuries(treasuryService.getRandom()) .build(); result.add(entity); } @@ -109,12 +115,14 @@ public class ProjectServiceImpl extends DataServiceImpl implements Proj List result = new ArrayList<>(); String id = dataGeneratorService.faker().code().isbn10(true); + String projectStatusId = projectStatusService.getAll().get(0).getId(); String name = "IBM és HP diszkek szállítása régi szerverbe"; String humanId = "2022-0027"; String contactName = dataGeneratorService.faker().name().fullName(); Partner partner = partnerService.getById("002"); // 002 Project entity = Project.builder() .id(id) + .projectStatusId(projectStatusId) .active(true) .humanId(humanId) .name(name) @@ -122,7 +130,7 @@ public class ProjectServiceImpl extends DataServiceImpl implements Proj .partner(partner) .incomingInvoices(invoiceService.getByHumanIds(new String[]{"VSz-2023/00070-"})) // VSz-2023/00070- .outgoingInvoices(invoiceService.getByHumanIds(new String[]{"USER-2023-7"})) // USER-2023-7 - .treasuries(treasuryService.getRandom()) + //.treasuries(treasuryService.getRandom()) .build(); result.add(entity); @@ -133,6 +141,7 @@ public class ProjectServiceImpl extends DataServiceImpl implements Proj partner = partnerService.getById("007"); // 007 entity = Project.builder() .id(id) + .projectStatusId(projectStatusId) .active(true) .humanId(humanId) .name(name) @@ -140,7 +149,7 @@ public class ProjectServiceImpl extends DataServiceImpl implements Proj .partner(partner) .incomingInvoices(invoiceService.getByHumanIds(new String[]{"582-SPI1003006-3021", "582-SPI003118", "582-SPI003680", "582-SPI003681", "582-SPI004090", "9090010764", "VSz-2021/00091"})) // 582-SPI1003006-3021, 582-SPI003118, 582-SPI003680, 582-SPI003681, 582-SPI004090, 9090010764, VSz-2021/00091 .outgoingInvoices(invoiceService.getByHumanIds(new String[]{"2021/0001", "2021/0069"})) // 2021/0001, 2021/0069 - .treasuries(treasuryService.getRandom()) + //.treasuries(treasuryService.getRandom()) .build(); result.add(entity); @@ -151,14 +160,15 @@ public class ProjectServiceImpl extends DataServiceImpl implements Proj partner = partnerService.getById("017"); // 017 entity = Project.builder() .id(id) + .projectStatusId(projectStatusId) .active(true) .humanId(humanId) .name(name) .contactName(contactName) .partner(partner) - .incomingInvoices(invoiceService.getByHumanIds(new String[]{"EURSZLA0177/2022","19044","9171058452","9171058628","2022-SOV/000495","2022-SOV/000496","E-SYMPR-2022-105"})) // EURSZLA0177/2022, 19044, 9171058452, 9171058628, V-SZ3-2022/00001, 2022-SOV/000495, 2022-SOV/000496, E-SYMPR-2022-105 - .outgoingInvoices(invoiceService.getByHumanIds(new String[]{"E-USER-2023-12","E-USER-2023-13"})) // E-USER-2023-12, E-USER-2023-13 - .treasuries(treasuryService.getByHumanIds(new String[]{"001","002","003","004","005","006","007","008","009","010","011"})) + .incomingInvoices(invoiceService.getByHumanIds(new String[]{"EURSZLA0177/2022", "19044", "9171058452", "9171058628", "2022-SOV/000495", "2022-SOV/000496", "E-SYMPR-2022-105"})) // EURSZLA0177/2022, 19044, 9171058452, 9171058628, V-SZ3-2022/00001, 2022-SOV/000495, 2022-SOV/000496, E-SYMPR-2022-105 + .outgoingInvoices(invoiceService.getByHumanIds(new String[]{"E-USER-2023-12", "E-USER-2023-13"})) // E-USER-2023-12, E-USER-2023-13 + .treasuries(treasuryService.getByHumanIds(new String[]{"001", "002", "003", "004", "005", "006", "007", "008", "009", "010", "011"})) .build(); result.add(entity); @@ -169,6 +179,7 @@ public class ProjectServiceImpl extends DataServiceImpl implements Proj partner = partnerService.getById("015"); // 015 entity = Project.builder() .id(id) + .projectStatusId(projectStatusId) .active(true) .humanId(humanId) .name(name) @@ -176,7 +187,7 @@ public class ProjectServiceImpl extends DataServiceImpl implements Proj .partner(partner) .incomingInvoices(invoiceService.getByHumanIds(new String[]{"17356/23"})) // 17356/23 .outgoingInvoices(invoiceService.getByHumanIds(new String[]{"E-USER-2023-53"})) // E-USER-2023-53 - .treasuries(treasuryService.getRandom()) + //.treasuries(treasuryService.getRandom()) .build(); result.add(entity); @@ -187,6 +198,7 @@ public class ProjectServiceImpl extends DataServiceImpl implements Proj partner = partnerService.getById("016"); // 016 entity = Project.builder() .id(id) + .projectStatusId(projectStatusId) .active(true) .humanId(humanId) .name(name) @@ -194,7 +206,7 @@ public class ProjectServiceImpl extends DataServiceImpl implements Proj .partner(partner) .incomingInvoices(invoiceService.getByHumanIds(new String[]{"2023-SOV/000123"})) // 2023-SOV/000123 .outgoingInvoices(invoiceService.getByHumanIds(new String[]{"E-USER-2023-95"})) // E-USER-2023-95 - .treasuries(treasuryService.getByHumanIds(new String[]{"012","013"})) + .treasuries(treasuryService.getByHumanIds(new String[]{"012", "013"})) .build(); result.add(entity); diff --git a/lis-services/src/main/java/hu/user/lis/services/data/ProjectStatusServiceImpl.java b/lis-services/src/main/java/hu/user/lis/services/data/ProjectStatusServiceImpl.java index 8c96ade..2ee101c 100644 --- a/lis-services/src/main/java/hu/user/lis/services/data/ProjectStatusServiceImpl.java +++ b/lis-services/src/main/java/hu/user/lis/services/data/ProjectStatusServiceImpl.java @@ -33,7 +33,9 @@ public class ProjectStatusServiceImpl extends DataServiceImpl imp @Override public ProjectStatus createNew() { String id = RandomStringUtils.random(8, "0123456789abcdef"); - return ProjectStatus.builder().id(id).active(true).build(); + ProjectStatus result = ProjectStatus.builder().id(id).active(true).order(entities.size() + 1).build(); + entities.put(result.getId(), result); + return result; } @Override @@ -55,8 +57,8 @@ public class ProjectStatusServiceImpl extends DataServiceImpl imp ProjectStatus entity = ProjectStatus.builder() .active(true) .id(RandomStringUtils.random(8, "0123456789abcdef")) - .name("Új") - .order(entities.size()) + .name(name) + .order(entities.size() + 1) .build(); entities.put(entity.getId(), entity); } diff --git a/lis-services/src/main/java/hu/user/lis/services/data/ServiceRecordServiceImpl.java b/lis-services/src/main/java/hu/user/lis/services/data/ServiceRecordServiceImpl.java index 61f16e4..b278322 100644 --- a/lis-services/src/main/java/hu/user/lis/services/data/ServiceRecordServiceImpl.java +++ b/lis-services/src/main/java/hu/user/lis/services/data/ServiceRecordServiceImpl.java @@ -11,7 +11,6 @@ import org.springframework.stereotype.Service; import java.util.ArrayList; import java.util.Date; -import java.util.HashMap; import java.util.List; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; @@ -25,7 +24,6 @@ public class ServiceRecordServiceImpl extends DataServiceImpl imp ProjectService projectService; @Autowired AssociateService associateService; - private HashMap projectRecords = new HashMap<>(); private List entities; @Override @@ -71,7 +69,7 @@ public class ServiceRecordServiceImpl extends DataServiceImpl imp public void calculateCost(ServiceRecord entity) { double cost = 0; try { - cost = entity.getAssociate().getMonthlyCost() * entity.getWorkHours() / 21; + cost = (entity.getAssociate().getMonthlyCost() * entity.getWorkHours()) / (21 * 8); entity.setCost(cost); } catch (Exception e) { log.catching(e); @@ -106,7 +104,20 @@ public class ServiceRecordServiceImpl extends DataServiceImpl imp .build(); calculateCost(entity); result.add(entity); - projectRecords.put(p.getId(), entity); + + id = RandomStringUtils.random(8, "0123456789abcdef"); + entity = ServiceRecord.builder() + .associate(associate) + .project(p) + .workDay(workDay) + .workHours(workHours) + .description(description) + .id(id) + .build(); + calculateCost(entity); + result.add(entity); + + } }); diff --git a/lis-services/src/main/java/hu/user/lis/services/data/TreasuryServiceImpl.java b/lis-services/src/main/java/hu/user/lis/services/data/TreasuryServiceImpl.java index 221a6bc..70fc5c3 100644 --- a/lis-services/src/main/java/hu/user/lis/services/data/TreasuryServiceImpl.java +++ b/lis-services/src/main/java/hu/user/lis/services/data/TreasuryServiceImpl.java @@ -2,7 +2,6 @@ package hu.user.lis.services.data; import com.fasterxml.jackson.databind.ObjectMapper; import hu.user.lis.db.Currency; -import hu.user.lis.db.Invoice; import hu.user.lis.db.Treasury; import lombok.extern.log4j.Log4j2; import org.apache.commons.lang3.RandomStringUtils; @@ -84,25 +83,25 @@ public class TreasuryServiceImpl extends DataServiceImpl implements Tr List result = new ArrayList<>(); SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); - String id = RandomStringUtils.random(8, "0123456789abcdef"); - String humanId = "001"; - Date transactionDate = formatter.parse("2023-01-09"); - Date valueDate = formatter.parse("2023-01-09"); - Currency buyCurrency = Currency.EUR; - Currency sellCurrency = Currency.EUR; - double buyAmount = 12065.0; - double sellAmount = 0.0; - Treasury entity = Treasury.builder() - .id(id) - .humanId(humanId) - .buyCurrency(buyCurrency) - .sellCurrency(sellCurrency) - .transactionDate(transactionDate) - .valueDate(valueDate) - .buyAmount(buyAmount) - .sellAmount(sellAmount) - .build(); - result.add(entity); + String id = RandomStringUtils.random(8, "0123456789abcdef"); + String humanId = "001"; + Date transactionDate = formatter.parse("2023-01-09"); + Date valueDate = formatter.parse("2023-01-09"); + Currency buyCurrency = Currency.EUR; + Currency sellCurrency = Currency.EUR; + double buyAmount = 12065.0; + double sellAmount = 0.0; + Treasury entity = Treasury.builder() + .id(id) + .humanId(humanId) + .buyCurrency(buyCurrency) + .sellCurrency(sellCurrency) + .transactionDate(transactionDate) + .valueDate(valueDate) + .buyAmount(buyAmount) + .sellAmount(sellAmount) + .build(); + result.add(entity); id = RandomStringUtils.random(8, "0123456789abcdef"); humanId = "002"; @@ -355,7 +354,7 @@ public class TreasuryServiceImpl extends DataServiceImpl implements Tr for (int i = 0; i < count; i++) { int index = RandomUtils.nextInt(0, getAll().size()); result.add(getAll().get(index)); - getAll().remove(index); + //getAll().remove(index); } return result; } diff --git a/lis-ui/src/main/java/hu/user/lis/ui/Constants.java b/lis-ui/src/main/java/hu/user/lis/ui/Constants.java index 4294b18..0b44f1e 100644 --- a/lis-ui/src/main/java/hu/user/lis/ui/Constants.java +++ b/lis-ui/src/main/java/hu/user/lis/ui/Constants.java @@ -3,6 +3,8 @@ package hu.user.lis.ui; public class Constants { public static final String SHOW_PROJECT_EDITOR = "SHOW_PROJECT_EDITOR"; public static final String SHOW_PROJECTS_LIST = "SHOW_PROJECTS_LIST"; + public static final String SHOW_SERVICE_RECORDS_LIST = "SHOW_SERVICE_RECORDS_LIST"; + public static final String SET_SERVICE_RECORDS_LIST_DATA = "SET_SERVICE_RECORDS_LIST_DATA"; public static final String SET_PROJECT_EDITOR_DATA = "SET_PROJECT_EDITOR_DATA"; public static final String SET_PROJECTS_LIST_DATA = "SET_PROJECTS_LIST_DATA"; public static final String PROJECT_EDITOR_QUEUE = "PROJECT_EDITOR_QUEUE"; diff --git a/lis-ui/src/main/java/hu/user/lis/ui/converter/DoubleToStringConverter.java b/lis-ui/src/main/java/hu/user/lis/ui/converter/DoubleToStringConverter.java index 1656f13..dd5a98c 100644 --- a/lis-ui/src/main/java/hu/user/lis/ui/converter/DoubleToStringConverter.java +++ b/lis-ui/src/main/java/hu/user/lis/ui/converter/DoubleToStringConverter.java @@ -13,6 +13,7 @@ public class DoubleToStringConverter implements Converter { + @Autowired + ProjectStatusService projectStatusService; + + @Override + public Object coerceToUi(String id, Selectbox box, BindContext bindContext) { + if (StringUtils.isBlank(id)) { + return IGNORED_VALUE; + } + ProjectStatus projectStatus = projectStatusService.getById(id); + final ListModel model = box.getModel(); + ((Selectable) model).clearSelection(); + ((Selectable) model).addToSelection(projectStatus); + return IGNORED_VALUE; + } + + @Override + public String coerceToBean(Object order, Selectbox bandbox, BindContext bindContext) { + ProjectStatus projectStatus = projectStatusService.getAll().get((Integer) order); + return projectStatus.getId(); + } +} \ No newline at end of file diff --git a/lis-ui/src/main/java/hu/user/lis/ui/data/ProjectStatusDataModel.java b/lis-ui/src/main/java/hu/user/lis/ui/data/ProjectStatusDataModel.java index fdaa832..745337e 100644 --- a/lis-ui/src/main/java/hu/user/lis/ui/data/ProjectStatusDataModel.java +++ b/lis-ui/src/main/java/hu/user/lis/ui/data/ProjectStatusDataModel.java @@ -36,4 +36,29 @@ public class ProjectStatusDataModel extends CachedDataModel { BindUtils.postNotifyChange(null, null, this, "*"); } + public void moveUp(ProjectStatus entity) { + projectStatusService.getAll().stream().anyMatch(s -> { + if (s.getOrder() == entity.getOrder() + 1) { + s.setOrder(s.getOrder() - 1); + entity.setOrder(entity.getOrder() + 1); + return true; + } + return false; + }); + } + + public void moveDown(ProjectStatus entity) { + projectStatusService.getAll().stream().anyMatch(s -> { + if (s.getOrder() == entity.getOrder() - 1) { + s.setOrder(s.getOrder() + 1); + entity.setOrder(entity.getOrder() - 1); + return true; + } + return false; + }); + } + + public void append() { + projectStatusService.createNew(); + } } diff --git a/lis-ui/src/main/java/hu/user/lis/ui/data/ServiceRecordsDataModel.java b/lis-ui/src/main/java/hu/user/lis/ui/data/ServiceRecordsDataModel.java index 4063d5b..f5d4377 100644 --- a/lis-ui/src/main/java/hu/user/lis/ui/data/ServiceRecordsDataModel.java +++ b/lis-ui/src/main/java/hu/user/lis/ui/data/ServiceRecordsDataModel.java @@ -1,10 +1,11 @@ package hu.user.lis.ui.data; +import hu.user.lis.db.Associate; +import hu.user.lis.db.Project; import hu.user.lis.db.ServiceRecord; import hu.user.lis.services.data.ServiceRecordService; import lombok.Getter; import lombok.extern.log4j.Log4j2; -import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.config.ConfigurableBeanFactory; import org.springframework.context.annotation.Scope; @@ -14,8 +15,10 @@ import org.zkoss.bind.annotation.Init; import org.zkoss.zk.ui.util.Clients; import org.zkoss.zul.FieldComparator; -import java.util.Comparator; -import java.util.List; +import java.util.*; +import java.util.concurrent.ConcurrentHashMap; +import java.util.function.Function; +import java.util.function.Predicate; import java.util.stream.Collectors; @Component @@ -26,7 +29,14 @@ public class ServiceRecordsDataModel extends CachedDataModel { @Autowired ServiceRecordService serviceRecordService; private boolean listAll; - private String projectId; + private Project filterProject; + private Associate filterAssociate; + private boolean groupByAssociate; + + public static Predicate distinctByKey(Function keyExtractor) { + Map map = new ConcurrentHashMap<>(); + return t -> map.putIfAbsent(keyExtractor.apply(t), Boolean.TRUE) == null; + } @Init public void init() { @@ -35,7 +45,7 @@ public class ServiceRecordsDataModel extends CachedDataModel { } private boolean canExecuteSearch() { - boolean result = listAll || !StringUtils.isBlank(projectId); + boolean result = listAll || Objects.nonNull(filterProject) || Objects.nonNull(filterAssociate); log.info("Can execute search: {}", result); return result; } @@ -45,10 +55,16 @@ public class ServiceRecordsDataModel extends CachedDataModel { return true; } boolean result = true; - if (!entity.getProject().getId().equals(projectId)) { - result = false; + if (Objects.nonNull(filterProject)) { + if (!entity.getProject().getId().equals(filterProject.getId())) { + result = false; + } + } + if (Objects.nonNull(filterAssociate)) { + if (!entity.getAssociate().getId().equals(filterAssociate.getId())) { + result = false; + } } - return result; } @@ -56,21 +72,48 @@ public class ServiceRecordsDataModel extends CachedDataModel { protected List getResultSet(long offset, int limit, FieldComparator sortComparator) { List result = null; if (canExecuteSearch()) { - result = serviceRecordService.getAll().stream() - .filter(s -> filter(s)) - .sorted(Comparator.comparing(ServiceRecord::getWorkDay)) - .collect(Collectors.toList()); + if (groupByAssociate) { + result = getGroupedServiceRecords().values().stream().collect(Collectors.toList()); + } else { + result = serviceRecordService.getAll().stream() + .filter(s -> filter(s)) + .sorted(Comparator.comparing(ServiceRecord::getWorkDay)) + .collect(Collectors.toList()); + } } return result; } + Map getGroupedServiceRecords() { + Map grouped = new HashMap<>(); + + serviceRecordService.getAll().stream().filter(s -> filter(s)).forEach(s -> { + if (grouped.containsKey(s.getAssociate().getId())) { + ServiceRecord serviceRecord = grouped.get(s.getAssociate().getId()); + serviceRecord.setCost(serviceRecord.getCost() + s.getCost()); + serviceRecord.setWorkHours(serviceRecord.getWorkHours() + s.getWorkHours()); + } else { + ServiceRecord serviceRecord = serviceRecordService.copy(s); + serviceRecord.setWorkDay(null); + grouped.put(serviceRecord.getAssociate().getId(), serviceRecord); + } + }); + return grouped; + } + @Override public int getResultSetCount() { int result = 0; if (canExecuteSearch()) { - result = (int) serviceRecordService.getAll().stream() - .filter(s -> filter(s)) - .count(); + + if (groupByAssociate) { + Map grouped = getGroupedServiceRecords(); + result = grouped.size(); + } else { + result = (int) serviceRecordService.getAll().stream() + .filter(s -> filter(s)) + .count(); + } } return result; } @@ -82,9 +125,19 @@ public class ServiceRecordsDataModel extends CachedDataModel { BindUtils.postNotifyChange(null, null, this, "*"); } - public void search(String projectId) { - log.info("Searching project using filter {}", projectId); - this.projectId = projectId; + public void search(Project project, boolean groupByAssociate) { + log.info("Searching project using filter {} grouping {}", project, groupByAssociate); + this.groupByAssociate = groupByAssociate; + this.filterProject = project; + listAll = false; + super.reset(); + BindUtils.postNotifyChange(null, null, this, "*"); + } + + public void search(Project project, Associate associate) { + log.info("Searching project using filter {} {}", project, associate); + this.filterAssociate = associate; + this.filterProject = project; listAll = false; super.reset(); BindUtils.postNotifyChange(null, null, this, "*"); diff --git a/lis-ui/src/main/java/hu/user/lis/ui/editor/ProjectEditorModel.java b/lis-ui/src/main/java/hu/user/lis/ui/editor/ProjectEditorModel.java index df6b8f1..e89a529 100644 --- a/lis-ui/src/main/java/hu/user/lis/ui/editor/ProjectEditorModel.java +++ b/lis-ui/src/main/java/hu/user/lis/ui/editor/ProjectEditorModel.java @@ -8,8 +8,10 @@ import hu.user.lis.db.Project; import hu.user.lis.db.Treasury; import hu.user.lis.services.data.*; import hu.user.lis.ui.Constants; +import hu.user.lis.ui.converter.ProjectStatusConverter; import hu.user.lis.ui.data.AssociatesDataModel; import hu.user.lis.ui.data.PartnerSelectorDataModel; +import hu.user.lis.ui.data.ProjectStatusDataModel; import hu.user.lis.ui.data.ServiceRecordsDataModel; import hu.user.lis.ui.event.EventBus; import lombok.Getter; @@ -57,24 +59,26 @@ public class ProjectEditorModel extends AbstractValidator implements EventListen private InvoiceService invoiceServiceImpl; @WireVariable private ProjectService projectServiceImpl; - @WireVariable private TreasuryService treasuryServiceImpl; - @WireVariable private ServiceRecordsDataModel serviceRecordsDataModel; @WireVariable + private ProjectStatusDataModel projectStatusDataModel; + @WireVariable + private ProjectStatusConverter projectStatusConverter; + @WireVariable private EventBus eventBus; private boolean formInvalid = true; private Invoice selectedIncomingInvoice; private Invoice selectedOutgoingInvoice; - private Treasury selectedTreasury; private String partialAssociateName; @Init public void init() { eventBus.register(this); + projectStatusDataModel.listAll(); log.info("Initialized"); } @@ -344,16 +348,15 @@ public class ProjectEditorModel extends AbstractValidator implements EventListen Map data = (Map) evt.getData(); origDocument = (Project) data.get("origDocument"); formDocument = (Project) data.get("formDocument"); - BindUtils.postNotifyChange(this, "formDocument"); + serviceRecordsDataModel.search(formDocument, true); associatesDataModel.listAll(); - - serviceRecordsDataModel.search(formDocument.getId()); + BindUtils.postNotifyChange(this, "formDocument"); } } @Destroy public void onDestroy() { - log.info("Destroy {}"); + log.info("Destroy {}", getClass().getSimpleName()); eventBus.unregister(this); } @@ -370,6 +373,12 @@ public class ProjectEditorModel extends AbstractValidator implements EventListen parentPanel.invalidate(); } + @Command + public void showServiceRecords(@BindingParam("associate") Associate associate) { + log.info("showServiceRecords"); + eventBus.showServiceRecordsList(ImmutableMap.of("filterAssociate", associate, "filterProject", formDocument)); + } + @Command @NotifyChange("formAssociates") public void onAfterRenderAssociates() { diff --git a/lis-ui/src/main/java/hu/user/lis/ui/event/EventBus.java b/lis-ui/src/main/java/hu/user/lis/ui/event/EventBus.java index 52b22d2..f09e704 100644 --- a/lis-ui/src/main/java/hu/user/lis/ui/event/EventBus.java +++ b/lis-ui/src/main/java/hu/user/lis/ui/event/EventBus.java @@ -31,6 +31,14 @@ public class EventBus { queue.publish(new Event(Constants.SHOW_PROJECT_EDITOR, null, data)); } + public void showServiceRecordsList(Object data) { + queue.publish(new Event(Constants.SHOW_SERVICE_RECORDS_LIST, null, data)); + } + + public void setServiceRecordsListData(Object data) { + queue.publish(new Event(Constants.SET_SERVICE_RECORDS_LIST_DATA, null, data)); + } + public void setProjectEditorData(Object data) { queue.publish(new Event(Constants.SET_PROJECT_EDITOR_DATA, null, data)); } diff --git a/lis-ui/src/main/java/hu/user/lis/ui/view/AssociatesViewModel.java b/lis-ui/src/main/java/hu/user/lis/ui/view/AssociatesViewModel.java index a8abd65..9156531 100644 --- a/lis-ui/src/main/java/hu/user/lis/ui/view/AssociatesViewModel.java +++ b/lis-ui/src/main/java/hu/user/lis/ui/view/AssociatesViewModel.java @@ -1,6 +1,5 @@ package hu.user.lis.ui.view; -import com.fasterxml.jackson.core.JsonProcessingException; import hu.user.lis.db.Associate; import hu.user.lis.ui.data.AssociatesDataModel; import lombok.Getter; @@ -15,10 +14,7 @@ import org.zkoss.zk.ui.util.Clients; import org.zkoss.zkplus.spring.DelegatingVariableResolver; import org.zkoss.zul.Window; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; -import java.util.Set; +import java.util.*; @Log4j2 @VariableResolver(DelegatingVariableResolver.class) @@ -95,7 +91,10 @@ public class AssociatesViewModel { } @Command - public void onEdit() throws JsonProcessingException { + public void onEdit() { + if (Objects.isNull(selectedEntity)) { + return; + } String page = "~./associate-editor.zul"; Associate editEntity = associatesDataModel.getAssociateService().copy(selectedEntity); Map arg = new HashMap<>(); diff --git a/lis-ui/src/main/java/hu/user/lis/ui/view/IndexViewModel.java b/lis-ui/src/main/java/hu/user/lis/ui/view/IndexViewModel.java index 96c02c7..912df2b 100644 --- a/lis-ui/src/main/java/hu/user/lis/ui/view/IndexViewModel.java +++ b/lis-ui/src/main/java/hu/user/lis/ui/view/IndexViewModel.java @@ -72,6 +72,10 @@ public class IndexViewModel implements EventListener { @Override public void onEvent(Event event) { + if (Constants.SHOW_SERVICE_RECORDS_LIST.equals(event.getName())) { + selectPage(SERVICE_RECORDS_LIST); + eventBus.setServiceRecordsListData(event.getData()); + } if (Constants.SHOW_PROJECT_EDITOR.equals(event.getName())) { selectPage(PROJECT_EDITOR); eventBus.setProjectEditorData(event.getData()); diff --git a/lis-ui/src/main/java/hu/user/lis/ui/view/PartnersViewModel.java b/lis-ui/src/main/java/hu/user/lis/ui/view/PartnersViewModel.java index f96ced4..35864f3 100644 --- a/lis-ui/src/main/java/hu/user/lis/ui/view/PartnersViewModel.java +++ b/lis-ui/src/main/java/hu/user/lis/ui/view/PartnersViewModel.java @@ -1,6 +1,5 @@ package hu.user.lis.ui.view; -import com.fasterxml.jackson.core.JsonProcessingException; import hu.user.lis.db.Partner; import hu.user.lis.ui.data.PartnersDataModel; import lombok.Getter; @@ -17,10 +16,7 @@ import org.zkoss.zkplus.spring.DelegatingVariableResolver; import org.zkoss.zul.Listbox; import org.zkoss.zul.Window; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; -import java.util.Set; +import java.util.*; @Log4j2 @VariableResolver(DelegatingVariableResolver.class) @@ -108,7 +104,10 @@ public class PartnersViewModel extends AsyncBaseModel { } @Command - public void onEdit() throws JsonProcessingException { + public void onEdit() { + if (Objects.isNull(selectedPartner)) { + return; + } String page = "~./partner-editor.zul"; Partner editEntity = partnersDataModel.getPartnerService().copy(selectedPartner); Map arg = new HashMap<>(); diff --git a/lis-ui/src/main/java/hu/user/lis/ui/view/ProjectsViewModel.java b/lis-ui/src/main/java/hu/user/lis/ui/view/ProjectsViewModel.java index ca3a449..3a1afb3 100644 --- a/lis-ui/src/main/java/hu/user/lis/ui/view/ProjectsViewModel.java +++ b/lis-ui/src/main/java/hu/user/lis/ui/view/ProjectsViewModel.java @@ -2,6 +2,8 @@ package hu.user.lis.ui.view; import com.google.common.collect.ImmutableMap; import hu.user.lis.db.Project; +import hu.user.lis.db.ProjectStatus; +import hu.user.lis.services.data.ProjectStatusService; import hu.user.lis.ui.Constants; import hu.user.lis.ui.data.ProjectsDataModel; import hu.user.lis.ui.event.EventBus; @@ -18,6 +20,7 @@ import org.zkoss.zk.ui.util.Clients; import org.zkoss.zkplus.spring.DelegatingVariableResolver; import java.util.Map; +import java.util.Objects; import java.util.Set; @@ -29,6 +32,8 @@ public class ProjectsViewModel extends AsyncBaseModel implements EventListener { ProjectsDataModel projectsDataModel; @WireVariable EventBus eventBus; + @WireVariable + private ProjectStatusService projectStatusServiceImpl; @Getter private Project selectedProject; private boolean filterShowInActive; @@ -49,6 +54,10 @@ public class ProjectsViewModel extends AsyncBaseModel implements EventListener { log.info("Initialized"); } + public ProjectStatus getProjectStatus(String id) { + return projectStatusServiceImpl.getById(id); + } + private void refresh() { projectsDataModel.clearSelection(); selectedProject = null; @@ -83,6 +92,9 @@ public class ProjectsViewModel extends AsyncBaseModel implements EventListener { @Command public void onEdit() { + if (Objects.isNull(selectedProject)) { + return; + } Project editEntity = projectsDataModel.getProjectService().copy(selectedProject); eventBus.showProjectEditor(ImmutableMap.of("origDocument", selectedProject, "formDocument", editEntity)); } diff --git a/lis-ui/src/main/java/hu/user/lis/ui/view/ServiceRecordsViewModel.java b/lis-ui/src/main/java/hu/user/lis/ui/view/ServiceRecordsViewModel.java index ac36317..06cefa5 100644 --- a/lis-ui/src/main/java/hu/user/lis/ui/view/ServiceRecordsViewModel.java +++ b/lis-ui/src/main/java/hu/user/lis/ui/view/ServiceRecordsViewModel.java @@ -1,15 +1,24 @@ package hu.user.lis.ui.view; import com.google.common.collect.ImmutableMap; +import hu.user.lis.db.Associate; +import hu.user.lis.db.Project; import hu.user.lis.db.ServiceRecord; +import hu.user.lis.ui.Constants; +import hu.user.lis.ui.data.AssociateSelectorDataModel; +import hu.user.lis.ui.data.ProjectSelectorDataModel; import hu.user.lis.ui.data.ServiceRecordsDataModel; import hu.user.lis.ui.event.EventBus; import lombok.Getter; import lombok.extern.log4j.Log4j2; +import org.zkoss.bind.BindContext; +import org.zkoss.bind.BindUtils; import org.zkoss.bind.annotation.*; -import org.zkoss.zk.ui.Component; import org.zkoss.zk.ui.Executions; -import org.zkoss.zk.ui.select.Selectors; +import org.zkoss.zk.ui.event.Event; +import org.zkoss.zk.ui.event.EventListener; +import org.zkoss.zk.ui.event.InputEvent; +import org.zkoss.zk.ui.event.OpenEvent; import org.zkoss.zk.ui.select.annotation.VariableResolver; import org.zkoss.zk.ui.select.annotation.WireVariable; import org.zkoss.zk.ui.util.Clients; @@ -18,33 +27,67 @@ import org.zkoss.zul.Window; import java.util.Collections; import java.util.Map; +import java.util.Objects; import java.util.Set; @Log4j2 @VariableResolver(DelegatingVariableResolver.class) -public class ServiceRecordsViewModel { +public class ServiceRecordsViewModel implements EventListener { @WireVariable @Getter ServiceRecordsDataModel serviceRecordsDataModel; @WireVariable - EventBus eventBus; + @Getter + private AssociateSelectorDataModel associateSelectorDataModel; + @WireVariable + @Getter + private ProjectSelectorDataModel projectSelectorDataModel; @Getter private ServiceRecord selectedEntity; - - @AfterCompose - public void onAfterCompose(@ContextParam(ContextType.VIEW) Component view) { - Selectors.wireComponents(view, this, false); - Selectors.wireEventListeners(view, this); - } + @Getter + private Project filterProject; + @Getter + private Associate filterAssociate; + @WireVariable + private EventBus eventBus; @Init public void init() { Clients.evalJavaScript("pushNav('/service-records')"); + eventBus.register(this); refresh(); log.info("Initialized"); } + @Command + public void onProjectFilterBandChanging(@ContextParam(ContextType.BIND_CONTEXT) BindContext ctx) { + InputEvent event = (InputEvent) ctx.getTriggerEvent(); + log.info("onProjectFilterBandChanging: {}", event.getValue()); + projectSelectorDataModel.search(event.getValue()); + } + + @Command + public void onProjectFilterBandOpen(@ContextParam(ContextType.BIND_CONTEXT) BindContext ctx) { + OpenEvent event = (OpenEvent) ctx.getTriggerEvent(); + log.info("onProjectFilterBandOpen: {}", event.isOpen()); + projectSelectorDataModel.search(null); + } + + @Command + public void onAssociateFilterBandChanging(@ContextParam(ContextType.BIND_CONTEXT) BindContext ctx) { + InputEvent event = (InputEvent) ctx.getTriggerEvent(); + log.info("onAssociateFilterBandChanging: {}", event.getValue()); + associateSelectorDataModel.search(event.getValue()); + } + + @Command + public void onAssociateFilterBandOpen(@ContextParam(ContextType.BIND_CONTEXT) BindContext ctx) { + OpenEvent event = (OpenEvent) ctx.getTriggerEvent(); + log.info("onAssociateFilterBandOpen: {}", event.isOpen()); + associateSelectorDataModel.search(null); + } + private void refresh() { serviceRecordsDataModel.clearSelection(); selectedEntity = null; @@ -88,6 +131,9 @@ public class ServiceRecordsViewModel { @Command public void onEdit() { + if (Objects.isNull(selectedEntity)) { + return; + } String page = "~./service-record-editor.zul"; ServiceRecord editEntity = serviceRecordsDataModel.getServiceRecordService().copy(selectedEntity); Map arg = ImmutableMap.of("origDocument", selectedEntity, "formDocument", editEntity); @@ -106,5 +152,38 @@ public class ServiceRecordsViewModel { editorWindow.doModal(); } + public void setFilterProject(Project filterProject) { + this.filterProject = filterProject; + serviceRecordsDataModel.search(filterProject, filterAssociate); + } + + public void setFilterAssociate(Associate filterAssociate) { + this.filterAssociate = filterAssociate; + serviceRecordsDataModel.search(filterProject, filterAssociate); + } + + @Command + @NotifyChange({"filterProject", "filterAssociate"}) + public void onClearFilters() { + filterAssociate = null; + filterProject = null; + serviceRecordsDataModel.listAll(); + } + + @Override + public void onEvent(Event evt) throws Exception { + if (Constants.SET_SERVICE_RECORDS_LIST_DATA.equals(evt.getName())) { + Map data = (Map) evt.getData(); + filterAssociate = (Associate) data.get("filterAssociate"); + filterProject = (Project) data.get("filterProject"); + serviceRecordsDataModel.search(filterProject, filterAssociate); + BindUtils.postNotifyChange(this, "filterProject", "filterAssociate"); + } + } + @Destroy + public void onDestroy() { + log.info("Destroy {}", getClass().getSimpleName()); + eventBus.unregister(this); + } } diff --git a/lis-ui/src/main/java/hu/user/lis/ui/view/SettingsViewModel.java b/lis-ui/src/main/java/hu/user/lis/ui/view/SettingsViewModel.java index 3c6472b..f29e80f 100644 --- a/lis-ui/src/main/java/hu/user/lis/ui/view/SettingsViewModel.java +++ b/lis-ui/src/main/java/hu/user/lis/ui/view/SettingsViewModel.java @@ -1,168 +1,63 @@ package hu.user.lis.ui.view; import com.fasterxml.jackson.core.JsonProcessingException; -import hu.user.lis.db.Partner; -import hu.user.lis.ui.data.PartnersDataModel; +import hu.user.lis.db.ProjectStatus; +import hu.user.lis.ui.data.ProjectStatusDataModel; import lombok.Getter; +import lombok.Setter; import lombok.extern.log4j.Log4j2; -import org.zkoss.bind.annotation.*; -import org.zkoss.zk.ui.Component; -import org.zkoss.zk.ui.Executions; -import org.zkoss.zk.ui.select.Selectors; +import org.zkoss.bind.annotation.Command; +import org.zkoss.bind.annotation.Init; import org.zkoss.zk.ui.select.annotation.VariableResolver; -import org.zkoss.zk.ui.select.annotation.Wire; import org.zkoss.zk.ui.select.annotation.WireVariable; import org.zkoss.zk.ui.util.Clients; import org.zkoss.zkplus.spring.DelegatingVariableResolver; -import org.zkoss.zul.Listbox; -import org.zkoss.zul.Window; - -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; -import java.util.Set; @Log4j2 @VariableResolver(DelegatingVariableResolver.class) public class SettingsViewModel extends AsyncBaseModel { @WireVariable @Getter - PartnersDataModel partnersDataModel; - @Wire - Listbox partnersList; + ProjectStatusDataModel projectStatusDataModel; @Getter - private Partner selectedPartner; - private boolean filterShowInActive; - private boolean filterShowActive; - private boolean filterShowBoth; - - @AfterCompose - public void onAfterCompose(@ContextParam(ContextType.VIEW) Component view) { - Selectors.wireComponents(view, this, false); - Selectors.wireEventListeners(view, this); - } + @Setter + private ProjectStatus selectedProjectStatus; @Init public void init() { - setFilterShowActive(true); Clients.evalJavaScript("pushNav('/settings')"); + projectStatusDataModel.listAll(); log.info("Initialized"); } - private void refresh() { - partnersDataModel.clearSelection(); - selectedPartner = null; - if (filterShowBoth) { - partnersDataModel.search(true, true); - } else { - partnersDataModel.search(filterShowActive, filterShowInActive); - } - } +// @Command +// @NotifyChange("selectedProjectStatus") +// public void onListSelection() { +// selectedProjectStatus = null; +// Set selections = projectStatusDataModel.getSelection(); +// if (selections.size() == 1) { +// selectedProjectStatus = selections.iterator().next(); +// log.info("Selected {}", selectedProjectStatus); +// } +// } @Command - @NotifyChange("selectedPartner") - public void search() { + public void onMoveUp() { + projectStatusDataModel.moveUp(selectedProjectStatus); + projectStatusDataModel.listAll(); } @Command - @NotifyChange("selectedPartner") - public void onListSelection() { - selectedPartner = null; - Set selections = partnersDataModel.getSelection(); - if (selections.size() == 1) { - selectedPartner = selections.iterator().next(); - log.info("Selected {}", selectedPartner); - } - } - - @Command - public void onAfterRenderPartners() { - } - - @Command - public void onAdd() { - String page = "~./partner-editor.zul"; - Partner newEntity = partnersDataModel.getPartnerService().createNew(); - Window editorWindow = (Window) Executions.createComponents(page, null, - Collections.singletonMap("formDocument", newEntity)); - editorWindow.addEventListener("onClose", e -> { - if (e.getData() != null) { - log.info("Partner popup result {}", e.getData()); - partnersDataModel.getPartnerService().add(newEntity); - partnersDataModel.clearSelection(); - refresh(); - partnersDataModel.addToSelection(newEntity); - selectedPartner = newEntity; - -// Optional listItem = partnersList.getItems().stream() -// .filter(li -> ((Partner) li.getValue()).getId().equals(newEntity.getId())) -// .findFirst(); -// if (listItem.isPresent()) { -// Clients.scrollIntoView(listItem.get()); -// } -// registerTask(() -> { -// }); - } - }); - editorWindow.doModal(); + public void onMoveDown() { + projectStatusDataModel.moveDown(selectedProjectStatus); + projectStatusDataModel.listAll(); } @Command - public void onEdit() throws JsonProcessingException { - String page = "~./partner-editor.zul"; - Partner editEntity = partnersDataModel.getPartnerService().copy(selectedPartner); - Map arg = new HashMap<>(); - arg.put("origDocument", selectedPartner); - arg.put("formDocument", editEntity); - Window editorWindow = (Window) Executions.createComponents(page, null, arg); - editorWindow.addEventListener("onClose", e -> { - if (e.getData() != null) { - log.info("Partner popup result {}", e.getData()); - Partner modifiedEntity = (Partner) e.getData(); - partnersDataModel.clearSelection(); - partnersDataModel.getPartnerService().replace(selectedPartner, modifiedEntity); - refresh(); - partnersDataModel.addToSelection(modifiedEntity); - selectedPartner = modifiedEntity; - } - }); - editorWindow.doModal(); + public void onAppend() throws JsonProcessingException { + projectStatusDataModel.append(); + projectStatusDataModel.listAll(); } - public boolean isFilterShowInActive() { - return filterShowInActive; - } - - @NotifyChange({"filterShowActive", "filterShowInActive", "filterShowBoth"}) - public void setFilterShowInActive(boolean filterShowInActive) { - this.filterShowBoth = false; - this.filterShowActive = false; - this.filterShowInActive = filterShowInActive; - refresh(); - } - - public boolean isFilterShowActive() { - return filterShowActive; - } - - @NotifyChange({"filterShowActive", "filterShowInActive", "filterShowBoth"}) - public void setFilterShowActive(boolean filterShowActive) { - this.filterShowBoth = false; - this.filterShowInActive = false; - this.filterShowActive = filterShowActive; - refresh(); - } - - public boolean isFilterShowBoth() { - return this.filterShowBoth; - } - - @NotifyChange({"filterShowActive", "filterShowInActive", "filterShowBoth"}) - public void setFilterShowBoth(boolean filterShowBoth) { - this.filterShowActive = false; - this.filterShowInActive = false; - this.filterShowBoth = filterShowBoth; - refresh(); - } } diff --git a/lis-ui/src/main/resources/web/associate-filter.zul b/lis-ui/src/main/resources/web/associate-filter.zul new file mode 100644 index 0000000..4e9fea4 --- /dev/null +++ b/lis-ui/src/main/resources/web/associate-filter.zul @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lis-ui/src/main/resources/web/index.zul b/lis-ui/src/main/resources/web/index.zul index afa7f49..a9935a8 100644 --- a/lis-ui/src/main/resources/web/index.zul +++ b/lis-ui/src/main/resources/web/index.zul @@ -10,6 +10,10 @@ -moz-user-select: none; -webkit-user-select: none; } + .z-toolbarbutton-content { + -moz-user-select: none; + -webkit-user-select: none; + }