From: Vásáry Dániel Date: Fri, 1 Mar 2024 15:50:53 +0000 (+0100) Subject: Views header & filter redesigned X-Git-Url: http://git.useribm.hu/?a=commitdiff_plain;h=d3382f56024f6a0e30501aa69d8c5b687d392301;p=sly-crm.git Views header & filter redesigned --- diff --git a/sly-crm-db/migrations/scripts/028_add_prices_to_project.sql b/sly-crm-db/migrations/scripts/028_add_prices_to_project.sql new file mode 100644 index 0000000..2becbad --- /dev/null +++ b/sly-crm-db/migrations/scripts/028_add_prices_to_project.sql @@ -0,0 +1,16 @@ +-- // add supply price, selling price to project +-- Migration SQL that makes the change goes here. + +ALTER TABLE project + ADD COLUMN supply_price DOUBLE + ADD COLUMN selling_price DOUBLE + ADD COLUMN margin DOUBLE; + +-- //@UNDO +-- SQL to undo the change goes here. + +ALTER TABLE project + DROP COLUMN supply_price + DROP COLUMN selling_price + DROP COLUMN margin; +CALL SYSPROC.ADMIN_CMD('REORG TABLE project'); diff --git a/sly-crm-db/src/main/java/hu/user/lis/db/Project.java b/sly-crm-db/src/main/java/hu/user/lis/db/Project.java index 4e0b93e..13d2362 100644 --- a/sly-crm-db/src/main/java/hu/user/lis/db/Project.java +++ b/sly-crm-db/src/main/java/hu/user/lis/db/Project.java @@ -9,7 +9,14 @@ import lombok.experimental.SuperBuilder; import org.hibernate.annotations.Fetch; import org.hibernate.annotations.FetchMode; -import javax.persistence.*; +import javax.persistence.CascadeType; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.OneToMany; +import javax.persistence.OrderColumn; +import javax.persistence.Transient; import java.util.List; @Getter @@ -60,5 +67,11 @@ public class Project extends IdEntity { private String contactName; + private Double supplyPrice; + + private Double sellingPrice; + + private Double margin; + private boolean active; } diff --git a/sly-crm-ui/src/main/java/hu/user/lis/ui/view/ImportInvoicesSuspendedViewModel.java b/sly-crm-ui/src/main/java/hu/user/lis/ui/view/ImportInvoicesSuspendedViewModel.java index 9ef3518..84e73ce 100644 --- a/sly-crm-ui/src/main/java/hu/user/lis/ui/view/ImportInvoicesSuspendedViewModel.java +++ b/sly-crm-ui/src/main/java/hu/user/lis/ui/view/ImportInvoicesSuspendedViewModel.java @@ -1,6 +1,12 @@ package hu.user.lis.ui.view; -import hu.user.lis.db.*; +import hu.user.lis.db.IncomingInvoice; +import hu.user.lis.db.Invoice; +import hu.user.lis.db.InvoiceImport; +import hu.user.lis.db.InvoiceStatus; +import hu.user.lis.db.OutgoingInvoice; +import hu.user.lis.db.Partner; +import hu.user.lis.db.Project; import hu.user.lis.db.repository.InvoiceImportRepository; import hu.user.lis.db.repository.InvoiceRepository; import hu.user.lis.db.repository.filter.InvoiceFilter; @@ -18,7 +24,12 @@ import lombok.Getter; import lombok.extern.log4j.Log4j2; import org.zkoss.bind.BindUtils; import org.zkoss.bind.PropertyChangeEvent; -import org.zkoss.bind.annotation.*; +import org.zkoss.bind.annotation.AfterCompose; +import org.zkoss.bind.annotation.Command; +import org.zkoss.bind.annotation.ContextParam; +import org.zkoss.bind.annotation.ContextType; +import org.zkoss.bind.annotation.Destroy; +import org.zkoss.bind.annotation.Init; import org.zkoss.zk.ui.Component; import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.EventListener; @@ -70,7 +81,7 @@ public class ImportInvoicesSuspendedViewModel extends EntityViewModel i 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", + "partner.vatNr,Partner adószám,natural,left,true", "project.name,Projekt név,natural,left,true", "paymentDeadline,Fizetési határidő,ascending,left,true", "grossAmount,Bruttó összeg,natural,left,true", diff --git a/sly-crm-ui/src/main/java/hu/user/lis/ui/view/ProjectsViewModel.java b/sly-crm-ui/src/main/java/hu/user/lis/ui/view/ProjectsViewModel.java index 20f6179..34e8401 100644 --- a/sly-crm-ui/src/main/java/hu/user/lis/ui/view/ProjectsViewModel.java +++ b/sly-crm-ui/src/main/java/hu/user/lis/ui/view/ProjectsViewModel.java @@ -56,6 +56,9 @@ public class ProjectsViewModel extends FilterActiveViewModel implements "projectStatus.name,Státusz,natural,left,true", "name,Megnevezés,natural,left,true", "contactName,Kapcsolattartó,natural,left,true", + "supplyPrice,Beszerzési ár (HUF),natural,left,true", + "sellingPrice,Eladási ár (HUF),natural,left,true", + "margin,Árrés (HUF) ,natural,left,true", "active,Aktív,natural,left,true" )); } diff --git a/sly-crm-ui/src/main/resources/web/associates.zul b/sly-crm-ui/src/main/resources/web/associates.zul index 215aa02..5dc4a87 100644 --- a/sly-crm-ui/src/main/resources/web/associates.zul +++ b/sly-crm-ui/src/main/resources/web/associates.zul @@ -7,16 +7,21 @@ - + + + + - - - - + onSelect="@command('onListSelection')" + sizedByContent="true" span="true"> diff --git a/sly-crm-ui/src/main/resources/web/import-invoices-approve.zul b/sly-crm-ui/src/main/resources/web/import-invoices-approve.zul index 44a05a5..a66489e 100644 --- a/sly-crm-ui/src/main/resources/web/import-invoices-approve.zul +++ b/sly-crm-ui/src/main/resources/web/import-invoices-approve.zul @@ -1,21 +1,24 @@ - - - - - - + + + + + + +
+ onSelect="@command('onListSelection')" sizedByContent="true" span="true"> diff --git a/sly-crm-ui/src/main/resources/web/import-invoices-assign.zul b/sly-crm-ui/src/main/resources/web/import-invoices-assign.zul index e39c5fb..fec78df 100644 --- a/sly-crm-ui/src/main/resources/web/import-invoices-assign.zul +++ b/sly-crm-ui/src/main/resources/web/import-invoices-assign.zul @@ -1,21 +1,24 @@ - + + + + - - - - -
+ onSelect="@command('onListSelection')" sizedByContent="true" span="true"> diff --git a/sly-crm-ui/src/main/resources/web/import-invoices-suspended.zul b/sly-crm-ui/src/main/resources/web/import-invoices-suspended.zul index 8cb69ff..9cc8a19 100644 --- a/sly-crm-ui/src/main/resources/web/import-invoices-suspended.zul +++ b/sly-crm-ui/src/main/resources/web/import-invoices-suspended.zul @@ -1,27 +1,35 @@ - + + + + - - + + + + + - + style="display: inline-block;" + width="300px"/> + +
@@ -33,7 +41,8 @@ + itemRenderer="@load(vm.invoicesDataModel.renderer)" onSelect="@command('onListSelection')" + sizedByContent="true" span="true"> diff --git a/sly-crm-ui/src/main/resources/web/index.zul b/sly-crm-ui/src/main/resources/web/index.zul index 6066aba..47c48ac 100644 --- a/sly-crm-ui/src/main/resources/web/index.zul +++ b/sly-crm-ui/src/main/resources/web/index.zul @@ -90,12 +90,6 @@ onClick="@command(vm.selectPage('~./invoices.zul'))"/> - - - - - - diff --git a/sly-crm-ui/src/main/resources/web/invoice-payment.zul b/sly-crm-ui/src/main/resources/web/invoice-payment.zul index 25912ee..396b02e 100644 --- a/sly-crm-ui/src/main/resources/web/invoice-payment.zul +++ b/sly-crm-ui/src/main/resources/web/invoice-payment.zul @@ -9,7 +9,12 @@ } - + + + + + diff --git a/sly-crm-ui/src/main/resources/web/invoices.zul b/sly-crm-ui/src/main/resources/web/invoices.zul index fccc695..42b9d68 100644 --- a/sly-crm-ui/src/main/resources/web/invoices.zul +++ b/sly-crm-ui/src/main/resources/web/invoices.zul @@ -5,74 +5,83 @@ ListModelList dateTypes = new ListModelList(DateType.values()); - + + + + + - - + + + + + - - - - - - - + + + +
+ + + + itemRenderer="@load(vm.invoicesDataModel.renderer)" onSelect="@command('onListSelection')" + sizedByContent="true" span="true"> @@ -114,13 +123,6 @@ - - -
diff --git a/sly-crm-ui/src/main/resources/web/partners.zul b/sly-crm-ui/src/main/resources/web/partners.zul index d14c619..8d02a09 100644 --- a/sly-crm-ui/src/main/resources/web/partners.zul +++ b/sly-crm-ui/src/main/resources/web/partners.zul @@ -1,15 +1,23 @@ - + + + + - - - - - - - + + itemRenderer="@load(vm.partnersDataModel.renderer)" onSelect="@command('onListSelection')" + sizedByContent="true" span="true"> @@ -43,20 +52,6 @@ - - - - - - - - - diff --git a/sly-crm-ui/src/main/resources/web/projects.zul b/sly-crm-ui/src/main/resources/web/projects.zul index 65d0672..90caacc 100644 --- a/sly-crm-ui/src/main/resources/web/projects.zul +++ b/sly-crm-ui/src/main/resources/web/projects.zul @@ -1,19 +1,27 @@ - - - - - - + + + + + + + + itemRenderer="@load(vm.projectsDataModel.renderer)" onSelect="@command('onListSelection')" + sizedByContent="true" span="true"> @@ -50,6 +59,9 @@ + + + diff --git a/sly-crm-ui/src/main/resources/web/service-records.zul b/sly-crm-ui/src/main/resources/web/service-records.zul index 2a0416a..fb66a7f 100644 --- a/sly-crm-ui/src/main/resources/web/service-records.zul +++ b/sly-crm-ui/src/main/resources/web/service-records.zul @@ -1,26 +1,38 @@ - + + + + + - - - - - -
@@ -34,7 +46,8 @@ + onSelect="@command('onListSelection')" + sizedByContent="true" span="true"> diff --git a/sly-crm-ui/src/main/resources/web/static/css/webclient.css b/sly-crm-ui/src/main/resources/web/static/css/webclient.css index f0286d6..65393ac 100644 --- a/sly-crm-ui/src/main/resources/web/static/css/webclient.css +++ b/sly-crm-ui/src/main/resources/web/static/css/webclient.css @@ -3,7 +3,7 @@ width: 100px; } .list-title { - font-size: 1.5em; + font-size: 2em; font-weight: bold; margin: 5px 10px 5px 10px; }