enabled: always
datasource:
type: com.zaxxer.hikari.HikariDataSource
- url: jdbc:db2://localhost:50000/slycrm
+ # url: jdbc:db2://localhost:50000/slycrm
+ # username: db2admin
+ # password: password
+ url: jdbc:db2://db2.in.useribm.hu:50000/slycrm
username: db2admin
- password: password
+ password: Passw@rd01
camunda.bpm:
generic-properties.properties:
telemetry-reporter-activate: false
ui:
user-name: user
password: password
+ disable-profile-save: true
workflow:
import-invoice:
input-path: /temp/invoice-import
import hu.user.lis.db.Profile;
import hu.user.lis.service.data.EntityDataService;
import hu.user.lis.ui.auth.CurrentProfile;
+import hu.user.lis.ui.properties.ApplicationUIProperties;
import hu.user.lis.ui.view.renderer.ReorderedItemsRenderer;
import lombok.Getter;
import lombok.extern.log4j.Log4j2;
@Autowired
private ReorderedItemsRenderer renderer;
+ @Autowired
+ private ApplicationUIProperties applicationUIProperties;
+
public void addColumns(List<ColDef> columns) {
Profile profile = currentProfile.getSetting(getClass().getSimpleName());
ColDef[] savedColumns = getValidSavedColumns(profile, columns);
}
private void saveProfileSetting() {
- Profile columnProfile = Profile.builder()
- .login(currentProfile.getAssociate().getLogin())
- .type(getClass().getSimpleName())
- .setting(entityDataService.toJSON(renderer.getColumnSettings()))
- .build();
- currentProfile.persistSetting(columnProfile);
+ if (!applicationUIProperties.isDisableProfileSave()) {
+ Profile columnProfile = Profile.builder()
+ .login(currentProfile.getAssociate().getLogin())
+ .type(getClass().getSimpleName())
+ .setting(entityDataService.toJSON(renderer.getColumnSettings()))
+ .build();
+ currentProfile.persistSetting(columnProfile);
+ }
}
private void setSortDirection(ColDef colDef) {
@Component
@ConfigurationProperties(prefix = "application.ui")
public class ApplicationUIProperties {
- String userName;
- String password;
+
+ private String userName;
+
+ private String password;
+
+ private boolean disableProfileSave;
+
}
package hu.user.lis.ui.view;
-import com.google.common.collect.ImmutableMap;
import hu.user.lis.db.Associate;
import hu.user.lis.ui.Constants;
import hu.user.lis.ui.data.AssociatesDataModel;
import org.zkoss.zk.ui.select.annotation.WireVariable;
import org.zkoss.zul.Messagebox;
-import static hu.user.lis.ui.data.common.CachedDataModel.ASCENDING;
-import static hu.user.lis.ui.data.common.CachedDataModel.NATURAL;
+import java.util.Arrays;
@Log4j2
public class AssociatesViewModel extends FilterActiveViewModel<Associate> {
@Override
public void init() {
super.init();
- addColumns(ImmutableMap.of(
- "name", ASCENDING,
- "login", NATURAL,
- "active", NATURAL
+ addColumns(Arrays.asList(
+ "name,Név,ascending,left,true",
+ "login,Login,natural,left,true",
+ "active,Aktív,natural,left,true"
));
}
package hu.user.lis.ui.view;
-import com.google.common.collect.ImmutableMap;
import hu.user.lis.db.*;
import hu.user.lis.db.repository.InvoiceImportRepository;
import hu.user.lis.db.repository.InvoiceRepository;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.select.annotation.WireVariable;
+import java.util.Arrays;
import java.util.Objects;
import java.util.Optional;
-import static hu.user.lis.ui.data.common.CachedDataModel.ASCENDING;
-import static hu.user.lis.ui.data.common.CachedDataModel.NATURAL;
-
@Log4j2
public class ImportInvoicesSuspendedViewModel extends EntityViewModel<Invoice> implements EventListener<Event> {
@Getter
eventBus.register(this);
eventBus.registerForBinding(this);
- addColumns(ImmutableMap.of(
- "partner.humanId", NATURAL,
- "partner.name", NATURAL,
- "partner.vatNr", NATURAL,
- "project.name", NATURAL,
- "paymentDeadline", ASCENDING,
- "grossAmount", NATURAL,
- "currency", NATURAL,
- "incoming", NATURAL
+ addColumns(Arrays.asList(
+ "partner.humanId,Sorszám,natural,left,true",
+ "partner.name,Partner név,natural,left,true",
+ "partner.vatNr,Partner adószám,left,true",
+ "project.name,Projekt név,natural,left,true",
+ "paymentDeadline,Fizetési határidő,ascending,left,true",
+ "grossAmount,Bruttó összeg,natural,left,true",
+ "currency,Pénznem,natural,left,true",
+ "incoming,Költség/Bevétel,natural,left,true"
));
+
refresh();
}
package hu.user.lis.ui.view;
-import com.google.common.collect.ImmutableMap;
import hu.user.lis.db.Project;
import hu.user.lis.ui.Constants;
import hu.user.lis.ui.data.ProjectsDataModel;
import org.zkoss.zk.ui.util.Notification;
import org.zkoss.zul.Messagebox;
+import java.util.Arrays;
import java.util.Map;
import java.util.Objects;
-import static hu.user.lis.ui.data.common.CachedDataModel.ASCENDING;
-import static hu.user.lis.ui.data.common.CachedDataModel.NATURAL;
-
@Log4j2
public class ProjectsViewModel extends FilterActiveViewModel<Project> implements EventListener {
public void init() {
super.init();
eventBus.register(this);
- addColumns(ImmutableMap.of(
- "humanId", ASCENDING,
- "partner.name", NATURAL,
- "projectStatus.name", NATURAL,
- "name", NATURAL,
- "contactName", NATURAL,
- "active", NATURAL
+ addColumns(Arrays.asList(
+ "humanId,Azonosító,ascending,left,true",
+ "partner.name,Ügyfél,natural,left,true",
+ "projectStatus.name,Státusz,natural,left,true",
+ "name,Megnevezés,natural,left,true",
+ "contactName,Kapcsolattartó,natural,left,true",
+ "active,Aktív,natural,left,true"
));
}
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 org.zkoss.zk.ui.select.annotation.WireVariable;
import org.zkoss.zkplus.spring.DelegatingVariableResolver;
+import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Objects;
-import static hu.user.lis.ui.data.common.CachedDataModel.ASCENDING;
-import static hu.user.lis.ui.data.common.CachedDataModel.NATURAL;
-
@Log4j2
@VariableResolver(DelegatingVariableResolver.class)
super.init();
eventBus.register(this);
eventBus.registerForBinding(this);
- addColumns(ImmutableMap.of(
- "project.humanId", ASCENDING,
- "project.name", NATURAL,
- "project.partner.name", NATURAL,
- "associate.name", NATURAL,
- "workDay", NATURAL,
- "description", NATURAL,
- "workHours", NATURAL
+ addColumns(Arrays.asList(
+ "project.humanId,Projekt azonosító,ascending,left,true",
+ "project.name,Projekt név,natural,left,true",
+ "project.partner.name,Partner név,natural,left,true",
+ "associate.name,Munkatárs,natural,left,true",
+ "workDay,Munkanap,natural,left,true",
+ "description,Leírás,natural,left,true",
+ "workHours,Óraszám,natural,left,true"
));
}
checked="@bind(vm.filterShowBoth)"/>
</toolbar>
</north>
- <center border="none" flex="true">
- <listbox vflex="true" model="@load(vm.associatesDataModel)"
- autopaging="true" mold="paging" pagingPosition="top" multiple="false"
- onSelect="@command('onListSelection')">
- <listhead sizable="true">
- <listheader label="Név" sort="auto(name)" align="left"
- sortDirection="@load(vm.cols['name'].sortDirection)"/>
- <listheader label="Login" sort="auto(login)" align="left"
- sortDirection="@load(vm.cols['login'].sortDirection)"/>
- <listheader label="Aktív" sort="auto(active)" align="left"
- sortDirection="@load(vm.cols['active'].sortDirection)"/>
-
- </listhead>
- <template name="model">
- <listitem onDoubleClick="@command('onEdit')">
- <listcell label="@load(each.name)"/>
- <listcell label="@load(each.login)"/>
- <listcell>
- <a iconSclass="z-icon-check" visible="@load(each.active)"/>
- <a iconSclass="z-icon-ban" visible="@load(!each.active)"/>
- </listcell>
- </listitem>
- </template>
- </listbox>
+ <center border="none">
+ <vlayout vflex="true">
+ <menupopup id="editPopup"
+ children="@bind(vm.associatesDataModel.renderer.columnSettings) @template('menu-item')">
+ <template name="menu-item" var="node">
+ <menuitem label="@load(node.label)" checked="@load(node.visible)"
+ onClick="@command('onHeaderMenuClicked', node=node)"/>
+ </template>
+ </menupopup>
+ <listbox vflex="true" model="@load(vm.associatesDataModel)" multiple="false"
+ itemRenderer="@load(vm.associatesDataModel.renderer)"
+ onSelect="@command('onListSelection')">
+ <listhead sizable="true" menupopup="editPopup"
+ onColSize="@command('onHeaderSizeChanged', node=node)"
+ children="@bind(vm.associatesDataModel.renderer.columnSettings) @template('head-item')">
+ <template name="head-item" var="node">
+ <listheader label="@load(node.label)" sort="@load(node.sort)" align="@load(node.align)"
+ visible="@load(node.visible)" width="@load(node.width)" draggable="head"
+ droppable="head" sortDirection="@load(node.sortDirection)"
+ onDrop="@command('onHeaderReorder')"/>
+ </template>
+ </listhead>
+ <template name="model">
+ <listitem onDoubleClick="@command('onEdit')">
+ <listcell label="@load(each.name)"/>
+ <listcell label="@load(each.login)"/>
+ <listcell>
+ <a iconSclass="z-icon-check" visible="@load(each.active)"/>
+ <a iconSclass="z-icon-ban" visible="@load(!each.active)"/>
+ </listcell>
+ </listitem>
+ </template>
+ </listbox>
+ </vlayout>
</center>
</borderlayout>
</toolbar>
</vlayout>
</north>
- <center border="none" hflex="true" vflex="true">
- <listbox id="invoicesList" vflex="true" model="@load(vm.invoicesDataModel)"
- autopaging="true" mold="paging" pagingPosition="top" multiple="false"
- onSelect="@command('onListSelection')">
- <listhead sizable="true">
- <listheader label="Sorszám" sort="auto(partner.humanId)" align="left"
- sortDirection="@load(vm.cols['partner.name'].sortDirection)"/>
- <listheader label="Partner név" sort="auto(partner.name)" align="left"
- sortDirection="@load(vm.cols['partner.name'].sortDirection)"/>
- <listheader label="Partner adószám" sort="auto(partner.vatNr)" align="left"
- sortDirection="@load(vm.cols['partner.vatNr'].sortDirection)"/>
- <listheader label="Projekt név" sort="auto(project.name)" align="left"
- sortDirection="@load(vm.cols['project.name'].sortDirection)"/>
- <listheader label="Fizetési határidő" sort="auto(paymentDeadline)" align="left"
- sortDirection="@load(vm.cols['paymentDeadline'].sortDirection)"/>
- <listheader label="Bruttó összeg" sort="auto(grossAmount)" align="right"
- style="text-align: center"
- sortDirection="@load(vm.cols['grossAmount'].sortDirection)"/>
- <listheader label="Pénznem" sort="auto(currency)" align="left"
- sortDirection="@load(vm.cols['currency'].sortDirection)"/>
- <listheader label="Költség/Bevétel" sort="auto(incoming)" align="left"
- sortDirection="@load(vm.cols['incoming'].sortDirection)"/>
- </listhead>
- <template name="model">
- <listitem>
- <listcell label="@load(each.humanId)"/>
- <listcell label="@load(each.partner.name)"/>
- <listcell label="@load(each.partner.vatNr)"/>
- <listcell label="@load(each.project.name)"/>
- <listcell
- label="@load(each.paymentDeadline) @converter('hu.user.lis.ui.converter.DateToStringConverter')"/>
- <listcell
- label="@load(each.grossAmount) @converter('hu.user.lis.ui.converter.DoubleToStringConverter')"/>
- <listcell label="@load(each.currency)"/>
- <listcell>
- <a iconSclass="z-icon-external-link" visible="@load(each.incoming)"/>
- <a iconSclass="z-icon-sign-in" visible="@load(!each.incoming)"/>
- </listcell>
- </listitem>
- </template>
- </listbox>
+ <center border="none">
+ <vlayout vflex="true">
+ <menupopup id="editPopup"
+ children="@bind(vm.invoicesDataModel.renderer.columnSettings) @template('menu-item')">
+ <template name="menu-item" var="node">
+ <menuitem label="@load(node.label)" checked="@load(node.visible)"
+ onClick="@command('onHeaderMenuClicked', node=node)"/>
+ </template>
+ </menupopup>
+ <listbox vflex="true" model="@load(vm.invoicesDataModel)" multiple="false"
+ itemRenderer="@load(vm.invoicesDataModel.renderer)" onSelect="@command('onListSelection')">
+ <listhead sizable="true" menupopup="editPopup"
+ onColSize="@command('onHeaderSizeChanged', node=node)"
+ children="@bind(vm.invoicesDataModel.renderer.columnSettings) @template('head-item')">
+ <template name="head-item" var="node">
+ <listheader label="@load(node.label)" sort="@load(node.sort)" align="@load(node.align)"
+ visible="@load(node.visible)" width="@load(node.width)" draggable="head"
+ droppable="head" sortDirection="@load(node.sortDirection)"
+ onDrop="@command('onHeaderReorder')"/>
+ </template>
+ </listhead>
+ <template name="model">
+ <listitem>
+ <listcell label="@load(each.humanId)"/>
+ <listcell label="@load(each.partner.name)"/>
+ <listcell label="@load(each.partner.vatNr)"/>
+ <listcell label="@load(each.project.name)"/>
+ <listcell
+ label="@load(each.paymentDeadline) @converter('hu.user.lis.ui.converter.DateToStringConverter')"/>
+ <listcell
+ label="@load(each.grossAmount) @converter('hu.user.lis.ui.converter.DoubleToStringConverter')"/>
+ <listcell label="@load(each.currency)"/>
+ <listcell>
+ <a iconSclass="z-icon-external-link" visible="@load(each.incoming)"/>
+ <a iconSclass="z-icon-sign-in" visible="@load(!each.incoming)"/>
+ </listcell>
+ </listitem>
+ </template>
+ </listbox>
+ </vlayout>
</center>
</borderlayout>
</window>
</vlayout>
</north>
<center border="none">
- <vlayout vflex="true" hflex="true">
+ <vlayout vflex="true">
<listbox id="invoicesList" vflex="true" model="@load(vm.invoicesDataModel)" multiple="false"
itemRenderer="@load(vm.invoicesDataModel.renderer)" onSelect="@command('onListSelection')">
<listhead sizable="true" menupopup="editPopup"
</toolbar>
</north>
<center border="none">
- <vlayout vflex="true" hflex="true">
+ <vlayout vflex="true">
<menupopup id="editPopup"
children="@bind(vm.partnersDataModel.renderer.columnSettings) @template('menu-item')">
<template name="menu-item" var="node">
checked="@bind(vm.filterShowBoth)"/>
</toolbar>
</north>
- <center border="none" flex="true">
- <listbox vflex="true" model="@load(vm.projectsDataModel)"
- autopaging="true" mold="paging" pagingPosition="top" multiple="false"
- onSelect="@command('onListSelection')">
- <listhead sizable="true">
- <listheader label="Azonosító" sort="auto(humanId)" align="left"
- sortDirection="@load(vm.cols['humanId'].sortDirection)"/>
- <listheader label="Ügyfél" sort="auto(partner.name)" align="left"
- sortDirection="@load(vm.cols['partner.name'].sortDirection)"/>
- <listheader label="Státusz" sort="auto(projectStatus.name)" align="left"
- sortDirection="@load(vm.cols['projectStatus.name'].sortDirection)"/>
- <listheader label="Megnevezés" sort="auto(name)" align="left"
- sortDirection="@load(vm.cols['name'].sortDirection)"/>
- <listheader label="Kapcsolattartó" sort="auto(contactName)" align="left"
- sortDirection="@load(vm.cols['contactName'].sortDirection)"/>
- <listheader label="Aktív" sort="auto(active)" align="left"
- sortDirection="@load(vm.cols['active'].sortDirection)"/>
- </listhead>
- <template name="model">
- <listitem onDoubleClick="@command('onEdit')">
- <listcell label="@load(each.humanId)"/>
- <listcell label="@load(each.partner.name)"/>
- <listcell label="@load(each.projectStatus.name)"/>
- <listcell label="@load(each.name)"/>
- <listcell label="@load(each.contactName)"/>
- <listcell>
- <a iconSclass="z-icon-check" visible="@load(each.active)"/>
- <a iconSclass="z-icon-ban" visible="@load(!each.active)"/>
- </listcell>
- </listitem>
- </template>
- </listbox>
+ <center border="none">
+ <vlayout vflex="true">
+ <menupopup id="editPopup"
+ children="@bind(vm.projectsDataModel.renderer.columnSettings) @template('menu-item')">
+ <template name="menu-item" var="node">
+ <menuitem label="@load(node.label)" checked="@load(node.visible)"
+ onClick="@command('onHeaderMenuClicked', node=node)"/>
+ </template>
+ </menupopup>
+ <listbox vflex="true" model="@load(vm.projectsDataModel)" multiple="false"
+ itemRenderer="@load(vm.projectsDataModel.renderer)" onSelect="@command('onListSelection')">
+ <listhead sizable="true" menupopup="editPopup"
+ onColSize="@command('onHeaderSizeChanged', node=node)"
+ children="@bind(vm.projectsDataModel.renderer.columnSettings) @template('head-item')">
+ <template name="head-item" var="node">
+ <listheader label="@load(node.label)" sort="@load(node.sort)" align="@load(node.align)"
+ visible="@load(node.visible)" width="@load(node.width)" draggable="head"
+ droppable="head" sortDirection="@load(node.sortDirection)"
+ onDrop="@command('onHeaderReorder')"/>
+ </template>
+ </listhead>
+ <template name="model">
+ <listitem onDoubleClick="@command('onEdit')">
+ <listcell label="@load(each.humanId)"/>
+ <listcell label="@load(each.partner.name)"/>
+ <listcell label="@load(each.projectStatus.name)"/>
+ <listcell label="@load(each.name)"/>
+ <listcell label="@load(each.contactName)"/>
+ <listcell>
+ <a iconSclass="z-icon-check" visible="@load(each.active)"/>
+ <a iconSclass="z-icon-ban" visible="@load(!each.active)"/>
+ </listcell>
+ </listitem>
+ </template>
+ </listbox>
+ </vlayout>
</center>
</borderlayout>
<toolbarbutton label="Nincs szűrés" iconSclass="z-icon-ban" onClick="@command('onClearFilters')"/>
</toolbar>
</north>
- <center border="none" flex="true">
- <listbox vflex="true" model="@load(vm.serviceRecordsDataModel)"
- autopaging="true" mold="paging" pagingPosition="top" onSelect="@command('onListSelection')">
- <listhead sizable="true">
- <listheader label="Projekt azonosító" sort="auto(project.humanId)" align="left"
- sortDirection="@load(vm.cols['project.humanId'].sortDirection)"/>
- <listheader label="Projekt név" sort="auto(project.name)" align="left"
- sortDirection="@load(vm.cols['project.name'].sortDirection)"/>
- <listheader label="Partner név" sort="auto(project.partner.name)" align="left"
- sortDirection="@load(vm.cols['project.partner.name'].sortDirection)"/>
- <listheader label="Munkatárs" sort="auto(associate.name)" align="left"
- sortDirection="@load(vm.cols['associate.name'].sortDirection)"/>
- <listheader label="Munkanap" sort="auto(workDay)" align="left"
- sortDirection="@load(vm.cols['workDay'].sortDirection)"/>
- <listheader label="Leírás" sort="auto(description)" align="left"
- sortDirection="@load(vm.cols['description'].sortDirection)"/>
- <listheader label="Óraszám" sort="auto(workHours)" align="right" style="text-align: center"
- sortDirection="@load(vm.cols['workHours'].sortDirection)"/>
- <listheader label="Aláírt" align="left"/>
- </listhead>
- <template name="model">
- <listitem onDoubleClick="@command('onEdit')">
- <listcell label="@load(each.project.humanId)"/>
- <listcell label="@load(each.project.name)"/>
- <listcell label="@load(each.project.partner.name)"/>
- <listcell label="@load(each.associate.name)"/>
- <listcell
- label="@load(each.workDay) @converter('hu.user.lis.ui.converter.DateToStringConverter')"/>
- <listcell label="@load(each.description)"/>
- <listcell>
- <label value="@load(each.workHours)"/>
- </listcell>
- <listcell>
- <a iconSclass="z-icon-check" visible="@load(each.signed)"/>
- <a iconSclass="z-icon-ban" visible="@load(not each.signed)"/>
- </listcell>
- </listitem>
- </template>
- </listbox>
+ <center border="none">
+ <vlayout vflex="true">
+ <menupopup id="editPopup"
+ children="@bind(vm.serviceRecordsDataModel.renderer.columnSettings) @template('menu-item')">
+ <template name="menu-item" var="node">
+ <menuitem label="@load(node.label)" checked="@load(node.visible)"
+ onClick="@command('onHeaderMenuClicked', node=node)"/>
+ </template>
+ </menupopup>
+ <listbox vflex="true" model="@load(vm.serviceRecordsDataModel)" multiple="false"
+ itemRenderer="@load(vm.serviceRecordsDataModel.renderer)"
+ onSelect="@command('onListSelection')">
+ <listhead sizable="true" menupopup="editPopup"
+ onColSize="@command('onHeaderSizeChanged', node=node)"
+ children="@bind(vm.serviceRecordsDataModel.renderer.columnSettings) @template('head-item')">
+ <template name="head-item" var="node">
+ <listheader label="@load(node.label)" sort="@load(node.sort)" align="@load(node.align)"
+ visible="@load(node.visible)" width="@load(node.width)" draggable="head"
+ droppable="head" sortDirection="@load(node.sortDirection)"
+ onDrop="@command('onHeaderReorder')"/>
+ </template>
+ </listhead>
+ <template name="model">
+ <listitem onDoubleClick="@command('onEdit')">
+ <listcell label="@load(each.project.humanId)"/>
+ <listcell label="@load(each.project.name)"/>
+ <listcell label="@load(each.project.partner.name)"/>
+ <listcell label="@load(each.associate.name)"/>
+ <listcell
+ label="@load(each.workDay) @converter('hu.user.lis.ui.converter.DateToStringConverter')"/>
+ <listcell label="@load(each.description)"/>
+ <listcell>
+ <label value="@load(each.workHours)"/>
+ </listcell>
+ <listcell>
+ <a iconSclass="z-icon-check" visible="@load(each.signed)"/>
+ <a iconSclass="z-icon-ban" visible="@load(not each.signed)"/>
+ </listcell>
+ </listitem>
+ </template>
+ </listbox>
+ </vlayout>
</center>
</borderlayout>