From 10cccaa6ce699934e551fd763fe26b3b0b7b0780 Mon Sep 17 00:00:00 2001 From: NicoleNG18 Date: Tue, 9 Jun 2026 16:58:08 +0300 Subject: [PATCH 1/2] regenerate module using the new Java template --- codbex-payments/codbex-payments.edm | 182 +- codbex-payments/codbex-payments.gen | 4984 ++++++++++------- codbex-payments/codbex-payments.model | 1721 +++--- .../CustomerPaymentController.ts | 237 - .../EmployeePaymentController.ts | 237 - .../PaymentAdjustmentController.ts | 199 - .../PaymentRecord/PaymentRecordController.ts | 232 - .../Settings/PaymentDirectionController.ts | 159 - .../api/Settings/PaymentTypeController.ts | 178 - .../SupplierPaymentController.ts | 237 - .../CustomerPayment/CustomerPaymentEntity.ts | 177 - .../CustomerPaymentRepository.ts | 61 - .../EmployeePayment/EmployeePaymentEntity.ts | 177 - .../EmployeePaymentRepository.ts | 61 - .../PaymentAdjustmentEntity.ts | 112 - .../PaymentAdjustmentRepository.ts | 57 - .../data/PaymentRecord/PaymentRecordEntity.ts | 194 - .../PaymentRecord/PaymentRecordRepository.ts | 59 - .../data/Settings/PaymentDirectionEntity.ts | 27 - .../Settings/PaymentDirectionRepository.ts | 25 - .../data/Settings/PaymentTypeEntity.ts | 27 - .../data/Settings/PaymentTypeRepository.ts | 25 - .../SupplierPayment/SupplierPaymentEntity.ts | 177 - .../SupplierPaymentRepository.ts | 61 - .../odata/codbex-payments.odata | 4 - .../schema/codbex-payments.schema | 77 +- .../CustomerPayment/controller.js | 26 +- .../dialog-filter/controller.js | 28 +- .../CustomerPayment/dialog-filter/index.html | 68 +- .../dialog-window/controller.js | 34 +- .../CustomerPayment/dialog-window/index.html | 74 +- .../CustomerPayment/index.html | 4 +- .../main-details/controller.js | 34 +- .../CustomerPayment/main-details/index.html | 86 +- .../EmployeePayment/controller.js | 20 +- .../dialog-filter/controller.js | 24 +- .../EmployeePayment/dialog-filter/index.html | 58 +- .../dialog-window/controller.js | 26 +- .../EmployeePayment/dialog-window/index.html | 66 +- .../EmployeePayment/index.html | 3 +- .../main-details/controller.js | 26 +- .../EmployeePayment/main-details/index.html | 74 +- .../PaymentAdjustment/controller.js | 18 +- .../dialog-filter/controller.js | 22 +- .../dialog-filter/index.html | 34 +- .../dialog-window/controller.js | 26 +- .../dialog-window/index.html | 42 +- .../PaymentAdjustment/index.html | 2 +- .../main-details/controller.js | 26 +- .../PaymentAdjustment/main-details/index.html | 42 +- .../PaymentRecord/PaymentRecord/controller.js | 148 +- .../PaymentRecord/dialog-filter/controller.js | 208 +- .../PaymentRecord/dialog-filter/index.html | 42 +- .../PaymentRecord/dialog-window/controller.js | 246 +- .../PaymentRecord/dialog-window/index.html | 46 +- .../ui/PaymentRecord/PaymentRecord/index.html | 2 +- .../PaymentRecord/main-details/controller.js | 266 +- .../PaymentRecord/main-details/index.html | 54 +- .../ui/Reports/PaymentRecord/controller.js | 54 +- .../PaymentRecord/dialog-filter/controller.js | 10 +- .../PaymentRecord/dialog-filter/index.html | 30 +- .../PaymentRecord/dialog-print/controller.js | 28 +- .../PaymentRecord/dialog-print/index.html | 4 +- .../PaymentRecord/dialog-window/controller.js | 2 +- .../PaymentRecord/dialog-window/index.html | 32 +- .../ui/Reports/PaymentRecord/index.html | 8 +- .../Settings/PaymentDirection/controller.js | 2 +- .../dialog-window/controller.js | 2 +- .../ui/Settings/PaymentType/controller.js | 2 +- .../PaymentType/dialog-window/controller.js | 2 +- .../SupplierPayment/controller.js | 84 +- .../dialog-filter/controller.js | 118 +- .../SupplierPayment/dialog-filter/index.html | 63 +- .../dialog-window/controller.js | 136 +- .../SupplierPayment/dialog-window/index.html | 71 +- .../SupplierPayment/index.html | 4 +- .../main-details/controller.js | 148 +- .../SupplierPayment/main-details/index.html | 79 +- .../CustomerPaymentController.java | 227 + .../EmployeePaymentController.java | 224 + .../PaymentAdjustmentController.java | 191 + .../PaymentRecordController.java | 224 + .../settings/PaymentDirectionController.java | 153 + .../api/settings/PaymentTypeController.java | 170 + .../SupplierPaymentController.java | 227 + .../CustomerPayment.extensionpoint | 2 +- .../CustomerPaymentEntity.java | 106 + .../CustomerPaymentRepository.java | 19 + .../EmployeePayment.extensionpoint | 2 +- .../EmployeePaymentEntity.java | 102 + .../EmployeePaymentRepository.java | 19 + .../PaymentAdjustment.extensionpoint | 2 +- .../PaymentAdjustmentEntity.java | 74 + .../PaymentAdjustmentRepository.java | 18 + .../PaymentRecord.extensionpoint | 2 +- .../paymentrecord/PaymentRecordEntity.java | 114 + .../PaymentRecordRepository.java | 18 + .../settings}/PaymentDirection.extensionpoint | 2 +- .../data/settings/PaymentDirectionEntity.java | 30 + .../settings/PaymentDirectionRepository.java | 12 + .../data/settings}/PaymentType.extensionpoint | 2 +- .../data/settings/PaymentTypeEntity.java | 30 + .../data/settings/PaymentTypeRepository.java | 12 + .../SupplierPayment.extensionpoint | 2 +- .../SupplierPaymentEntity.java | 106 + .../SupplierPaymentRepository.java | 19 + .../roles/default-roles.roles | 2 +- .../en-US/codbex-payments.model.json | 108 +- 108 files changed, 7779 insertions(+), 6881 deletions(-) delete mode 100644 codbex-payments/gen/codbex-payments/api/CustomerPayment/CustomerPaymentController.ts delete mode 100644 codbex-payments/gen/codbex-payments/api/EmployeePayment/EmployeePaymentController.ts delete mode 100644 codbex-payments/gen/codbex-payments/api/PaymentAdjustment/PaymentAdjustmentController.ts delete mode 100644 codbex-payments/gen/codbex-payments/api/PaymentRecord/PaymentRecordController.ts delete mode 100644 codbex-payments/gen/codbex-payments/api/Settings/PaymentDirectionController.ts delete mode 100644 codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeController.ts delete mode 100644 codbex-payments/gen/codbex-payments/api/SupplierPayment/SupplierPaymentController.ts delete mode 100644 codbex-payments/gen/codbex-payments/data/CustomerPayment/CustomerPaymentEntity.ts delete mode 100644 codbex-payments/gen/codbex-payments/data/CustomerPayment/CustomerPaymentRepository.ts delete mode 100644 codbex-payments/gen/codbex-payments/data/EmployeePayment/EmployeePaymentEntity.ts delete mode 100644 codbex-payments/gen/codbex-payments/data/EmployeePayment/EmployeePaymentRepository.ts delete mode 100644 codbex-payments/gen/codbex-payments/data/PaymentAdjustment/PaymentAdjustmentEntity.ts delete mode 100644 codbex-payments/gen/codbex-payments/data/PaymentAdjustment/PaymentAdjustmentRepository.ts delete mode 100644 codbex-payments/gen/codbex-payments/data/PaymentRecord/PaymentRecordEntity.ts delete mode 100644 codbex-payments/gen/codbex-payments/data/PaymentRecord/PaymentRecordRepository.ts delete mode 100644 codbex-payments/gen/codbex-payments/data/Settings/PaymentDirectionEntity.ts delete mode 100644 codbex-payments/gen/codbex-payments/data/Settings/PaymentDirectionRepository.ts delete mode 100644 codbex-payments/gen/codbex-payments/data/Settings/PaymentTypeEntity.ts delete mode 100644 codbex-payments/gen/codbex-payments/data/Settings/PaymentTypeRepository.ts delete mode 100644 codbex-payments/gen/codbex-payments/data/SupplierPayment/SupplierPaymentEntity.ts delete mode 100644 codbex-payments/gen/codbex-payments/data/SupplierPayment/SupplierPaymentRepository.ts delete mode 100644 codbex-payments/gen/codbex-payments/odata/codbex-payments.odata create mode 100644 codbex-payments/gen/codbex_payments/api/customerpayment/CustomerPaymentController.java create mode 100644 codbex-payments/gen/codbex_payments/api/employeepayment/EmployeePaymentController.java create mode 100644 codbex-payments/gen/codbex_payments/api/paymentadjustment/PaymentAdjustmentController.java create mode 100644 codbex-payments/gen/codbex_payments/api/paymentrecord/PaymentRecordController.java create mode 100644 codbex-payments/gen/codbex_payments/api/settings/PaymentDirectionController.java create mode 100644 codbex-payments/gen/codbex_payments/api/settings/PaymentTypeController.java create mode 100644 codbex-payments/gen/codbex_payments/api/supplierpayment/SupplierPaymentController.java rename codbex-payments/gen/{codbex-payments/data/CustomerPayment => codbex_payments/data/customerpayment}/CustomerPayment.extensionpoint (98%) create mode 100644 codbex-payments/gen/codbex_payments/data/customerpayment/CustomerPaymentEntity.java create mode 100644 codbex-payments/gen/codbex_payments/data/customerpayment/CustomerPaymentRepository.java rename codbex-payments/gen/{codbex-payments/data/EmployeePayment => codbex_payments/data/employeepayment}/EmployeePayment.extensionpoint (98%) create mode 100644 codbex-payments/gen/codbex_payments/data/employeepayment/EmployeePaymentEntity.java create mode 100644 codbex-payments/gen/codbex_payments/data/employeepayment/EmployeePaymentRepository.java rename codbex-payments/gen/{codbex-payments/data/PaymentAdjustment => codbex_payments/data/paymentadjustment}/PaymentAdjustment.extensionpoint (98%) create mode 100644 codbex-payments/gen/codbex_payments/data/paymentadjustment/PaymentAdjustmentEntity.java create mode 100644 codbex-payments/gen/codbex_payments/data/paymentadjustment/PaymentAdjustmentRepository.java rename codbex-payments/gen/{codbex-payments/data/PaymentRecord => codbex_payments/data/paymentrecord}/PaymentRecord.extensionpoint (98%) create mode 100644 codbex-payments/gen/codbex_payments/data/paymentrecord/PaymentRecordEntity.java create mode 100644 codbex-payments/gen/codbex_payments/data/paymentrecord/PaymentRecordRepository.java rename codbex-payments/gen/{codbex-payments/data/Settings => codbex_payments/data/settings}/PaymentDirection.extensionpoint (98%) create mode 100644 codbex-payments/gen/codbex_payments/data/settings/PaymentDirectionEntity.java create mode 100644 codbex-payments/gen/codbex_payments/data/settings/PaymentDirectionRepository.java rename codbex-payments/gen/{codbex-payments/data/Settings => codbex_payments/data/settings}/PaymentType.extensionpoint (98%) create mode 100644 codbex-payments/gen/codbex_payments/data/settings/PaymentTypeEntity.java create mode 100644 codbex-payments/gen/codbex_payments/data/settings/PaymentTypeRepository.java rename codbex-payments/gen/{codbex-payments/data/SupplierPayment => codbex_payments/data/supplierpayment}/SupplierPayment.extensionpoint (98%) create mode 100644 codbex-payments/gen/codbex_payments/data/supplierpayment/SupplierPaymentEntity.java create mode 100644 codbex-payments/gen/codbex_payments/data/supplierpayment/SupplierPaymentRepository.java rename codbex-payments/gen/{codbex-payments => codbex_payments}/roles/default-roles.roles (99%) diff --git a/codbex-payments/codbex-payments.edm b/codbex-payments/codbex-payments.edm index 5fb2315..26c7370 100644 --- a/codbex-payments/codbex-payments.edm +++ b/codbex-payments/codbex-payments.edm @@ -10,13 +10,13 @@ + - + - @@ -32,13 +32,13 @@ + - + - @@ -54,13 +54,12 @@ + - - @@ -74,12 +73,12 @@ + - @@ -90,95 +89,55 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -189,11 +148,17 @@ - - - - + + + + + + + + + + @@ -204,16 +169,71 @@ - + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -225,5 +245,5 @@ - + \ No newline at end of file diff --git a/codbex-payments/codbex-payments.gen b/codbex-payments/codbex-payments.gen index 456ef54..dcc3ba7 100644 --- a/codbex-payments/codbex-payments.gen +++ b/codbex-payments/codbex-payments.gen @@ -1,15 +1,17 @@ { "tablePrefix": "CODBEX_", "brand": "codbex", - "brandUrl": "https://www.codbex.com", - "title": "Payments Management Application", - "description": "Managing payments data", + "brandUrl": "https://www.codbex.com/", + "title": "Payments Management Module", + "description": "Managing Payments Data", "projectName": "codbex-payments", "workspaceName": "workspace", "filePath": "codbex-payments.model", - "templateId": "template-application-angular-v2/template/template.js", + "templateId": "template-application-angular-java/template/template.js", "fileName": "codbex-payments", "genFolderName": "codbex-payments", + "javaRuntime": true, + "javaGenFolderName": "codbex_payments", "dataSource": "DefaultDB", "perspectives": { "CustomerPayment": { @@ -138,10 +140,10 @@ }, "Settings": { "views": [ - "Currency", "PaymentType", + "PaymentDirection", "PaymentMethod", - "PaymentDirection" + "Currency" ], "name": "Settings", "label": "Settings", @@ -151,30 +153,6 @@ "icon": "/services/web/resources/unicons/copy.svg", "role": "" }, - "Companies": { - "views": [ - "Company" - ], - "name": "Companies", - "label": "Companies", - "header": "", - "order": "100", - "navId": "", - "icon": "/services/web/resources/unicons/university.svg", - "role": "" - }, - "Customers": { - "views": [ - "Customer" - ], - "name": "Customers", - "label": "Customers", - "header": "", - "order": "100", - "navId": "", - "icon": "/services/web/resources/unicons/user-plus.svg", - "role": "" - }, "PaymentAdjustment": { "views": [ "PaymentAdjustment", @@ -206,6 +184,18 @@ "icon": "/services/web/resources/unicons/paypal.svg", "role": "" }, + "Customers": { + "views": [ + "Customer" + ], + "name": "Customers", + "label": "Customers", + "header": "", + "order": "300", + "navId": "", + "icon": "/services/web/resources/unicons/user-plus.svg", + "role": "" + }, "Employees": { "views": [ "Employee" @@ -229,6 +219,18 @@ "navId": "", "icon": "/services/web/resources/unicons/user-minus.svg", "role": "" + }, + "Companies": { + "views": [ + "Company" + ], + "name": "Companies", + "label": "Companies", + "header": "", + "order": "113", + "navId": "", + "icon": "/services/web/resources/unicons/user.svg", + "role": "" } }, "roles": [ @@ -291,6 +293,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "int", "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", "inputRule": "" }, { @@ -319,10 +322,11 @@ "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "Customer", - "widgetDropdownUrl": "/services/ts/codbex-partners/gen/codbex-partners/api/Customers/CustomerService.ts", - "widgetDropdownControllerUrl": "/services/ts/codbex-partners/gen/codbex-partners/api/Customers/CustomerController.ts", + "widgetDropdownUrl": "/services/java/codbex-partners/gen/codbex_partners/api/customers/CustomerController", + "widgetDropdownControllerUrl": "/services/java/codbex-partners/gen/codbex_partners/api/customers/CustomerController", "dataTypeJava": "int", "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", "inputRule": "" }, { @@ -350,6 +354,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "date", "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.LocalDate", "isDateType": true, "inputRule": "" }, @@ -377,6 +382,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "date", "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.LocalDate", "isDateType": true, "inputRule": "" }, @@ -406,6 +412,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 34, "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" @@ -436,6 +443,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 34, "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" @@ -465,6 +473,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 100, "inputRule": "" @@ -496,6 +505,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "double", "dataTypeTypescript": "number", + "dataTypeJavaClass": "java.math.BigDecimal", "inputRule": "" }, { @@ -516,7 +526,7 @@ "relationshipName": "CustomerPayment_Currency", "relationshipEntityName": "Currency", "relationshipEntityPerspectiveName": "Settings", - "relationshipEntityPerspectiveLabel": "Entities", + "relationshipEntityPerspectiveLabel": "Settings", "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, @@ -524,10 +534,44 @@ "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "Currency", - "widgetDropdownUrl": "/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyService.ts", - "widgetDropdownControllerUrl": "/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts", + "widgetDropdownUrl": "/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController", + "widgetDropdownControllerUrl": "/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "CUSTOMERPAYMENT_COMPANY", + "dataNullable": true, + "dataType": "INTEGER", + "description": "", + "name": "Company", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "CustomerPayment_Company", + "relationshipEntityName": "Company", + "relationshipEntityPerspectiveName": "Companies", + "relationshipEntityPerspectiveLabel": "Companies", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Company", + "widgetDropdownUrl": "/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController", + "widgetDropdownControllerUrl": "/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController", "dataTypeJava": "int", "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", "inputRule": "" }, { @@ -555,6 +599,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 100, "inputRule": "" @@ -584,17 +629,19 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 100, "inputRule": "" }, { "auditType": "NONE", - "dataName": "CUSTOMERPAYMENT_COMPANY", - "dataNullable": true, + "dataName": "CUSTOMERPAYMENT_PAYMENTMETHOD", + "dataNullable": false, "dataType": "INTEGER", "description": "", - "name": "Company", + "isRequiredProperty": true, + "name": "PaymentMethod", "tooltip": "", "widgetDropDownKey": "Id", "widgetDropDownValue": "Name", @@ -602,22 +649,22 @@ "widgetLength": "20", "widgetSize": "", "widgetType": "DROPDOWN", - "relationshipName": "CustomerPayment_Company", - "relationshipEntityName": "Company", - "relationshipEntityPerspectiveName": "Companies", - "relationshipEntityPerspectiveLabel": "Entities", - "dataNotNull": false, + "relationshipName": "CustomerPayment_PaymentMethod", + "relationshipEntityName": "PaymentMethod", + "relationshipEntityPerspectiveName": "Settings", + "relationshipEntityPerspectiveLabel": "Settings", + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, - "widgetLabel": "Company", - "widgetDropdownUrl": "/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyService.ts", - "widgetDropdownControllerUrl": "/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts", + "widgetLabel": "PaymentMethod", + "widgetDropdownUrl": "/services/java/codbex-methods/gen/codbex_methods/api/settings/PaymentMethodController", + "widgetDropdownControllerUrl": "/services/java/codbex-methods/gen/codbex_methods/api/settings/PaymentMethodController", "dataTypeJava": "int", "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", "inputRule": "" }, { @@ -646,6 +693,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" @@ -676,6 +724,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" @@ -705,42 +754,11 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" }, - { - "auditType": "NONE", - "dataName": "CUSTOMERPAYMENT_PAYMENTMETHOD", - "dataNullable": false, - "dataType": "INTEGER", - "description": "", - "isRequiredProperty": true, - "name": "PaymentMethod", - "tooltip": "", - "widgetDropDownKey": "Id", - "widgetDropDownValue": "Name", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "DROPDOWN", - "relationshipName": "CustomerPayment_PaymentMethod", - "relationshipEntityName": "PaymentMethod", - "relationshipEntityPerspectiveName": "Settings", - "relationshipEntityPerspectiveLabel": "methods", - "dataNotNull": true, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "PaymentMethod", - "widgetDropdownUrl": "/services/ts/codbex-methods/gen/codbex-methods/api/Settings/PaymentMethodService.ts", - "widgetDropdownControllerUrl": "/services/ts/codbex-methods/gen/codbex-methods/api/Settings/PaymentMethodController.ts", - "dataTypeJava": "int", - "dataTypeTypescript": "number", - "inputRule": "" - }, { "auditType": "CREATED_AT", "dataName": "CUSTOMERPAYMENT_CREATEDAT", @@ -765,6 +783,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "timestamp", "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.Instant", "isDateType": true, "inputRule": "" }, @@ -793,6 +812,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" @@ -821,6 +841,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "timestamp", "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.Instant", "isDateType": true, "inputRule": "" }, @@ -849,6 +870,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" @@ -884,6 +906,7 @@ "tooltip": "CustomerPayment", "type": "PRIMARY", "dataSource": "DefaultDB", + "javaPerspectiveName": "customerpayment", "referencedProjections": [ { "name": "Customer", @@ -939,10 +962,11 @@ "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "Customer", - "widgetDropdownUrl": "/services/ts/codbex-partners/gen/codbex-partners/api/Customers/CustomerService.ts", - "widgetDropdownControllerUrl": "/services/ts/codbex-partners/gen/codbex-partners/api/Customers/CustomerController.ts", + "widgetDropdownUrl": "/services/java/codbex-partners/gen/codbex_partners/api/customers/CustomerController", + "widgetDropdownControllerUrl": "/services/java/codbex-partners/gen/codbex_partners/api/customers/CustomerController", "dataTypeJava": "int", "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", "inputRule": "" }, "properties": [ @@ -971,6 +995,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "date", "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.LocalDate", "isDateType": true, "inputRule": "" }, @@ -998,6 +1023,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "date", "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.LocalDate", "isDateType": true, "inputRule": "" }, @@ -1027,6 +1053,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 34, "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" @@ -1057,6 +1084,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 34, "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" @@ -1086,6 +1114,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 100, "inputRule": "" @@ -1117,6 +1146,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "double", "dataTypeTypescript": "number", + "dataTypeJavaClass": "java.math.BigDecimal", "inputRule": "" }, { @@ -1137,7 +1167,7 @@ "relationshipName": "CustomerPayment_Currency", "relationshipEntityName": "Currency", "relationshipEntityPerspectiveName": "Settings", - "relationshipEntityPerspectiveLabel": "Entities", + "relationshipEntityPerspectiveLabel": "Settings", "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, @@ -1145,10 +1175,44 @@ "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "Currency", - "widgetDropdownUrl": "/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyService.ts", - "widgetDropdownControllerUrl": "/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts", + "widgetDropdownUrl": "/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController", + "widgetDropdownControllerUrl": "/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "CUSTOMERPAYMENT_COMPANY", + "dataNullable": true, + "dataType": "INTEGER", + "description": "", + "name": "Company", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "CustomerPayment_Company", + "relationshipEntityName": "Company", + "relationshipEntityPerspectiveName": "Companies", + "relationshipEntityPerspectiveLabel": "Companies", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Company", + "widgetDropdownUrl": "/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController", + "widgetDropdownControllerUrl": "/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController", "dataTypeJava": "int", "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", "inputRule": "" }, { @@ -1176,6 +1240,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 100, "inputRule": "" @@ -1205,17 +1270,19 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 100, "inputRule": "" }, { "auditType": "NONE", - "dataName": "CUSTOMERPAYMENT_COMPANY", - "dataNullable": true, + "dataName": "CUSTOMERPAYMENT_PAYMENTMETHOD", + "dataNullable": false, "dataType": "INTEGER", "description": "", - "name": "Company", + "isRequiredProperty": true, + "name": "PaymentMethod", "tooltip": "", "widgetDropDownKey": "Id", "widgetDropDownValue": "Name", @@ -1223,22 +1290,22 @@ "widgetLength": "20", "widgetSize": "", "widgetType": "DROPDOWN", - "relationshipName": "CustomerPayment_Company", - "relationshipEntityName": "Company", - "relationshipEntityPerspectiveName": "Companies", - "relationshipEntityPerspectiveLabel": "Entities", - "dataNotNull": false, + "relationshipName": "CustomerPayment_PaymentMethod", + "relationshipEntityName": "PaymentMethod", + "relationshipEntityPerspectiveName": "Settings", + "relationshipEntityPerspectiveLabel": "Settings", + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, - "widgetLabel": "Company", - "widgetDropdownUrl": "/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyService.ts", - "widgetDropdownControllerUrl": "/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts", + "widgetLabel": "PaymentMethod", + "widgetDropdownUrl": "/services/java/codbex-methods/gen/codbex_methods/api/settings/PaymentMethodController", + "widgetDropdownControllerUrl": "/services/java/codbex-methods/gen/codbex_methods/api/settings/PaymentMethodController", "dataTypeJava": "int", "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", "inputRule": "" }, { @@ -1267,42 +1334,11 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" }, - { - "auditType": "NONE", - "dataName": "CUSTOMERPAYMENT_PAYMENTMETHOD", - "dataNullable": false, - "dataType": "INTEGER", - "description": "", - "isRequiredProperty": true, - "name": "PaymentMethod", - "tooltip": "", - "widgetDropDownKey": "Id", - "widgetDropDownValue": "Name", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "DROPDOWN", - "relationshipName": "CustomerPayment_PaymentMethod", - "relationshipEntityName": "PaymentMethod", - "relationshipEntityPerspectiveName": "Settings", - "relationshipEntityPerspectiveLabel": "methods", - "dataNotNull": true, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "PaymentMethod", - "widgetDropdownUrl": "/services/ts/codbex-methods/gen/codbex-methods/api/Settings/PaymentMethodService.ts", - "widgetDropdownControllerUrl": "/services/ts/codbex-methods/gen/codbex-methods/api/Settings/PaymentMethodController.ts", - "dataTypeJava": "int", - "dataTypeTypescript": "number", - "inputRule": "" - }, { "auditType": "CREATED_AT", "dataName": "CUSTOMERPAYMENT_CREATEDAT", @@ -1327,6 +1363,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "timestamp", "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.Instant", "isDateType": true, "inputRule": "" }, @@ -1355,6 +1392,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" @@ -1383,6 +1421,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "timestamp", "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.Instant", "isDateType": true, "inputRule": "" }, @@ -1411,6 +1450,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" @@ -1446,6 +1486,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "int", "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", "inputRule": "" }, { @@ -1474,10 +1515,11 @@ "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "Supplier", - "widgetDropdownUrl": "/services/ts/codbex-partners/gen/codbex-partners/api/Suppliers/SupplierService.ts", - "widgetDropdownControllerUrl": "/services/ts/codbex-partners/gen/codbex-partners/api/Suppliers/SupplierController.ts", + "widgetDropdownUrl": "/services/java/codbex-partners/gen/codbex_partners/api/suppliers/SupplierController", + "widgetDropdownControllerUrl": "/services/java/codbex-partners/gen/codbex_partners/api/suppliers/SupplierController", "dataTypeJava": "int", "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", "inputRule": "" }, { @@ -1505,6 +1547,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "date", "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.LocalDate", "isDateType": true, "inputRule": "" }, @@ -1532,6 +1575,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "date", "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.LocalDate", "isDateType": true, "inputRule": "" }, @@ -1561,6 +1605,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 34, "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" @@ -1591,6 +1636,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 34, "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" @@ -1620,6 +1666,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 100, "inputRule": "" @@ -1651,6 +1698,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "double", "dataTypeTypescript": "number", + "dataTypeJavaClass": "java.math.BigDecimal", "inputRule": "" }, { @@ -1671,7 +1719,7 @@ "relationshipName": "SupplierPayment_Currency", "relationshipEntityName": "Currency", "relationshipEntityPerspectiveName": "Settings", - "relationshipEntityPerspectiveLabel": "Entities", + "relationshipEntityPerspectiveLabel": "Settings", "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, @@ -1679,10 +1727,44 @@ "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "Currency", - "widgetDropdownUrl": "/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyService.ts", - "widgetDropdownControllerUrl": "/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts", + "widgetDropdownUrl": "/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController", + "widgetDropdownControllerUrl": "/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "SUPPLIERPAYMENT_COMPANY", + "dataNullable": true, + "dataType": "INTEGER", + "description": "", + "name": "Company", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "SupplierPayment_Company", + "relationshipEntityName": "Company", + "relationshipEntityPerspectiveName": "Companies", + "relationshipEntityPerspectiveLabel": "Companies", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Company", + "widgetDropdownUrl": "/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController", + "widgetDropdownControllerUrl": "/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController", "dataTypeJava": "int", "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", "inputRule": "" }, { @@ -1710,6 +1792,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 100, "inputRule": "" @@ -1739,17 +1822,19 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 100, "inputRule": "" }, { "auditType": "NONE", - "dataName": "SUPPLIERPAYMENT_COMPANY", - "dataNullable": true, + "dataName": "SUPPLIERPAYMENT_PAYMENTMETHOD", + "dataNullable": false, "dataType": "INTEGER", "description": "", - "name": "Company", + "isRequiredProperty": true, + "name": "PaymentMethod", "tooltip": "", "widgetDropDownKey": "Id", "widgetDropDownValue": "Name", @@ -1757,22 +1842,22 @@ "widgetLength": "20", "widgetSize": "", "widgetType": "DROPDOWN", - "relationshipName": "SupplierPayment_Company", - "relationshipEntityName": "Company", - "relationshipEntityPerspectiveName": "Companies", - "relationshipEntityPerspectiveLabel": "Entities", - "dataNotNull": false, + "relationshipName": "SupplierPayment_PaymentMethod", + "relationshipEntityName": "PaymentMethod", + "relationshipEntityPerspectiveName": "Settings", + "relationshipEntityPerspectiveLabel": "Settings", + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, - "widgetLabel": "Company", - "widgetDropdownUrl": "/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyService.ts", - "widgetDropdownControllerUrl": "/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts", + "widgetLabel": "PaymentMethod", + "widgetDropdownUrl": "/services/java/codbex-methods/gen/codbex_methods/api/settings/PaymentMethodController", + "widgetDropdownControllerUrl": "/services/java/codbex-methods/gen/codbex_methods/api/settings/PaymentMethodController", "dataTypeJava": "int", "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", "inputRule": "" }, { @@ -1801,6 +1886,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" @@ -1831,6 +1917,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" @@ -1860,40 +1947,11 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" }, - { - "auditType": "NONE", - "dataName": "SUPPLIERPAYMENT_PAYMENTMETHOD", - "dataNullable": false, - "dataType": "INTEGER", - "description": "", - "isRequiredProperty": true, - "name": "PaymentMethod", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "TEXTBOX", - "relationshipName": "SupplierPayment_PaymentMethod", - "relationshipEntityName": "PaymentMethod", - "relationshipEntityPerspectiveName": "Settings", - "relationshipEntityPerspectiveLabel": "methods", - "dataNotNull": true, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "PaymentMethod", - "widgetDropdownUrl": "", - "widgetDropdownControllerUrl": "", - "dataTypeJava": "int", - "dataTypeTypescript": "number", - "inputRule": "" - }, { "auditType": "CREATED_AT", "dataName": "SUPPLIERPAYMENT_CREATEDAT", @@ -1918,6 +1976,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "timestamp", "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.Instant", "isDateType": true, "inputRule": "" }, @@ -1946,6 +2005,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" @@ -1974,6 +2034,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "timestamp", "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.Instant", "isDateType": true, "inputRule": "" }, @@ -2002,6 +2063,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" @@ -2037,6 +2099,7 @@ "tooltip": "SupplierPayment", "type": "PRIMARY", "dataSource": "DefaultDB", + "javaPerspectiveName": "supplierpayment", "referencedProjections": [ { "name": "Supplier", @@ -2092,10 +2155,11 @@ "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "Supplier", - "widgetDropdownUrl": "/services/ts/codbex-partners/gen/codbex-partners/api/Suppliers/SupplierService.ts", - "widgetDropdownControllerUrl": "/services/ts/codbex-partners/gen/codbex-partners/api/Suppliers/SupplierController.ts", + "widgetDropdownUrl": "/services/java/codbex-partners/gen/codbex_partners/api/suppliers/SupplierController", + "widgetDropdownControllerUrl": "/services/java/codbex-partners/gen/codbex_partners/api/suppliers/SupplierController", "dataTypeJava": "int", "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", "inputRule": "" }, "properties": [ @@ -2124,6 +2188,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "date", "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.LocalDate", "isDateType": true, "inputRule": "" }, @@ -2151,6 +2216,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "date", "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.LocalDate", "isDateType": true, "inputRule": "" }, @@ -2180,6 +2246,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 34, "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" @@ -2210,6 +2277,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 34, "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" @@ -2239,6 +2307,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 100, "inputRule": "" @@ -2270,6 +2339,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "double", "dataTypeTypescript": "number", + "dataTypeJavaClass": "java.math.BigDecimal", "inputRule": "" }, { @@ -2290,7 +2360,7 @@ "relationshipName": "SupplierPayment_Currency", "relationshipEntityName": "Currency", "relationshipEntityPerspectiveName": "Settings", - "relationshipEntityPerspectiveLabel": "Entities", + "relationshipEntityPerspectiveLabel": "Settings", "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, @@ -2298,10 +2368,44 @@ "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "Currency", - "widgetDropdownUrl": "/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyService.ts", - "widgetDropdownControllerUrl": "/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts", + "widgetDropdownUrl": "/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController", + "widgetDropdownControllerUrl": "/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "SUPPLIERPAYMENT_COMPANY", + "dataNullable": true, + "dataType": "INTEGER", + "description": "", + "name": "Company", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "SupplierPayment_Company", + "relationshipEntityName": "Company", + "relationshipEntityPerspectiveName": "Companies", + "relationshipEntityPerspectiveLabel": "Companies", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Company", + "widgetDropdownUrl": "/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController", + "widgetDropdownControllerUrl": "/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController", "dataTypeJava": "int", "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", "inputRule": "" }, { @@ -2329,6 +2433,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 100, "inputRule": "" @@ -2358,17 +2463,19 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 100, "inputRule": "" }, { "auditType": "NONE", - "dataName": "SUPPLIERPAYMENT_COMPANY", - "dataNullable": true, + "dataName": "SUPPLIERPAYMENT_PAYMENTMETHOD", + "dataNullable": false, "dataType": "INTEGER", "description": "", - "name": "Company", + "isRequiredProperty": true, + "name": "PaymentMethod", "tooltip": "", "widgetDropDownKey": "Id", "widgetDropDownValue": "Name", @@ -2376,22 +2483,22 @@ "widgetLength": "20", "widgetSize": "", "widgetType": "DROPDOWN", - "relationshipName": "SupplierPayment_Company", - "relationshipEntityName": "Company", - "relationshipEntityPerspectiveName": "Companies", - "relationshipEntityPerspectiveLabel": "Entities", - "dataNotNull": false, + "relationshipName": "SupplierPayment_PaymentMethod", + "relationshipEntityName": "PaymentMethod", + "relationshipEntityPerspectiveName": "Settings", + "relationshipEntityPerspectiveLabel": "Settings", + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, - "widgetLabel": "Company", - "widgetDropdownUrl": "/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyService.ts", - "widgetDropdownControllerUrl": "/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts", + "widgetLabel": "PaymentMethod", + "widgetDropdownUrl": "/services/java/codbex-methods/gen/codbex_methods/api/settings/PaymentMethodController", + "widgetDropdownControllerUrl": "/services/java/codbex-methods/gen/codbex_methods/api/settings/PaymentMethodController", "dataTypeJava": "int", "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", "inputRule": "" }, { @@ -2420,6 +2527,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" @@ -2450,6 +2558,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" @@ -2479,40 +2588,11 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" }, - { - "auditType": "NONE", - "dataName": "SUPPLIERPAYMENT_PAYMENTMETHOD", - "dataNullable": false, - "dataType": "INTEGER", - "description": "", - "isRequiredProperty": true, - "name": "PaymentMethod", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "TEXTBOX", - "relationshipName": "SupplierPayment_PaymentMethod", - "relationshipEntityName": "PaymentMethod", - "relationshipEntityPerspectiveName": "Settings", - "relationshipEntityPerspectiveLabel": "methods", - "dataNotNull": true, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "PaymentMethod", - "widgetDropdownUrl": "", - "widgetDropdownControllerUrl": "", - "dataTypeJava": "int", - "dataTypeTypescript": "number", - "inputRule": "" - }, { "auditType": "CREATED_AT", "dataName": "SUPPLIERPAYMENT_CREATEDAT", @@ -2537,6 +2617,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "timestamp", "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.Instant", "isDateType": true, "inputRule": "" }, @@ -2565,6 +2646,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" @@ -2593,6 +2675,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "timestamp", "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.Instant", "isDateType": true, "inputRule": "" }, @@ -2621,6 +2704,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" @@ -2656,6 +2740,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "int", "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", "inputRule": "" }, { @@ -2684,10 +2769,11 @@ "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "Employee", - "widgetDropdownUrl": "/services/ts/codbex-employees/gen/codbex-employees/api/Employees/EmployeeService.ts", - "widgetDropdownControllerUrl": "/services/ts/codbex-employees/gen/codbex-employees/api/Employees/EmployeeController.ts", + "widgetDropdownUrl": "/services/java/codbex-employees/gen/codbex_employees/api/employees/EmployeeController", + "widgetDropdownControllerUrl": "/services/java/codbex-employees/gen/codbex_employees/api/employees/EmployeeController", "dataTypeJava": "int", "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", "inputRule": "" }, { @@ -2715,6 +2801,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "date", "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.LocalDate", "isDateType": true, "inputRule": "" }, @@ -2742,6 +2829,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "date", "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.LocalDate", "isDateType": true, "inputRule": "" }, @@ -2771,6 +2859,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 34, "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" @@ -2801,6 +2890,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 34, "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" @@ -2830,6 +2920,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 100, "inputRule": "" @@ -2861,6 +2952,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "double", "dataTypeTypescript": "number", + "dataTypeJavaClass": "java.math.BigDecimal", "inputRule": "" }, { @@ -2881,7 +2973,7 @@ "relationshipName": "EmployeePayment_Currency", "relationshipEntityName": "Currency", "relationshipEntityPerspectiveName": "Settings", - "relationshipEntityPerspectiveLabel": "Entities", + "relationshipEntityPerspectiveLabel": "Settings", "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, @@ -2889,10 +2981,44 @@ "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "Currency", - "widgetDropdownUrl": "/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyService.ts", - "widgetDropdownControllerUrl": "/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts", + "widgetDropdownUrl": "/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController", + "widgetDropdownControllerUrl": "/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "EMPLOYEEPAYMENT_COMPANY", + "dataNullable": true, + "dataType": "INTEGER", + "description": "", + "name": "Company", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "EmployeePayment_Company", + "relationshipEntityName": "Company", + "relationshipEntityPerspectiveName": "Companies", + "relationshipEntityPerspectiveLabel": "Companies", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Company", + "widgetDropdownUrl": "/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController", + "widgetDropdownControllerUrl": "/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController", "dataTypeJava": "int", "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", "inputRule": "" }, { @@ -2920,6 +3046,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 100, "inputRule": "" @@ -2949,42 +3076,11 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 100, "inputRule": "" }, - { - "auditType": "NONE", - "dataName": "EMPLOYEEPAYMENT_COMPANY", - "dataNullable": true, - "dataType": "INTEGER", - "description": "", - "name": "Company", - "tooltip": "", - "widgetDropDownKey": "Id", - "widgetDropDownValue": "Name", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "DROPDOWN", - "relationshipName": "EmployeePayment_Company", - "relationshipEntityName": "Company", - "relationshipEntityPerspectiveName": "Companies", - "relationshipEntityPerspectiveLabel": "Entities", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isRequiredProperty": false, - "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "Company", - "widgetDropdownUrl": "/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyService.ts", - "widgetDropdownControllerUrl": "/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts", - "dataTypeJava": "int", - "dataTypeTypescript": "number", - "inputRule": "" - }, { "auditType": "NONE", "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generateByType('Employee Payment')", @@ -3011,6 +3107,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" @@ -3041,6 +3138,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" @@ -3070,40 +3168,11 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 36, "inputRule": "" }, - { - "auditType": "NONE", - "dataName": "EMPLOYEEPAYMENT_PAYMENTMETHOD", - "dataNullable": false, - "dataType": "INTEGER", - "description": "", - "isRequiredProperty": true, - "name": "PaymentMethod", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "TEXTBOX", - "relationshipName": "EmployeePayment_PaymentMethod", - "relationshipEntityName": "PaymentMethod", - "relationshipEntityPerspectiveName": "Settings", - "relationshipEntityPerspectiveLabel": "methods", - "dataNotNull": true, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "PaymentMethod", - "widgetDropdownUrl": "", - "widgetDropdownControllerUrl": "", - "dataTypeJava": "int", - "dataTypeTypescript": "number", - "inputRule": "" - }, { "auditType": "CREATED_AT", "dataName": "EMPLOYEEPAYMENT_CREATEDAT", @@ -3128,6 +3197,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "timestamp", "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.Instant", "isDateType": true, "inputRule": "" }, @@ -3156,6 +3226,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" @@ -3184,6 +3255,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "timestamp", "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.Instant", "isDateType": true, "inputRule": "" }, @@ -3212,6 +3284,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" @@ -3247,6 +3320,7 @@ "tooltip": "EmployeePayment", "type": "PRIMARY", "dataSource": "DefaultDB", + "javaPerspectiveName": "employeepayment", "referencedProjections": [ { "name": "Employee", @@ -3262,11 +3336,6 @@ "name": "Company", "project": "codbex-companies", "genFolderName": "codbex-companies" - }, - { - "name": "PaymentMethod", - "project": "codbex-methods", - "genFolderName": "codbex-methods" } ], "dataOrderBy": "DESC", @@ -3302,10 +3371,11 @@ "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "Employee", - "widgetDropdownUrl": "/services/ts/codbex-employees/gen/codbex-employees/api/Employees/EmployeeService.ts", - "widgetDropdownControllerUrl": "/services/ts/codbex-employees/gen/codbex-employees/api/Employees/EmployeeController.ts", + "widgetDropdownUrl": "/services/java/codbex-employees/gen/codbex_employees/api/employees/EmployeeController", + "widgetDropdownControllerUrl": "/services/java/codbex-employees/gen/codbex_employees/api/employees/EmployeeController", "dataTypeJava": "int", "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", "inputRule": "" }, "properties": [ @@ -3334,6 +3404,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "date", "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.LocalDate", "isDateType": true, "inputRule": "" }, @@ -3361,6 +3432,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "date", "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.LocalDate", "isDateType": true, "inputRule": "" }, @@ -3390,6 +3462,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 34, "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" @@ -3420,6 +3493,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 34, "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" @@ -3449,6 +3523,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 100, "inputRule": "" @@ -3480,6 +3555,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "double", "dataTypeTypescript": "number", + "dataTypeJavaClass": "java.math.BigDecimal", "inputRule": "" }, { @@ -3500,7 +3576,7 @@ "relationshipName": "EmployeePayment_Currency", "relationshipEntityName": "Currency", "relationshipEntityPerspectiveName": "Settings", - "relationshipEntityPerspectiveLabel": "Entities", + "relationshipEntityPerspectiveLabel": "Settings", "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, @@ -3508,10 +3584,44 @@ "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "Currency", - "widgetDropdownUrl": "/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyService.ts", - "widgetDropdownControllerUrl": "/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts", + "widgetDropdownUrl": "/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController", + "widgetDropdownControllerUrl": "/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "EMPLOYEEPAYMENT_COMPANY", + "dataNullable": true, + "dataType": "INTEGER", + "description": "", + "name": "Company", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "EmployeePayment_Company", + "relationshipEntityName": "Company", + "relationshipEntityPerspectiveName": "Companies", + "relationshipEntityPerspectiveLabel": "Companies", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Company", + "widgetDropdownUrl": "/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController", + "widgetDropdownControllerUrl": "/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController", "dataTypeJava": "int", "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", "inputRule": "" }, { @@ -3539,6 +3649,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 100, "inputRule": "" @@ -3568,42 +3679,11 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 100, "inputRule": "" }, - { - "auditType": "NONE", - "dataName": "EMPLOYEEPAYMENT_COMPANY", - "dataNullable": true, - "dataType": "INTEGER", - "description": "", - "name": "Company", - "tooltip": "", - "widgetDropDownKey": "Id", - "widgetDropDownValue": "Name", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "DROPDOWN", - "relationshipName": "EmployeePayment_Company", - "relationshipEntityName": "Company", - "relationshipEntityPerspectiveName": "Companies", - "relationshipEntityPerspectiveLabel": "Entities", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isRequiredProperty": false, - "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "Company", - "widgetDropdownUrl": "/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyService.ts", - "widgetDropdownControllerUrl": "/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts", - "dataTypeJava": "int", - "dataTypeTypescript": "number", - "inputRule": "" - }, { "auditType": "NONE", "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generateByType('Employee Payment')", @@ -3630,6 +3710,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" @@ -3660,6 +3741,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" @@ -3689,40 +3771,11 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 36, "inputRule": "" }, - { - "auditType": "NONE", - "dataName": "EMPLOYEEPAYMENT_PAYMENTMETHOD", - "dataNullable": false, - "dataType": "INTEGER", - "description": "", - "isRequiredProperty": true, - "name": "PaymentMethod", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "TEXTBOX", - "relationshipName": "EmployeePayment_PaymentMethod", - "relationshipEntityName": "PaymentMethod", - "relationshipEntityPerspectiveName": "Settings", - "relationshipEntityPerspectiveLabel": "methods", - "dataNotNull": true, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "PaymentMethod", - "widgetDropdownUrl": "", - "widgetDropdownControllerUrl": "", - "dataTypeJava": "int", - "dataTypeTypescript": "number", - "inputRule": "" - }, { "auditType": "CREATED_AT", "dataName": "EMPLOYEEPAYMENT_CREATEDAT", @@ -3747,6 +3800,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "timestamp", "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.Instant", "isDateType": true, "inputRule": "" }, @@ -3775,6 +3829,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" @@ -3803,6 +3858,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "timestamp", "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.Instant", "isDateType": true, "inputRule": "" }, @@ -3831,6 +3887,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" @@ -3866,6 +3923,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "int", "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", "inputRule": "" }, { @@ -3893,6 +3951,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "date", "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.LocalDate", "isDateType": true, "inputRule": "" }, @@ -3920,6 +3979,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "date", "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.LocalDate", "isDateType": true, "inputRule": "" }, @@ -3949,6 +4009,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 34, "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" @@ -3979,6 +4040,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 34, "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" @@ -4008,6 +4070,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" @@ -4039,6 +4102,40 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "double", "dataTypeTypescript": "number", + "dataTypeJavaClass": "java.math.BigDecimal", + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "PAYMENTRECORD_COMPANY", + "dataNullable": true, + "dataType": "INTEGER", + "description": "", + "name": "Company", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "PaymentRecord_Company", + "relationshipEntityName": "Company", + "relationshipEntityPerspectiveName": "Companies", + "relationshipEntityPerspectiveLabel": "Companies", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Company", + "widgetDropdownUrl": "/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController", + "widgetDropdownControllerUrl": "/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", "inputRule": "" }, { @@ -4059,7 +4156,7 @@ "relationshipName": "PaymentRecord_Currency", "relationshipEntityName": "Currency", "relationshipEntityPerspectiveName": "Settings", - "relationshipEntityPerspectiveLabel": "Entities", + "relationshipEntityPerspectiveLabel": "Settings", "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, @@ -4067,10 +4164,11 @@ "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "Currency", - "widgetDropdownUrl": "/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyService.ts", - "widgetDropdownControllerUrl": "/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts", + "widgetDropdownUrl": "/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController", + "widgetDropdownControllerUrl": "/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController", "dataTypeJava": "int", "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", "inputRule": "" }, { @@ -4099,10 +4197,11 @@ "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "PaymentDirection", - "widgetDropdownUrl": "/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentDirectionService.ts", - "widgetDropdownControllerUrl": "/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentDirectionController.ts", + "widgetDropdownUrl": "/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentDirectionController", + "widgetDropdownControllerUrl": "/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentDirectionController", "dataTypeJava": "int", "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", "inputRule": "" }, { @@ -4131,10 +4230,11 @@ "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "PaymentType", - "widgetDropdownUrl": "/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeService.ts", - "widgetDropdownControllerUrl": "/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeController.ts", + "widgetDropdownUrl": "/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentTypeController", + "widgetDropdownControllerUrl": "/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentTypeController", "dataTypeJava": "int", "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", "inputRule": "" }, { @@ -4162,6 +4262,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" @@ -4191,42 +4292,11 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" }, - { - "auditType": "NONE", - "dataName": "PAYMENTRECORD_COMPANY", - "dataNullable": true, - "dataType": "INTEGER", - "description": "", - "name": "Company", - "tooltip": "", - "widgetDropDownKey": "Id", - "widgetDropDownValue": "Name", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "DROPDOWN", - "relationshipName": "PaymentRecord_Company", - "relationshipEntityName": "Company", - "relationshipEntityPerspectiveName": "Companies", - "relationshipEntityPerspectiveLabel": "Entities", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isRequiredProperty": false, - "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "Company", - "widgetDropdownUrl": "/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyService.ts", - "widgetDropdownControllerUrl": "/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts", - "dataTypeJava": "int", - "dataTypeTypescript": "number", - "inputRule": "" - }, { "auditType": "NONE", "calculatedPropertyExpressionCreate": "require(\"sdk/utils/uuid\").random()", @@ -4253,6 +4323,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" @@ -4282,6 +4353,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 36, "inputRule": "" @@ -4310,6 +4382,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "boolean", "dataTypeTypescript": "boolean", + "dataTypeJavaClass": "Boolean", "inputRule": "" }, { @@ -4336,6 +4409,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "timestamp", "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.Instant", "isDateType": true, "inputRule": "" }, @@ -4364,6 +4438,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 255, "inputRule": "" @@ -4392,6 +4467,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "timestamp", "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.Instant", "isDateType": true, "inputRule": "" }, @@ -4420,6 +4496,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" @@ -4448,6 +4525,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "timestamp", "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.Instant", "isDateType": true, "inputRule": "" }, @@ -4476,6 +4554,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" @@ -4510,16 +4589,17 @@ "tooltip": "PaymentRecord", "type": "PRIMARY", "dataSource": "DefaultDB", + "javaPerspectiveName": "paymentrecord", "referencedProjections": [ - { - "name": "Currency", - "project": "codbex-currencies", - "genFolderName": "codbex-currencies" - }, { "name": "Company", "project": "codbex-companies", "genFolderName": "codbex-companies" + }, + { + "name": "Currency", + "project": "codbex-currencies", + "genFolderName": "codbex-currencies" } ], "dataOrderBy": "DESC", @@ -4554,6 +4634,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "date", "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.LocalDate", "isDateType": true, "inputRule": "" }, @@ -4582,6 +4663,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "date", "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.LocalDate", "isDateType": true, "inputRule": "" }, @@ -4611,6 +4693,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 34, "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" @@ -4641,6 +4724,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 34, "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" @@ -4670,6 +4754,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" @@ -4701,6 +4786,40 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "double", "dataTypeTypescript": "number", + "dataTypeJavaClass": "java.math.BigDecimal", + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "PAYMENTRECORD_COMPANY", + "dataNullable": true, + "dataType": "INTEGER", + "description": "", + "name": "Company", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "PaymentRecord_Company", + "relationshipEntityName": "Company", + "relationshipEntityPerspectiveName": "Companies", + "relationshipEntityPerspectiveLabel": "Companies", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Company", + "widgetDropdownUrl": "/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController", + "widgetDropdownControllerUrl": "/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", "inputRule": "" }, { @@ -4721,7 +4840,7 @@ "relationshipName": "PaymentRecord_Currency", "relationshipEntityName": "Currency", "relationshipEntityPerspectiveName": "Settings", - "relationshipEntityPerspectiveLabel": "Entities", + "relationshipEntityPerspectiveLabel": "Settings", "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, @@ -4729,10 +4848,11 @@ "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "Currency", - "widgetDropdownUrl": "/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyService.ts", - "widgetDropdownControllerUrl": "/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts", + "widgetDropdownUrl": "/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController", + "widgetDropdownControllerUrl": "/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController", "dataTypeJava": "int", "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", "inputRule": "" }, { @@ -4761,10 +4881,11 @@ "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "PaymentDirection", - "widgetDropdownUrl": "/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentDirectionService.ts", - "widgetDropdownControllerUrl": "/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentDirectionController.ts", + "widgetDropdownUrl": "/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentDirectionController", + "widgetDropdownControllerUrl": "/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentDirectionController", "dataTypeJava": "int", "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", "inputRule": "" }, { @@ -4793,10 +4914,11 @@ "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "PaymentType", - "widgetDropdownUrl": "/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeService.ts", - "widgetDropdownControllerUrl": "/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeController.ts", + "widgetDropdownUrl": "/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentTypeController", + "widgetDropdownControllerUrl": "/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentTypeController", "dataTypeJava": "int", "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", "inputRule": "" }, { @@ -4824,6 +4946,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" @@ -4853,42 +4976,11 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" }, - { - "auditType": "NONE", - "dataName": "PAYMENTRECORD_COMPANY", - "dataNullable": true, - "dataType": "INTEGER", - "description": "", - "name": "Company", - "tooltip": "", - "widgetDropDownKey": "Id", - "widgetDropDownValue": "Name", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "DROPDOWN", - "relationshipName": "PaymentRecord_Company", - "relationshipEntityName": "Company", - "relationshipEntityPerspectiveName": "Companies", - "relationshipEntityPerspectiveLabel": "Entities", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isRequiredProperty": false, - "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "Company", - "widgetDropdownUrl": "/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyService.ts", - "widgetDropdownControllerUrl": "/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts", - "dataTypeJava": "int", - "dataTypeTypescript": "number", - "inputRule": "" - }, { "auditType": "NONE", "calculatedPropertyExpressionCreate": "require(\"sdk/utils/uuid\").random()", @@ -4915,6 +5007,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" @@ -4944,6 +5037,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 36, "inputRule": "" @@ -4972,6 +5066,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "boolean", "dataTypeTypescript": "boolean", + "dataTypeJavaClass": "Boolean", "inputRule": "" }, { @@ -4998,6 +5093,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "timestamp", "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.Instant", "isDateType": true, "inputRule": "" }, @@ -5026,6 +5122,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 255, "inputRule": "" @@ -5054,6 +5151,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "timestamp", "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.Instant", "isDateType": true, "inputRule": "" }, @@ -5082,6 +5180,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" @@ -5110,6 +5209,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "timestamp", "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.Instant", "isDateType": true, "inputRule": "" }, @@ -5138,6 +5238,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" @@ -5151,10 +5252,8 @@ "properties": [ { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "", - "calculatedPropertyExpressionUpdate": "", "dataAutoIncrement": true, - "dataName": "CURRENCY_ID", + "dataName": "PAYMENTTYPE_ID", "dataNullable": true, "dataPrimaryKey": true, "dataType": "INTEGER", @@ -5175,1553 +5274,506 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "int", "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", "inputRule": "" }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "", - "calculatedPropertyExpressionUpdate": "", - "dataLength": "3", - "dataName": "CURRENCY_CODE", - "dataNullable": true, + "dataLength": "20", + "dataName": "PAYMENTTYPE_NAME", + "dataNullable": false, "dataType": "VARCHAR", "description": "", - "name": "Code", + "isRequiredProperty": true, + "name": "Name", "tooltip": "", "widgetIsMajor": true, - "widgetLength": "3", - "widgetSize": "fd-col-md--2 fd-col--3", + "widgetLength": "20", + "widgetSize": "", "widgetType": "TEXTBOX", - "dataNotNull": false, + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, - "widgetLabel": "Code", + "widgetLabel": "Name", "widgetDropdownUrl": "", "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, - "maxLength": 3, + "maxLength": 20, "inputRule": "" - }, + } + ], + "caption": "Manage entity PaymentType", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"CODBEX_PAYMENTTYPE\"", + "dataName": "PAYMENTTYPE", + "dataQuery": "", + "description": "Manage entity PaymentType", + "feedPassword": "YWRtaW4=", + "feedUsername": "YWRtaW4=", + "generateDefaultRoles": "true", + "generateReport": "false", + "icon": "/services/web/resources/unicons/file.svg", + "menuIndex": "100", + "menuKey": "paymenttype", + "menuLabel": "PaymentType", + "multilingual": "false", + "name": "PaymentType", + "perspectiveHeader": "", + "perspectiveIcon": "/services/web/resources/unicons/copy.svg", + "perspectiveName": "Settings", + "perspectiveNavId": "", + "perspectiveOrder": "100", + "perspectiveRole": "", + "roleRead": "codbex-payments.Settings.PaymentTypeReadOnly", + "roleWrite": "codbex-payments.Settings.PaymentTypeFullAccess", + "title": "PaymentType", + "tooltip": "PaymentType", + "type": "SETTING", + "dataSource": "DefaultDB", + "javaPerspectiveName": "settings", + "referencedProjections": [], + "primaryKeys": [ + "Id" + ], + "primaryKeysString": "Id" + }, + { + "properties": [ { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "", - "calculatedPropertyExpressionUpdate": "", - "dataLength": "127", - "dataName": "CURRENCY_NAME", + "dataAutoIncrement": true, + "dataName": "PAYMENTADJUSTMENT_ID", "dataNullable": true, - "dataType": "VARCHAR", + "dataPrimaryKey": true, + "dataType": "INTEGER", "description": "", - "name": "Name", + "name": "Id", "tooltip": "", "widgetIsMajor": true, "widgetLength": "20", - "widgetSize": "fd-col-md--6 fd-col--9", + "widgetSize": "", "widgetType": "TEXTBOX", "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, "dataUnique": false, "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, - "widgetLabel": "Name", + "widgetLabel": "Id", "widgetDropdownUrl": "", "widgetDropdownControllerUrl": "", - "dataTypeJava": "string", - "dataTypeTypescript": "string", - "minLength": 0, - "maxLength": 20, + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", "inputRule": "" }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "", - "calculatedPropertyExpressionUpdate": "", - "dataLength": "3", - "dataName": "CURRENCY_NUMERIC", - "dataNullable": true, - "dataType": "VARCHAR", + "dataName": "PAYMENTADJUSTMENT_DATE", + "dataNullable": false, + "dataType": "DATE", "description": "", - "name": "Numeric", + "isRequiredProperty": true, + "name": "Date", "tooltip": "", "widgetIsMajor": true, - "widgetLength": "3", - "widgetSize": "fd-col-md--2 fd-col--3", - "widgetType": "TEXTBOX", - "dataNotNull": false, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DATE", + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, - "widgetLabel": "Numeric", + "widgetLabel": "Date", "widgetDropdownUrl": "", "widgetDropdownControllerUrl": "", - "dataTypeJava": "string", - "dataTypeTypescript": "string", - "minLength": 0, - "maxLength": 3, + "dataTypeJava": "date", + "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.LocalDate", + "isDateType": true, "inputRule": "" }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "", - "calculatedPropertyExpressionUpdate": "", - "dataName": "CURRENCY_ROUNDING", - "dataNullable": true, - "dataType": "INTEGER", + "dataName": "PAYMENTADJUSTMENT_VALOR", + "dataNullable": false, + "dataType": "DATE", "description": "", - "name": "Rounding", + "isRequiredProperty": true, + "name": "Valor", "tooltip": "", "widgetIsMajor": true, "widgetLength": "20", - "widgetSize": "fd-col-md--2 fd-col--3", - "widgetType": "NUMBER", - "dataNotNull": false, + "widgetSize": "", + "widgetType": "DATE", + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, - "widgetLabel": "Rounding", + "widgetLabel": "Valor", "widgetDropdownUrl": "", "widgetDropdownControllerUrl": "", - "dataTypeJava": "int", - "dataTypeTypescript": "number", + "dataTypeJava": "date", + "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.LocalDate", + "isDateType": true, "inputRule": "" }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "", - "calculatedPropertyExpressionUpdate": "", - "dataName": "CURRENCY_BASE", - "dataNullable": true, - "dataType": "BOOLEAN", + "dataLength": "16", + "dataName": "PAYMENTADJUSTMENT_AMOUNT", + "dataNullable": false, + "dataPrecision": "16", + "dataScale": "2", + "dataType": "DECIMAL", "description": "", - "name": "Base", + "isRequiredProperty": true, + "name": "Amount", "tooltip": "", "widgetIsMajor": true, "widgetLength": "20", "widgetSize": "", - "widgetType": "CHECKBOX", - "dataNotNull": false, + "widgetType": "NUMBER", + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, - "widgetLabel": "Base", + "widgetLabel": "Amount", "widgetDropdownUrl": "", "widgetDropdownControllerUrl": "", - "dataTypeJava": "boolean", - "dataTypeTypescript": "boolean", + "dataTypeJava": "double", + "dataTypeTypescript": "number", + "dataTypeJavaClass": "java.math.BigDecimal", "inputRule": "" }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "", - "calculatedPropertyExpressionUpdate": "", - "dataName": "CURRENCY_RATE", - "dataNullable": true, - "dataType": "DOUBLE", + "dataName": "PAYMENTADJUSTMENT_CURRENCY", + "dataNullable": false, + "dataType": "INTEGER", "description": "", - "name": "Rate", + "isRequiredProperty": true, + "name": "Currency", "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Code", "widgetIsMajor": true, "widgetLength": "20", - "widgetSize": "fd-col-md--4 fd-col--6", - "widgetType": "NUMBER", - "dataNotNull": false, + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "PaymentAdjustment_Currency", + "relationshipEntityName": "Currency", + "relationshipEntityPerspectiveName": "Settings", + "relationshipEntityPerspectiveLabel": "Settings", + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, - "widgetLabel": "Rate", - "widgetDropdownUrl": "", - "widgetDropdownControllerUrl": "", - "dataTypeJava": "double", + "widgetLabel": "Currency", + "widgetDropdownUrl": "/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController", + "widgetDropdownControllerUrl": "/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController", + "dataTypeJava": "int", "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", "inputRule": "" - } - ], - "caption": "Manage entity Currency", - "dataCount": "SELECT COUNT(*) AS COUNT FROM \"CODBEX_CURRENCY\"", - "dataName": "CURRENCY", - "dataQuery": "", - "description": "Manage entity Currency", - "generateDefaultRoles": "false", - "generateReport": "false", - "icon": "/services/web/resources/unicons/file.svg", - "layoutType": "MANAGE", - "menuIndex": "100", - "menuKey": "currency", - "menuLabel": "Currency", - "multilingual": "false", - "name": "Currency", - "perspectiveHeader": "", - "perspectiveIcon": "/services/web/resources/unicons/dollar-alt.svg", - "perspectiveLabel": "Entities", - "perspectiveName": "Settings", - "perspectiveNavId": "", - "perspectiveOrder": "990", - "perspectiveRole": "", - "projectionReferencedEntity": "Currency", - "projectionReferencedModel": "/workspace/codbex-currencies/codbex-currencies.model", - "title": "Currency", - "tooltip": "Currency", - "type": "PROJECTION", - "dataSource": "DefaultDB", - "referencedProjections": [], - "primaryKeys": [ - "Id" - ], - "primaryKeysString": "Id" - }, - { - "properties": [ + }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "", - "calculatedPropertyExpressionUpdate": "", - "dataAutoIncrement": true, - "dataName": "COMPANY_ID", + "dataLength": "100", + "dataName": "PAYMENTADJUSTMENT_REASON", "dataNullable": true, - "dataPrimaryKey": true, - "dataType": "INTEGER", + "dataType": "VARCHAR", "description": "", - "name": "Id", + "name": "Reason", "tooltip": "", "widgetIsMajor": true, "widgetLength": "20", "widgetSize": "", "widgetType": "TEXTBOX", "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, "dataUnique": false, "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, - "widgetLabel": "Id", + "widgetLabel": "Reason", "widgetDropdownUrl": "", "widgetDropdownControllerUrl": "", - "dataTypeJava": "int", - "dataTypeTypescript": "number", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 20, "inputRule": "" }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "", - "calculatedPropertyExpressionUpdate": "", - "dataLength": "100", - "dataName": "COMPANY_NAME", - "dataNullable": true, - "dataType": "VARCHAR", + "dataName": "PAYMENTADJUSTMENT_COMPANY", + "dataNullable": false, + "dataType": "INTEGER", "description": "", "isRequiredProperty": true, - "name": "Name", + "name": "Company", "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", "widgetIsMajor": true, - "widgetLength": "100", + "widgetLength": "20", "widgetSize": "", - "widgetType": "TEXTBOX", - "dataNotNull": false, + "widgetType": "DROPDOWN", + "relationshipName": "PaymentAdjustment_Company", + "relationshipEntityName": "Company", + "relationshipEntityPerspectiveName": "Companies", + "relationshipEntityPerspectiveLabel": "Companies", + "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, - "widgetLabel": "Name", - "widgetDropdownUrl": "", - "widgetDropdownControllerUrl": "", - "dataTypeJava": "string", - "dataTypeTypescript": "string", - "minLength": 0, - "maxLength": 100, + "widgetLabel": "Company", + "widgetDropdownUrl": "/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController", + "widgetDropdownControllerUrl": "/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", "inputRule": "" }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "", - "calculatedPropertyExpressionUpdate": "", - "dataLength": "50", - "dataName": "COMPANY_MANAGER", + "calculatedPropertyExpressionCreate": "require(\"sdk/utils/uuid\").random()", + "dataLength": "36", + "dataName": "PAYMENTADJUSTMENT_UUID", "dataNullable": true, "dataType": "VARCHAR", + "dataUnique": true, "description": "", - "name": "Manager", + "isCalculatedProperty": true, + "name": "UUID", "tooltip": "", "widgetIsMajor": true, - "widgetLength": "50", - "widgetSize": "fd-col-md--6 fd-col--9", + "widgetLength": "20", + "widgetSize": "", "widgetType": "TEXTBOX", "dataNotNull": false, "dataAutoIncrement": false, "dataPrimaryKey": false, - "dataUnique": false, "isRequiredProperty": false, - "isCalculatedProperty": false, "isReadOnlyProperty": false, - "widgetLabel": "Manager", + "widgetLabel": "UUID", "widgetDropdownUrl": "", "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, - "maxLength": 50, + "maxLength": 20, "inputRule": "" }, { - "auditType": "NONE", - "calculatedPropertyExpressionCreate": "", - "calculatedPropertyExpressionUpdate": "", - "dataLength": "100", - "dataName": "COMPANY_EMAIL", + "auditType": "CREATED_AT", + "dataName": "PAYMENTADJUSTMENT_CREATEDAT", "dataNullable": true, - "dataType": "VARCHAR", + "dataType": "TIMESTAMP", "description": "", - "isRequiredProperty": true, - "name": "Email", + "isReadOnlyProperty": true, + "name": "CreatedAt", "tooltip": "", "widgetIsMajor": true, - "widgetLength": "100", - "widgetSize": "fd-col-md--4 fd-col--6", + "widgetLength": "20", + "widgetSize": "", "widgetType": "TEXTBOX", "dataNotNull": false, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, + "isRequiredProperty": false, "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "Email", + "widgetLabel": "CreatedAt", "widgetDropdownUrl": "", "widgetDropdownControllerUrl": "", - "dataTypeJava": "string", - "dataTypeTypescript": "string", - "minLength": 0, - "maxLength": 100, + "dataTypeJava": "timestamp", + "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.Instant", + "isDateType": true, "inputRule": "" }, { - "auditType": "NONE", - "calculatedPropertyExpressionCreate": "", - "calculatedPropertyExpressionUpdate": "", + "auditType": "CREATED_BY", "dataLength": "20", - "dataName": "COMPANY_PHONE", + "dataName": "PAYMENTADJUSTMENT_CREATEDBY", "dataNullable": true, "dataType": "VARCHAR", "description": "", - "name": "Phone", + "isReadOnlyProperty": true, + "name": "CreatedBy", "tooltip": "", "widgetIsMajor": true, "widgetLength": "20", - "widgetSize": "fd-col-md--2 fd-col--3", - "widgetType": "TEL", + "widgetSize": "", + "widgetType": "TEXTBOX", "dataNotNull": false, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, "isRequiredProperty": false, "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "Phone", + "widgetLabel": "CreatedBy", "widgetDropdownUrl": "", "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" }, { - "auditType": "NONE", - "calculatedPropertyExpressionCreate": "", - "calculatedPropertyExpressionUpdate": "", - "dataLength": "200", - "dataName": "COMPANY_ADDRESS", + "auditType": "UPDATED_AT", + "dataName": "PAYMENTADJUSTMENT_UPDATEDAT", "dataNullable": true, - "dataType": "VARCHAR", + "dataType": "TIMESTAMP", "description": "", - "isRequiredProperty": true, - "name": "Address", + "isReadOnlyProperty": true, + "name": "UpdatedAt", "tooltip": "", "widgetIsMajor": true, - "widgetLength": "200", + "widgetLength": "20", "widgetSize": "", "widgetType": "TEXTBOX", "dataNotNull": false, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, + "isRequiredProperty": false, "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "Address", + "widgetLabel": "UpdatedAt", "widgetDropdownUrl": "", "widgetDropdownControllerUrl": "", - "dataTypeJava": "string", - "dataTypeTypescript": "string", - "minLength": 0, - "maxLength": 200, + "dataTypeJava": "timestamp", + "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.Instant", + "isDateType": true, "inputRule": "" }, { - "auditType": "NONE", - "calculatedPropertyExpressionCreate": "", - "calculatedPropertyExpressionUpdate": "", + "auditType": "UPDATED_BY", "dataLength": "20", - "dataName": "COMPANY_POSTCODE", + "dataName": "PAYMENTADJUSTMENT_UPDATEDBY", "dataNullable": true, "dataType": "VARCHAR", "description": "", - "isRequiredProperty": true, - "name": "PostCode", + "isReadOnlyProperty": true, + "name": "UpdatedBy", "tooltip": "", "widgetIsMajor": true, "widgetLength": "20", - "widgetSize": "fd-col-md--2 fd-col--3", + "widgetSize": "", "widgetType": "TEXTBOX", "dataNotNull": false, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, + "isRequiredProperty": false, "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "PostCode", - "widgetDropdownUrl": "", - "widgetDropdownControllerUrl": "", - "dataTypeJava": "string", - "dataTypeTypescript": "string", - "minLength": 0, - "maxLength": 20, - "inputRule": "" - }, - { - "auditType": "NONE", - "calculatedPropertyExpressionCreate": "", - "calculatedPropertyExpressionUpdate": "", - "dataName": "COMPANY_CITY", - "dataNullable": true, - "dataType": "INTEGER", - "description": "", - "isRequiredProperty": true, - "name": "City", - "relationshipEntityPerspectiveName": "Cities", - "relationshipName": "Company_City", - "tooltip": "", - "widgetDropDownKey": "Id", - "widgetDropDownValue": "Name", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "DROPDOWN", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "City", - "widgetDropdownUrl": "/services/ts/codbex-payments/gen/codbex-payments/api/Cities/undefinedService.ts", - "widgetDropdownControllerUrl": "/services/ts/codbex-payments/gen/codbex-payments/api/Cities/undefinedController.ts", - "dataTypeJava": "int", - "dataTypeTypescript": "number", - "inputRule": "" - }, - { - "auditType": "NONE", - "calculatedPropertyExpressionCreate": "", - "calculatedPropertyExpressionUpdate": "", - "dataName": "COMPANY_COUNTRY", - "dataNullable": true, - "dataType": "INTEGER", - "description": "", - "isRequiredProperty": true, - "name": "Country", - "relationshipEntityPerspectiveName": "Countries", - "relationshipName": "Company_Country", - "tooltip": "", - "widgetDropDownKey": "Id", - "widgetDropDownValue": "Name", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "DROPDOWN", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "Country", - "widgetDropdownUrl": "/services/ts/codbex-payments/gen/codbex-payments/api/Countries/undefinedService.ts", - "widgetDropdownControllerUrl": "/services/ts/codbex-payments/gen/codbex-payments/api/Countries/undefinedController.ts", - "dataTypeJava": "int", - "dataTypeTypescript": "number", - "inputRule": "" - }, - { - "auditType": "NONE", - "calculatedPropertyExpressionCreate": "", - "calculatedPropertyExpressionUpdate": "", - "dataLength": "20", - "dataName": "COMPANY_TIN", - "dataNullable": true, - "dataType": "VARCHAR", - "description": "", - "name": "TIN", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "fd-col-md--4 fd-col--6", - "widgetType": "TEXTBOX", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isRequiredProperty": false, - "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "TIN", + "widgetLabel": "UpdatedBy", "widgetDropdownUrl": "", "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" - }, - { - "auditType": "NONE", - "calculatedPropertyExpressionCreate": "", - "calculatedPropertyExpressionUpdate": "", - "dataLength": "22", - "dataName": "COMPANY_IBAN", - "dataNullable": true, - "dataType": "VARCHAR", - "description": "", - "name": "IBAN", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "22", - "widgetSize": "fd-col-md--4 fd-col--6", - "widgetType": "TEXTBOX", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isRequiredProperty": false, - "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "IBAN", - "widgetDropdownUrl": "", - "widgetDropdownControllerUrl": "", - "dataTypeJava": "string", - "dataTypeTypescript": "string", - "minLength": 0, - "maxLength": 22, - "inputRule": "" } ], - "caption": "Manage entity Company", - "dataCount": "SELECT COUNT(*) AS COUNT FROM \"CODBEX_COMPANY\"", - "dataName": "COMPANY", + "caption": "Manage entity PaymentAdjustment", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"CODBEX_PAYMENTADJUSTMENT\"", + "dataName": "PAYMENTADJUSTMENT", "dataQuery": "", - "description": "Manage entity Company", - "generateDefaultRoles": "false", + "description": "Manage entity PaymentAdjustment", + "feedPassword": "YWRtaW4=", + "feedUsername": "YWRtaW4=", + "generateDefaultRoles": "true", "generateReport": "false", "icon": "/services/web/resources/unicons/file.svg", - "layoutType": "MANAGE", + "layoutType": "MANAGE_MASTER", "menuIndex": "100", - "menuKey": "company", - "menuLabel": "Company", + "menuKey": "paymentadjustment", + "menuLabel": "PaymentAdjustment", "multilingual": "false", - "name": "Company", + "name": "PaymentAdjustment", "perspectiveHeader": "", - "perspectiveIcon": "/services/web/resources/unicons/university.svg", - "perspectiveLabel": "Entities", - "perspectiveName": "Companies", - "perspectiveNavId": "", - "perspectiveOrder": "100", + "perspectiveIcon": "/services/web/resources/unicons/paypal.svg", + "perspectiveLabel": "PaymentAdjustment", + "perspectiveName": "PaymentAdjustment", + "perspectiveNavId": "sales-navigation-group", + "perspectiveOrder": "700", "perspectiveRole": "", - "projectionReferencedEntity": "Company", - "projectionReferencedModel": "/workspace/codbex-companies/codbex-companies.model", - "title": "Company", - "tooltip": "Company", - "type": "PROJECTION", + "roleRead": "codbex-payments.PaymentAdjustment.PaymentAdjustmentReadOnly", + "roleWrite": "codbex-payments.PaymentAdjustment.PaymentAdjustmentFullAccess", + "title": "PaymentAdjustment", + "tooltip": "PaymentAdjustment", + "type": "PRIMARY", "dataSource": "DefaultDB", - "referencedProjections": [], + "javaPerspectiveName": "paymentadjustment", + "referencedProjections": [ + { + "name": "Currency", + "project": "codbex-currencies", + "genFolderName": "codbex-currencies" + }, + { + "name": "Company", + "project": "codbex-companies", + "genFolderName": "codbex-companies" + } + ], "primaryKeys": [ "Id" ], "primaryKeysString": "Id", - "hasDropdowns": true - }, - { - "properties": [ - { - "auditType": "NONE", - "dataAutoIncrement": true, - "dataName": "PAYMENTTYPE_ID", - "dataNullable": true, - "dataPrimaryKey": true, - "dataType": "INTEGER", - "description": "", - "name": "Id", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "TEXTBOX", - "dataNotNull": false, - "dataUnique": false, - "isRequiredProperty": false, - "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "Id", - "widgetDropdownUrl": "", - "widgetDropdownControllerUrl": "", - "dataTypeJava": "int", - "dataTypeTypescript": "number", - "inputRule": "" - }, - { + "masterProperties": { + "title": { "auditType": "NONE", - "dataLength": "20", - "dataName": "PAYMENTTYPE_NAME", + "dataName": "PAYMENTADJUSTMENT_DATE", "dataNullable": false, - "dataType": "VARCHAR", + "dataType": "DATE", "description": "", "isRequiredProperty": true, - "name": "Name", + "name": "Date", "tooltip": "", "widgetIsMajor": true, "widgetLength": "20", "widgetSize": "", - "widgetType": "TEXTBOX", + "widgetType": "DATE", "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, - "widgetLabel": "Name", + "widgetLabel": "Date", "widgetDropdownUrl": "", "widgetDropdownControllerUrl": "", - "dataTypeJava": "string", - "dataTypeTypescript": "string", - "minLength": 0, - "maxLength": 20, - "inputRule": "" - } - ], - "caption": "Manage entity PaymentType", - "dataCount": "SELECT COUNT(*) AS COUNT FROM \"CODBEX_PAYMENTTYPE\"", - "dataName": "PAYMENTTYPE", - "dataQuery": "", - "description": "Manage entity PaymentType", - "feedPassword": "YWRtaW4=", - "feedUsername": "YWRtaW4=", - "generateDefaultRoles": "true", - "generateReport": "false", - "icon": "/services/web/resources/unicons/file.svg", - "menuIndex": "100", - "menuKey": "paymenttype", - "menuLabel": "PaymentType", - "multilingual": "false", - "name": "PaymentType", - "perspectiveHeader": "", - "perspectiveIcon": "/services/web/resources/unicons/copy.svg", - "perspectiveName": "Settings", - "perspectiveNavId": "", - "perspectiveOrder": "100", - "perspectiveRole": "", - "roleRead": "codbex-payments.Settings.PaymentTypeReadOnly", - "roleWrite": "codbex-payments.Settings.PaymentTypeFullAccess", - "title": "PaymentType", - "tooltip": "PaymentType", - "type": "SETTING", - "dataSource": "DefaultDB", - "referencedProjections": [], - "primaryKeys": [ - "Id" - ], - "primaryKeysString": "Id" - }, - { - "properties": [ - { - "auditType": "NONE", - "dataAutoIncrement": true, - "dataName": "PAYMENTMETHOD_ID", - "dataNullable": true, - "dataPrimaryKey": true, - "dataType": "INTEGER", - "description": "", - "name": "Id", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "TEXTBOX", - "dataNotNull": false, - "dataUnique": false, - "isRequiredProperty": false, - "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "Id", - "widgetDropdownUrl": "", - "widgetDropdownControllerUrl": "", - "dataTypeJava": "int", - "dataTypeTypescript": "number", - "inputRule": "" - }, - { - "auditType": "NONE", - "dataLength": "20", - "dataName": "PAYMENTMETHOD_NAME", - "dataNullable": true, - "dataType": "VARCHAR", - "description": "", - "name": "Name", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "TEXTBOX", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isRequiredProperty": false, - "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "Name", - "widgetDropdownUrl": "", - "widgetDropdownControllerUrl": "", - "dataTypeJava": "string", - "dataTypeTypescript": "string", - "minLength": 0, - "maxLength": 20, - "inputRule": "" - } - ], - "caption": "Manage entity PaymentMethod", - "dataCount": "SELECT COUNT(*) AS COUNT FROM \"CODBEX_PAYMENTMETHOD\"", - "dataName": "PAYMENTMETHOD", - "dataQuery": "", - "description": "Manage entity PaymentMethod", - "generateDefaultRoles": "false", - "generateReport": "false", - "icon": "/services/web/resources/unicons/file.svg", - "layoutType": "MANAGE", - "menuIndex": "100", - "menuKey": "paymentmethod", - "menuLabel": "PaymentMethod", - "multilingual": "false", - "name": "PaymentMethod", - "perspectiveHeader": "", - "perspectiveIcon": "/services/web/resources/unicons/archive.svg", - "perspectiveLabel": "methods", - "perspectiveName": "Settings", - "perspectiveNavId": "", - "perspectiveOrder": "100", - "perspectiveRole": "", - "projectionReferencedEntity": "PaymentMethod", - "projectionReferencedModel": "/workspace/codbex-methods/codbex-methods.model", - "title": "PaymentMethod", - "tooltip": "PaymentMethod", - "type": "PROJECTION", - "dataSource": "DefaultDB", - "referencedProjections": [], - "primaryKeys": [ - "Id" - ], - "primaryKeysString": "Id" - }, - { - "properties": [ - { - "auditType": "NONE", - "dataAutoIncrement": true, - "dataName": "CUSTOMER_ID", - "dataNullable": true, - "dataPrimaryKey": true, - "dataType": "INTEGER", - "description": "", - "name": "Id", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "TEXTBOX", - "dataNotNull": false, - "dataUnique": false, - "isRequiredProperty": false, - "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "Id", - "widgetDropdownUrl": "", - "widgetDropdownControllerUrl": "", - "dataTypeJava": "int", - "dataTypeTypescript": "number", - "inputRule": "" - }, - { - "auditType": "NONE", - "dataLength": "100", - "dataName": "CUSTOMER_NAME", - "dataNullable": true, - "dataType": "VARCHAR", - "description": "", - "isRequiredProperty": true, - "name": "Name", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "100", - "widgetSize": "", - "widgetType": "TEXTBOX", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "Name", - "widgetDropdownUrl": "", - "widgetDropdownControllerUrl": "", - "dataTypeJava": "string", - "dataTypeTypescript": "string", - "minLength": 0, - "maxLength": 100, - "inputRule": "" - }, - { - "auditType": "NONE", - "dataLength": "200", - "dataName": "CUSTOMER_ADDRESS", - "dataNullable": true, - "dataType": "VARCHAR", - "description": "", - "isRequiredProperty": true, - "name": "Address", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "200", - "widgetSize": "", - "widgetType": "TEXTAREA", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "Address", - "widgetDropdownUrl": "", - "widgetDropdownControllerUrl": "", - "dataTypeJava": "string", - "dataTypeTypescript": "string", - "minLength": 0, - "maxLength": 200, - "inputRule": "" - }, - { - "auditType": "NONE", - "dataLength": "20", - "dataName": "CUSTOMER_POSTALCODE", - "dataNullable": true, - "dataType": "VARCHAR", - "description": "", - "name": "PostalCode", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "fd-col-md--2 fd-col--3", - "widgetType": "TEXTBOX", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isRequiredProperty": false, - "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "PostalCode", - "widgetDropdownUrl": "", - "widgetDropdownControllerUrl": "", - "dataTypeJava": "string", - "dataTypeTypescript": "string", - "minLength": 0, - "maxLength": 20, - "inputRule": "" - }, - { - "auditType": "NONE", - "dataLength": "100", - "dataName": "CUSTOMER_EMAIL", - "dataNullable": true, - "dataType": "VARCHAR", - "description": "", - "isRequiredProperty": true, - "name": "Email", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "100", - "widgetSize": "fd-col-md--6 fd-col--9", - "widgetType": "TEXTBOX", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "Email", - "widgetDropdownUrl": "", - "widgetDropdownControllerUrl": "", - "dataTypeJava": "string", - "dataTypeTypescript": "string", - "minLength": 0, - "maxLength": 100, - "inputRule": "" - }, - { - "auditType": "NONE", - "dataLength": "20", - "dataName": "CUSTOMER_PHONE", - "dataNullable": true, - "dataType": "VARCHAR", - "description": "", - "name": "Phone", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "fd-col-md--2 fd-col--3", - "widgetType": "TEXTBOX", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isRequiredProperty": false, - "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "Phone", - "widgetDropdownUrl": "", - "widgetDropdownControllerUrl": "", - "dataTypeJava": "string", - "dataTypeTypescript": "string", - "minLength": 0, - "maxLength": 20, - "inputRule": "" - }, - { - "auditType": "NONE", - "dataLength": "20", - "dataName": "CUSTOMER_FAX", - "dataNullable": true, - "dataType": "VARCHAR", - "description": "", - "name": "Fax", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "fd-col-md--2 fd-col--3", - "widgetType": "TEXTBOX", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isRequiredProperty": false, - "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "Fax", - "widgetDropdownUrl": "", - "widgetDropdownControllerUrl": "", - "dataTypeJava": "string", - "dataTypeTypescript": "string", - "minLength": 0, - "maxLength": 20, - "inputRule": "" - }, - { - "auditType": "NONE", - "dataName": "CUSTOMER_COUNTRY", - "dataNullable": true, - "dataType": "INTEGER", - "description": "", - "isRequiredProperty": true, - "name": "Country", - "relationshipEntityPerspectiveLabel": "Entities", - "relationshipEntityPerspectiveName": "Countries", - "relationshipName": "Customer_Country", - "tooltip": "", - "widgetDropDownKey": "Id", - "widgetDropDownValue": "Name", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "DROPDOWN", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "Country", - "widgetDropdownUrl": "/services/ts/codbex-payments/gen/codbex-payments/api/Countries/undefinedService.ts", - "widgetDropdownControllerUrl": "/services/ts/codbex-payments/gen/codbex-payments/api/Countries/undefinedController.ts", - "dataTypeJava": "int", - "dataTypeTypescript": "number", - "inputRule": "" - }, - { - "auditType": "NONE", - "dataName": "CUSTOMER_CITY", - "dataNullable": true, - "dataType": "INTEGER", - "description": "", - "isRequiredProperty": true, - "name": "City", - "relationshipEntityPerspectiveLabel": "Entities", - "relationshipEntityPerspectiveName": "Cities", - "relationshipName": "Customer_City", - "tooltip": "", - "widgetDropDownKey": "Id", - "widgetDropDownValue": "Name", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "DROPDOWN", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "City", - "widgetDropdownUrl": "/services/ts/codbex-payments/gen/codbex-payments/api/Cities/undefinedService.ts", - "widgetDropdownControllerUrl": "/services/ts/codbex-payments/gen/codbex-payments/api/Cities/undefinedController.ts", - "dataTypeJava": "int", - "dataTypeTypescript": "number", - "inputRule": "" - }, - { - "auditType": "NONE", - "dataLength": "20", - "dataName": "CUSTOMER_TIN", - "dataNullable": true, - "dataType": "VARCHAR", - "description": "", - "name": "TIN", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "fd-col-md--4 fd-col--6", - "widgetType": "TEXTBOX", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isRequiredProperty": false, - "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "TIN", - "widgetDropdownUrl": "", - "widgetDropdownControllerUrl": "", - "dataTypeJava": "string", - "dataTypeTypescript": "string", - "minLength": 0, - "maxLength": 20, - "inputRule": "" - }, - { - "auditType": "NONE", - "dataLength": "36", - "dataName": "CUSTOMER_IBAN", - "dataNullable": true, - "dataType": "VARCHAR", - "description": "", - "name": "IBAN", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "36", - "widgetSize": "fd-col-md--4 fd-col--6", - "widgetType": "TEXTBOX", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isRequiredProperty": false, - "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "IBAN", - "widgetDropdownUrl": "", - "widgetDropdownControllerUrl": "", - "dataTypeJava": "string", - "dataTypeTypescript": "string", - "minLength": 0, - "maxLength": 36, - "inputRule": "" - } - ], - "caption": "Manage entity Customer", - "dataCount": "SELECT COUNT(*) AS COUNT FROM \"CODBEX_CUSTOMER\"", - "dataName": "CUSTOMER", - "dataQuery": "", - "description": "Manage entity Customer", - "generateDefaultRoles": "false", - "generateReport": "false", - "icon": "/services/web/resources/unicons/file.svg", - "layoutType": "MANAGE", - "menuIndex": "100", - "menuKey": "customer", - "menuLabel": "Customer", - "multilingual": "false", - "name": "Customer", - "perspectiveHeader": "", - "perspectiveIcon": "/services/web/resources/unicons/user-plus.svg", - "perspectiveLabel": "Customers", - "perspectiveName": "Customers", - "perspectiveNavId": "", - "perspectiveOrder": "100", - "perspectiveRole": "", - "projectionReferencedEntity": "Customer", - "projectionReferencedModel": "/workspace/codbex-partners/codbex-partners.model", - "title": "Customer", - "tooltip": "Customer", - "type": "PROJECTION", - "dataSource": "DefaultDB", - "referencedProjections": [], - "primaryKeys": [ - "Id" - ], - "primaryKeysString": "Id", - "hasDropdowns": true - }, - { - "properties": [ - { - "auditType": "NONE", - "dataAutoIncrement": true, - "dataName": "PAYMENTADJUSTMENT_ID", - "dataNullable": true, - "dataPrimaryKey": true, - "dataType": "INTEGER", - "description": "", - "name": "Id", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "TEXTBOX", - "dataNotNull": false, - "dataUnique": false, - "isRequiredProperty": false, - "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "Id", - "widgetDropdownUrl": "", - "widgetDropdownControllerUrl": "", - "dataTypeJava": "int", - "dataTypeTypescript": "number", - "inputRule": "" - }, - { - "auditType": "NONE", - "dataName": "PAYMENTADJUSTMENT_DATE", - "dataNullable": false, - "dataType": "DATE", - "description": "", - "isRequiredProperty": true, - "name": "Date", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "DATE", - "dataNotNull": true, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "Date", - "widgetDropdownUrl": "", - "widgetDropdownControllerUrl": "", - "dataTypeJava": "date", - "dataTypeTypescript": "Date", - "isDateType": true, - "inputRule": "" - }, - { - "auditType": "NONE", - "dataName": "PAYMENTADJUSTMENT_VALOR", - "dataNullable": false, - "dataType": "DATE", - "description": "", - "isRequiredProperty": true, - "name": "Valor", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "DATE", - "dataNotNull": true, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "Valor", - "widgetDropdownUrl": "", - "widgetDropdownControllerUrl": "", - "dataTypeJava": "date", - "dataTypeTypescript": "Date", - "isDateType": true, - "inputRule": "" - }, - { - "auditType": "NONE", - "dataLength": "16", - "dataName": "PAYMENTADJUSTMENT_AMOUNT", - "dataNullable": false, - "dataPrecision": "16", - "dataScale": "2", - "dataType": "DECIMAL", - "description": "", - "isRequiredProperty": true, - "name": "Amount", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "NUMBER", - "dataNotNull": true, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "Amount", - "widgetDropdownUrl": "", - "widgetDropdownControllerUrl": "", - "dataTypeJava": "double", - "dataTypeTypescript": "number", - "inputRule": "" - }, - { - "auditType": "NONE", - "dataName": "PAYMENTADJUSTMENT_CURRENCY", - "dataNullable": false, - "dataType": "INTEGER", - "description": "", - "isRequiredProperty": true, - "name": "Currency", - "tooltip": "", - "widgetDropDownKey": "Id", - "widgetDropDownValue": "Name", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "DROPDOWN", - "relationshipName": "PaymentAdjustment_Currency", - "relationshipEntityName": "Currency", - "relationshipEntityPerspectiveName": "Settings", - "relationshipEntityPerspectiveLabel": "Entities", - "dataNotNull": true, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "Currency", - "widgetDropdownUrl": "/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyService.ts", - "widgetDropdownControllerUrl": "/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts", - "dataTypeJava": "int", - "dataTypeTypescript": "number", - "inputRule": "" - }, - { - "auditType": "NONE", - "dataName": "PAYMENTADJUSTMENT_COMPANY", - "dataNullable": false, - "dataType": "INTEGER", - "description": "", - "isRequiredProperty": true, - "name": "Company", - "tooltip": "", - "widgetDropDownKey": "Id", - "widgetDropDownValue": "Name", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "DROPDOWN", - "relationshipName": "PaymentAdjustment_Company", - "relationshipEntityName": "Company", - "relationshipEntityPerspectiveName": "Companies", - "relationshipEntityPerspectiveLabel": "Entities", - "dataNotNull": true, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "Company", - "widgetDropdownUrl": "/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyService.ts", - "widgetDropdownControllerUrl": "/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts", - "dataTypeJava": "int", - "dataTypeTypescript": "number", - "inputRule": "" - }, - { - "auditType": "NONE", - "dataLength": "100", - "dataName": "PAYMENTADJUSTMENT_REASON", - "dataNullable": true, - "dataType": "VARCHAR", - "description": "", - "name": "Reason", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "TEXTBOX", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isRequiredProperty": false, - "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "Reason", - "widgetDropdownUrl": "", - "widgetDropdownControllerUrl": "", - "dataTypeJava": "string", - "dataTypeTypescript": "string", - "minLength": 0, - "maxLength": 20, - "inputRule": "" - }, - { - "auditType": "NONE", - "calculatedPropertyExpressionCreate": "require(\"sdk/utils/uuid\").random()", - "dataLength": "36", - "dataName": "PAYMENTADJUSTMENT_UUID", - "dataNullable": true, - "dataType": "VARCHAR", - "dataUnique": true, - "description": "", - "isCalculatedProperty": true, - "name": "UUID", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "TEXTBOX", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "isRequiredProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "UUID", - "widgetDropdownUrl": "", - "widgetDropdownControllerUrl": "", - "dataTypeJava": "string", - "dataTypeTypescript": "string", - "minLength": 0, - "maxLength": 20, - "inputRule": "" - }, - { - "auditType": "CREATED_AT", - "dataName": "PAYMENTADJUSTMENT_CREATEDAT", - "dataNullable": true, - "dataType": "TIMESTAMP", - "description": "", - "isReadOnlyProperty": true, - "name": "CreatedAt", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "TEXTBOX", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isRequiredProperty": false, - "isCalculatedProperty": false, - "widgetLabel": "CreatedAt", - "widgetDropdownUrl": "", - "widgetDropdownControllerUrl": "", - "dataTypeJava": "timestamp", - "dataTypeTypescript": "Date", - "isDateType": true, - "inputRule": "" - }, - { - "auditType": "CREATED_BY", - "dataLength": "20", - "dataName": "PAYMENTADJUSTMENT_CREATEDBY", - "dataNullable": true, - "dataType": "VARCHAR", - "description": "", - "isReadOnlyProperty": true, - "name": "CreatedBy", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "TEXTBOX", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isRequiredProperty": false, - "isCalculatedProperty": false, - "widgetLabel": "CreatedBy", - "widgetDropdownUrl": "", - "widgetDropdownControllerUrl": "", - "dataTypeJava": "string", - "dataTypeTypescript": "string", - "minLength": 0, - "maxLength": 20, - "inputRule": "" - }, - { - "auditType": "UPDATED_AT", - "dataName": "PAYMENTADJUSTMENT_UPDATEDAT", - "dataNullable": true, - "dataType": "TIMESTAMP", - "description": "", - "isReadOnlyProperty": true, - "name": "UpdatedAt", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "TEXTBOX", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isRequiredProperty": false, - "isCalculatedProperty": false, - "widgetLabel": "UpdatedAt", - "widgetDropdownUrl": "", - "widgetDropdownControllerUrl": "", - "dataTypeJava": "timestamp", - "dataTypeTypescript": "Date", - "isDateType": true, - "inputRule": "" - }, - { - "auditType": "UPDATED_BY", - "dataLength": "20", - "dataName": "PAYMENTADJUSTMENT_UPDATEDBY", - "dataNullable": true, - "dataType": "VARCHAR", - "description": "", - "isReadOnlyProperty": true, - "name": "UpdatedBy", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "TEXTBOX", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isRequiredProperty": false, - "isCalculatedProperty": false, - "widgetLabel": "UpdatedBy", - "widgetDropdownUrl": "", - "widgetDropdownControllerUrl": "", - "dataTypeJava": "string", - "dataTypeTypescript": "string", - "minLength": 0, - "maxLength": 20, - "inputRule": "" - } - ], - "caption": "Manage entity PaymentAdjustment", - "dataCount": "SELECT COUNT(*) AS COUNT FROM \"CODBEX_PAYMENTADJUSTMENT\"", - "dataName": "PAYMENTADJUSTMENT", - "dataQuery": "", - "description": "Manage entity PaymentAdjustment", - "feedPassword": "YWRtaW4=", - "feedUsername": "YWRtaW4=", - "generateDefaultRoles": "true", - "generateReport": "false", - "icon": "/services/web/resources/unicons/file.svg", - "layoutType": "MANAGE_MASTER", - "menuIndex": "100", - "menuKey": "paymentadjustment", - "menuLabel": "PaymentAdjustment", - "multilingual": "false", - "name": "PaymentAdjustment", - "perspectiveHeader": "", - "perspectiveIcon": "/services/web/resources/unicons/paypal.svg", - "perspectiveLabel": "PaymentAdjustment", - "perspectiveName": "PaymentAdjustment", - "perspectiveNavId": "sales-navigation-group", - "perspectiveOrder": "700", - "perspectiveRole": "", - "roleRead": "codbex-payments.PaymentAdjustment.PaymentAdjustmentReadOnly", - "roleWrite": "codbex-payments.PaymentAdjustment.PaymentAdjustmentFullAccess", - "title": "PaymentAdjustment", - "tooltip": "PaymentAdjustment", - "type": "PRIMARY", - "dataSource": "DefaultDB", - "referencedProjections": [ - { - "name": "Currency", - "project": "codbex-currencies", - "genFolderName": "codbex-currencies" - }, - { - "name": "Company", - "project": "codbex-companies", - "genFolderName": "codbex-companies" - } - ], - "primaryKeys": [ - "Id" - ], - "primaryKeysString": "Id", - "masterProperties": { - "title": { - "auditType": "NONE", - "dataName": "PAYMENTADJUSTMENT_DATE", - "dataNullable": false, - "dataType": "DATE", - "description": "", - "isRequiredProperty": true, - "name": "Date", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "DATE", - "dataNotNull": true, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "Date", - "widgetDropdownUrl": "", - "widgetDropdownControllerUrl": "", - "dataTypeJava": "date", - "dataTypeTypescript": "Date", - "isDateType": true, + "dataTypeJava": "date", + "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.LocalDate", + "isDateType": true, "inputRule": "" }, "properties": [ @@ -6749,6 +5801,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "date", "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.LocalDate", "isDateType": true, "inputRule": "" }, @@ -6779,6 +5832,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "double", "dataTypeTypescript": "number", + "dataTypeJavaClass": "java.math.BigDecimal", "inputRule": "" }, { @@ -6791,7 +5845,7 @@ "name": "Currency", "tooltip": "", "widgetDropDownKey": "Id", - "widgetDropDownValue": "Name", + "widgetDropDownValue": "Code", "widgetIsMajor": true, "widgetLength": "20", "widgetSize": "", @@ -6799,7 +5853,7 @@ "relationshipName": "PaymentAdjustment_Currency", "relationshipEntityName": "Currency", "relationshipEntityPerspectiveName": "Settings", - "relationshipEntityPerspectiveLabel": "Entities", + "relationshipEntityPerspectiveLabel": "Settings", "dataNotNull": true, "dataAutoIncrement": false, "dataPrimaryKey": false, @@ -6807,42 +5861,11 @@ "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "Currency", - "widgetDropdownUrl": "/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyService.ts", - "widgetDropdownControllerUrl": "/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts", - "dataTypeJava": "int", - "dataTypeTypescript": "number", - "inputRule": "" - }, - { - "auditType": "NONE", - "dataName": "PAYMENTADJUSTMENT_COMPANY", - "dataNullable": false, - "dataType": "INTEGER", - "description": "", - "isRequiredProperty": true, - "name": "Company", - "tooltip": "", - "widgetDropDownKey": "Id", - "widgetDropDownValue": "Name", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "DROPDOWN", - "relationshipName": "PaymentAdjustment_Company", - "relationshipEntityName": "Company", - "relationshipEntityPerspectiveName": "Companies", - "relationshipEntityPerspectiveLabel": "Entities", - "dataNotNull": true, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "Company", - "widgetDropdownUrl": "/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyService.ts", - "widgetDropdownControllerUrl": "/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts", + "widgetDropdownUrl": "/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController", + "widgetDropdownControllerUrl": "/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController", "dataTypeJava": "int", "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", "inputRule": "" }, { @@ -6870,10 +5893,44 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" }, + { + "auditType": "NONE", + "dataName": "PAYMENTADJUSTMENT_COMPANY", + "dataNullable": false, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "Company", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "PaymentAdjustment_Company", + "relationshipEntityName": "Company", + "relationshipEntityPerspectiveName": "Companies", + "relationshipEntityPerspectiveLabel": "Companies", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Company", + "widgetDropdownUrl": "/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController", + "widgetDropdownControllerUrl": "/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", + "inputRule": "" + }, { "auditType": "NONE", "calculatedPropertyExpressionCreate": "require(\"sdk/utils/uuid\").random()", @@ -6900,6 +5957,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" @@ -6928,6 +5986,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "timestamp", "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.Instant", "isDateType": true, "inputRule": "" }, @@ -6956,6 +6015,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" @@ -6984,6 +6044,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "timestamp", "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.Instant", "isDateType": true, "inputRule": "" }, @@ -7012,6 +6073,7 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" @@ -7024,96 +6086,1715 @@ { "properties": [ { - "auditType": "NONE", - "dataAutoIncrement": true, - "dataName": "PAYMENTDIRECTION_ID", + "auditType": "NONE", + "dataAutoIncrement": true, + "dataName": "PAYMENTDIRECTION_ID", + "dataNullable": true, + "dataPrimaryKey": true, + "dataType": "INTEGER", + "description": "", + "name": "Id", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Id", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "20", + "dataName": "PAYMENTDIRECTION_NAME", + "dataNullable": false, + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": true, + "name": "Name", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Name", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + } + ], + "caption": "Manage entity PaymentDirection", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"CODBEX_PAYMENTDIRECTION\"", + "dataName": "PAYMENTDIRECTION", + "dataQuery": "", + "description": "Manage entity PaymentDirection", + "generateDefaultRoles": "false", + "generateReport": "false", + "icon": "/services/web/resources/unicons/file.svg", + "menuIndex": "100", + "menuKey": "paymentdirection", + "menuLabel": "PaymentDirection", + "multilingual": "false", + "name": "PaymentDirection", + "perspectiveHeader": "", + "perspectiveIcon": "/services/web/resources/unicons/copy.svg", + "perspectiveName": "Settings", + "perspectiveNavId": "", + "perspectiveOrder": "100", + "perspectiveRole": "", + "title": "PaymentDirection", + "tooltip": "PaymentDirection", + "type": "SETTING", + "dataSource": "DefaultDB", + "javaPerspectiveName": "settings", + "referencedProjections": [], + "primaryKeys": [ + "Id" + ], + "primaryKeysString": "Id" + }, + { + "properties": [ + { + "auditType": "NONE", + "dataAutoIncrement": true, + "dataName": "CUSTOMER_ID", + "dataNullable": true, + "dataPrimaryKey": true, + "dataType": "INTEGER", + "description": "", + "name": "Id", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Id", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "50", + "dataName": "CUSTOMER_FIRSTNAME", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "FirstName", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "50", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "FirstName", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 50, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "50", + "dataName": "CUSTOMER_LASTNAME", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "LastName", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "50", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "LastName", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 50, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "255", + "dataName": "CUSTOMER_LEGALENTITYNAME", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "LegalEntityName", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "255", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "LegalEntityName", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 255, + "inputRule": "" + }, + { + "auditType": "NONE", + "calculatedPropertyExpressionCreate": "(entity.FirstName && entity.LastName) ? (entity.FirstName + \" \" + entity.LastName) : entity.LegalEntityName", + "calculatedPropertyExpressionUpdate": "(entity.FirstName && entity.LastName) ? (entity.FirstName + \" \" + entity.LastName) : entity.LegalEntityName", + "dataLength": "255", + "dataName": "CUSTOMER_NAME", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "isCalculatedProperty": true, + "name": "Name", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "255", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Name", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 255, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "100", + "dataName": "CUSTOMER_EMAIL", + "dataNullable": true, + "dataType": "VARCHAR", + "dataUnique": true, + "description": "", + "isRequiredProperty": true, + "name": "Email", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "100", + "widgetSize": "fd-col-md--6 fd-col--9", + "widgetType": "EMAIL", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Email", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 100, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "15", + "dataName": "CUSTOMER_PHONE", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": true, + "name": "Phone", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "15", + "widgetSize": "fd-col-md--2 fd-col--3", + "widgetType": "TEL", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Phone", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 15, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "CUSTOMER_COUNTRY", + "dataNullable": true, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "Country", + "relationshipEntityPerspectiveLabel": "Settings", + "relationshipEntityPerspectiveName": "Settings", + "relationshipName": "Customer_Country", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Country", + "widgetDropdownUrl": "/services/java/codbex-payments/gen/codbex_payments/api/settings/undefinedController", + "widgetDropdownControllerUrl": "/services/java/codbex-payments/gen/codbex_payments/api/settings/undefinedController", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "CUSTOMER_CITY", + "dataNullable": true, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "City", + "relationshipEntityPerspectiveLabel": "Settings", + "relationshipEntityPerspectiveName": "Settings", + "relationshipName": "Customer_City", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "City", + "widgetDropdownUrl": "/services/java/codbex-payments/gen/codbex_payments/api/settings/undefinedController", + "widgetDropdownControllerUrl": "/services/java/codbex-payments/gen/codbex_payments/api/settings/undefinedController", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "20", + "dataName": "CUSTOMER_FAX", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "Fax", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "fd-col-md--2 fd-col--3", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Fax", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "255", + "dataName": "CUSTOMER_ADDRESS", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": true, + "name": "Address", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "255", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Address", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 255, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "10", + "dataName": "CUSTOMER_POSTALCODE", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": true, + "name": "PostalCode", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "10", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "PostalCode", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 10, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "15", + "dataName": "CUSTOMER_TIN", + "dataNullable": true, + "dataType": "VARCHAR", + "dataUnique": true, + "description": "", + "isRequiredProperty": true, + "name": "TIN", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "15", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "TIN", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 15, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "34", + "dataName": "CUSTOMER_IBAN", + "dataNullable": true, + "dataType": "VARCHAR", + "dataUnique": true, + "description": "", + "isRequiredProperty": true, + "name": "IBAN", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "IBAN", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 34, + "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" + }, + { + "auditType": "NONE", + "dataLength": "150", + "dataName": "CUSTOMER_RESPONSIBLEPERSON", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "ResponsiblePerson", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "150", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "ResponsiblePerson", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 150, + "inputRule": "" + }, + { + "auditType": "CREATED_AT", + "calculatedPropertyExpressionCreate": "new Date().toISOString().slice(0, 19).replace('T', ' ')", + "dataName": "CUSTOMER_CREATEDAT", + "dataNullable": true, + "dataType": "TIMESTAMP", + "description": "", + "name": "CreatedAt", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DATETIME-LOCAL", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "CreatedAt", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "timestamp", + "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.Instant", + "isDateType": true, + "inputRule": "" + }, + { + "auditType": "CREATED_BY", + "dataLength": "20", + "dataName": "CUSTOMER_CREATEDBY", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "isReadOnlyProperty": true, + "name": "CreatedBy", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "CreatedBy", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + }, + { + "auditType": "UPDATED_AT", + "dataName": "CUSTOMER_UPDATEDAT", + "dataNullable": true, + "dataType": "TIMESTAMP", + "description": "", + "isReadOnlyProperty": true, + "name": "UpdatedAt", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "UpdatedAt", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "timestamp", + "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.Instant", + "isDateType": true, + "inputRule": "" + }, + { + "auditType": "UPDATED_BY", + "dataLength": "20", + "dataName": "CUSTOMER_UPDATEDBY", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "isReadOnlyProperty": true, + "name": "UpdatedBy", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "UpdatedBy", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + } + ], + "caption": "Manage entity Customer", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"CODBEX_CUSTOMER\"", + "dataName": "CUSTOMER", + "dataQuery": "", + "description": "Manage entity Customer", + "generateDefaultRoles": "false", + "generateReport": "false", + "icon": "/services/web/resources/unicons/file.svg", + "layoutType": "MANAGE", + "menuIndex": "100", + "menuKey": "customer", + "menuLabel": "Customer", + "multilingual": "false", + "name": "Customer", + "perspectiveHeader": "", + "perspectiveIcon": "/services/web/resources/unicons/user-plus.svg", + "perspectiveLabel": "Customers", + "perspectiveName": "Customers", + "perspectiveNavId": "", + "perspectiveOrder": "300", + "perspectiveRole": "", + "projectionReferencedEntity": "Customer", + "projectionReferencedModel": "/workspace/codbex-partners/codbex-partners.model", + "title": "Customer", + "tooltip": "Customer", + "type": "PROJECTION", + "dataSource": "DefaultDB", + "javaPerspectiveName": "customers", + "referencedProjections": [], + "primaryKeys": [ + "Id" + ], + "primaryKeysString": "Id", + "hasDropdowns": true, + "hasDates": true + }, + { + "properties": [ + { + "auditType": "NONE", + "dataAutoIncrement": true, + "dataName": "EMPLOYEE_ID", + "dataNullable": true, + "dataPrimaryKey": true, + "dataType": "INTEGER", + "description": "", + "name": "Id", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Id", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "50", + "dataName": "EMPLOYEE_FIRSTNAME", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": true, + "name": "FirstName", + "tooltip": "", + "widgetIsMajor": true, + "widgetLabel": "First Name", + "widgetLength": "50", + "widgetShortLabel": "First Name", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 50, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "50", + "dataName": "EMPLOYEE_MIDDLENAME", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "MiddleName", + "tooltip": "", + "widgetIsMajor": true, + "widgetLabel": "Middle Name", + "widgetLength": "50", + "widgetShortLabel": "Middle Name", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 50, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "50", + "dataName": "EMPLOYEE_LASTNAME", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": true, + "name": "LastName", + "tooltip": "", + "widgetIsMajor": true, + "widgetLabel": "Last Name", + "widgetLength": "50", + "widgetShortLabel": "Last Name", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 50, + "inputRule": "" + }, + { + "auditType": "NONE", + "calculatedPropertyExpressionCreate": "entity[\"FirstName\"] + \" \" + entity[\"LastName\"]", + "calculatedPropertyExpressionUpdate": "entity[\"FirstName\"] + \" \" + entity[\"LastName\"]", + "dataLength": "70", + "dataName": "EMPLOYEE_NAME", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "isCalculatedProperty": true, + "name": "Name", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "70", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Name", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 70, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "40", + "dataName": "EMPLOYEE_EMAIL", + "dataNullable": true, + "dataType": "VARCHAR", + "dataUnique": true, + "description": "", + "isRequiredProperty": true, + "name": "Email", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "40", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "EMAIL", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Email", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 40, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "20", + "dataName": "EMPLOYEE_PHONENUMBER", + "dataNullable": true, + "dataType": "VARCHAR", + "dataUnique": true, + "description": "", + "isRequiredProperty": true, + "name": "PhoneNumber", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "TEL", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "PhoneNumber", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "EMPLOYEE_BIRTHDATE", + "dataNullable": true, + "dataType": "DATE", + "description": "", + "isRequiredProperty": true, + "name": "BirthDate", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "DATE", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "BirthDate", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "date", + "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.LocalDate", + "isDateType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "10", + "dataName": "EMPLOYEE_PERSONALNUMBER", + "dataNullable": true, + "dataType": "VARCHAR", + "dataUnique": true, + "description": "", + "isRequiredProperty": true, + "name": "PersonalNumber", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "10", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "PersonalNumber", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 10, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "EMPLOYEE_NATIONALITY", + "dataNullable": true, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "Nationality", + "relationshipEntityPerspectiveLabel": "Settings", + "relationshipEntityPerspectiveName": "Settings", + "relationshipName": "Employee_Country", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Nationality", + "widgetDropdownUrl": "/services/java/codbex-payments/gen/codbex_payments/api/settings/undefinedController", + "widgetDropdownControllerUrl": "/services/java/codbex-payments/gen/codbex_payments/api/settings/undefinedController", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "EMPLOYEE_GENDER", + "dataNullable": true, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "Gender", + "relationshipEntityPerspectiveLabel": "Settings", + "relationshipEntityPerspectiveName": "Settings", + "relationshipName": "Employee_Gender", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "DROPDOWN", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Gender", + "widgetDropdownUrl": "/services/java/codbex-payments/gen/codbex_payments/api/settings/undefinedController", + "widgetDropdownControllerUrl": "/services/java/codbex-payments/gen/codbex_payments/api/settings/undefinedController", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "EMPLOYEE_MARTIALSTATUS", + "dataNullable": true, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "MartialStatus", + "relationshipEntityPerspectiveLabel": "Settings", + "relationshipEntityPerspectiveName": "Settings", + "relationshipName": "Employee_MartialStatus", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "DROPDOWN", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "MartialStatus", + "widgetDropdownUrl": "/services/java/codbex-payments/gen/codbex_payments/api/settings/undefinedController", + "widgetDropdownControllerUrl": "/services/java/codbex-payments/gen/codbex_payments/api/settings/undefinedController", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "34", + "dataName": "EMPLOYEE_IBAN", + "dataNullable": true, + "dataType": "VARCHAR", + "dataUnique": true, + "description": "", + "isRequiredProperty": true, + "name": "IBAN", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "IBAN", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 34, + "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" + }, + { + "auditType": "CREATED_AT", + "dataName": "EMPLOYEE_CREATEDAT", + "dataNullable": true, + "dataType": "TIMESTAMP", + "description": "", + "isReadOnlyProperty": true, + "name": "CreatedAt", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "CreatedAt", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "timestamp", + "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.Instant", + "isDateType": true, + "inputRule": "" + }, + { + "auditType": "CREATED_BY", + "dataLength": "20", + "dataName": "EMPLOYEE_CREATEDBY", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "isReadOnlyProperty": true, + "name": "CreatedBy", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "CreatedBy", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + }, + { + "auditType": "UPDATED_AT", + "dataName": "EMPLOYEE_UPDATEDAT", + "dataNullable": true, + "dataType": "TIMESTAMP", + "description": "", + "isReadOnlyProperty": true, + "name": "UpdatedAt", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "UpdatedAt", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "timestamp", + "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.Instant", + "isDateType": true, + "inputRule": "" + }, + { + "auditType": "UPDATED_BY", + "dataLength": "20", + "dataName": "EMPLOYEE_UPDATEDBY", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "isReadOnlyProperty": true, + "name": "UpdatedBy", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "UpdatedBy", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + } + ], + "caption": "Manage entity Employee", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"CODBEX_EMPLOYEE\"", + "dataName": "EMPLOYEE", + "dataQuery": "", + "description": "Manage entity Employee", + "generateDefaultRoles": "false", + "generateReport": "false", + "icon": "/services/web/resources/unicons/file.svg", + "layoutType": "MANAGE", + "menuIndex": "100", + "menuKey": "employee", + "menuLabel": "Employee", + "multilingual": "false", + "name": "Employee", + "perspectiveHeader": "", + "perspectiveIcon": "/services/web/resources/unicons/user.svg", + "perspectiveLabel": "Employees", + "perspectiveName": "Employees", + "perspectiveNavId": "", + "perspectiveOrder": "100", + "perspectiveRole": "", + "projectionReferencedEntity": "Employee", + "projectionReferencedModel": "/workspace/codbex-employees/codbex-employees.model", + "title": "Employee", + "tooltip": "Employee", + "type": "PROJECTION", + "dataSource": "DefaultDB", + "javaPerspectiveName": "employees", + "referencedProjections": [], + "primaryKeys": [ + "Id" + ], + "primaryKeysString": "Id", + "hasDates": true, + "hasDropdowns": true + }, + { + "properties": [ + { + "auditType": "NONE", + "dataAutoIncrement": true, + "dataName": "SUPPLIER_ID", + "dataNullable": true, + "dataPrimaryKey": true, + "dataType": "INTEGER", + "description": "", + "name": "Id", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Id", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "50", + "dataName": "SUPPLIER_FIRSTNAME", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "FirstName", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "50", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "FirstName", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 50, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "50", + "dataName": "SUPPLIER_LASTNAME", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "LastName", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "50", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "LastName", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 50, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "255", + "dataName": "SUPPLIER_LEGALENTITYNAME", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "LegalEntityName", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "255", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "LegalEntityName", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 255, + "inputRule": "" + }, + { + "auditType": "NONE", + "calculatedPropertyExpressionCreate": "(entity.FirstName && entity.LastName) ? (entity.FirstName + \" \" + entity.LastName) : entity.LegalEntityName", + "calculatedPropertyExpressionUpdate": "(entity.FirstName && entity.LastName) ? (entity.FirstName + \" \" + entity.LastName) : entity.LegalEntityName", + "dataLength": "255", + "dataName": "SUPPLIER_NAME", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "isCalculatedProperty": true, + "name": "Name", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "255", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Name", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 255, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "100", + "dataName": "SUPPLIER_EMAIL", + "dataNullable": true, + "dataType": "VARCHAR", + "dataUnique": true, + "description": "", + "isRequiredProperty": true, + "name": "Email", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "100", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "EMAIL", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Email", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 100, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "15", + "dataName": "SUPPLIER_PHONE", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": true, + "name": "Phone", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "15", + "widgetSize": "fd-col-md--2 fd-col--3", + "widgetType": "TEL", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Phone", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 15, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "20", + "dataName": "SUPPLIER_FAX", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": true, + "name": "Fax", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "fd-col-md--2 fd-col--3", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Fax", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "15", + "dataName": "SUPPLIER_TIN", + "dataNullable": true, + "dataType": "VARCHAR", + "dataUnique": true, + "description": "", + "isRequiredProperty": true, + "name": "TIN", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "15", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "TIN", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 15, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "34", + "dataName": "SUPPLIER_IBAN", + "dataNullable": true, + "dataType": "VARCHAR", + "dataUnique": true, + "description": "", + "isRequiredProperty": true, + "name": "IBAN", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "IBAN", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 34, + "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" + }, + { + "auditType": "CREATED_AT", + "dataName": "SUPPLIER_CREATEDAT", "dataNullable": true, - "dataPrimaryKey": true, - "dataType": "INTEGER", + "dataType": "TIMESTAMP", "description": "", - "name": "Id", + "name": "CreatedAt", "tooltip": "", "widgetIsMajor": true, "widgetLength": "20", "widgetSize": "", "widgetType": "TEXTBOX", "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, "dataUnique": false, "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, - "widgetLabel": "Id", + "widgetLabel": "CreatedAt", "widgetDropdownUrl": "", "widgetDropdownControllerUrl": "", - "dataTypeJava": "int", - "dataTypeTypescript": "number", + "dataTypeJava": "timestamp", + "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.Instant", + "isDateType": true, "inputRule": "" }, { - "auditType": "NONE", + "auditType": "CREATED_BY", "dataLength": "20", - "dataName": "PAYMENTDIRECTION_NAME", - "dataNullable": false, + "dataName": "SUPPLIER_CREATEDBY", + "dataNullable": true, "dataType": "VARCHAR", "description": "", - "isRequiredProperty": true, - "name": "Name", + "isReadOnlyProperty": true, + "name": "CreatedBy", "tooltip": "", "widgetIsMajor": true, "widgetLength": "20", "widgetSize": "", "widgetType": "TEXTBOX", - "dataNotNull": true, + "dataNotNull": false, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, + "isRequiredProperty": false, "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "Name", + "widgetLabel": "CreatedBy", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + }, + { + "auditType": "UPDATED_AT", + "dataName": "SUPPLIER_UPDATEDAT", + "dataNullable": true, + "dataType": "TIMESTAMP", + "description": "", + "isReadOnlyProperty": true, + "name": "UpdatedAt", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "UpdatedAt", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "timestamp", + "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.Instant", + "isDateType": true, + "inputRule": "" + }, + { + "auditType": "UPDATED_BY", + "dataLength": "20", + "dataName": "SUPPLIER_UPDATEDBY", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "isReadOnlyProperty": true, + "name": "UpdatedBy", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "UpdatedBy", "widgetDropdownUrl": "", "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" } ], - "caption": "Manage entity PaymentDirection", - "dataCount": "SELECT COUNT(*) AS COUNT FROM \"CODBEX_PAYMENTDIRECTION\"", - "dataName": "PAYMENTDIRECTION", + "caption": "Manage entity Supplier", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"CODBEX_SUPPLIER\"", + "dataName": "SUPPLIER", "dataQuery": "", - "description": "Manage entity PaymentDirection", + "description": "Manage entity Supplier", "generateDefaultRoles": "false", "generateReport": "false", "icon": "/services/web/resources/unicons/file.svg", + "layoutType": "MANAGE", "menuIndex": "100", - "menuKey": "paymentdirection", - "menuLabel": "PaymentDirection", + "menuKey": "supplier", + "menuLabel": "Supplier", "multilingual": "false", - "name": "PaymentDirection", + "name": "Supplier", "perspectiveHeader": "", - "perspectiveIcon": "/services/web/resources/unicons/copy.svg", - "perspectiveName": "Settings", + "perspectiveIcon": "/services/web/resources/unicons/user-minus.svg", + "perspectiveLabel": "Suppliers", + "perspectiveName": "Suppliers", "perspectiveNavId": "", - "perspectiveOrder": "100", + "perspectiveOrder": "200", "perspectiveRole": "", - "title": "PaymentDirection", - "tooltip": "PaymentDirection", - "type": "SETTING", + "projectionReferencedEntity": "Supplier", + "projectionReferencedModel": "/workspace/codbex-partners/codbex-partners.model", + "title": "Supplier", + "tooltip": "Supplier", + "type": "PROJECTION", "dataSource": "DefaultDB", + "javaPerspectiveName": "suppliers", "referencedProjections": [], "primaryKeys": [ "Id" ], - "primaryKeysString": "Id" + "primaryKeysString": "Id", + "hasDates": true }, { "properties": [ { "auditType": "NONE", "dataAutoIncrement": true, - "dataName": "EMPLOYEE_ID", + "dataName": "PAYMENTMETHOD_ID", "dataNullable": true, "dataPrimaryKey": true, "dataType": "INTEGER", @@ -7134,407 +7815,432 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "int", "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", "inputRule": "" }, { "auditType": "NONE", - "dataLength": "50", - "dataName": "EMPLOYEE_FIRSTNAME", + "dataLength": "20", + "dataName": "PAYMENTMETHOD_NAME", "dataNullable": true, "dataType": "VARCHAR", + "dataUnique": true, "description": "", "isRequiredProperty": true, - "name": "FirstName", + "name": "Name", "tooltip": "", "widgetIsMajor": true, - "widgetLabel": "First Name", - "widgetLength": "50", - "widgetShortLabel": "First Name", - "widgetSize": "fd-col-md--4 fd-col--6", + "widgetLength": "20", + "widgetSize": "", "widgetType": "TEXTBOX", "dataNotNull": false, "dataAutoIncrement": false, "dataPrimaryKey": false, - "dataUnique": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, + "widgetLabel": "Name", "widgetDropdownUrl": "", "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, - "maxLength": 50, + "maxLength": 20, "inputRule": "" - }, + } + ], + "caption": "Manage entity PaymentMethod", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"CODBEX_PAYMENTMETHOD\"", + "dataName": "PAYMENTMETHOD", + "dataQuery": "", + "description": "Manage entity PaymentMethod", + "generateDefaultRoles": "false", + "generateReport": "false", + "icon": "/services/web/resources/unicons/file.svg", + "layoutType": "MANAGE", + "menuIndex": "100", + "menuKey": "paymentmethod", + "menuLabel": "PaymentMethod", + "multilingual": "false", + "name": "PaymentMethod", + "perspectiveHeader": "", + "perspectiveIcon": "/services/web/resources/unicons/copy.svg", + "perspectiveLabel": "Settings", + "perspectiveName": "Settings", + "perspectiveNavId": "", + "perspectiveOrder": "100", + "perspectiveRole": "", + "projectionReferencedEntity": "PaymentMethod", + "projectionReferencedModel": "/workspace/codbex-methods/codbex-methods.model", + "title": "PaymentMethod", + "tooltip": "PaymentMethod", + "type": "PROJECTION", + "dataSource": "DefaultDB", + "javaPerspectiveName": "settings", + "referencedProjections": [], + "primaryKeys": [ + "Id" + ], + "primaryKeysString": "Id" + }, + { + "properties": [ { "auditType": "NONE", - "dataLength": "50", - "dataName": "EMPLOYEE_MIDDLENAME", + "dataAutoIncrement": true, + "dataName": "CURRENCY_ID", "dataNullable": true, - "dataType": "VARCHAR", + "dataPrimaryKey": true, + "dataType": "INTEGER", "description": "", - "name": "MiddleName", + "name": "Id", "tooltip": "", "widgetIsMajor": true, - "widgetLabel": "Middle Name", - "widgetLength": "50", - "widgetShortLabel": "Middle Name", - "widgetSize": "fd-col-md--4 fd-col--6", + "widgetLength": "20", + "widgetSize": "", "widgetType": "TEXTBOX", "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, "dataUnique": false, "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, + "widgetLabel": "Id", "widgetDropdownUrl": "", "widgetDropdownControllerUrl": "", - "dataTypeJava": "string", - "dataTypeTypescript": "string", - "minLength": 0, - "maxLength": 50, + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", "inputRule": "" }, { "auditType": "NONE", - "dataLength": "50", - "dataName": "EMPLOYEE_LASTNAME", + "dataLength": "3", + "dataName": "CURRENCY_CODE", "dataNullable": true, "dataType": "VARCHAR", + "dataUnique": true, "description": "", "isRequiredProperty": true, - "name": "LastName", + "name": "Code", "tooltip": "", "widgetIsMajor": true, - "widgetLabel": "Last Name", - "widgetLength": "50", - "widgetShortLabel": "Last Name", - "widgetSize": "fd-col-md--4 fd-col--6", + "widgetLength": "3", + "widgetSize": "fd-col-md--2 fd-col--3", "widgetType": "TEXTBOX", "dataNotNull": false, "dataAutoIncrement": false, "dataPrimaryKey": false, - "dataUnique": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, + "widgetLabel": "Code", "widgetDropdownUrl": "", "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, - "maxLength": 50, + "maxLength": 3, "inputRule": "" }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "entity[\"FirstName\"] + \" \" + entity[\"LastName\"]", - "calculatedPropertyExpressionUpdate": "entity[\"FirstName\"] + \" \" + entity[\"LastName\"]", - "dataLength": "70", - "dataName": "EMPLOYEE_NAME", + "dataLength": "127", + "dataName": "CURRENCY_NAME", "dataNullable": true, "dataType": "VARCHAR", "description": "", - "isCalculatedProperty": true, + "isRequiredProperty": true, "name": "Name", "tooltip": "", "widgetIsMajor": true, - "widgetLength": "70", - "widgetSize": "fd-col-md--4 fd-col--6", + "widgetLength": "127", + "widgetSize": "fd-col-md--6 fd-col--9", "widgetType": "TEXTBOX", "dataNotNull": false, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, + "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "Name", "widgetDropdownUrl": "", "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, - "maxLength": 70, + "maxLength": 127, "inputRule": "" }, { "auditType": "NONE", - "dataLength": "40", - "dataName": "EMPLOYEE_EMAIL", + "dataLength": "3", + "dataName": "CURRENCY_NUMERIC", "dataNullable": true, "dataType": "VARCHAR", "dataUnique": true, "description": "", "isRequiredProperty": true, - "name": "Email", + "name": "Numeric", "tooltip": "", "widgetIsMajor": true, - "widgetLength": "40", - "widgetSize": "fd-col-md--4 fd-col--6", - "widgetType": "EMAIL", + "widgetLength": "3", + "widgetSize": "fd-col-md--2 fd-col--3", + "widgetType": "TEXTBOX", "dataNotNull": false, "dataAutoIncrement": false, "dataPrimaryKey": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, - "widgetLabel": "Email", + "widgetLabel": "Numeric", "widgetDropdownUrl": "", "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, - "maxLength": 40, + "maxLength": 3, "inputRule": "" }, { "auditType": "NONE", - "dataLength": "20", - "dataName": "EMPLOYEE_PHONENUMBER", + "dataName": "CURRENCY_ROUNDING", "dataNullable": true, - "dataType": "VARCHAR", - "dataUnique": true, + "dataType": "INTEGER", "description": "", "isRequiredProperty": true, - "name": "PhoneNumber", + "name": "Rounding", "tooltip": "", "widgetIsMajor": true, "widgetLength": "20", - "widgetSize": "fd-col-md--4 fd-col--6", - "widgetType": "TEL", + "widgetSize": "fd-col-md--2 fd-col--3", + "widgetType": "NUMBER", "dataNotNull": false, "dataAutoIncrement": false, "dataPrimaryKey": false, + "dataUnique": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, - "widgetLabel": "PhoneNumber", + "widgetLabel": "Rounding", "widgetDropdownUrl": "", "widgetDropdownControllerUrl": "", - "dataTypeJava": "string", - "dataTypeTypescript": "string", - "minLength": 0, - "maxLength": 20, + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", "inputRule": "" }, { "auditType": "NONE", - "dataName": "EMPLOYEE_BIRTHDATE", + "dataName": "CURRENCY_BASE", "dataNullable": true, - "dataType": "DATE", + "dataType": "BOOLEAN", "description": "", - "isRequiredProperty": true, - "name": "BirthDate", + "name": "Base", "tooltip": "", "widgetIsMajor": true, "widgetLength": "20", - "widgetSize": "fd-col-md--4 fd-col--6", - "widgetType": "DATE", + "widgetSize": "", + "widgetType": "CHECKBOX", "dataNotNull": false, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, + "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, - "widgetLabel": "BirthDate", + "widgetLabel": "Base", "widgetDropdownUrl": "", "widgetDropdownControllerUrl": "", - "dataTypeJava": "date", - "dataTypeTypescript": "Date", - "isDateType": true, + "dataTypeJava": "boolean", + "dataTypeTypescript": "boolean", + "dataTypeJavaClass": "Boolean", "inputRule": "" }, { "auditType": "NONE", - "dataLength": "10", - "dataName": "EMPLOYEE_PERSONALNUMBER", + "dataName": "CURRENCY_RATE", "dataNullable": true, - "dataType": "VARCHAR", - "dataUnique": true, + "dataType": "DOUBLE", "description": "", "isRequiredProperty": true, - "name": "PersonalNumber", + "name": "Rate", "tooltip": "", "widgetIsMajor": true, - "widgetLength": "10", + "widgetLength": "20", "widgetSize": "fd-col-md--4 fd-col--6", - "widgetType": "TEXTBOX", + "widgetType": "NUMBER", "dataNotNull": false, "dataAutoIncrement": false, "dataPrimaryKey": false, + "dataUnique": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, - "widgetLabel": "PersonalNumber", + "widgetLabel": "Rate", "widgetDropdownUrl": "", "widgetDropdownControllerUrl": "", - "dataTypeJava": "string", - "dataTypeTypescript": "string", - "minLength": 0, - "maxLength": 10, + "dataTypeJava": "double", + "dataTypeTypescript": "number", + "dataTypeJavaClass": "Double", "inputRule": "" }, { - "auditType": "NONE", - "dataName": "EMPLOYEE_NATIONALITY", + "auditType": "CREATED_AT", + "dataName": "CURRENCY_CREATEDAT", "dataNullable": true, - "dataType": "INTEGER", + "dataType": "TIMESTAMP", "description": "", - "isRequiredProperty": true, - "name": "Nationality", - "relationshipEntityPerspectiveLabel": "Settings", - "relationshipEntityPerspectiveName": "Settings", - "relationshipName": "Employee_Country", + "isReadOnlyProperty": true, + "name": "CreatedAt", "tooltip": "", - "widgetDropDownKey": "Id", - "widgetDropDownValue": "Name", "widgetIsMajor": true, "widgetLength": "20", - "widgetSize": "fd-col-md--4 fd-col--6", - "widgetType": "DROPDOWN", + "widgetSize": "", + "widgetType": "TEXTBOX", "dataNotNull": false, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, + "isRequiredProperty": false, "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "Nationality", - "widgetDropdownUrl": "/services/ts/codbex-payments/gen/codbex-payments/api/Settings/undefinedService.ts", - "widgetDropdownControllerUrl": "/services/ts/codbex-payments/gen/codbex-payments/api/Settings/undefinedController.ts", - "dataTypeJava": "int", - "dataTypeTypescript": "number", + "widgetLabel": "CreatedAt", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "timestamp", + "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.Instant", + "isDateType": true, "inputRule": "" }, { - "auditType": "NONE", - "dataName": "EMPLOYEE_GENDER", + "auditType": "CREATED_BY", + "dataLength": "20", + "dataName": "CURRENCY_CREATEDBY", "dataNullable": true, - "dataType": "INTEGER", + "dataType": "VARCHAR", "description": "", - "isRequiredProperty": true, - "name": "Gender", - "relationshipEntityPerspectiveLabel": "Entities", - "relationshipEntityPerspectiveName": "Settings", - "relationshipName": "Employee_Gender", + "isReadOnlyProperty": true, + "name": "CreatedBy", "tooltip": "", - "widgetDropDownKey": "Id", - "widgetDropDownValue": "Name", "widgetIsMajor": true, "widgetLength": "20", - "widgetSize": "fd-col-md--4 fd-col--6", - "widgetType": "DROPDOWN", + "widgetSize": "", + "widgetType": "TEXTBOX", "dataNotNull": false, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, + "isRequiredProperty": false, "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "Gender", - "widgetDropdownUrl": "/services/ts/codbex-payments/gen/codbex-payments/api/Settings/undefinedService.ts", - "widgetDropdownControllerUrl": "/services/ts/codbex-payments/gen/codbex-payments/api/Settings/undefinedController.ts", - "dataTypeJava": "int", - "dataTypeTypescript": "number", + "widgetLabel": "CreatedBy", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 20, "inputRule": "" }, { - "auditType": "NONE", - "dataName": "EMPLOYEE_MARTIALSTATUS", + "auditType": "UPDATED_AT", + "dataName": "CURRENCY_UPDATEDAT", "dataNullable": true, - "dataType": "INTEGER", + "dataType": "TIMESTAMP", "description": "", - "isRequiredProperty": true, - "name": "MartialStatus", - "relationshipEntityPerspectiveLabel": "Entities", - "relationshipEntityPerspectiveName": "Settings", - "relationshipName": "Employee_MartialStatus", + "isReadOnlyProperty": true, + "name": "UpdatedAt", "tooltip": "", - "widgetDropDownKey": "Id", - "widgetDropDownValue": "Name", "widgetIsMajor": true, "widgetLength": "20", - "widgetSize": "fd-col-md--4 fd-col--6", - "widgetType": "DROPDOWN", + "widgetSize": "", + "widgetType": "TEXTBOX", "dataNotNull": false, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, + "isRequiredProperty": false, "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "MartialStatus", - "widgetDropdownUrl": "/services/ts/codbex-payments/gen/codbex-payments/api/Settings/undefinedService.ts", - "widgetDropdownControllerUrl": "/services/ts/codbex-payments/gen/codbex-payments/api/Settings/undefinedController.ts", - "dataTypeJava": "int", - "dataTypeTypescript": "number", + "widgetLabel": "UpdatedAt", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "timestamp", + "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.Instant", + "isDateType": true, "inputRule": "" }, { - "auditType": "NONE", - "dataLength": "34", - "dataName": "EMPLOYEE_IBAN", + "auditType": "UPDATED_BY", + "dataLength": "20", + "dataName": "CURRENCY_UPDATEDBY", "dataNullable": true, "dataType": "VARCHAR", - "dataUnique": true, "description": "", - "isRequiredProperty": true, - "name": "IBAN", + "isReadOnlyProperty": true, + "name": "UpdatedBy", "tooltip": "", "widgetIsMajor": true, - "widgetLength": "34", - "widgetSize": "fd-col-md--4 fd-col--6", + "widgetLength": "20", + "widgetSize": "", "widgetType": "TEXTBOX", "dataNotNull": false, "dataAutoIncrement": false, "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, "isCalculatedProperty": false, - "isReadOnlyProperty": false, - "widgetLabel": "IBAN", + "widgetLabel": "UpdatedBy", "widgetDropdownUrl": "", "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, - "maxLength": 34, + "maxLength": 20, "inputRule": "" } ], - "caption": "Manage entity Employee", - "dataCount": "SELECT COUNT(*) AS COUNT FROM \"CODBEX_EMPLOYEE\"", - "dataName": "EMPLOYEE", + "caption": "Manage entity Currency", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"CODBEX_CURRENCY\"", + "dataName": "CURRENCY", "dataQuery": "", - "description": "Manage entity Employee", + "description": "Manage entity Currency", "generateDefaultRoles": "false", "generateReport": "false", "icon": "/services/web/resources/unicons/file.svg", "layoutType": "MANAGE", "menuIndex": "100", - "menuKey": "employee", - "menuLabel": "Employee", + "menuKey": "currency", + "menuLabel": "Currency", "multilingual": "false", - "name": "Employee", + "name": "Currency", "perspectiveHeader": "", - "perspectiveIcon": "/services/web/resources/unicons/user.svg", - "perspectiveLabel": "Employees", - "perspectiveName": "Employees", + "perspectiveIcon": "/services/web/resources/unicons/copy.svg", + "perspectiveLabel": "Settings", + "perspectiveName": "Settings", "perspectiveNavId": "", "perspectiveOrder": "100", "perspectiveRole": "", - "projectionReferencedEntity": "Employee", - "projectionReferencedModel": "/workspace/codbex-employees/codbex-employees.model", - "title": "Employee", - "tooltip": "Employee", + "projectionReferencedEntity": "Currency", + "projectionReferencedModel": "/workspace/codbex-currencies/codbex-currencies.model", + "title": "Currency", + "tooltip": "Currency", "type": "PROJECTION", "dataSource": "DefaultDB", + "javaPerspectiveName": "settings", "referencedProjections": [], "primaryKeys": [ "Id" ], "primaryKeysString": "Id", - "hasDates": true, - "hasDropdowns": true + "hasDates": true }, { "properties": [ { "auditType": "NONE", "dataAutoIncrement": true, - "dataName": "SUPPLIER_ID", + "dataName": "COMPANY_ID", "dataNullable": true, "dataPrimaryKey": true, "dataType": "INTEGER", @@ -7555,50 +8261,86 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "int", "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", "inputRule": "" }, { "auditType": "NONE", - "dataLength": "50", - "dataName": "SUPPLIER_FIRSTNAME", + "dataLength": "100", + "dataName": "COMPANY_NAME", "dataNullable": true, "dataType": "VARCHAR", "description": "", - "name": "FirstName", + "isRequiredProperty": true, + "name": "Name", "tooltip": "", "widgetIsMajor": true, - "widgetLength": "50", + "widgetLength": "100", "widgetSize": "", "widgetType": "TEXTBOX", "dataNotNull": false, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, - "widgetLabel": "FirstName", + "widgetLabel": "Name", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 100, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "100", + "dataName": "COMPANY_EMAIL", + "dataNullable": true, + "dataType": "VARCHAR", + "dataUnique": true, + "description": "", + "isRequiredProperty": true, + "name": "Email", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "100", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Email", "widgetDropdownUrl": "", "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, - "maxLength": 50, + "maxLength": 100, "inputRule": "" }, { "auditType": "NONE", - "dataLength": "50", - "dataName": "SUPPLIER_LASTNAME", + "dataName": "COMPANY_MANAGER", "dataNullable": true, - "dataType": "VARCHAR", + "dataType": "INTEGER", "description": "", - "name": "LastName", + "name": "Manager", + "relationshipEntityPerspectiveLabel": "Employees", + "relationshipEntityPerspectiveName": "Employees", + "relationshipName": "Company_Employee", "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", "widgetIsMajor": true, - "widgetLength": "50", + "widgetLength": "20", "widgetSize": "", - "widgetType": "TEXTBOX", + "widgetType": "DROPDOWN", "dataNotNull": false, "dataAutoIncrement": false, "dataPrimaryKey": false, @@ -7606,28 +8348,27 @@ "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, - "widgetLabel": "LastName", - "widgetDropdownUrl": "", - "widgetDropdownControllerUrl": "", - "dataTypeJava": "string", - "dataTypeTypescript": "string", - "minLength": 0, - "maxLength": 50, + "widgetLabel": "Manager", + "widgetDropdownUrl": "/services/java/codbex-payments/gen/codbex_payments/api/employees/undefinedController", + "widgetDropdownControllerUrl": "/services/java/codbex-payments/gen/codbex_payments/api/employees/undefinedController", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", "inputRule": "" }, { "auditType": "NONE", - "dataLength": "255", - "dataName": "SUPPLIER_LEGALENTITYNAME", + "dataLength": "20", + "dataName": "COMPANY_PHONE", "dataNullable": true, "dataType": "VARCHAR", "description": "", - "name": "LegalEntityName", + "name": "Phone", "tooltip": "", "widgetIsMajor": true, - "widgetLength": "255", + "widgetLength": "20", "widgetSize": "", - "widgetType": "TEXTBOX", + "widgetType": "TEL", "dataNotNull": false, "dataAutoIncrement": false, "dataPrimaryKey": false, @@ -7635,113 +8376,119 @@ "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, - "widgetLabel": "LegalEntityName", + "widgetLabel": "Phone", "widgetDropdownUrl": "", "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, - "maxLength": 255, + "maxLength": 20, "inputRule": "" }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "(entity.FirstName && entity.LastName) ? (entity.FirstName + \" \" + entity.LastName) : entity.LegalEntityName", - "calculatedPropertyExpressionUpdate": "(entity.FirstName && entity.LastName) ? (entity.FirstName + \" \" + entity.LastName) : entity.LegalEntityName", - "dataLength": "255", - "dataName": "SUPPLIER_NAME", + "dataLength": "200", + "dataName": "COMPANY_ADDRESS", "dataNullable": true, "dataType": "VARCHAR", "description": "", - "isCalculatedProperty": true, - "name": "Name", + "isRequiredProperty": true, + "name": "Address", "tooltip": "", "widgetIsMajor": true, - "widgetLength": "255", + "widgetLength": "200", "widgetSize": "", "widgetType": "TEXTBOX", "dataNotNull": false, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, - "isRequiredProperty": false, + "isCalculatedProperty": false, "isReadOnlyProperty": false, - "widgetLabel": "Name", + "widgetLabel": "Address", "widgetDropdownUrl": "", "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, - "maxLength": 255, + "maxLength": 200, "inputRule": "" }, { "auditType": "NONE", - "dataLength": "100", - "dataName": "SUPPLIER_EMAIL", + "dataName": "COMPANY_COUNTRY", "dataNullable": true, - "dataType": "VARCHAR", - "dataUnique": true, + "dataType": "INTEGER", "description": "", "isRequiredProperty": true, - "name": "Email", + "name": "Country", + "relationshipEntityPerspectiveLabel": "Settings", + "relationshipEntityPerspectiveName": "Settings", + "relationshipName": "Company_Country", "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", "widgetIsMajor": true, - "widgetLength": "100", - "widgetSize": "fd-col-md--4 fd-col--6", - "widgetType": "EMAIL", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", "dataNotNull": false, "dataAutoIncrement": false, "dataPrimaryKey": false, + "dataUnique": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, - "widgetLabel": "Email", - "widgetDropdownUrl": "", - "widgetDropdownControllerUrl": "", - "dataTypeJava": "string", - "dataTypeTypescript": "string", - "minLength": 0, - "maxLength": 100, + "widgetLabel": "Country", + "widgetDropdownUrl": "/services/java/codbex-payments/gen/codbex_payments/api/settings/undefinedController", + "widgetDropdownControllerUrl": "/services/java/codbex-payments/gen/codbex_payments/api/settings/undefinedController", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", "inputRule": "" }, { "auditType": "NONE", - "dataLength": "15", - "dataName": "SUPPLIER_PHONE", + "dataName": "COMPANY_CITY", "dataNullable": true, - "dataType": "VARCHAR", + "dataType": "INTEGER", "description": "", "isRequiredProperty": true, - "name": "Phone", + "name": "City", + "relationshipEntityPerspectiveLabel": "Settings", + "relationshipEntityPerspectiveName": "Settings", + "relationshipName": "Company_City", "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", "widgetIsMajor": true, - "widgetLength": "15", - "widgetSize": "fd-col-md--2 fd-col--3", - "widgetType": "TEL", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", "dataNotNull": false, "dataAutoIncrement": false, "dataPrimaryKey": false, "dataUnique": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, - "widgetLabel": "Phone", - "widgetDropdownUrl": "", - "widgetDropdownControllerUrl": "", - "dataTypeJava": "string", - "dataTypeTypescript": "string", - "minLength": 0, - "maxLength": 15, + "widgetLabel": "City", + "widgetDropdownUrl": "/services/java/codbex-payments/gen/codbex_payments/api/settings/undefinedController", + "widgetDropdownControllerUrl": "/services/java/codbex-payments/gen/codbex_payments/api/settings/undefinedController", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", "inputRule": "" }, { "auditType": "NONE", "dataLength": "20", - "dataName": "SUPPLIER_FAX", + "dataName": "COMPANY_POSTCODE", "dataNullable": true, "dataType": "VARCHAR", "description": "", "isRequiredProperty": true, - "name": "Fax", + "name": "PostCode", "tooltip": "", "widgetIsMajor": true, "widgetLength": "20", @@ -7753,33 +8500,34 @@ "dataUnique": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, - "widgetLabel": "Fax", + "widgetLabel": "PostCode", "widgetDropdownUrl": "", "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 20, "inputRule": "" }, { "auditType": "NONE", - "dataLength": "15", - "dataName": "SUPPLIER_TIN", + "dataLength": "20", + "dataName": "COMPANY_TIN", "dataNullable": true, "dataType": "VARCHAR", - "dataUnique": true, "description": "", - "isRequiredProperty": true, "name": "TIN", "tooltip": "", "widgetIsMajor": true, - "widgetLength": "15", + "widgetLength": "20", "widgetSize": "fd-col-md--4 fd-col--6", "widgetType": "TEXTBOX", "dataNotNull": false, "dataAutoIncrement": false, "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, "isCalculatedProperty": false, "isReadOnlyProperty": false, "widgetLabel": "TIN", @@ -7787,14 +8535,15 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, - "maxLength": 15, + "maxLength": 20, "inputRule": "" }, { "auditType": "NONE", "dataLength": "34", - "dataName": "SUPPLIER_IBAN", + "dataName": "COMPANY_IBAN", "dataNullable": true, "dataType": "VARCHAR", "dataUnique": true, @@ -7804,6 +8553,7 @@ "tooltip": "", "widgetIsMajor": true, "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", "widgetSize": "fd-col-md--4 fd-col--6", "widgetType": "TEXTBOX", "dataNotNull": false, @@ -7816,16 +8566,18 @@ "widgetDropdownControllerUrl": "", "dataTypeJava": "string", "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", "minLength": 0, "maxLength": 34, - "inputRule": "" + "inputRule": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$" }, { "auditType": "CREATED_AT", - "dataName": "SUPPLIER_CREATEDAT", + "dataName": "COMPANY_CREATEDAT", "dataNullable": true, "dataType": "TIMESTAMP", "description": "", + "isReadOnlyProperty": true, "name": "CreatedAt", "tooltip": "", "widgetIsMajor": true, @@ -7838,48 +8590,138 @@ "dataUnique": false, "isRequiredProperty": false, "isCalculatedProperty": false, - "isReadOnlyProperty": false, "widgetLabel": "CreatedAt", "widgetDropdownUrl": "", "widgetDropdownControllerUrl": "", "dataTypeJava": "timestamp", "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.Instant", + "isDateType": true, + "inputRule": "" + }, + { + "auditType": "CREATED_BY", + "dataLength": "20", + "dataName": "COMPANY_CREATEDBY", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "isReadOnlyProperty": true, + "name": "CreatedBy", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "CreatedBy", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + }, + { + "auditType": "UPDATED_AT", + "dataName": "COMPANY_UPDATEDAT", + "dataNullable": true, + "dataType": "TIMESTAMP", + "description": "", + "isReadOnlyProperty": true, + "name": "UpdatedAt", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "UpdatedAt", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "timestamp", + "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.Instant", "isDateType": true, "inputRule": "" + }, + { + "auditType": "UPDATED_BY", + "dataLength": "20", + "dataName": "COMPANY_UPDATEDBY", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "isReadOnlyProperty": true, + "name": "UpdatedBy", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "widgetLabel": "UpdatedBy", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 20, + "inputRule": "" } ], - "caption": "Manage entity Supplier", - "dataCount": "SELECT COUNT(*) AS COUNT FROM \"CODBEX_SUPPLIER\"", - "dataName": "SUPPLIER", + "caption": "Manage entity Company", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"CODBEX_COMPANY\"", + "dataName": "COMPANY", "dataQuery": "", - "description": "Manage entity Supplier", + "description": "Manage entity Company", "generateDefaultRoles": "false", "generateReport": "false", "icon": "/services/web/resources/unicons/file.svg", "layoutType": "MANAGE", "menuIndex": "100", - "menuKey": "supplier", - "menuLabel": "Supplier", + "menuKey": "company", + "menuLabel": "Company", "multilingual": "false", - "name": "Supplier", + "name": "Company", "perspectiveHeader": "", - "perspectiveIcon": "/services/web/resources/unicons/user-minus.svg", - "perspectiveLabel": "Suppliers", - "perspectiveName": "Suppliers", + "perspectiveIcon": "/services/web/resources/unicons/user.svg", + "perspectiveLabel": "Companies", + "perspectiveName": "Companies", "perspectiveNavId": "", - "perspectiveOrder": "200", + "perspectiveOrder": "113", "perspectiveRole": "", - "projectionReferencedEntity": "Supplier", - "projectionReferencedModel": "/workspace/codbex-partners/codbex-partners.model", - "title": "Supplier", - "tooltip": "Supplier", + "projectionReferencedEntity": "Company", + "projectionReferencedModel": "/workspace/codbex-companies/codbex-companies.model", + "title": "Company", + "tooltip": "Company", "type": "PROJECTION", "dataSource": "DefaultDB", + "javaPerspectiveName": "companies", "referencedProjections": [], "primaryKeys": [ "Id" ], "primaryKeysString": "Id", + "hasDropdowns": true, "hasDates": true } ] diff --git a/codbex-payments/codbex-payments.model b/codbex-payments/codbex-payments.model index 8452712..fee4601 100644 --- a/codbex-payments/codbex-payments.model +++ b/codbex-payments/codbex-payments.model @@ -148,7 +148,26 @@ "relationshipName": "CustomerPayment_Currency", "relationshipEntityName": "Currency", "relationshipEntityPerspectiveName": "Settings", - "relationshipEntityPerspectiveLabel": "Entities" + "relationshipEntityPerspectiveLabel": "Settings" + }, + { + "auditType": "NONE", + "dataName": "CUSTOMERPAYMENT_COMPANY", + "dataNullable": "true", + "dataType": "INTEGER", + "description": "", + "name": "Company", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "CustomerPayment_Company", + "relationshipEntityName": "Company", + "relationshipEntityPerspectiveName": "Companies", + "relationshipEntityPerspectiveLabel": "Companies" }, { "auditType": "NONE", @@ -181,11 +200,12 @@ }, { "auditType": "NONE", - "dataName": "CUSTOMERPAYMENT_COMPANY", - "dataNullable": "true", + "dataName": "CUSTOMERPAYMENT_PAYMENTMETHOD", + "dataNullable": "false", "dataType": "INTEGER", "description": "", - "name": "Company", + "isRequiredProperty": "true", + "name": "PaymentMethod", "tooltip": "", "widgetDropDownKey": "Id", "widgetDropDownValue": "Name", @@ -193,10 +213,10 @@ "widgetLength": "20", "widgetSize": "", "widgetType": "DROPDOWN", - "relationshipName": "CustomerPayment_Company", - "relationshipEntityName": "Company", - "relationshipEntityPerspectiveName": "Companies", - "relationshipEntityPerspectiveLabel": "Entities" + "relationshipName": "CustomerPayment_PaymentMethod", + "relationshipEntityName": "PaymentMethod", + "relationshipEntityPerspectiveName": "Settings", + "relationshipEntityPerspectiveLabel": "Settings" }, { "auditType": "NONE", @@ -245,26 +265,6 @@ "widgetSize": "", "widgetType": "TEXTBOX" }, - { - "auditType": "NONE", - "dataName": "CUSTOMERPAYMENT_PAYMENTMETHOD", - "dataNullable": "false", - "dataType": "INTEGER", - "description": "", - "isRequiredProperty": "true", - "name": "PaymentMethod", - "tooltip": "", - "widgetDropDownKey": "Id", - "widgetDropDownValue": "Name", - "widgetIsMajor": "true", - "widgetLength": "20", - "widgetSize": "", - "widgetType": "DROPDOWN", - "relationshipName": "CustomerPayment_PaymentMethod", - "relationshipEntityName": "PaymentMethod", - "relationshipEntityPerspectiveName": "Settings", - "relationshipEntityPerspectiveLabel": "methods" - }, { "auditType": "CREATED_AT", "dataName": "CUSTOMERPAYMENT_CREATEDAT", @@ -501,7 +501,26 @@ "relationshipName": "SupplierPayment_Currency", "relationshipEntityName": "Currency", "relationshipEntityPerspectiveName": "Settings", - "relationshipEntityPerspectiveLabel": "Entities" + "relationshipEntityPerspectiveLabel": "Settings" + }, + { + "auditType": "NONE", + "dataName": "SUPPLIERPAYMENT_COMPANY", + "dataNullable": "true", + "dataType": "INTEGER", + "description": "", + "name": "Company", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "SupplierPayment_Company", + "relationshipEntityName": "Company", + "relationshipEntityPerspectiveName": "Companies", + "relationshipEntityPerspectiveLabel": "Companies" }, { "auditType": "NONE", @@ -534,11 +553,12 @@ }, { "auditType": "NONE", - "dataName": "SUPPLIERPAYMENT_COMPANY", - "dataNullable": "true", + "dataName": "SUPPLIERPAYMENT_PAYMENTMETHOD", + "dataNullable": "false", "dataType": "INTEGER", "description": "", - "name": "Company", + "isRequiredProperty": "true", + "name": "PaymentMethod", "tooltip": "", "widgetDropDownKey": "Id", "widgetDropDownValue": "Name", @@ -546,10 +566,10 @@ "widgetLength": "20", "widgetSize": "", "widgetType": "DROPDOWN", - "relationshipName": "SupplierPayment_Company", - "relationshipEntityName": "Company", - "relationshipEntityPerspectiveName": "Companies", - "relationshipEntityPerspectiveLabel": "Entities" + "relationshipName": "SupplierPayment_PaymentMethod", + "relationshipEntityName": "PaymentMethod", + "relationshipEntityPerspectiveName": "Settings", + "relationshipEntityPerspectiveLabel": "Settings" }, { "auditType": "NONE", @@ -598,24 +618,6 @@ "widgetSize": "", "widgetType": "TEXTBOX" }, - { - "auditType": "NONE", - "dataName": "SUPPLIERPAYMENT_PAYMENTMETHOD", - "dataNullable": "false", - "dataType": "INTEGER", - "description": "", - "isRequiredProperty": "true", - "name": "PaymentMethod", - "tooltip": "", - "widgetIsMajor": "true", - "widgetLength": "20", - "widgetSize": "", - "widgetType": "TEXTBOX", - "relationshipName": "SupplierPayment_PaymentMethod", - "relationshipEntityName": "PaymentMethod", - "relationshipEntityPerspectiveName": "Settings", - "relationshipEntityPerspectiveLabel": "methods" - }, { "auditType": "CREATED_AT", "dataName": "SUPPLIERPAYMENT_CREATEDAT", @@ -852,7 +854,26 @@ "relationshipName": "EmployeePayment_Currency", "relationshipEntityName": "Currency", "relationshipEntityPerspectiveName": "Settings", - "relationshipEntityPerspectiveLabel": "Entities" + "relationshipEntityPerspectiveLabel": "Settings" + }, + { + "auditType": "NONE", + "dataName": "EMPLOYEEPAYMENT_COMPANY", + "dataNullable": "true", + "dataType": "INTEGER", + "description": "", + "name": "Company", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "EmployeePayment_Company", + "relationshipEntityName": "Company", + "relationshipEntityPerspectiveName": "Companies", + "relationshipEntityPerspectiveLabel": "Companies" }, { "auditType": "NONE", @@ -883,25 +904,6 @@ "widgetSize": "", "widgetType": "TEXTBOX" }, - { - "auditType": "NONE", - "dataName": "EMPLOYEEPAYMENT_COMPANY", - "dataNullable": "true", - "dataType": "INTEGER", - "description": "", - "name": "Company", - "tooltip": "", - "widgetDropDownKey": "Id", - "widgetDropDownValue": "Name", - "widgetIsMajor": "true", - "widgetLength": "20", - "widgetSize": "", - "widgetType": "DROPDOWN", - "relationshipName": "EmployeePayment_Company", - "relationshipEntityName": "Company", - "relationshipEntityPerspectiveName": "Companies", - "relationshipEntityPerspectiveLabel": "Entities" - }, { "auditType": "NONE", "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generateByType('Employee Payment')", @@ -949,24 +951,6 @@ "widgetSize": "", "widgetType": "TEXTBOX" }, - { - "auditType": "NONE", - "dataName": "EMPLOYEEPAYMENT_PAYMENTMETHOD", - "dataNullable": "false", - "dataType": "INTEGER", - "description": "", - "isRequiredProperty": "true", - "name": "PaymentMethod", - "tooltip": "", - "widgetIsMajor": "true", - "widgetLength": "20", - "widgetSize": "", - "widgetType": "TEXTBOX", - "relationshipName": "EmployeePayment_PaymentMethod", - "relationshipEntityName": "PaymentMethod", - "relationshipEntityPerspectiveName": "Settings", - "relationshipEntityPerspectiveLabel": "methods" - }, { "auditType": "CREATED_AT", "dataName": "EMPLOYEEPAYMENT_CREATEDAT", @@ -1165,6 +1149,25 @@ "widgetSize": "", "widgetType": "NUMBER" }, + { + "auditType": "NONE", + "dataName": "PAYMENTRECORD_COMPANY", + "dataNullable": "true", + "dataType": "INTEGER", + "description": "", + "name": "Company", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "PaymentRecord_Company", + "relationshipEntityName": "Company", + "relationshipEntityPerspectiveName": "Companies", + "relationshipEntityPerspectiveLabel": "Companies" + }, { "auditType": "NONE", "dataName": "PAYMENTRECORD_CURRENCY", @@ -1183,7 +1186,7 @@ "relationshipName": "PaymentRecord_Currency", "relationshipEntityName": "Currency", "relationshipEntityPerspectiveName": "Settings", - "relationshipEntityPerspectiveLabel": "Entities" + "relationshipEntityPerspectiveLabel": "Settings" }, { "auditType": "NONE", @@ -1253,25 +1256,6 @@ "widgetSize": "", "widgetType": "TEXTBOX" }, - { - "auditType": "NONE", - "dataName": "PAYMENTRECORD_COMPANY", - "dataNullable": "true", - "dataType": "INTEGER", - "description": "", - "name": "Company", - "tooltip": "", - "widgetDropDownKey": "Id", - "widgetDropDownValue": "Name", - "widgetIsMajor": "true", - "widgetLength": "20", - "widgetSize": "", - "widgetType": "DROPDOWN", - "relationshipName": "PaymentRecord_Company", - "relationshipEntityName": "Company", - "relationshipEntityPerspectiveName": "Companies", - "relationshipEntityPerspectiveLabel": "Entities" - }, { "auditType": "NONE", "calculatedPropertyExpressionCreate": "require(\"sdk/utils/uuid\").random()", @@ -1435,10 +1419,8 @@ "properties": [ { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "", - "calculatedPropertyExpressionUpdate": "", "dataAutoIncrement": "true", - "dataName": "CURRENCY_ID", + "dataName": "PAYMENTTYPE_ID", "dataNullable": "true", "dataPrimaryKey": "true", "dataType": "INTEGER", @@ -1452,133 +1434,334 @@ }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "", - "calculatedPropertyExpressionUpdate": "", - "dataLength": "3", - "dataName": "CURRENCY_CODE", - "dataNullable": "true", + "dataLength": "20", + "dataName": "PAYMENTTYPE_NAME", + "dataNullable": "false", "dataType": "VARCHAR", "description": "", - "name": "Code", + "isRequiredProperty": "true", + "name": "Name", "tooltip": "", "widgetIsMajor": "true", - "widgetLength": "3", - "widgetSize": "fd-col-md--2 fd-col--3", + "widgetLength": "20", + "widgetSize": "", "widgetType": "TEXTBOX" - }, + } + ], + "caption": "Manage entity PaymentType", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"${tablePrefix}PAYMENTTYPE\"", + "dataName": "PAYMENTTYPE", + "dataQuery": "", + "description": "Manage entity PaymentType", + "feedPassword": "YWRtaW4=", + "feedUsername": "YWRtaW4=", + "generateDefaultRoles": "true", + "generateReport": "false", + "icon": "/services/web/resources/unicons/file.svg", + "layoutType": "MANAGE", + "menuIndex": "100", + "menuKey": "paymenttype", + "menuLabel": "PaymentType", + "multilingual": "false", + "name": "PaymentType", + "perspectiveHeader": "", + "perspectiveIcon": "/services/web/resources/unicons/copy.svg", + "perspectiveLabel": "Settings", + "perspectiveName": "Settings", + "perspectiveNavId": "", + "perspectiveOrder": "100", + "perspectiveRole": "", + "roleRead": "codbex-payments.Settings.PaymentTypeReadOnly", + "roleWrite": "codbex-payments.Settings.PaymentTypeFullAccess", + "title": "PaymentType", + "tooltip": "PaymentType", + "type": "SETTING" + }, + { + "properties": [ { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "", - "calculatedPropertyExpressionUpdate": "", - "dataLength": "127", - "dataName": "CURRENCY_NAME", + "dataAutoIncrement": "true", + "dataName": "PAYMENTADJUSTMENT_ID", "dataNullable": "true", - "dataType": "VARCHAR", + "dataPrimaryKey": "true", + "dataType": "INTEGER", "description": "", - "name": "Name", + "name": "Id", "tooltip": "", "widgetIsMajor": "true", "widgetLength": "20", - "widgetSize": "fd-col-md--6 fd-col--9", + "widgetSize": "", "widgetType": "TEXTBOX" }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "", - "calculatedPropertyExpressionUpdate": "", - "dataLength": "3", - "dataName": "CURRENCY_NUMERIC", - "dataNullable": "true", - "dataType": "VARCHAR", + "dataName": "PAYMENTADJUSTMENT_DATE", + "dataNullable": "false", + "dataType": "DATE", "description": "", - "name": "Numeric", + "isRequiredProperty": "true", + "name": "Date", "tooltip": "", "widgetIsMajor": "true", - "widgetLength": "3", - "widgetSize": "fd-col-md--2 fd-col--3", - "widgetType": "TEXTBOX" + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DATE" }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "", - "calculatedPropertyExpressionUpdate": "", - "dataName": "CURRENCY_ROUNDING", + "dataName": "PAYMENTADJUSTMENT_VALOR", + "dataNullable": "false", + "dataType": "DATE", + "description": "", + "isRequiredProperty": "true", + "name": "Valor", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DATE" + }, + { + "auditType": "NONE", + "dataLength": "16", + "dataName": "PAYMENTADJUSTMENT_AMOUNT", + "dataNullable": "false", + "dataPrecision": "16", + "dataScale": "2", + "dataType": "DECIMAL", + "description": "", + "isRequiredProperty": "true", + "name": "Amount", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "NUMBER" + }, + { + "auditType": "NONE", + "dataName": "PAYMENTADJUSTMENT_CURRENCY", + "dataNullable": "false", + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": "true", + "name": "Currency", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Code", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "PaymentAdjustment_Currency", + "relationshipEntityName": "Currency", + "relationshipEntityPerspectiveName": "Settings", + "relationshipEntityPerspectiveLabel": "Settings" + }, + { + "auditType": "NONE", + "dataLength": "100", + "dataName": "PAYMENTADJUSTMENT_REASON", "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "name": "Reason", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataName": "PAYMENTADJUSTMENT_COMPANY", + "dataNullable": "false", "dataType": "INTEGER", "description": "", - "name": "Rounding", + "isRequiredProperty": "true", + "name": "Company", "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", "widgetIsMajor": "true", "widgetLength": "20", - "widgetSize": "fd-col-md--2 fd-col--3", - "widgetType": "NUMBER" + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "PaymentAdjustment_Company", + "relationshipEntityName": "Company", + "relationshipEntityPerspectiveName": "Companies", + "relationshipEntityPerspectiveLabel": "Companies" }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "", - "calculatedPropertyExpressionUpdate": "", - "dataName": "CURRENCY_BASE", + "calculatedPropertyExpressionCreate": "require(\"sdk/utils/uuid\").random()", + "dataLength": "36", + "dataName": "PAYMENTADJUSTMENT_UUID", "dataNullable": "true", - "dataType": "BOOLEAN", + "dataType": "VARCHAR", + "dataUnique": "true", "description": "", - "name": "Base", + "isCalculatedProperty": "true", + "name": "UUID", "tooltip": "", "widgetIsMajor": "true", "widgetLength": "20", "widgetSize": "", - "widgetType": "CHECKBOX" + "widgetType": "TEXTBOX" + }, + { + "auditType": "CREATED_AT", + "dataName": "PAYMENTADJUSTMENT_CREATEDAT", + "dataNullable": "true", + "dataType": "TIMESTAMP", + "description": "", + "isReadOnlyProperty": "true", + "name": "CreatedAt", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" }, + { + "auditType": "CREATED_BY", + "dataLength": "20", + "dataName": "PAYMENTADJUSTMENT_CREATEDBY", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "isReadOnlyProperty": "true", + "name": "CreatedBy", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "UPDATED_AT", + "dataName": "PAYMENTADJUSTMENT_UPDATEDAT", + "dataNullable": "true", + "dataType": "TIMESTAMP", + "description": "", + "isReadOnlyProperty": "true", + "name": "UpdatedAt", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "UPDATED_BY", + "dataLength": "20", + "dataName": "PAYMENTADJUSTMENT_UPDATEDBY", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "isReadOnlyProperty": "true", + "name": "UpdatedBy", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + } + ], + "caption": "Manage entity PaymentAdjustment", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"${tablePrefix}PAYMENTADJUSTMENT\"", + "dataName": "PAYMENTADJUSTMENT", + "dataQuery": "", + "description": "Manage entity PaymentAdjustment", + "feedPassword": "YWRtaW4=", + "feedUsername": "YWRtaW4=", + "generateDefaultRoles": "true", + "generateReport": "false", + "icon": "/services/web/resources/unicons/file.svg", + "layoutType": "MANAGE_MASTER", + "menuIndex": "100", + "menuKey": "paymentadjustment", + "menuLabel": "PaymentAdjustment", + "multilingual": "false", + "name": "PaymentAdjustment", + "perspectiveHeader": "", + "perspectiveIcon": "/services/web/resources/unicons/paypal.svg", + "perspectiveLabel": "PaymentAdjustment", + "perspectiveName": "PaymentAdjustment", + "perspectiveNavId": "sales-navigation-group", + "perspectiveOrder": "700", + "perspectiveRole": "", + "roleRead": "codbex-payments.PaymentAdjustment.PaymentAdjustmentReadOnly", + "roleWrite": "codbex-payments.PaymentAdjustment.PaymentAdjustmentFullAccess", + "title": "PaymentAdjustment", + "tooltip": "PaymentAdjustment", + "type": "PRIMARY" + }, + { + "properties": [ { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "", - "calculatedPropertyExpressionUpdate": "", - "dataName": "CURRENCY_RATE", + "dataAutoIncrement": "true", + "dataName": "PAYMENTDIRECTION_ID", "dataNullable": "true", - "dataType": "DOUBLE", + "dataPrimaryKey": "true", + "dataType": "INTEGER", "description": "", - "name": "Rate", + "name": "Id", "tooltip": "", "widgetIsMajor": "true", "widgetLength": "20", - "widgetSize": "fd-col-md--4 fd-col--6", - "widgetType": "NUMBER" + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "20", + "dataName": "PAYMENTDIRECTION_NAME", + "dataNullable": "false", + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": "true", + "name": "Name", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" } ], - "caption": "Manage entity Currency", - "dataCount": "SELECT COUNT(*) AS COUNT FROM \"${tablePrefix}CURRENCY\"", - "dataName": "CURRENCY", + "caption": "Manage entity PaymentDirection", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"${tablePrefix}PAYMENTDIRECTION\"", + "dataName": "PAYMENTDIRECTION", "dataQuery": "", - "description": "Manage entity Currency", + "description": "Manage entity PaymentDirection", "generateDefaultRoles": "false", "generateReport": "false", "icon": "/services/web/resources/unicons/file.svg", "layoutType": "MANAGE", "menuIndex": "100", - "menuKey": "currency", - "menuLabel": "Currency", + "menuKey": "paymentdirection", + "menuLabel": "PaymentDirection", "multilingual": "false", - "name": "Currency", + "name": "PaymentDirection", "perspectiveHeader": "", - "perspectiveIcon": "/services/web/resources/unicons/dollar-alt.svg", - "perspectiveLabel": "Entities", + "perspectiveIcon": "/services/web/resources/unicons/copy.svg", + "perspectiveLabel": "Settings", "perspectiveName": "Settings", "perspectiveNavId": "", - "perspectiveOrder": "990", + "perspectiveOrder": "100", "perspectiveRole": "", - "projectionReferencedEntity": "Currency", - "projectionReferencedModel": "/workspace/codbex-currencies/codbex-currencies.model", - "title": "Currency", - "tooltip": "Currency", - "type": "PROJECTION" + "title": "PaymentDirection", + "tooltip": "PaymentDirection", + "type": "SETTING" }, { "properties": [ { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "", - "calculatedPropertyExpressionUpdate": "", "dataAutoIncrement": "true", - "dataName": "COMPANY_ID", + "dataName": "CUSTOMER_ID", "dataNullable": "true", "dataPrimaryKey": "true", "dataType": "INTEGER", @@ -1592,98 +1775,140 @@ }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "", - "calculatedPropertyExpressionUpdate": "", - "dataLength": "100", - "dataName": "COMPANY_NAME", + "dataLength": "50", + "dataName": "CUSTOMER_FIRSTNAME", "dataNullable": "true", "dataType": "VARCHAR", "description": "", - "isRequiredProperty": "true", - "name": "Name", + "name": "FirstName", "tooltip": "", "widgetIsMajor": "true", - "widgetLength": "100", + "widgetLength": "50", "widgetSize": "", "widgetType": "TEXTBOX" }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "", - "calculatedPropertyExpressionUpdate": "", "dataLength": "50", - "dataName": "COMPANY_MANAGER", + "dataName": "CUSTOMER_LASTNAME", "dataNullable": "true", "dataType": "VARCHAR", "description": "", - "name": "Manager", + "name": "LastName", "tooltip": "", "widgetIsMajor": "true", "widgetLength": "50", - "widgetSize": "fd-col-md--6 fd-col--9", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "255", + "dataName": "CUSTOMER_LEGALENTITYNAME", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "name": "LegalEntityName", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "255", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "calculatedPropertyExpressionCreate": "(entity.FirstName && entity.LastName) ? (entity.FirstName + \" \" + entity.LastName) : entity.LegalEntityName", + "calculatedPropertyExpressionUpdate": "(entity.FirstName && entity.LastName) ? (entity.FirstName + \" \" + entity.LastName) : entity.LegalEntityName", + "dataLength": "255", + "dataName": "CUSTOMER_NAME", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "isCalculatedProperty": "true", + "name": "Name", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "255", + "widgetSize": "", "widgetType": "TEXTBOX" }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "", - "calculatedPropertyExpressionUpdate": "", "dataLength": "100", - "dataName": "COMPANY_EMAIL", + "dataName": "CUSTOMER_EMAIL", "dataNullable": "true", "dataType": "VARCHAR", + "dataUnique": "true", "description": "", "isRequiredProperty": "true", "name": "Email", "tooltip": "", "widgetIsMajor": "true", "widgetLength": "100", - "widgetSize": "fd-col-md--4 fd-col--6", - "widgetType": "TEXTBOX" + "widgetSize": "fd-col-md--6 fd-col--9", + "widgetType": "EMAIL" }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "", - "calculatedPropertyExpressionUpdate": "", - "dataLength": "20", - "dataName": "COMPANY_PHONE", + "dataLength": "15", + "dataName": "CUSTOMER_PHONE", "dataNullable": "true", "dataType": "VARCHAR", "description": "", + "isRequiredProperty": "true", "name": "Phone", "tooltip": "", "widgetIsMajor": "true", - "widgetLength": "20", + "widgetLength": "15", "widgetSize": "fd-col-md--2 fd-col--3", "widgetType": "TEL" }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "", - "calculatedPropertyExpressionUpdate": "", - "dataLength": "200", - "dataName": "COMPANY_ADDRESS", + "dataName": "CUSTOMER_COUNTRY", "dataNullable": "true", - "dataType": "VARCHAR", + "dataType": "INTEGER", "description": "", "isRequiredProperty": "true", - "name": "Address", + "name": "Country", + "relationshipEntityPerspectiveLabel": "Settings", + "relationshipEntityPerspectiveName": "Settings", + "relationshipName": "Customer_Country", "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN" + }, + { + "auditType": "NONE", + "dataName": "CUSTOMER_CITY", + "dataNullable": "true", + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": "true", + "name": "City", + "relationshipEntityPerspectiveLabel": "Settings", + "relationshipEntityPerspectiveName": "Settings", + "relationshipName": "Customer_City", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", "widgetIsMajor": "true", - "widgetLength": "200", + "widgetLength": "20", "widgetSize": "", - "widgetType": "TEXTBOX" + "widgetType": "DROPDOWN" }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "", - "calculatedPropertyExpressionUpdate": "", "dataLength": "20", - "dataName": "COMPANY_POSTCODE", + "dataName": "CUSTOMER_FAX", "dataNullable": "true", "dataType": "VARCHAR", "description": "", - "isRequiredProperty": "true", - "name": "PostCode", + "name": "Fax", "tooltip": "", "widgetIsMajor": "true", "widgetLength": "20", @@ -1692,177 +1917,118 @@ }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "", - "calculatedPropertyExpressionUpdate": "", - "dataName": "COMPANY_CITY", + "dataLength": "255", + "dataName": "CUSTOMER_ADDRESS", "dataNullable": "true", - "dataType": "INTEGER", + "dataType": "VARCHAR", "description": "", "isRequiredProperty": "true", - "name": "City", - "relationshipEntityPerspectiveName": "Cities", - "relationshipName": "Company_City", + "name": "Address", "tooltip": "", - "widgetDropDownKey": "Id", - "widgetDropDownValue": "Name", "widgetIsMajor": "true", - "widgetLength": "20", + "widgetLength": "255", "widgetSize": "", - "widgetType": "DROPDOWN" + "widgetType": "TEXTBOX" }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "", - "calculatedPropertyExpressionUpdate": "", - "dataName": "COMPANY_COUNTRY", + "dataLength": "10", + "dataName": "CUSTOMER_POSTALCODE", "dataNullable": "true", - "dataType": "INTEGER", + "dataType": "VARCHAR", "description": "", "isRequiredProperty": "true", - "name": "Country", - "relationshipEntityPerspectiveName": "Countries", - "relationshipName": "Company_Country", + "name": "PostalCode", "tooltip": "", - "widgetDropDownKey": "Id", - "widgetDropDownValue": "Name", "widgetIsMajor": "true", - "widgetLength": "20", + "widgetLength": "10", "widgetSize": "", - "widgetType": "DROPDOWN" + "widgetType": "TEXTBOX" }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "", - "calculatedPropertyExpressionUpdate": "", - "dataLength": "20", - "dataName": "COMPANY_TIN", + "dataLength": "15", + "dataName": "CUSTOMER_TIN", "dataNullable": "true", "dataType": "VARCHAR", + "dataUnique": "true", "description": "", + "isRequiredProperty": "true", "name": "TIN", "tooltip": "", "widgetIsMajor": "true", - "widgetLength": "20", + "widgetLength": "15", "widgetSize": "fd-col-md--4 fd-col--6", "widgetType": "TEXTBOX" }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "", - "calculatedPropertyExpressionUpdate": "", - "dataLength": "22", - "dataName": "COMPANY_IBAN", + "dataLength": "34", + "dataName": "CUSTOMER_IBAN", "dataNullable": "true", "dataType": "VARCHAR", + "dataUnique": "true", "description": "", + "isRequiredProperty": "true", "name": "IBAN", "tooltip": "", "widgetIsMajor": "true", - "widgetLength": "22", + "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", "widgetSize": "fd-col-md--4 fd-col--6", "widgetType": "TEXTBOX" - } - ], - "caption": "Manage entity Company", - "dataCount": "SELECT COUNT(*) AS COUNT FROM \"${tablePrefix}COMPANY\"", - "dataName": "COMPANY", - "dataQuery": "", - "description": "Manage entity Company", - "generateDefaultRoles": "false", - "generateReport": "false", - "icon": "/services/web/resources/unicons/file.svg", - "layoutType": "MANAGE", - "menuIndex": "100", - "menuKey": "company", - "menuLabel": "Company", - "multilingual": "false", - "name": "Company", - "perspectiveHeader": "", - "perspectiveIcon": "/services/web/resources/unicons/university.svg", - "perspectiveLabel": "Entities", - "perspectiveName": "Companies", - "perspectiveNavId": "", - "perspectiveOrder": "100", - "perspectiveRole": "", - "projectionReferencedEntity": "Company", - "projectionReferencedModel": "/workspace/codbex-companies/codbex-companies.model", - "title": "Company", - "tooltip": "Company", - "type": "PROJECTION" - }, - { - "properties": [ + }, { "auditType": "NONE", - "dataAutoIncrement": "true", - "dataName": "PAYMENTTYPE_ID", + "dataLength": "150", + "dataName": "CUSTOMER_RESPONSIBLEPERSON", "dataNullable": "true", - "dataPrimaryKey": "true", - "dataType": "INTEGER", + "dataType": "VARCHAR", "description": "", - "name": "Id", + "name": "ResponsiblePerson", "tooltip": "", "widgetIsMajor": "true", - "widgetLength": "20", + "widgetLength": "150", "widgetSize": "", "widgetType": "TEXTBOX" }, { - "auditType": "NONE", + "auditType": "CREATED_AT", + "calculatedPropertyExpressionCreate": "new Date().toISOString().slice(0, 19).replace('T', ' ')", + "dataName": "CUSTOMER_CREATEDAT", + "dataNullable": "true", + "dataType": "TIMESTAMP", + "description": "", + "name": "CreatedAt", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DATETIME-LOCAL" + }, + { + "auditType": "CREATED_BY", "dataLength": "20", - "dataName": "PAYMENTTYPE_NAME", - "dataNullable": "false", + "dataName": "CUSTOMER_CREATEDBY", + "dataNullable": "true", "dataType": "VARCHAR", "description": "", - "isRequiredProperty": "true", - "name": "Name", + "isReadOnlyProperty": "true", + "name": "CreatedBy", "tooltip": "", "widgetIsMajor": "true", "widgetLength": "20", "widgetSize": "", "widgetType": "TEXTBOX" - } - ], - "caption": "Manage entity PaymentType", - "dataCount": "SELECT COUNT(*) AS COUNT FROM \"${tablePrefix}PAYMENTTYPE\"", - "dataName": "PAYMENTTYPE", - "dataQuery": "", - "description": "Manage entity PaymentType", - "feedPassword": "YWRtaW4=", - "feedUsername": "YWRtaW4=", - "generateDefaultRoles": "true", - "generateReport": "false", - "icon": "/services/web/resources/unicons/file.svg", - "layoutType": "MANAGE", - "menuIndex": "100", - "menuKey": "paymenttype", - "menuLabel": "PaymentType", - "multilingual": "false", - "name": "PaymentType", - "perspectiveHeader": "", - "perspectiveIcon": "/services/web/resources/unicons/copy.svg", - "perspectiveLabel": "Settings", - "perspectiveName": "Settings", - "perspectiveNavId": "", - "perspectiveOrder": "100", - "perspectiveRole": "", - "roleRead": "codbex-payments.Settings.PaymentTypeReadOnly", - "roleWrite": "codbex-payments.Settings.PaymentTypeFullAccess", - "title": "PaymentType", - "tooltip": "PaymentType", - "type": "SETTING" - }, - { - "properties": [ + }, { - "auditType": "NONE", - "dataAutoIncrement": "true", - "dataName": "PAYMENTMETHOD_ID", + "auditType": "UPDATED_AT", + "dataName": "CUSTOMER_UPDATEDAT", "dataNullable": "true", - "dataPrimaryKey": "true", - "dataType": "INTEGER", + "dataType": "TIMESTAMP", "description": "", - "name": "Id", + "isReadOnlyProperty": "true", + "name": "UpdatedAt", "tooltip": "", "widgetIsMajor": "true", "widgetLength": "20", @@ -1870,13 +2036,14 @@ "widgetType": "TEXTBOX" }, { - "auditType": "NONE", + "auditType": "UPDATED_BY", "dataLength": "20", - "dataName": "PAYMENTMETHOD_NAME", + "dataName": "CUSTOMER_UPDATEDBY", "dataNullable": "true", "dataType": "VARCHAR", "description": "", - "name": "Name", + "isReadOnlyProperty": "true", + "name": "UpdatedBy", "tooltip": "", "widgetIsMajor": "true", "widgetLength": "20", @@ -1884,31 +2051,31 @@ "widgetType": "TEXTBOX" } ], - "caption": "Manage entity PaymentMethod", - "dataCount": "SELECT COUNT(*) AS COUNT FROM \"${tablePrefix}PAYMENTMETHOD\"", - "dataName": "PAYMENTMETHOD", + "caption": "Manage entity Customer", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"${tablePrefix}CUSTOMER\"", + "dataName": "CUSTOMER", "dataQuery": "", - "description": "Manage entity PaymentMethod", + "description": "Manage entity Customer", "generateDefaultRoles": "false", "generateReport": "false", "icon": "/services/web/resources/unicons/file.svg", "layoutType": "MANAGE", "menuIndex": "100", - "menuKey": "paymentmethod", - "menuLabel": "PaymentMethod", + "menuKey": "customer", + "menuLabel": "Customer", "multilingual": "false", - "name": "PaymentMethod", + "name": "Customer", "perspectiveHeader": "", - "perspectiveIcon": "/services/web/resources/unicons/archive.svg", - "perspectiveLabel": "methods", - "perspectiveName": "Settings", + "perspectiveIcon": "/services/web/resources/unicons/user-plus.svg", + "perspectiveLabel": "Customers", + "perspectiveName": "Customers", "perspectiveNavId": "", - "perspectiveOrder": "100", + "perspectiveOrder": "300", "perspectiveRole": "", - "projectionReferencedEntity": "PaymentMethod", - "projectionReferencedModel": "/workspace/codbex-methods/codbex-methods.model", - "title": "PaymentMethod", - "tooltip": "PaymentMethod", + "projectionReferencedEntity": "Customer", + "projectionReferencedModel": "/workspace/codbex-partners/codbex-partners.model", + "title": "Customer", + "tooltip": "Customer", "type": "PROJECTION" }, { @@ -1916,7 +2083,7 @@ { "auditType": "NONE", "dataAutoIncrement": "true", - "dataName": "CUSTOMER_ID", + "dataName": "EMPLOYEE_ID", "dataNullable": "true", "dataPrimaryKey": "true", "dataType": "INTEGER", @@ -1930,183 +2097,291 @@ }, { "auditType": "NONE", - "dataLength": "100", - "dataName": "CUSTOMER_NAME", + "dataLength": "50", + "dataName": "EMPLOYEE_FIRSTNAME", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": "true", + "name": "FirstName", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLabel": "First Name", + "widgetLength": "50", + "widgetShortLabel": "First Name", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "50", + "dataName": "EMPLOYEE_MIDDLENAME", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "name": "MiddleName", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLabel": "Middle Name", + "widgetLength": "50", + "widgetShortLabel": "Middle Name", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "50", + "dataName": "EMPLOYEE_LASTNAME", "dataNullable": "true", "dataType": "VARCHAR", "description": "", "isRequiredProperty": "true", + "name": "LastName", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLabel": "Last Name", + "widgetLength": "50", + "widgetShortLabel": "Last Name", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "calculatedPropertyExpressionCreate": "entity[\"FirstName\"] + \" \" + entity[\"LastName\"]", + "calculatedPropertyExpressionUpdate": "entity[\"FirstName\"] + \" \" + entity[\"LastName\"]", + "dataLength": "70", + "dataName": "EMPLOYEE_NAME", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "isCalculatedProperty": "true", "name": "Name", "tooltip": "", "widgetIsMajor": "true", - "widgetLength": "100", - "widgetSize": "", + "widgetLength": "70", + "widgetSize": "fd-col-md--4 fd-col--6", "widgetType": "TEXTBOX" }, { "auditType": "NONE", - "dataLength": "200", - "dataName": "CUSTOMER_ADDRESS", + "dataLength": "40", + "dataName": "EMPLOYEE_EMAIL", "dataNullable": "true", "dataType": "VARCHAR", + "dataUnique": "true", "description": "", "isRequiredProperty": "true", - "name": "Address", + "name": "Email", "tooltip": "", "widgetIsMajor": "true", - "widgetLength": "200", - "widgetSize": "", - "widgetType": "TEXTAREA" + "widgetLength": "40", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "EMAIL" }, { "auditType": "NONE", "dataLength": "20", - "dataName": "CUSTOMER_POSTALCODE", + "dataName": "EMPLOYEE_PHONENUMBER", "dataNullable": "true", "dataType": "VARCHAR", + "dataUnique": "true", "description": "", - "name": "PostalCode", + "isRequiredProperty": "true", + "name": "PhoneNumber", "tooltip": "", "widgetIsMajor": "true", "widgetLength": "20", - "widgetSize": "fd-col-md--2 fd-col--3", - "widgetType": "TEXTBOX" + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "TEL" }, { "auditType": "NONE", - "dataLength": "100", - "dataName": "CUSTOMER_EMAIL", + "dataName": "EMPLOYEE_BIRTHDATE", "dataNullable": "true", - "dataType": "VARCHAR", + "dataType": "DATE", "description": "", "isRequiredProperty": "true", - "name": "Email", + "name": "BirthDate", "tooltip": "", "widgetIsMajor": "true", - "widgetLength": "100", - "widgetSize": "fd-col-md--6 fd-col--9", - "widgetType": "TEXTBOX" + "widgetLength": "20", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "DATE" }, { "auditType": "NONE", - "dataLength": "20", - "dataName": "CUSTOMER_PHONE", + "dataLength": "10", + "dataName": "EMPLOYEE_PERSONALNUMBER", "dataNullable": "true", "dataType": "VARCHAR", + "dataUnique": "true", "description": "", - "name": "Phone", + "isRequiredProperty": "true", + "name": "PersonalNumber", "tooltip": "", "widgetIsMajor": "true", - "widgetLength": "20", - "widgetSize": "fd-col-md--2 fd-col--3", + "widgetLength": "10", + "widgetSize": "fd-col-md--4 fd-col--6", "widgetType": "TEXTBOX" }, { "auditType": "NONE", - "dataLength": "20", - "dataName": "CUSTOMER_FAX", + "dataName": "EMPLOYEE_NATIONALITY", "dataNullable": "true", - "dataType": "VARCHAR", + "dataType": "INTEGER", "description": "", - "name": "Fax", + "isRequiredProperty": "true", + "name": "Nationality", + "relationshipEntityPerspectiveLabel": "Settings", + "relationshipEntityPerspectiveName": "Settings", + "relationshipName": "Employee_Country", "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", "widgetIsMajor": "true", "widgetLength": "20", - "widgetSize": "fd-col-md--2 fd-col--3", - "widgetType": "TEXTBOX" + "widgetSize": "", + "widgetType": "DROPDOWN" }, { "auditType": "NONE", - "dataName": "CUSTOMER_COUNTRY", + "dataName": "EMPLOYEE_GENDER", "dataNullable": "true", "dataType": "INTEGER", "description": "", "isRequiredProperty": "true", - "name": "Country", - "relationshipEntityPerspectiveLabel": "Entities", - "relationshipEntityPerspectiveName": "Countries", - "relationshipName": "Customer_Country", + "name": "Gender", + "relationshipEntityPerspectiveLabel": "Settings", + "relationshipEntityPerspectiveName": "Settings", + "relationshipName": "Employee_Gender", "tooltip": "", "widgetDropDownKey": "Id", "widgetDropDownValue": "Name", "widgetIsMajor": "true", "widgetLength": "20", - "widgetSize": "", + "widgetSize": "fd-col-md--4 fd-col--6", "widgetType": "DROPDOWN" }, { "auditType": "NONE", - "dataName": "CUSTOMER_CITY", + "dataName": "EMPLOYEE_MARTIALSTATUS", "dataNullable": "true", "dataType": "INTEGER", "description": "", "isRequiredProperty": "true", - "name": "City", - "relationshipEntityPerspectiveLabel": "Entities", - "relationshipEntityPerspectiveName": "Cities", - "relationshipName": "Customer_City", + "name": "MartialStatus", + "relationshipEntityPerspectiveLabel": "Settings", + "relationshipEntityPerspectiveName": "Settings", + "relationshipName": "Employee_MartialStatus", "tooltip": "", "widgetDropDownKey": "Id", "widgetDropDownValue": "Name", "widgetIsMajor": "true", "widgetLength": "20", - "widgetSize": "", + "widgetSize": "fd-col-md--4 fd-col--6", "widgetType": "DROPDOWN" }, { "auditType": "NONE", + "dataLength": "34", + "dataName": "EMPLOYEE_IBAN", + "dataNullable": "true", + "dataType": "VARCHAR", + "dataUnique": "true", + "description": "", + "isRequiredProperty": "true", + "name": "IBAN", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "TEXTBOX" + }, + { + "auditType": "CREATED_AT", + "dataName": "EMPLOYEE_CREATEDAT", + "dataNullable": "true", + "dataType": "TIMESTAMP", + "description": "", + "isReadOnlyProperty": "true", + "name": "CreatedAt", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "CREATED_BY", "dataLength": "20", - "dataName": "CUSTOMER_TIN", + "dataName": "EMPLOYEE_CREATEDBY", "dataNullable": "true", "dataType": "VARCHAR", "description": "", - "name": "TIN", + "isReadOnlyProperty": "true", + "name": "CreatedBy", "tooltip": "", "widgetIsMajor": "true", "widgetLength": "20", - "widgetSize": "fd-col-md--4 fd-col--6", + "widgetSize": "", "widgetType": "TEXTBOX" }, { - "auditType": "NONE", - "dataLength": "36", - "dataName": "CUSTOMER_IBAN", + "auditType": "UPDATED_AT", + "dataName": "EMPLOYEE_UPDATEDAT", + "dataNullable": "true", + "dataType": "TIMESTAMP", + "description": "", + "isReadOnlyProperty": "true", + "name": "UpdatedAt", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "UPDATED_BY", + "dataLength": "20", + "dataName": "EMPLOYEE_UPDATEDBY", "dataNullable": "true", "dataType": "VARCHAR", "description": "", - "name": "IBAN", + "isReadOnlyProperty": "true", + "name": "UpdatedBy", "tooltip": "", "widgetIsMajor": "true", - "widgetLength": "36", - "widgetSize": "fd-col-md--4 fd-col--6", + "widgetLength": "20", + "widgetSize": "", "widgetType": "TEXTBOX" } ], - "caption": "Manage entity Customer", - "dataCount": "SELECT COUNT(*) AS COUNT FROM \"${tablePrefix}CUSTOMER\"", - "dataName": "CUSTOMER", + "caption": "Manage entity Employee", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"${tablePrefix}EMPLOYEE\"", + "dataName": "EMPLOYEE", "dataQuery": "", - "description": "Manage entity Customer", + "description": "Manage entity Employee", "generateDefaultRoles": "false", "generateReport": "false", "icon": "/services/web/resources/unicons/file.svg", "layoutType": "MANAGE", "menuIndex": "100", - "menuKey": "customer", - "menuLabel": "Customer", + "menuKey": "employee", + "menuLabel": "Employee", "multilingual": "false", - "name": "Customer", + "name": "Employee", "perspectiveHeader": "", - "perspectiveIcon": "/services/web/resources/unicons/user-plus.svg", - "perspectiveLabel": "Customers", - "perspectiveName": "Customers", + "perspectiveIcon": "/services/web/resources/unicons/user.svg", + "perspectiveLabel": "Employees", + "perspectiveName": "Employees", "perspectiveNavId": "", "perspectiveOrder": "100", "perspectiveRole": "", - "projectionReferencedEntity": "Customer", - "projectionReferencedModel": "/workspace/codbex-partners/codbex-partners.model", - "title": "Customer", - "tooltip": "Customer", + "projectionReferencedEntity": "Employee", + "projectionReferencedModel": "/workspace/codbex-employees/codbex-employees.model", + "title": "Employee", + "tooltip": "Employee", "type": "PROJECTION" }, { @@ -2114,7 +2389,7 @@ { "auditType": "NONE", "dataAutoIncrement": "true", - "dataName": "PAYMENTADJUSTMENT_ID", + "dataName": "SUPPLIER_ID", "dataNullable": "true", "dataPrimaryKey": "true", "dataType": "INTEGER", @@ -2128,127 +2403,148 @@ }, { "auditType": "NONE", - "dataName": "PAYMENTADJUSTMENT_DATE", - "dataNullable": "false", - "dataType": "DATE", + "dataLength": "50", + "dataName": "SUPPLIER_FIRSTNAME", + "dataNullable": "true", + "dataType": "VARCHAR", "description": "", - "isRequiredProperty": "true", - "name": "Date", + "name": "FirstName", "tooltip": "", "widgetIsMajor": "true", - "widgetLength": "20", + "widgetLength": "50", "widgetSize": "", - "widgetType": "DATE" + "widgetType": "TEXTBOX" }, { "auditType": "NONE", - "dataName": "PAYMENTADJUSTMENT_VALOR", - "dataNullable": "false", - "dataType": "DATE", + "dataLength": "50", + "dataName": "SUPPLIER_LASTNAME", + "dataNullable": "true", + "dataType": "VARCHAR", "description": "", - "isRequiredProperty": "true", - "name": "Valor", + "name": "LastName", "tooltip": "", "widgetIsMajor": "true", - "widgetLength": "20", + "widgetLength": "50", "widgetSize": "", - "widgetType": "DATE" + "widgetType": "TEXTBOX" }, { "auditType": "NONE", - "dataLength": "16", - "dataName": "PAYMENTADJUSTMENT_AMOUNT", - "dataNullable": "false", - "dataPrecision": "16", - "dataScale": "2", - "dataType": "DECIMAL", + "dataLength": "255", + "dataName": "SUPPLIER_LEGALENTITYNAME", + "dataNullable": "true", + "dataType": "VARCHAR", "description": "", - "isRequiredProperty": "true", - "name": "Amount", + "name": "LegalEntityName", "tooltip": "", "widgetIsMajor": "true", - "widgetLength": "20", + "widgetLength": "255", "widgetSize": "", - "widgetType": "NUMBER" + "widgetType": "TEXTBOX" }, { "auditType": "NONE", - "dataName": "PAYMENTADJUSTMENT_CURRENCY", - "dataNullable": "false", - "dataType": "INTEGER", + "calculatedPropertyExpressionCreate": "(entity.FirstName && entity.LastName) ? (entity.FirstName + \" \" + entity.LastName) : entity.LegalEntityName", + "calculatedPropertyExpressionUpdate": "(entity.FirstName && entity.LastName) ? (entity.FirstName + \" \" + entity.LastName) : entity.LegalEntityName", + "dataLength": "255", + "dataName": "SUPPLIER_NAME", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "isCalculatedProperty": "true", + "name": "Name", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "255", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "100", + "dataName": "SUPPLIER_EMAIL", + "dataNullable": "true", + "dataType": "VARCHAR", + "dataUnique": "true", "description": "", "isRequiredProperty": "true", - "name": "Currency", + "name": "Email", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "100", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "EMAIL" + }, + { + "auditType": "NONE", + "dataLength": "15", + "dataName": "SUPPLIER_PHONE", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": "true", + "name": "Phone", "tooltip": "", - "widgetDropDownKey": "Id", - "widgetDropDownValue": "Name", "widgetIsMajor": "true", - "widgetLength": "20", - "widgetSize": "", - "widgetType": "DROPDOWN", - "relationshipName": "PaymentAdjustment_Currency", - "relationshipEntityName": "Currency", - "relationshipEntityPerspectiveName": "Settings", - "relationshipEntityPerspectiveLabel": "Entities" + "widgetLength": "15", + "widgetSize": "fd-col-md--2 fd-col--3", + "widgetType": "TEL" }, { "auditType": "NONE", - "dataName": "PAYMENTADJUSTMENT_COMPANY", - "dataNullable": "false", - "dataType": "INTEGER", + "dataLength": "20", + "dataName": "SUPPLIER_FAX", + "dataNullable": "true", + "dataType": "VARCHAR", "description": "", "isRequiredProperty": "true", - "name": "Company", + "name": "Fax", "tooltip": "", - "widgetDropDownKey": "Id", - "widgetDropDownValue": "Name", "widgetIsMajor": "true", "widgetLength": "20", - "widgetSize": "", - "widgetType": "DROPDOWN", - "relationshipName": "PaymentAdjustment_Company", - "relationshipEntityName": "Company", - "relationshipEntityPerspectiveName": "Companies", - "relationshipEntityPerspectiveLabel": "Entities" + "widgetSize": "fd-col-md--2 fd-col--3", + "widgetType": "TEXTBOX" }, { "auditType": "NONE", - "dataLength": "100", - "dataName": "PAYMENTADJUSTMENT_REASON", + "dataLength": "15", + "dataName": "SUPPLIER_TIN", "dataNullable": "true", "dataType": "VARCHAR", + "dataUnique": "true", "description": "", - "name": "Reason", + "isRequiredProperty": "true", + "name": "TIN", "tooltip": "", "widgetIsMajor": "true", - "widgetLength": "20", - "widgetSize": "", + "widgetLength": "15", + "widgetSize": "fd-col-md--4 fd-col--6", "widgetType": "TEXTBOX" }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "require(\"sdk/utils/uuid\").random()", - "dataLength": "36", - "dataName": "PAYMENTADJUSTMENT_UUID", + "dataLength": "34", + "dataName": "SUPPLIER_IBAN", "dataNullable": "true", "dataType": "VARCHAR", "dataUnique": "true", "description": "", - "isCalculatedProperty": "true", - "name": "UUID", + "isRequiredProperty": "true", + "name": "IBAN", "tooltip": "", "widgetIsMajor": "true", - "widgetLength": "20", - "widgetSize": "", + "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", + "widgetSize": "fd-col-md--4 fd-col--6", "widgetType": "TEXTBOX" }, { "auditType": "CREATED_AT", - "dataName": "PAYMENTADJUSTMENT_CREATEDAT", + "dataName": "SUPPLIER_CREATEDAT", "dataNullable": "true", "dataType": "TIMESTAMP", "description": "", - "isReadOnlyProperty": "true", "name": "CreatedAt", "tooltip": "", "widgetIsMajor": "true", @@ -2259,7 +2555,7 @@ { "auditType": "CREATED_BY", "dataLength": "20", - "dataName": "PAYMENTADJUSTMENT_CREATEDBY", + "dataName": "SUPPLIER_CREATEDBY", "dataNullable": "true", "dataType": "VARCHAR", "description": "", @@ -2273,7 +2569,7 @@ }, { "auditType": "UPDATED_AT", - "dataName": "PAYMENTADJUSTMENT_UPDATEDAT", + "dataName": "SUPPLIER_UPDATEDAT", "dataNullable": "true", "dataType": "TIMESTAMP", "description": "", @@ -2288,7 +2584,7 @@ { "auditType": "UPDATED_BY", "dataLength": "20", - "dataName": "PAYMENTADJUSTMENT_UPDATEDBY", + "dataName": "SUPPLIER_UPDATEDBY", "dataNullable": "true", "dataType": "VARCHAR", "description": "", @@ -2301,41 +2597,39 @@ "widgetType": "TEXTBOX" } ], - "caption": "Manage entity PaymentAdjustment", - "dataCount": "SELECT COUNT(*) AS COUNT FROM \"${tablePrefix}PAYMENTADJUSTMENT\"", - "dataName": "PAYMENTADJUSTMENT", + "caption": "Manage entity Supplier", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"${tablePrefix}SUPPLIER\"", + "dataName": "SUPPLIER", "dataQuery": "", - "description": "Manage entity PaymentAdjustment", - "feedPassword": "YWRtaW4=", - "feedUsername": "YWRtaW4=", - "generateDefaultRoles": "true", + "description": "Manage entity Supplier", + "generateDefaultRoles": "false", "generateReport": "false", "icon": "/services/web/resources/unicons/file.svg", - "layoutType": "MANAGE_MASTER", + "layoutType": "MANAGE", "menuIndex": "100", - "menuKey": "paymentadjustment", - "menuLabel": "PaymentAdjustment", + "menuKey": "supplier", + "menuLabel": "Supplier", "multilingual": "false", - "name": "PaymentAdjustment", + "name": "Supplier", "perspectiveHeader": "", - "perspectiveIcon": "/services/web/resources/unicons/paypal.svg", - "perspectiveLabel": "PaymentAdjustment", - "perspectiveName": "PaymentAdjustment", - "perspectiveNavId": "sales-navigation-group", - "perspectiveOrder": "700", + "perspectiveIcon": "/services/web/resources/unicons/user-minus.svg", + "perspectiveLabel": "Suppliers", + "perspectiveName": "Suppliers", + "perspectiveNavId": "", + "perspectiveOrder": "200", "perspectiveRole": "", - "roleRead": "codbex-payments.PaymentAdjustment.PaymentAdjustmentReadOnly", - "roleWrite": "codbex-payments.PaymentAdjustment.PaymentAdjustmentFullAccess", - "title": "PaymentAdjustment", - "tooltip": "PaymentAdjustment", - "type": "PRIMARY" + "projectionReferencedEntity": "Supplier", + "projectionReferencedModel": "/workspace/codbex-partners/codbex-partners.model", + "title": "Supplier", + "tooltip": "Supplier", + "type": "PROJECTION" }, { "properties": [ { "auditType": "NONE", "dataAutoIncrement": "true", - "dataName": "PAYMENTDIRECTION_ID", + "dataName": "PAYMENTMETHOD_ID", "dataNullable": "true", "dataPrimaryKey": "true", "dataType": "INTEGER", @@ -2350,9 +2644,10 @@ { "auditType": "NONE", "dataLength": "20", - "dataName": "PAYMENTDIRECTION_NAME", - "dataNullable": "false", + "dataName": "PAYMENTMETHOD_NAME", + "dataNullable": "true", "dataType": "VARCHAR", + "dataUnique": "true", "description": "", "isRequiredProperty": "true", "name": "Name", @@ -2363,20 +2658,20 @@ "widgetType": "TEXTBOX" } ], - "caption": "Manage entity PaymentDirection", - "dataCount": "SELECT COUNT(*) AS COUNT FROM \"${tablePrefix}PAYMENTDIRECTION\"", - "dataName": "PAYMENTDIRECTION", + "caption": "Manage entity PaymentMethod", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"${tablePrefix}PAYMENTMETHOD\"", + "dataName": "PAYMENTMETHOD", "dataQuery": "", - "description": "Manage entity PaymentDirection", + "description": "Manage entity PaymentMethod", "generateDefaultRoles": "false", "generateReport": "false", "icon": "/services/web/resources/unicons/file.svg", "layoutType": "MANAGE", "menuIndex": "100", - "menuKey": "paymentdirection", - "menuLabel": "PaymentDirection", + "menuKey": "paymentmethod", + "menuLabel": "PaymentMethod", "multilingual": "false", - "name": "PaymentDirection", + "name": "PaymentMethod", "perspectiveHeader": "", "perspectiveIcon": "/services/web/resources/unicons/copy.svg", "perspectiveLabel": "Settings", @@ -2384,16 +2679,18 @@ "perspectiveNavId": "", "perspectiveOrder": "100", "perspectiveRole": "", - "title": "PaymentDirection", - "tooltip": "PaymentDirection", - "type": "SETTING" + "projectionReferencedEntity": "PaymentMethod", + "projectionReferencedModel": "/workspace/codbex-methods/codbex-methods.model", + "title": "PaymentMethod", + "tooltip": "PaymentMethod", + "type": "PROJECTION" }, { "properties": [ { "auditType": "NONE", "dataAutoIncrement": "true", - "dataName": "EMPLOYEE_ID", + "dataName": "CURRENCY_ID", "dataNullable": "true", "dataPrimaryKey": "true", "dataType": "INTEGER", @@ -2407,232 +2704,176 @@ }, { "auditType": "NONE", - "dataLength": "50", - "dataName": "EMPLOYEE_FIRSTNAME", + "dataLength": "3", + "dataName": "CURRENCY_CODE", "dataNullable": "true", "dataType": "VARCHAR", + "dataUnique": "true", "description": "", "isRequiredProperty": "true", - "name": "FirstName", - "tooltip": "", - "widgetIsMajor": "true", - "widgetLabel": "First Name", - "widgetLength": "50", - "widgetShortLabel": "First Name", - "widgetSize": "fd-col-md--4 fd-col--6", - "widgetType": "TEXTBOX" - }, - { - "auditType": "NONE", - "dataLength": "50", - "dataName": "EMPLOYEE_MIDDLENAME", - "dataNullable": "true", - "dataType": "VARCHAR", - "description": "", - "name": "MiddleName", + "name": "Code", "tooltip": "", "widgetIsMajor": "true", - "widgetLabel": "Middle Name", - "widgetLength": "50", - "widgetShortLabel": "Middle Name", - "widgetSize": "fd-col-md--4 fd-col--6", + "widgetLength": "3", + "widgetSize": "fd-col-md--2 fd-col--3", "widgetType": "TEXTBOX" }, { "auditType": "NONE", - "dataLength": "50", - "dataName": "EMPLOYEE_LASTNAME", + "dataLength": "127", + "dataName": "CURRENCY_NAME", "dataNullable": "true", "dataType": "VARCHAR", "description": "", "isRequiredProperty": "true", - "name": "LastName", - "tooltip": "", - "widgetIsMajor": "true", - "widgetLabel": "Last Name", - "widgetLength": "50", - "widgetShortLabel": "Last Name", - "widgetSize": "fd-col-md--4 fd-col--6", - "widgetType": "TEXTBOX" - }, - { - "auditType": "NONE", - "calculatedPropertyExpressionCreate": "entity[\"FirstName\"] + \" \" + entity[\"LastName\"]", - "calculatedPropertyExpressionUpdate": "entity[\"FirstName\"] + \" \" + entity[\"LastName\"]", - "dataLength": "70", - "dataName": "EMPLOYEE_NAME", - "dataNullable": "true", - "dataType": "VARCHAR", - "description": "", - "isCalculatedProperty": "true", "name": "Name", "tooltip": "", "widgetIsMajor": "true", - "widgetLength": "70", - "widgetSize": "fd-col-md--4 fd-col--6", + "widgetLength": "127", + "widgetSize": "fd-col-md--6 fd-col--9", "widgetType": "TEXTBOX" }, { "auditType": "NONE", - "dataLength": "40", - "dataName": "EMPLOYEE_EMAIL", + "dataLength": "3", + "dataName": "CURRENCY_NUMERIC", "dataNullable": "true", "dataType": "VARCHAR", "dataUnique": "true", "description": "", "isRequiredProperty": "true", - "name": "Email", + "name": "Numeric", "tooltip": "", "widgetIsMajor": "true", - "widgetLength": "40", - "widgetSize": "fd-col-md--4 fd-col--6", - "widgetType": "EMAIL" + "widgetLength": "3", + "widgetSize": "fd-col-md--2 fd-col--3", + "widgetType": "TEXTBOX" }, { "auditType": "NONE", - "dataLength": "20", - "dataName": "EMPLOYEE_PHONENUMBER", + "dataName": "CURRENCY_ROUNDING", "dataNullable": "true", - "dataType": "VARCHAR", - "dataUnique": "true", + "dataType": "INTEGER", "description": "", "isRequiredProperty": "true", - "name": "PhoneNumber", + "name": "Rounding", "tooltip": "", "widgetIsMajor": "true", "widgetLength": "20", - "widgetSize": "fd-col-md--4 fd-col--6", - "widgetType": "TEL" + "widgetSize": "fd-col-md--2 fd-col--3", + "widgetType": "NUMBER" }, { "auditType": "NONE", - "dataName": "EMPLOYEE_BIRTHDATE", + "dataName": "CURRENCY_BASE", "dataNullable": "true", - "dataType": "DATE", + "dataType": "BOOLEAN", "description": "", - "isRequiredProperty": "true", - "name": "BirthDate", + "name": "Base", "tooltip": "", "widgetIsMajor": "true", "widgetLength": "20", - "widgetSize": "fd-col-md--4 fd-col--6", - "widgetType": "DATE" + "widgetSize": "", + "widgetType": "CHECKBOX" }, { "auditType": "NONE", - "dataLength": "10", - "dataName": "EMPLOYEE_PERSONALNUMBER", + "dataName": "CURRENCY_RATE", "dataNullable": "true", - "dataType": "VARCHAR", - "dataUnique": "true", + "dataType": "DOUBLE", "description": "", "isRequiredProperty": "true", - "name": "PersonalNumber", + "name": "Rate", "tooltip": "", "widgetIsMajor": "true", - "widgetLength": "10", + "widgetLength": "20", "widgetSize": "fd-col-md--4 fd-col--6", - "widgetType": "TEXTBOX" + "widgetType": "NUMBER" }, { - "auditType": "NONE", - "dataName": "EMPLOYEE_NATIONALITY", + "auditType": "CREATED_AT", + "dataName": "CURRENCY_CREATEDAT", "dataNullable": "true", - "dataType": "INTEGER", + "dataType": "TIMESTAMP", "description": "", - "isRequiredProperty": "true", - "name": "Nationality", - "relationshipEntityPerspectiveLabel": "Settings", - "relationshipEntityPerspectiveName": "Settings", - "relationshipName": "Employee_Country", + "isReadOnlyProperty": "true", + "name": "CreatedAt", "tooltip": "", - "widgetDropDownKey": "Id", - "widgetDropDownValue": "Name", "widgetIsMajor": "true", "widgetLength": "20", - "widgetSize": "fd-col-md--4 fd-col--6", - "widgetType": "DROPDOWN" + "widgetSize": "", + "widgetType": "TEXTBOX" }, { - "auditType": "NONE", - "dataName": "EMPLOYEE_GENDER", + "auditType": "CREATED_BY", + "dataLength": "20", + "dataName": "CURRENCY_CREATEDBY", "dataNullable": "true", - "dataType": "INTEGER", + "dataType": "VARCHAR", "description": "", - "isRequiredProperty": "true", - "name": "Gender", - "relationshipEntityPerspectiveLabel": "Entities", - "relationshipEntityPerspectiveName": "Settings", - "relationshipName": "Employee_Gender", + "isReadOnlyProperty": "true", + "name": "CreatedBy", "tooltip": "", - "widgetDropDownKey": "Id", - "widgetDropDownValue": "Name", "widgetIsMajor": "true", "widgetLength": "20", - "widgetSize": "fd-col-md--4 fd-col--6", - "widgetType": "DROPDOWN" + "widgetSize": "", + "widgetType": "TEXTBOX" }, { - "auditType": "NONE", - "dataName": "EMPLOYEE_MARTIALSTATUS", + "auditType": "UPDATED_AT", + "dataName": "CURRENCY_UPDATEDAT", "dataNullable": "true", - "dataType": "INTEGER", + "dataType": "TIMESTAMP", "description": "", - "isRequiredProperty": "true", - "name": "MartialStatus", - "relationshipEntityPerspectiveLabel": "Entities", - "relationshipEntityPerspectiveName": "Settings", - "relationshipName": "Employee_MartialStatus", + "isReadOnlyProperty": "true", + "name": "UpdatedAt", "tooltip": "", - "widgetDropDownKey": "Id", - "widgetDropDownValue": "Name", "widgetIsMajor": "true", "widgetLength": "20", - "widgetSize": "fd-col-md--4 fd-col--6", - "widgetType": "DROPDOWN" + "widgetSize": "", + "widgetType": "TEXTBOX" }, { - "auditType": "NONE", - "dataLength": "34", - "dataName": "EMPLOYEE_IBAN", + "auditType": "UPDATED_BY", + "dataLength": "20", + "dataName": "CURRENCY_UPDATEDBY", "dataNullable": "true", "dataType": "VARCHAR", - "dataUnique": "true", "description": "", - "isRequiredProperty": "true", - "name": "IBAN", + "isReadOnlyProperty": "true", + "name": "UpdatedBy", "tooltip": "", "widgetIsMajor": "true", - "widgetLength": "34", - "widgetSize": "fd-col-md--4 fd-col--6", + "widgetLength": "20", + "widgetSize": "", "widgetType": "TEXTBOX" } ], - "caption": "Manage entity Employee", - "dataCount": "SELECT COUNT(*) AS COUNT FROM \"${tablePrefix}EMPLOYEE\"", - "dataName": "EMPLOYEE", + "caption": "Manage entity Currency", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"${tablePrefix}CURRENCY\"", + "dataName": "CURRENCY", "dataQuery": "", - "description": "Manage entity Employee", + "description": "Manage entity Currency", "generateDefaultRoles": "false", "generateReport": "false", "icon": "/services/web/resources/unicons/file.svg", "layoutType": "MANAGE", "menuIndex": "100", - "menuKey": "employee", - "menuLabel": "Employee", + "menuKey": "currency", + "menuLabel": "Currency", "multilingual": "false", - "name": "Employee", + "name": "Currency", "perspectiveHeader": "", - "perspectiveIcon": "/services/web/resources/unicons/user.svg", - "perspectiveLabel": "Employees", - "perspectiveName": "Employees", + "perspectiveIcon": "/services/web/resources/unicons/copy.svg", + "perspectiveLabel": "Settings", + "perspectiveName": "Settings", "perspectiveNavId": "", "perspectiveOrder": "100", "perspectiveRole": "", - "projectionReferencedEntity": "Employee", - "projectionReferencedModel": "/workspace/codbex-employees/codbex-employees.model", - "title": "Employee", - "tooltip": "Employee", + "projectionReferencedEntity": "Currency", + "projectionReferencedModel": "/workspace/codbex-currencies/codbex-currencies.model", + "title": "Currency", + "tooltip": "Currency", "type": "PROJECTION" }, { @@ -2640,7 +2881,7 @@ { "auditType": "NONE", "dataAutoIncrement": "true", - "dataName": "SUPPLIER_ID", + "dataName": "COMPANY_ID", "dataNullable": "true", "dataPrimaryKey": "true", "dataType": "INTEGER", @@ -2654,103 +2895,129 @@ }, { "auditType": "NONE", - "dataLength": "50", - "dataName": "SUPPLIER_FIRSTNAME", + "dataLength": "100", + "dataName": "COMPANY_NAME", "dataNullable": "true", "dataType": "VARCHAR", "description": "", - "name": "FirstName", + "isRequiredProperty": "true", + "name": "Name", "tooltip": "", "widgetIsMajor": "true", - "widgetLength": "50", + "widgetLength": "100", "widgetSize": "", "widgetType": "TEXTBOX" }, { "auditType": "NONE", - "dataLength": "50", - "dataName": "SUPPLIER_LASTNAME", + "dataLength": "100", + "dataName": "COMPANY_EMAIL", "dataNullable": "true", "dataType": "VARCHAR", + "dataUnique": "true", "description": "", - "name": "LastName", + "isRequiredProperty": "true", + "name": "Email", "tooltip": "", "widgetIsMajor": "true", - "widgetLength": "50", - "widgetSize": "", + "widgetLength": "100", + "widgetSize": "fd-col-md--4 fd-col--6", "widgetType": "TEXTBOX" }, { "auditType": "NONE", - "dataLength": "255", - "dataName": "SUPPLIER_LEGALENTITYNAME", + "dataName": "COMPANY_MANAGER", + "dataNullable": "true", + "dataType": "INTEGER", + "description": "", + "name": "Manager", + "relationshipEntityPerspectiveLabel": "Employees", + "relationshipEntityPerspectiveName": "Employees", + "relationshipName": "Company_Employee", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN" + }, + { + "auditType": "NONE", + "dataLength": "20", + "dataName": "COMPANY_PHONE", "dataNullable": "true", "dataType": "VARCHAR", "description": "", - "name": "LegalEntityName", + "name": "Phone", "tooltip": "", "widgetIsMajor": "true", - "widgetLength": "255", + "widgetLength": "20", "widgetSize": "", - "widgetType": "TEXTBOX" + "widgetType": "TEL" }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "(entity.FirstName && entity.LastName) ? (entity.FirstName + \" \" + entity.LastName) : entity.LegalEntityName", - "calculatedPropertyExpressionUpdate": "(entity.FirstName && entity.LastName) ? (entity.FirstName + \" \" + entity.LastName) : entity.LegalEntityName", - "dataLength": "255", - "dataName": "SUPPLIER_NAME", + "dataLength": "200", + "dataName": "COMPANY_ADDRESS", "dataNullable": "true", "dataType": "VARCHAR", "description": "", - "isCalculatedProperty": "true", - "name": "Name", + "isRequiredProperty": "true", + "name": "Address", "tooltip": "", "widgetIsMajor": "true", - "widgetLength": "255", + "widgetLength": "200", "widgetSize": "", "widgetType": "TEXTBOX" }, { "auditType": "NONE", - "dataLength": "100", - "dataName": "SUPPLIER_EMAIL", + "dataName": "COMPANY_COUNTRY", "dataNullable": "true", - "dataType": "VARCHAR", - "dataUnique": "true", + "dataType": "INTEGER", "description": "", "isRequiredProperty": "true", - "name": "Email", + "name": "Country", + "relationshipEntityPerspectiveLabel": "Settings", + "relationshipEntityPerspectiveName": "Settings", + "relationshipName": "Company_Country", "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", "widgetIsMajor": "true", - "widgetLength": "100", - "widgetSize": "fd-col-md--4 fd-col--6", - "widgetType": "EMAIL" + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN" }, { "auditType": "NONE", - "dataLength": "15", - "dataName": "SUPPLIER_PHONE", + "dataName": "COMPANY_CITY", "dataNullable": "true", - "dataType": "VARCHAR", + "dataType": "INTEGER", "description": "", "isRequiredProperty": "true", - "name": "Phone", + "name": "City", + "relationshipEntityPerspectiveLabel": "Settings", + "relationshipEntityPerspectiveName": "Settings", + "relationshipName": "Company_City", "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", "widgetIsMajor": "true", - "widgetLength": "15", - "widgetSize": "fd-col-md--2 fd-col--3", - "widgetType": "TEL" + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN" }, { "auditType": "NONE", "dataLength": "20", - "dataName": "SUPPLIER_FAX", + "dataName": "COMPANY_POSTCODE", "dataNullable": "true", "dataType": "VARCHAR", "description": "", "isRequiredProperty": "true", - "name": "Fax", + "name": "PostCode", "tooltip": "", "widgetIsMajor": "true", "widgetLength": "20", @@ -2759,24 +3026,22 @@ }, { "auditType": "NONE", - "dataLength": "15", - "dataName": "SUPPLIER_TIN", + "dataLength": "20", + "dataName": "COMPANY_TIN", "dataNullable": "true", "dataType": "VARCHAR", - "dataUnique": "true", "description": "", - "isRequiredProperty": "true", "name": "TIN", "tooltip": "", "widgetIsMajor": "true", - "widgetLength": "15", + "widgetLength": "20", "widgetSize": "fd-col-md--4 fd-col--6", "widgetType": "TEXTBOX" }, { "auditType": "NONE", "dataLength": "34", - "dataName": "SUPPLIER_IBAN", + "dataName": "COMPANY_IBAN", "dataNullable": "true", "dataType": "VARCHAR", "dataUnique": "true", @@ -2786,48 +3051,94 @@ "tooltip": "", "widgetIsMajor": "true", "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", "widgetSize": "fd-col-md--4 fd-col--6", "widgetType": "TEXTBOX" }, { "auditType": "CREATED_AT", - "dataName": "SUPPLIER_CREATEDAT", + "dataName": "COMPANY_CREATEDAT", "dataNullable": "true", "dataType": "TIMESTAMP", "description": "", + "isReadOnlyProperty": "true", "name": "CreatedAt", "tooltip": "", "widgetIsMajor": "true", "widgetLength": "20", "widgetSize": "", "widgetType": "TEXTBOX" + }, + { + "auditType": "CREATED_BY", + "dataLength": "20", + "dataName": "COMPANY_CREATEDBY", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "isReadOnlyProperty": "true", + "name": "CreatedBy", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "UPDATED_AT", + "dataName": "COMPANY_UPDATEDAT", + "dataNullable": "true", + "dataType": "TIMESTAMP", + "description": "", + "isReadOnlyProperty": "true", + "name": "UpdatedAt", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "UPDATED_BY", + "dataLength": "20", + "dataName": "COMPANY_UPDATEDBY", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "isReadOnlyProperty": "true", + "name": "UpdatedBy", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" } ], - "caption": "Manage entity Supplier", - "dataCount": "SELECT COUNT(*) AS COUNT FROM \"${tablePrefix}SUPPLIER\"", - "dataName": "SUPPLIER", + "caption": "Manage entity Company", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"${tablePrefix}COMPANY\"", + "dataName": "COMPANY", "dataQuery": "", - "description": "Manage entity Supplier", + "description": "Manage entity Company", "generateDefaultRoles": "false", "generateReport": "false", "icon": "/services/web/resources/unicons/file.svg", "layoutType": "MANAGE", "menuIndex": "100", - "menuKey": "supplier", - "menuLabel": "Supplier", + "menuKey": "company", + "menuLabel": "Company", "multilingual": "false", - "name": "Supplier", + "name": "Company", "perspectiveHeader": "", - "perspectiveIcon": "/services/web/resources/unicons/user-minus.svg", - "perspectiveLabel": "Suppliers", - "perspectiveName": "Suppliers", + "perspectiveIcon": "/services/web/resources/unicons/user.svg", + "perspectiveLabel": "Companies", + "perspectiveName": "Companies", "perspectiveNavId": "", - "perspectiveOrder": "200", + "perspectiveOrder": "113", "perspectiveRole": "", - "projectionReferencedEntity": "Supplier", - "projectionReferencedModel": "/workspace/codbex-partners/codbex-partners.model", - "title": "Supplier", - "tooltip": "Supplier", + "projectionReferencedEntity": "Company", + "projectionReferencedModel": "/workspace/codbex-companies/codbex-companies.model", + "title": "Company", + "tooltip": "Company", "type": "PROJECTION" } ], diff --git a/codbex-payments/gen/codbex-payments/api/CustomerPayment/CustomerPaymentController.ts b/codbex-payments/gen/codbex-payments/api/CustomerPayment/CustomerPaymentController.ts deleted file mode 100644 index 81625c6..0000000 --- a/codbex-payments/gen/codbex-payments/api/CustomerPayment/CustomerPaymentController.ts +++ /dev/null @@ -1,237 +0,0 @@ -import { Controller, Get, Post, Put, Delete, Documentation, request, response } from '@aerokit/sdk/http' -import { HttpUtils } from "@aerokit/sdk/http/utils"; -import { ValidationError } from '@aerokit/sdk/http/errors' -import { ForbiddenError } from '@aerokit/sdk/http/errors' -import { user } from '@aerokit/sdk/security' -import { Options } from '@aerokit/sdk/db' -import { Extensions } from "@aerokit/sdk/extensions" -import { Injected, Inject } from '@aerokit/sdk/component' -import { CustomerPaymentRepository } from '../../data/CustomerPayment/CustomerPaymentRepository' -import { CustomerPaymentEntity } from '../../data/CustomerPayment/CustomerPaymentEntity' -// custom imports -import { NumberGeneratorService } from "/codbex-number-generator/service/generator"; - -const validationModules = await Extensions.loadExtensionModules('codbex-payments-CustomerPayment-CustomerPayment', ['validate']); - -@Controller -@Documentation('codbex-payments - CustomerPayment Controller') -@Injected() -class CustomerPaymentController { - - @Inject('CustomerPaymentRepository') - private readonly repository!: CustomerPaymentRepository; - - @Get('/') - @Documentation('Get All CustomerPayment') - public getAll(_: any, ctx: any): CustomerPaymentEntity[] { - try { - this.checkPermissions('read'); - const options: Options = { - limit: ctx.queryParameters["$limit"] ? parseInt(ctx.queryParameters["$limit"]) : 20, - offset: ctx.queryParameters["$offset"] ? parseInt(ctx.queryParameters["$offset"]) : 0, - language: request.getLocale()?.split("_")[0] - }; - - return this.repository.findAll(options); - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Post('/') - @Documentation('Create CustomerPayment') - public create(entity: CustomerPaymentEntity): CustomerPaymentEntity { - try { - this.checkPermissions('write'); - this.validateEntity(entity); - entity.Id = this.repository.create(entity) as any; - response.setHeader('Content-Location', '/services/ts/codbex-payments/gen/codbex-payments/api/CustomerPayment/CustomerPaymentController.ts/' + entity.Id); - response.setStatus(response.CREATED); - return entity; - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Get('/count') - @Documentation('Count CustomerPayment') - public count(): { count: number } { - try { - this.checkPermissions('read'); - return { count: this.repository.count() }; - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Post('/count') - @Documentation('Count CustomerPayment with filter') - public countWithFilter(filter: any): { count: number } { - try { - this.checkPermissions('read'); - return { count: this.repository.count(filter) }; - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Post('/search') - @Documentation('Search CustomerPayment') - public search(filter: any): CustomerPaymentEntity[] { - try { - this.checkPermissions('read'); - return this.repository.findAll(filter); - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Get('/:id') - @Documentation('Get CustomerPayment by id') - public getById(_: any, ctx: any): CustomerPaymentEntity { - try { - this.checkPermissions('read'); - const id = parseInt(ctx.pathParameters.id); - const options: Options = { - language: request.getLocale()?.split("_")[0] - }; - const entity = this.repository.findById(id, options); - if (entity) { - return entity; - } else { - HttpUtils.sendResponseNotFound('CustomerPayment not found'); - } - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Put('/:id') - @Documentation('Update CustomerPayment by id') - public update(entity: CustomerPaymentEntity, ctx: any): CustomerPaymentEntity { - try { - this.checkPermissions('write'); - const id = parseInt(ctx.pathParameters.id); - entity.Id = id; - this.validateEntity(entity); - this.repository.update(entity); - return entity; - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Delete('/:id') - @Documentation('Delete CustomerPayment by id') - public deleteById(_: any, ctx: any): void { - try { - this.checkPermissions('write'); - const id = parseInt(ctx.pathParameters.id); - const entity = this.repository.findById(id); - if (entity) { - this.repository.deleteById(id); - HttpUtils.sendResponseNoContent(); - } else { - HttpUtils.sendResponseNotFound('CustomerPayment not found'); - } - } catch (error: any) { - this.handleError(error); - } - } - - private handleError(error: any) { - if (error.name === 'ForbiddenError') { - HttpUtils.sendForbiddenRequest(error.message); - } else if (error.name === 'ValidationError') { - HttpUtils.sendResponseBadRequest(error.message); - } else { - HttpUtils.sendInternalServerError(error.message); - } - } - - private checkPermissions(operationType: string) { - if (operationType === 'read' && !(user.isInRole('codbex-payments.CustomerPayment.CustomerPaymentReadOnly') || user.isInRole('codbex-payments.CustomerPayment.CustomerPaymentFullAccess'))) { - throw new ForbiddenError(); - } - if (operationType === 'write' && !user.isInRole('codbex-payments.CustomerPayment.CustomerPaymentFullAccess')) { - throw new ForbiddenError(); - } - } - - private validateEntity(entity: any): void { - if (entity.Customer === null || entity.Customer === undefined) { - throw new ValidationError(`The 'Customer' property is required, provide a valid value`); - } - if (entity.Date === null || entity.Date === undefined) { - throw new ValidationError(`The 'Date' property is required, provide a valid value`); - } - if (entity.Valor === null || entity.Valor === undefined) { - throw new ValidationError(`The 'Valor' property is required, provide a valid value`); - } - if (entity.OurPartyIBAN === null || entity.OurPartyIBAN === undefined) { - throw new ValidationError(`The 'OurPartyIBAN' property is required, provide a valid value`); - } - if (entity.OurPartyIBAN?.length > 34) { - throw new ValidationError(`The 'OurPartyIBAN' exceeds the maximum length of [34] characters`); - } - if (!RegExp(/^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$/).test(entity.OurPartyIBAN)) { - throw new ValidationError(`The value provided for the 'OurPartyIBAN' property ('[${entity.OurPartyIBAN}]') doesn't match the required pattern '^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'`); - } - if (entity.CounterpartyIBAN === null || entity.CounterpartyIBAN === undefined) { - throw new ValidationError(`The 'CounterpartyIBAN' property is required, provide a valid value`); - } - if (entity.CounterpartyIBAN?.length > 34) { - throw new ValidationError(`The 'CounterpartyIBAN' exceeds the maximum length of [34] characters`); - } - if (!RegExp(/^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$/).test(entity.CounterpartyIBAN)) { - throw new ValidationError(`The value provided for the 'CounterpartyIBAN' property ('[${entity.CounterpartyIBAN}]') doesn't match the required pattern '^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'`); - } - if (entity.CounterpartyName?.length > 100) { - throw new ValidationError(`The 'CounterpartyName' exceeds the maximum length of [100] characters`); - } - if (entity.Amount === null || entity.Amount === undefined) { - throw new ValidationError(`The 'Amount' property is required, provide a valid value`); - } - if (entity.Currency === null || entity.Currency === undefined) { - throw new ValidationError(`The 'Currency' property is required, provide a valid value`); - } - if (entity.Reason === null || entity.Reason === undefined) { - throw new ValidationError(`The 'Reason' property is required, provide a valid value`); - } - if (entity.Reason?.length > 100) { - throw new ValidationError(`The 'Reason' exceeds the maximum length of [100] characters`); - } - if (entity.Description?.length > 100) { - throw new ValidationError(`The 'Description' exceeds the maximum length of [100] characters`); - } - if (entity.Name?.length > 20) { - throw new ValidationError(`The 'Name' exceeds the maximum length of [20] characters`); - } - if (entity.UUID?.length > 36) { - throw new ValidationError(`The 'UUID' exceeds the maximum length of [36] characters`); - } - if (entity.Reference?.length > 36) { - throw new ValidationError(`The 'Reference' exceeds the maximum length of [36] characters`); - } - if (entity.PaymentMethod === null || entity.PaymentMethod === undefined) { - throw new ValidationError(`The 'PaymentMethod' property is required, provide a valid value`); - } - if (entity.CreatedBy?.length > 20) { - throw new ValidationError(`The 'CreatedBy' exceeds the maximum length of [20] characters`); - } - if (entity.UpdatedBy?.length > 20) { - throw new ValidationError(`The 'UpdatedBy' exceeds the maximum length of [20] characters`); - } - for (const next of validationModules) { - next.validate(entity); - } - } - -} diff --git a/codbex-payments/gen/codbex-payments/api/EmployeePayment/EmployeePaymentController.ts b/codbex-payments/gen/codbex-payments/api/EmployeePayment/EmployeePaymentController.ts deleted file mode 100644 index bad4d91..0000000 --- a/codbex-payments/gen/codbex-payments/api/EmployeePayment/EmployeePaymentController.ts +++ /dev/null @@ -1,237 +0,0 @@ -import { Controller, Get, Post, Put, Delete, Documentation, request, response } from '@aerokit/sdk/http' -import { HttpUtils } from "@aerokit/sdk/http/utils"; -import { ValidationError } from '@aerokit/sdk/http/errors' -import { ForbiddenError } from '@aerokit/sdk/http/errors' -import { user } from '@aerokit/sdk/security' -import { Options } from '@aerokit/sdk/db' -import { Extensions } from "@aerokit/sdk/extensions" -import { Injected, Inject } from '@aerokit/sdk/component' -import { EmployeePaymentRepository } from '../../data/EmployeePayment/EmployeePaymentRepository' -import { EmployeePaymentEntity } from '../../data/EmployeePayment/EmployeePaymentEntity' -// custom imports -import { NumberGeneratorService } from "/codbex-number-generator/service/generator"; - -const validationModules = await Extensions.loadExtensionModules('codbex-payments-EmployeePayment-EmployeePayment', ['validate']); - -@Controller -@Documentation('codbex-payments - EmployeePayment Controller') -@Injected() -class EmployeePaymentController { - - @Inject('EmployeePaymentRepository') - private readonly repository!: EmployeePaymentRepository; - - @Get('/') - @Documentation('Get All EmployeePayment') - public getAll(_: any, ctx: any): EmployeePaymentEntity[] { - try { - this.checkPermissions('read'); - const options: Options = { - limit: ctx.queryParameters["$limit"] ? parseInt(ctx.queryParameters["$limit"]) : 20, - offset: ctx.queryParameters["$offset"] ? parseInt(ctx.queryParameters["$offset"]) : 0, - language: request.getLocale()?.split("_")[0] - }; - - return this.repository.findAll(options); - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Post('/') - @Documentation('Create EmployeePayment') - public create(entity: EmployeePaymentEntity): EmployeePaymentEntity { - try { - this.checkPermissions('write'); - this.validateEntity(entity); - entity.Id = this.repository.create(entity) as any; - response.setHeader('Content-Location', '/services/ts/codbex-payments/gen/codbex-payments/api/EmployeePayment/EmployeePaymentController.ts/' + entity.Id); - response.setStatus(response.CREATED); - return entity; - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Get('/count') - @Documentation('Count EmployeePayment') - public count(): { count: number } { - try { - this.checkPermissions('read'); - return { count: this.repository.count() }; - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Post('/count') - @Documentation('Count EmployeePayment with filter') - public countWithFilter(filter: any): { count: number } { - try { - this.checkPermissions('read'); - return { count: this.repository.count(filter) }; - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Post('/search') - @Documentation('Search EmployeePayment') - public search(filter: any): EmployeePaymentEntity[] { - try { - this.checkPermissions('read'); - return this.repository.findAll(filter); - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Get('/:id') - @Documentation('Get EmployeePayment by id') - public getById(_: any, ctx: any): EmployeePaymentEntity { - try { - this.checkPermissions('read'); - const id = parseInt(ctx.pathParameters.id); - const options: Options = { - language: request.getLocale()?.split("_")[0] - }; - const entity = this.repository.findById(id, options); - if (entity) { - return entity; - } else { - HttpUtils.sendResponseNotFound('EmployeePayment not found'); - } - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Put('/:id') - @Documentation('Update EmployeePayment by id') - public update(entity: EmployeePaymentEntity, ctx: any): EmployeePaymentEntity { - try { - this.checkPermissions('write'); - const id = parseInt(ctx.pathParameters.id); - entity.Id = id; - this.validateEntity(entity); - this.repository.update(entity); - return entity; - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Delete('/:id') - @Documentation('Delete EmployeePayment by id') - public deleteById(_: any, ctx: any): void { - try { - this.checkPermissions('write'); - const id = parseInt(ctx.pathParameters.id); - const entity = this.repository.findById(id); - if (entity) { - this.repository.deleteById(id); - HttpUtils.sendResponseNoContent(); - } else { - HttpUtils.sendResponseNotFound('EmployeePayment not found'); - } - } catch (error: any) { - this.handleError(error); - } - } - - private handleError(error: any) { - if (error.name === 'ForbiddenError') { - HttpUtils.sendForbiddenRequest(error.message); - } else if (error.name === 'ValidationError') { - HttpUtils.sendResponseBadRequest(error.message); - } else { - HttpUtils.sendInternalServerError(error.message); - } - } - - private checkPermissions(operationType: string) { - if (operationType === 'read' && !(user.isInRole('codbex-payments.EmployeePayment.EmployeePaymentReadOnly') || user.isInRole('codbex-payments.EmployeePayment.EmployeePaymentFullAccess'))) { - throw new ForbiddenError(); - } - if (operationType === 'write' && !user.isInRole('codbex-payments.EmployeePayment.EmployeePaymentFullAccess')) { - throw new ForbiddenError(); - } - } - - private validateEntity(entity: any): void { - if (entity.Employee === null || entity.Employee === undefined) { - throw new ValidationError(`The 'Employee' property is required, provide a valid value`); - } - if (entity.Date === null || entity.Date === undefined) { - throw new ValidationError(`The 'Date' property is required, provide a valid value`); - } - if (entity.Valor === null || entity.Valor === undefined) { - throw new ValidationError(`The 'Valor' property is required, provide a valid value`); - } - if (entity.OurPartyIBAN === null || entity.OurPartyIBAN === undefined) { - throw new ValidationError(`The 'OurPartyIBAN' property is required, provide a valid value`); - } - if (entity.OurPartyIBAN?.length > 34) { - throw new ValidationError(`The 'OurPartyIBAN' exceeds the maximum length of [34] characters`); - } - if (!RegExp(/^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$/).test(entity.OurPartyIBAN)) { - throw new ValidationError(`The value provided for the 'OurPartyIBAN' property ('[${entity.OurPartyIBAN}]') doesn't match the required pattern '^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'`); - } - if (entity.CounterpartyIBAN === null || entity.CounterpartyIBAN === undefined) { - throw new ValidationError(`The 'CounterpartyIBAN' property is required, provide a valid value`); - } - if (entity.CounterpartyIBAN?.length > 34) { - throw new ValidationError(`The 'CounterpartyIBAN' exceeds the maximum length of [34] characters`); - } - if (!RegExp(/^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$/).test(entity.CounterpartyIBAN)) { - throw new ValidationError(`The value provided for the 'CounterpartyIBAN' property ('[${entity.CounterpartyIBAN}]') doesn't match the required pattern '^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'`); - } - if (entity.CounterpartyName?.length > 100) { - throw new ValidationError(`The 'CounterpartyName' exceeds the maximum length of [100] characters`); - } - if (entity.Amount === null || entity.Amount === undefined) { - throw new ValidationError(`The 'Amount' property is required, provide a valid value`); - } - if (entity.Currency === null || entity.Currency === undefined) { - throw new ValidationError(`The 'Currency' property is required, provide a valid value`); - } - if (entity.Reason === null || entity.Reason === undefined) { - throw new ValidationError(`The 'Reason' property is required, provide a valid value`); - } - if (entity.Reason?.length > 100) { - throw new ValidationError(`The 'Reason' exceeds the maximum length of [100] characters`); - } - if (entity.Description?.length > 100) { - throw new ValidationError(`The 'Description' exceeds the maximum length of [100] characters`); - } - if (entity.Name?.length > 20) { - throw new ValidationError(`The 'Name' exceeds the maximum length of [20] characters`); - } - if (entity.UUID?.length > 36) { - throw new ValidationError(`The 'UUID' exceeds the maximum length of [36] characters`); - } - if (entity.Reference?.length > 36) { - throw new ValidationError(`The 'Reference' exceeds the maximum length of [36] characters`); - } - if (entity.PaymentMethod === null || entity.PaymentMethod === undefined) { - throw new ValidationError(`The 'PaymentMethod' property is required, provide a valid value`); - } - if (entity.CreatedBy?.length > 20) { - throw new ValidationError(`The 'CreatedBy' exceeds the maximum length of [20] characters`); - } - if (entity.UpdatedBy?.length > 20) { - throw new ValidationError(`The 'UpdatedBy' exceeds the maximum length of [20] characters`); - } - for (const next of validationModules) { - next.validate(entity); - } - } - -} diff --git a/codbex-payments/gen/codbex-payments/api/PaymentAdjustment/PaymentAdjustmentController.ts b/codbex-payments/gen/codbex-payments/api/PaymentAdjustment/PaymentAdjustmentController.ts deleted file mode 100644 index a3d2370..0000000 --- a/codbex-payments/gen/codbex-payments/api/PaymentAdjustment/PaymentAdjustmentController.ts +++ /dev/null @@ -1,199 +0,0 @@ -import { Controller, Get, Post, Put, Delete, Documentation, request, response } from '@aerokit/sdk/http' -import { HttpUtils } from "@aerokit/sdk/http/utils"; -import { ValidationError } from '@aerokit/sdk/http/errors' -import { ForbiddenError } from '@aerokit/sdk/http/errors' -import { user } from '@aerokit/sdk/security' -import { Options } from '@aerokit/sdk/db' -import { Extensions } from "@aerokit/sdk/extensions" -import { Injected, Inject } from '@aerokit/sdk/component' -import { PaymentAdjustmentRepository } from '../../data/PaymentAdjustment/PaymentAdjustmentRepository' -import { PaymentAdjustmentEntity } from '../../data/PaymentAdjustment/PaymentAdjustmentEntity' - -const validationModules = await Extensions.loadExtensionModules('codbex-payments-PaymentAdjustment-PaymentAdjustment', ['validate']); - -@Controller -@Documentation('codbex-payments - PaymentAdjustment Controller') -@Injected() -class PaymentAdjustmentController { - - @Inject('PaymentAdjustmentRepository') - private readonly repository!: PaymentAdjustmentRepository; - - @Get('/') - @Documentation('Get All PaymentAdjustment') - public getAll(_: any, ctx: any): PaymentAdjustmentEntity[] { - try { - this.checkPermissions('read'); - const options: Options = { - limit: ctx.queryParameters["$limit"] ? parseInt(ctx.queryParameters["$limit"]) : 20, - offset: ctx.queryParameters["$offset"] ? parseInt(ctx.queryParameters["$offset"]) : 0, - language: request.getLocale()?.split("_")[0] - }; - - return this.repository.findAll(options); - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Post('/') - @Documentation('Create PaymentAdjustment') - public create(entity: PaymentAdjustmentEntity): PaymentAdjustmentEntity { - try { - this.checkPermissions('write'); - this.validateEntity(entity); - entity.Id = this.repository.create(entity) as any; - response.setHeader('Content-Location', '/services/ts/codbex-payments/gen/codbex-payments/api/PaymentAdjustment/PaymentAdjustmentController.ts/' + entity.Id); - response.setStatus(response.CREATED); - return entity; - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Get('/count') - @Documentation('Count PaymentAdjustment') - public count(): { count: number } { - try { - this.checkPermissions('read'); - return { count: this.repository.count() }; - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Post('/count') - @Documentation('Count PaymentAdjustment with filter') - public countWithFilter(filter: any): { count: number } { - try { - this.checkPermissions('read'); - return { count: this.repository.count(filter) }; - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Post('/search') - @Documentation('Search PaymentAdjustment') - public search(filter: any): PaymentAdjustmentEntity[] { - try { - this.checkPermissions('read'); - return this.repository.findAll(filter); - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Get('/:id') - @Documentation('Get PaymentAdjustment by id') - public getById(_: any, ctx: any): PaymentAdjustmentEntity { - try { - this.checkPermissions('read'); - const id = parseInt(ctx.pathParameters.id); - const options: Options = { - language: request.getLocale()?.split("_")[0] - }; - const entity = this.repository.findById(id, options); - if (entity) { - return entity; - } else { - HttpUtils.sendResponseNotFound('PaymentAdjustment not found'); - } - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Put('/:id') - @Documentation('Update PaymentAdjustment by id') - public update(entity: PaymentAdjustmentEntity, ctx: any): PaymentAdjustmentEntity { - try { - this.checkPermissions('write'); - const id = parseInt(ctx.pathParameters.id); - entity.Id = id; - this.validateEntity(entity); - this.repository.update(entity); - return entity; - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Delete('/:id') - @Documentation('Delete PaymentAdjustment by id') - public deleteById(_: any, ctx: any): void { - try { - this.checkPermissions('write'); - const id = parseInt(ctx.pathParameters.id); - const entity = this.repository.findById(id); - if (entity) { - this.repository.deleteById(id); - HttpUtils.sendResponseNoContent(); - } else { - HttpUtils.sendResponseNotFound('PaymentAdjustment not found'); - } - } catch (error: any) { - this.handleError(error); - } - } - - private handleError(error: any) { - if (error.name === 'ForbiddenError') { - HttpUtils.sendForbiddenRequest(error.message); - } else if (error.name === 'ValidationError') { - HttpUtils.sendResponseBadRequest(error.message); - } else { - HttpUtils.sendInternalServerError(error.message); - } - } - - private checkPermissions(operationType: string) { - if (operationType === 'read' && !(user.isInRole('codbex-payments.PaymentAdjustment.PaymentAdjustmentReadOnly') || user.isInRole('codbex-payments.PaymentAdjustment.PaymentAdjustmentFullAccess'))) { - throw new ForbiddenError(); - } - if (operationType === 'write' && !user.isInRole('codbex-payments.PaymentAdjustment.PaymentAdjustmentFullAccess')) { - throw new ForbiddenError(); - } - } - - private validateEntity(entity: any): void { - if (entity.Date === null || entity.Date === undefined) { - throw new ValidationError(`The 'Date' property is required, provide a valid value`); - } - if (entity.Valor === null || entity.Valor === undefined) { - throw new ValidationError(`The 'Valor' property is required, provide a valid value`); - } - if (entity.Amount === null || entity.Amount === undefined) { - throw new ValidationError(`The 'Amount' property is required, provide a valid value`); - } - if (entity.Currency === null || entity.Currency === undefined) { - throw new ValidationError(`The 'Currency' property is required, provide a valid value`); - } - if (entity.Company === null || entity.Company === undefined) { - throw new ValidationError(`The 'Company' property is required, provide a valid value`); - } - if (entity.Reason?.length > 100) { - throw new ValidationError(`The 'Reason' exceeds the maximum length of [100] characters`); - } - if (entity.UUID?.length > 36) { - throw new ValidationError(`The 'UUID' exceeds the maximum length of [36] characters`); - } - if (entity.CreatedBy?.length > 20) { - throw new ValidationError(`The 'CreatedBy' exceeds the maximum length of [20] characters`); - } - if (entity.UpdatedBy?.length > 20) { - throw new ValidationError(`The 'UpdatedBy' exceeds the maximum length of [20] characters`); - } - for (const next of validationModules) { - next.validate(entity); - } - } - -} diff --git a/codbex-payments/gen/codbex-payments/api/PaymentRecord/PaymentRecordController.ts b/codbex-payments/gen/codbex-payments/api/PaymentRecord/PaymentRecordController.ts deleted file mode 100644 index 84ee8f0..0000000 --- a/codbex-payments/gen/codbex-payments/api/PaymentRecord/PaymentRecordController.ts +++ /dev/null @@ -1,232 +0,0 @@ -import { Controller, Get, Post, Put, Delete, Documentation, request, response } from '@aerokit/sdk/http' -import { HttpUtils } from "@aerokit/sdk/http/utils"; -import { ValidationError } from '@aerokit/sdk/http/errors' -import { ForbiddenError } from '@aerokit/sdk/http/errors' -import { user } from '@aerokit/sdk/security' -import { Options } from '@aerokit/sdk/db' -import { Extensions } from "@aerokit/sdk/extensions" -import { Injected, Inject } from '@aerokit/sdk/component' -import { PaymentRecordRepository } from '../../data/PaymentRecord/PaymentRecordRepository' -import { PaymentRecordEntity } from '../../data/PaymentRecord/PaymentRecordEntity' - -const validationModules = await Extensions.loadExtensionModules('codbex-payments-PaymentRecord-PaymentRecord', ['validate']); - -@Controller -@Documentation('codbex-payments - PaymentRecord Controller') -@Injected() -class PaymentRecordController { - - @Inject('PaymentRecordRepository') - private readonly repository!: PaymentRecordRepository; - - @Get('/') - @Documentation('Get All PaymentRecord') - public getAll(_: any, ctx: any): PaymentRecordEntity[] { - try { - this.checkPermissions('read'); - const options: Options = { - limit: ctx.queryParameters["$limit"] ? parseInt(ctx.queryParameters["$limit"]) : 20, - offset: ctx.queryParameters["$offset"] ? parseInt(ctx.queryParameters["$offset"]) : 0, - language: request.getLocale()?.split("_")[0] - }; - - return this.repository.findAll(options); - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Post('/') - @Documentation('Create PaymentRecord') - public create(entity: PaymentRecordEntity): PaymentRecordEntity { - try { - this.checkPermissions('write'); - this.validateEntity(entity); - entity.Id = this.repository.create(entity) as any; - response.setHeader('Content-Location', '/services/ts/codbex-payments/gen/codbex-payments/api/PaymentRecord/PaymentRecordController.ts/' + entity.Id); - response.setStatus(response.CREATED); - return entity; - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Get('/count') - @Documentation('Count PaymentRecord') - public count(): { count: number } { - try { - this.checkPermissions('read'); - return { count: this.repository.count() }; - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Post('/count') - @Documentation('Count PaymentRecord with filter') - public countWithFilter(filter: any): { count: number } { - try { - this.checkPermissions('read'); - return { count: this.repository.count(filter) }; - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Post('/search') - @Documentation('Search PaymentRecord') - public search(filter: any): PaymentRecordEntity[] { - try { - this.checkPermissions('read'); - return this.repository.findAll(filter); - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Get('/:id') - @Documentation('Get PaymentRecord by id') - public getById(_: any, ctx: any): PaymentRecordEntity { - try { - this.checkPermissions('read'); - const id = parseInt(ctx.pathParameters.id); - const options: Options = { - language: request.getLocale()?.split("_")[0] - }; - const entity = this.repository.findById(id, options); - if (entity) { - return entity; - } else { - HttpUtils.sendResponseNotFound('PaymentRecord not found'); - } - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Put('/:id') - @Documentation('Update PaymentRecord by id') - public update(entity: PaymentRecordEntity, ctx: any): PaymentRecordEntity { - try { - this.checkPermissions('write'); - const id = parseInt(ctx.pathParameters.id); - entity.Id = id; - this.validateEntity(entity); - this.repository.update(entity); - return entity; - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Delete('/:id') - @Documentation('Delete PaymentRecord by id') - public deleteById(_: any, ctx: any): void { - try { - this.checkPermissions('write'); - const id = parseInt(ctx.pathParameters.id); - const entity = this.repository.findById(id); - if (entity) { - this.repository.deleteById(id); - HttpUtils.sendResponseNoContent(); - } else { - HttpUtils.sendResponseNotFound('PaymentRecord not found'); - } - } catch (error: any) { - this.handleError(error); - } - } - - private handleError(error: any) { - if (error.name === 'ForbiddenError') { - HttpUtils.sendForbiddenRequest(error.message); - } else if (error.name === 'ValidationError') { - HttpUtils.sendResponseBadRequest(error.message); - } else { - HttpUtils.sendInternalServerError(error.message); - } - } - - private checkPermissions(operationType: string) { - if (operationType === 'read' && !(user.isInRole('codbex-payments.PaymentRecord.PaymentRecordReadOnly') || user.isInRole('codbex-payments.PaymentRecord.PaymentRecordFullAccess'))) { - throw new ForbiddenError(); - } - if (operationType === 'write' && !user.isInRole('codbex-payments.PaymentRecord.PaymentRecordFullAccess')) { - throw new ForbiddenError(); - } - } - - private validateEntity(entity: any): void { - if (entity.Date === null || entity.Date === undefined) { - throw new ValidationError(`The 'Date' property is required, provide a valid value`); - } - if (entity.Valor === null || entity.Valor === undefined) { - throw new ValidationError(`The 'Valor' property is required, provide a valid value`); - } - if (entity.OurPartyIBAN === null || entity.OurPartyIBAN === undefined) { - throw new ValidationError(`The 'OurPartyIBAN' property is required, provide a valid value`); - } - if (entity.OurPartyIBAN?.length > 34) { - throw new ValidationError(`The 'OurPartyIBAN' exceeds the maximum length of [34] characters`); - } - if (!RegExp(/^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$/).test(entity.OurPartyIBAN)) { - throw new ValidationError(`The value provided for the 'OurPartyIBAN' property ('[${entity.OurPartyIBAN}]') doesn't match the required pattern '^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'`); - } - if (entity.CounterpartyIBAN === null || entity.CounterpartyIBAN === undefined) { - throw new ValidationError(`The 'CounterpartyIBAN' property is required, provide a valid value`); - } - if (entity.CounterpartyIBAN?.length > 34) { - throw new ValidationError(`The 'CounterpartyIBAN' exceeds the maximum length of [34] characters`); - } - if (!RegExp(/^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$/).test(entity.CounterpartyIBAN)) { - throw new ValidationError(`The value provided for the 'CounterpartyIBAN' property ('[${entity.CounterpartyIBAN}]') doesn't match the required pattern '^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'`); - } - if (entity.CounterpartyName?.length > 100) { - throw new ValidationError(`The 'CounterpartyName' exceeds the maximum length of [100] characters`); - } - if (entity.Amount === null || entity.Amount === undefined) { - throw new ValidationError(`The 'Amount' property is required, provide a valid value`); - } - if (entity.Currency === null || entity.Currency === undefined) { - throw new ValidationError(`The 'Currency' property is required, provide a valid value`); - } - if (entity.PaymentDirection === null || entity.PaymentDirection === undefined) { - throw new ValidationError(`The 'PaymentDirection' property is required, provide a valid value`); - } - if (entity.PaymentType === null || entity.PaymentType === undefined) { - throw new ValidationError(`The 'PaymentType' property is required, provide a valid value`); - } - if (entity.Reason?.length > 100) { - throw new ValidationError(`The 'Reason' exceeds the maximum length of [100] characters`); - } - if (entity.Description?.length > 100) { - throw new ValidationError(`The 'Description' exceeds the maximum length of [100] characters`); - } - if (entity.UUID?.length > 36) { - throw new ValidationError(`The 'UUID' exceeds the maximum length of [36] characters`); - } - if (entity.Reference?.length > 36) { - throw new ValidationError(`The 'Reference' exceeds the maximum length of [36] characters`); - } - if (entity.DeletedReason?.length > 255) { - throw new ValidationError(`The 'DeletedReason' exceeds the maximum length of [255] characters`); - } - if (entity.CreatedBy?.length > 20) { - throw new ValidationError(`The 'CreatedBy' exceeds the maximum length of [20] characters`); - } - if (entity.UpdatedBy?.length > 20) { - throw new ValidationError(`The 'UpdatedBy' exceeds the maximum length of [20] characters`); - } - for (const next of validationModules) { - next.validate(entity); - } - } - -} diff --git a/codbex-payments/gen/codbex-payments/api/Settings/PaymentDirectionController.ts b/codbex-payments/gen/codbex-payments/api/Settings/PaymentDirectionController.ts deleted file mode 100644 index fb6aa29..0000000 --- a/codbex-payments/gen/codbex-payments/api/Settings/PaymentDirectionController.ts +++ /dev/null @@ -1,159 +0,0 @@ -import { Controller, Get, Post, Put, Delete, Documentation, request, response } from '@aerokit/sdk/http' -import { HttpUtils } from "@aerokit/sdk/http/utils"; -import { ValidationError } from '@aerokit/sdk/http/errors' -import { Options } from '@aerokit/sdk/db' -import { Extensions } from "@aerokit/sdk/extensions" -import { Injected, Inject } from '@aerokit/sdk/component' -import { PaymentDirectionRepository } from '../../data/Settings/PaymentDirectionRepository' -import { PaymentDirectionEntity } from '../../data/Settings/PaymentDirectionEntity' - -const validationModules = await Extensions.loadExtensionModules('codbex-payments-Settings-PaymentDirection', ['validate']); - -@Controller -@Documentation('codbex-payments - PaymentDirection Controller') -@Injected() -class PaymentDirectionController { - - @Inject('PaymentDirectionRepository') - private readonly repository!: PaymentDirectionRepository; - - @Get('/') - @Documentation('Get All PaymentDirection') - public getAll(_: any, ctx: any): PaymentDirectionEntity[] { - try { - const options: Options = { - limit: ctx.queryParameters["$limit"] ? parseInt(ctx.queryParameters["$limit"]) : 20, - offset: ctx.queryParameters["$offset"] ? parseInt(ctx.queryParameters["$offset"]) : 0, - language: request.getLocale()?.split("_")[0] - }; - - return this.repository.findAll(options); - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Post('/') - @Documentation('Create PaymentDirection') - public create(entity: PaymentDirectionEntity): PaymentDirectionEntity { - try { - this.validateEntity(entity); - entity.Id = this.repository.create(entity) as any; - response.setHeader('Content-Location', '/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentDirectionController.ts/' + entity.Id); - response.setStatus(response.CREATED); - return entity; - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Get('/count') - @Documentation('Count PaymentDirection') - public count(): { count: number } { - try { - return { count: this.repository.count() }; - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Post('/count') - @Documentation('Count PaymentDirection with filter') - public countWithFilter(filter: any): { count: number } { - try { - return { count: this.repository.count(filter) }; - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Post('/search') - @Documentation('Search PaymentDirection') - public search(filter: any): PaymentDirectionEntity[] { - try { - return this.repository.findAll(filter); - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Get('/:id') - @Documentation('Get PaymentDirection by id') - public getById(_: any, ctx: any): PaymentDirectionEntity { - try { - const id = parseInt(ctx.pathParameters.id); - const options: Options = { - language: request.getLocale()?.split("_")[0] - }; - const entity = this.repository.findById(id, options); - if (entity) { - return entity; - } else { - HttpUtils.sendResponseNotFound('PaymentDirection not found'); - } - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Put('/:id') - @Documentation('Update PaymentDirection by id') - public update(entity: PaymentDirectionEntity, ctx: any): PaymentDirectionEntity { - try { - const id = parseInt(ctx.pathParameters.id); - entity.Id = id; - this.validateEntity(entity); - this.repository.update(entity); - return entity; - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Delete('/:id') - @Documentation('Delete PaymentDirection by id') - public deleteById(_: any, ctx: any): void { - try { - const id = parseInt(ctx.pathParameters.id); - const entity = this.repository.findById(id); - if (entity) { - this.repository.deleteById(id); - HttpUtils.sendResponseNoContent(); - } else { - HttpUtils.sendResponseNotFound('PaymentDirection not found'); - } - } catch (error: any) { - this.handleError(error); - } - } - - private handleError(error: any) { - if (error.name === 'ForbiddenError') { - HttpUtils.sendForbiddenRequest(error.message); - } else if (error.name === 'ValidationError') { - HttpUtils.sendResponseBadRequest(error.message); - } else { - HttpUtils.sendInternalServerError(error.message); - } - } - - private validateEntity(entity: any): void { - if (entity.Name === null || entity.Name === undefined) { - throw new ValidationError(`The 'Name' property is required, provide a valid value`); - } - if (entity.Name?.length > 20) { - throw new ValidationError(`The 'Name' exceeds the maximum length of [20] characters`); - } - for (const next of validationModules) { - next.validate(entity); - } - } - -} diff --git a/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeController.ts b/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeController.ts deleted file mode 100644 index 371dfa6..0000000 --- a/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeController.ts +++ /dev/null @@ -1,178 +0,0 @@ -import { Controller, Get, Post, Put, Delete, Documentation, request, response } from '@aerokit/sdk/http' -import { HttpUtils } from "@aerokit/sdk/http/utils"; -import { ValidationError } from '@aerokit/sdk/http/errors' -import { ForbiddenError } from '@aerokit/sdk/http/errors' -import { user } from '@aerokit/sdk/security' -import { Options } from '@aerokit/sdk/db' -import { Extensions } from "@aerokit/sdk/extensions" -import { Injected, Inject } from '@aerokit/sdk/component' -import { PaymentTypeRepository } from '../../data/Settings/PaymentTypeRepository' -import { PaymentTypeEntity } from '../../data/Settings/PaymentTypeEntity' - -const validationModules = await Extensions.loadExtensionModules('codbex-payments-Settings-PaymentType', ['validate']); - -@Controller -@Documentation('codbex-payments - PaymentType Controller') -@Injected() -class PaymentTypeController { - - @Inject('PaymentTypeRepository') - private readonly repository!: PaymentTypeRepository; - - @Get('/') - @Documentation('Get All PaymentType') - public getAll(_: any, ctx: any): PaymentTypeEntity[] { - try { - this.checkPermissions('read'); - const options: Options = { - limit: ctx.queryParameters["$limit"] ? parseInt(ctx.queryParameters["$limit"]) : 20, - offset: ctx.queryParameters["$offset"] ? parseInt(ctx.queryParameters["$offset"]) : 0, - language: request.getLocale()?.split("_")[0] - }; - - return this.repository.findAll(options); - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Post('/') - @Documentation('Create PaymentType') - public create(entity: PaymentTypeEntity): PaymentTypeEntity { - try { - this.checkPermissions('write'); - this.validateEntity(entity); - entity.Id = this.repository.create(entity) as any; - response.setHeader('Content-Location', '/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeController.ts/' + entity.Id); - response.setStatus(response.CREATED); - return entity; - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Get('/count') - @Documentation('Count PaymentType') - public count(): { count: number } { - try { - this.checkPermissions('read'); - return { count: this.repository.count() }; - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Post('/count') - @Documentation('Count PaymentType with filter') - public countWithFilter(filter: any): { count: number } { - try { - this.checkPermissions('read'); - return { count: this.repository.count(filter) }; - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Post('/search') - @Documentation('Search PaymentType') - public search(filter: any): PaymentTypeEntity[] { - try { - this.checkPermissions('read'); - return this.repository.findAll(filter); - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Get('/:id') - @Documentation('Get PaymentType by id') - public getById(_: any, ctx: any): PaymentTypeEntity { - try { - this.checkPermissions('read'); - const id = parseInt(ctx.pathParameters.id); - const options: Options = { - language: request.getLocale()?.split("_")[0] - }; - const entity = this.repository.findById(id, options); - if (entity) { - return entity; - } else { - HttpUtils.sendResponseNotFound('PaymentType not found'); - } - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Put('/:id') - @Documentation('Update PaymentType by id') - public update(entity: PaymentTypeEntity, ctx: any): PaymentTypeEntity { - try { - this.checkPermissions('write'); - const id = parseInt(ctx.pathParameters.id); - entity.Id = id; - this.validateEntity(entity); - this.repository.update(entity); - return entity; - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Delete('/:id') - @Documentation('Delete PaymentType by id') - public deleteById(_: any, ctx: any): void { - try { - this.checkPermissions('write'); - const id = parseInt(ctx.pathParameters.id); - const entity = this.repository.findById(id); - if (entity) { - this.repository.deleteById(id); - HttpUtils.sendResponseNoContent(); - } else { - HttpUtils.sendResponseNotFound('PaymentType not found'); - } - } catch (error: any) { - this.handleError(error); - } - } - - private handleError(error: any) { - if (error.name === 'ForbiddenError') { - HttpUtils.sendForbiddenRequest(error.message); - } else if (error.name === 'ValidationError') { - HttpUtils.sendResponseBadRequest(error.message); - } else { - HttpUtils.sendInternalServerError(error.message); - } - } - - private checkPermissions(operationType: string) { - if (operationType === 'read' && !(user.isInRole('codbex-payments.Settings.PaymentTypeReadOnly') || user.isInRole('codbex-payments.Settings.PaymentTypeFullAccess'))) { - throw new ForbiddenError(); - } - if (operationType === 'write' && !user.isInRole('codbex-payments.Settings.PaymentTypeFullAccess')) { - throw new ForbiddenError(); - } - } - - private validateEntity(entity: any): void { - if (entity.Name === null || entity.Name === undefined) { - throw new ValidationError(`The 'Name' property is required, provide a valid value`); - } - if (entity.Name?.length > 20) { - throw new ValidationError(`The 'Name' exceeds the maximum length of [20] characters`); - } - for (const next of validationModules) { - next.validate(entity); - } - } - -} diff --git a/codbex-payments/gen/codbex-payments/api/SupplierPayment/SupplierPaymentController.ts b/codbex-payments/gen/codbex-payments/api/SupplierPayment/SupplierPaymentController.ts deleted file mode 100644 index 35e51e3..0000000 --- a/codbex-payments/gen/codbex-payments/api/SupplierPayment/SupplierPaymentController.ts +++ /dev/null @@ -1,237 +0,0 @@ -import { Controller, Get, Post, Put, Delete, Documentation, request, response } from '@aerokit/sdk/http' -import { HttpUtils } from "@aerokit/sdk/http/utils"; -import { ValidationError } from '@aerokit/sdk/http/errors' -import { ForbiddenError } from '@aerokit/sdk/http/errors' -import { user } from '@aerokit/sdk/security' -import { Options } from '@aerokit/sdk/db' -import { Extensions } from "@aerokit/sdk/extensions" -import { Injected, Inject } from '@aerokit/sdk/component' -import { SupplierPaymentRepository } from '../../data/SupplierPayment/SupplierPaymentRepository' -import { SupplierPaymentEntity } from '../../data/SupplierPayment/SupplierPaymentEntity' -// custom imports -import { NumberGeneratorService } from "/codbex-number-generator/service/generator"; - -const validationModules = await Extensions.loadExtensionModules('codbex-payments-SupplierPayment-SupplierPayment', ['validate']); - -@Controller -@Documentation('codbex-payments - SupplierPayment Controller') -@Injected() -class SupplierPaymentController { - - @Inject('SupplierPaymentRepository') - private readonly repository!: SupplierPaymentRepository; - - @Get('/') - @Documentation('Get All SupplierPayment') - public getAll(_: any, ctx: any): SupplierPaymentEntity[] { - try { - this.checkPermissions('read'); - const options: Options = { - limit: ctx.queryParameters["$limit"] ? parseInt(ctx.queryParameters["$limit"]) : 20, - offset: ctx.queryParameters["$offset"] ? parseInt(ctx.queryParameters["$offset"]) : 0, - language: request.getLocale()?.split("_")[0] - }; - - return this.repository.findAll(options); - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Post('/') - @Documentation('Create SupplierPayment') - public create(entity: SupplierPaymentEntity): SupplierPaymentEntity { - try { - this.checkPermissions('write'); - this.validateEntity(entity); - entity.Id = this.repository.create(entity) as any; - response.setHeader('Content-Location', '/services/ts/codbex-payments/gen/codbex-payments/api/SupplierPayment/SupplierPaymentController.ts/' + entity.Id); - response.setStatus(response.CREATED); - return entity; - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Get('/count') - @Documentation('Count SupplierPayment') - public count(): { count: number } { - try { - this.checkPermissions('read'); - return { count: this.repository.count() }; - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Post('/count') - @Documentation('Count SupplierPayment with filter') - public countWithFilter(filter: any): { count: number } { - try { - this.checkPermissions('read'); - return { count: this.repository.count(filter) }; - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Post('/search') - @Documentation('Search SupplierPayment') - public search(filter: any): SupplierPaymentEntity[] { - try { - this.checkPermissions('read'); - return this.repository.findAll(filter); - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Get('/:id') - @Documentation('Get SupplierPayment by id') - public getById(_: any, ctx: any): SupplierPaymentEntity { - try { - this.checkPermissions('read'); - const id = parseInt(ctx.pathParameters.id); - const options: Options = { - language: request.getLocale()?.split("_")[0] - }; - const entity = this.repository.findById(id, options); - if (entity) { - return entity; - } else { - HttpUtils.sendResponseNotFound('SupplierPayment not found'); - } - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Put('/:id') - @Documentation('Update SupplierPayment by id') - public update(entity: SupplierPaymentEntity, ctx: any): SupplierPaymentEntity { - try { - this.checkPermissions('write'); - const id = parseInt(ctx.pathParameters.id); - entity.Id = id; - this.validateEntity(entity); - this.repository.update(entity); - return entity; - } catch (error: any) { - this.handleError(error); - } - return undefined as any; - } - - @Delete('/:id') - @Documentation('Delete SupplierPayment by id') - public deleteById(_: any, ctx: any): void { - try { - this.checkPermissions('write'); - const id = parseInt(ctx.pathParameters.id); - const entity = this.repository.findById(id); - if (entity) { - this.repository.deleteById(id); - HttpUtils.sendResponseNoContent(); - } else { - HttpUtils.sendResponseNotFound('SupplierPayment not found'); - } - } catch (error: any) { - this.handleError(error); - } - } - - private handleError(error: any) { - if (error.name === 'ForbiddenError') { - HttpUtils.sendForbiddenRequest(error.message); - } else if (error.name === 'ValidationError') { - HttpUtils.sendResponseBadRequest(error.message); - } else { - HttpUtils.sendInternalServerError(error.message); - } - } - - private checkPermissions(operationType: string) { - if (operationType === 'read' && !(user.isInRole('codbex-payments.SupplierPayment.SupplierPaymentReadOnly') || user.isInRole('codbex-payments.SupplierPayment.SupplierPaymentFullAccess'))) { - throw new ForbiddenError(); - } - if (operationType === 'write' && !user.isInRole('codbex-payments.SupplierPayment.SupplierPaymentFullAccess')) { - throw new ForbiddenError(); - } - } - - private validateEntity(entity: any): void { - if (entity.Supplier === null || entity.Supplier === undefined) { - throw new ValidationError(`The 'Supplier' property is required, provide a valid value`); - } - if (entity.Date === null || entity.Date === undefined) { - throw new ValidationError(`The 'Date' property is required, provide a valid value`); - } - if (entity.Valor === null || entity.Valor === undefined) { - throw new ValidationError(`The 'Valor' property is required, provide a valid value`); - } - if (entity.OurPartyIBAN === null || entity.OurPartyIBAN === undefined) { - throw new ValidationError(`The 'OurPartyIBAN' property is required, provide a valid value`); - } - if (entity.OurPartyIBAN?.length > 34) { - throw new ValidationError(`The 'OurPartyIBAN' exceeds the maximum length of [34] characters`); - } - if (!RegExp(/^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$/).test(entity.OurPartyIBAN)) { - throw new ValidationError(`The value provided for the 'OurPartyIBAN' property ('[${entity.OurPartyIBAN}]') doesn't match the required pattern '^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'`); - } - if (entity.CounterpartyIBAN === null || entity.CounterpartyIBAN === undefined) { - throw new ValidationError(`The 'CounterpartyIBAN' property is required, provide a valid value`); - } - if (entity.CounterpartyIBAN?.length > 34) { - throw new ValidationError(`The 'CounterpartyIBAN' exceeds the maximum length of [34] characters`); - } - if (!RegExp(/^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$/).test(entity.CounterpartyIBAN)) { - throw new ValidationError(`The value provided for the 'CounterpartyIBAN' property ('[${entity.CounterpartyIBAN}]') doesn't match the required pattern '^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'`); - } - if (entity.CounterpartyName?.length > 100) { - throw new ValidationError(`The 'CounterpartyName' exceeds the maximum length of [100] characters`); - } - if (entity.Amount === null || entity.Amount === undefined) { - throw new ValidationError(`The 'Amount' property is required, provide a valid value`); - } - if (entity.Currency === null || entity.Currency === undefined) { - throw new ValidationError(`The 'Currency' property is required, provide a valid value`); - } - if (entity.Reason === null || entity.Reason === undefined) { - throw new ValidationError(`The 'Reason' property is required, provide a valid value`); - } - if (entity.Reason?.length > 100) { - throw new ValidationError(`The 'Reason' exceeds the maximum length of [100] characters`); - } - if (entity.Description?.length > 100) { - throw new ValidationError(`The 'Description' exceeds the maximum length of [100] characters`); - } - if (entity.Name?.length > 20) { - throw new ValidationError(`The 'Name' exceeds the maximum length of [20] characters`); - } - if (entity.UUID?.length > 36) { - throw new ValidationError(`The 'UUID' exceeds the maximum length of [36] characters`); - } - if (entity.Reference?.length > 36) { - throw new ValidationError(`The 'Reference' exceeds the maximum length of [36] characters`); - } - if (entity.PaymentMethod === null || entity.PaymentMethod === undefined) { - throw new ValidationError(`The 'PaymentMethod' property is required, provide a valid value`); - } - if (entity.CreatedBy?.length > 20) { - throw new ValidationError(`The 'CreatedBy' exceeds the maximum length of [20] characters`); - } - if (entity.UpdatedBy?.length > 20) { - throw new ValidationError(`The 'UpdatedBy' exceeds the maximum length of [20] characters`); - } - for (const next of validationModules) { - next.validate(entity); - } - } - -} diff --git a/codbex-payments/gen/codbex-payments/data/CustomerPayment/CustomerPaymentEntity.ts b/codbex-payments/gen/codbex-payments/data/CustomerPayment/CustomerPaymentEntity.ts deleted file mode 100644 index d866fbd..0000000 --- a/codbex-payments/gen/codbex-payments/data/CustomerPayment/CustomerPaymentEntity.ts +++ /dev/null @@ -1,177 +0,0 @@ -import { Entity, Table, Id, Generated, Column, Documentation, CreatedAt, CreatedBy, UpdatedAt, UpdatedBy} from '@aerokit/sdk/db' - -@Entity('CustomerPaymentEntity') -@Table('CODBEX_CUSTOMERPAYMENT') -@Documentation('CustomerPayment entity mapping') -export class CustomerPaymentEntity { - - @Id() - @Generated('sequence') - @Documentation('Id') - @Column({ - name: 'CUSTOMERPAYMENT_ID', - type: 'integer', - }) - public Id?: number; - - @Documentation('Customer') - @Column({ - name: 'CUSTOMERPAYMENT_CUSTOMER', - type: 'integer', - }) - public Customer!: number; - - @Documentation('Date') - @Column({ - name: 'CUSTOMERPAYMENT_DATE', - type: 'date', - }) - public Date!: Date; - - @Documentation('Valor') - @Column({ - name: 'CUSTOMERPAYMENT_VALOR', - type: 'date', - }) - public Valor!: Date; - - @Documentation('OurPartyIBAN') - @Column({ - name: 'CUSTOMERPAYMENT_OURPARTYIBAN', - type: 'string', - length: 34, - }) - public OurPartyIBAN!: string; - - @Documentation('CounterpartyIBAN') - @Column({ - name: 'CUSTOMERPAYMENT_COUNTERPARTYIBAN', - type: 'string', - length: 34, - }) - public CounterpartyIBAN!: string; - - @Documentation('CounterpartyName') - @Column({ - name: 'CUSTOMERPAYMENT_COUNTERPARTYNAME', - type: 'string', - length: 100, - nullable: true, - }) - public CounterpartyName?: string; - - @Documentation('Amount') - @Column({ - name: 'CUSTOMERPAYMENT_AMOUNT', - type: 'big_decimal', - precision: 16, - scale: 2, - }) - public Amount!: number; - - @Documentation('Currency') - @Column({ - name: 'CUSTOMERPAYMENT_CURRENCY', - type: 'integer', - }) - public Currency!: number; - - @Documentation('Reason') - @Column({ - name: 'CUSTOMERPAYMENT_REASON', - type: 'string', - length: 100, - }) - public Reason!: string; - - @Documentation('Description') - @Column({ - name: 'CUSTOMERPAYMENT_DESCRIPTION', - type: 'string', - length: 100, - nullable: true, - }) - public Description?: string; - - @Documentation('Company') - @Column({ - name: 'CUSTOMERPAYMENT_COMPANY', - type: 'integer', - nullable: true, - }) - public Company?: number; - - @Documentation('Name') - @Column({ - name: 'CUSTOMERPAYMENT_NAME', - type: 'string', - length: 20, - nullable: true, - }) - public Name?: string; - - @Documentation('UUID') - @Column({ - name: 'CUSTOMERPAYMENT_UUID', - type: 'string', - length: 36, - }) - public UUID?: string; - - @Documentation('Reference') - @Column({ - name: 'CUSTOMERPAYMENT_REFERENCE', - type: 'string', - length: 36, - nullable: true, - }) - public Reference?: string; - - @Documentation('PaymentMethod') - @Column({ - name: 'CUSTOMERPAYMENT_PAYMENTMETHOD', - type: 'integer', - }) - public PaymentMethod!: number; - - @Documentation('CreatedAt') - @Column({ - name: 'CUSTOMERPAYMENT_CREATEDAT', - type: 'timestamp', - nullable: true, - }) - @CreatedAt() - public CreatedAt?: Date; - - @Documentation('CreatedBy') - @Column({ - name: 'CUSTOMERPAYMENT_CREATEDBY', - type: 'string', - length: 20, - nullable: true, - }) - @CreatedBy() - public CreatedBy?: string; - - @Documentation('UpdatedAt') - @Column({ - name: 'CUSTOMERPAYMENT_UPDATEDAT', - type: 'timestamp', - nullable: true, - }) - @UpdatedAt() - public UpdatedAt?: Date; - - @Documentation('UpdatedBy') - @Column({ - name: 'CUSTOMERPAYMENT_UPDATEDBY', - type: 'string', - length: 20, - nullable: true, - }) - @UpdatedBy() - public UpdatedBy?: string; - -} - -(new CustomerPaymentEntity()); diff --git a/codbex-payments/gen/codbex-payments/data/CustomerPayment/CustomerPaymentRepository.ts b/codbex-payments/gen/codbex-payments/data/CustomerPayment/CustomerPaymentRepository.ts deleted file mode 100644 index b1a3ab7..0000000 --- a/codbex-payments/gen/codbex-payments/data/CustomerPayment/CustomerPaymentRepository.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { Repository, EntityEvent, EntityConstructor, Options } from '@aerokit/sdk/db' -import { Component } from '@aerokit/sdk/component' -import { Producer } from '@aerokit/sdk/messaging' -import { Extensions } from '@aerokit/sdk/extensions' -import { CustomerPaymentEntity } from './CustomerPaymentEntity' -// custom imports -import { NumberGeneratorService } from "/codbex-number-generator/service/generator"; - -@Component('CustomerPaymentRepository') -export class CustomerPaymentRepository extends Repository { - - constructor() { - super((CustomerPaymentEntity as EntityConstructor)); - } - - public override findById(id: string | number, options?: Options): CustomerPaymentEntity | undefined { - const entity = super.findById(id, options); - if (entity) { - entity.Date = entity.Date ? new Date(entity.Date) : undefined; - entity.Valor = entity.Valor ? new Date(entity.Valor) : undefined; - entity.CreatedAt = entity.CreatedAt ? new Date(entity.CreatedAt) : undefined; - entity.UpdatedAt = entity.UpdatedAt ? new Date(entity.UpdatedAt) : undefined; - } - return entity; - } - - public override findAll(options?: Options): CustomerPaymentEntity[] { - const entities = super.findAll(options); - entities.forEach(entity => { - entity.Date = entity.Date ? new Date(entity.Date) : undefined; - entity.Valor = entity.Valor ? new Date(entity.Valor) : undefined; - entity.CreatedAt = entity.CreatedAt ? new Date(entity.CreatedAt) : undefined; - entity.UpdatedAt = entity.UpdatedAt ? new Date(entity.UpdatedAt) : undefined; - }); - return entities; - } - - public override create(entity: CustomerPaymentEntity): string | number { - entity.Name = new NumberGeneratorService().generateByType('Customer Payment'); - entity.UUID = require("sdk/utils/uuid").random(); - return super.create(entity); - } - - public override upsert(entity: CustomerPaymentEntity): string | number { - entity.Name = new NumberGeneratorService().generateByType('Customer Payment'); - entity.UUID = require("sdk/utils/uuid").random(); - return super.upsert(entity); - } - - protected override async triggerEvent(data: EntityEvent): Promise { - const triggerExtensions = await Extensions.loadExtensionModules('codbex-payments-CustomerPayment-CustomerPayment', ['trigger']); - triggerExtensions.forEach(triggerExtension => { - try { - triggerExtension.trigger(data); - } catch (error) { - console.error(error); - } - }); - Producer.topic('codbex-payments-CustomerPayment-CustomerPayment').send(JSON.stringify(data)); - } -} diff --git a/codbex-payments/gen/codbex-payments/data/EmployeePayment/EmployeePaymentEntity.ts b/codbex-payments/gen/codbex-payments/data/EmployeePayment/EmployeePaymentEntity.ts deleted file mode 100644 index 2437e5d..0000000 --- a/codbex-payments/gen/codbex-payments/data/EmployeePayment/EmployeePaymentEntity.ts +++ /dev/null @@ -1,177 +0,0 @@ -import { Entity, Table, Id, Generated, Column, Documentation, CreatedAt, CreatedBy, UpdatedAt, UpdatedBy} from '@aerokit/sdk/db' - -@Entity('EmployeePaymentEntity') -@Table('CODBEX_EMPLOYEEPAYMENT') -@Documentation('EmployeePayment entity mapping') -export class EmployeePaymentEntity { - - @Id() - @Generated('sequence') - @Documentation('Id') - @Column({ - name: 'EMPLOYEEPAYMENT_ID', - type: 'integer', - }) - public Id?: number; - - @Documentation('Employee') - @Column({ - name: 'EMPLOYEEPAYMENT_EMPLOYEE', - type: 'integer', - }) - public Employee!: number; - - @Documentation('Date') - @Column({ - name: 'EMPLOYEEPAYMENT_DATE', - type: 'date', - }) - public Date!: Date; - - @Documentation('Valor') - @Column({ - name: 'EMPLOYEEPAYMENT_VALOR', - type: 'date', - }) - public Valor!: Date; - - @Documentation('OurPartyIBAN') - @Column({ - name: 'EMPLOYEEPAYMENT_OURPARTYIBAN', - type: 'string', - length: 34, - }) - public OurPartyIBAN!: string; - - @Documentation('CounterpartyIBAN') - @Column({ - name: 'EMPLOYEEPAYMENT_COUNTERPARTYIBAN', - type: 'string', - length: 34, - }) - public CounterpartyIBAN!: string; - - @Documentation('CounterpartyName') - @Column({ - name: 'EMPLOYEEPAYMENT_COUNTERPARTYNAME', - type: 'string', - length: 100, - nullable: true, - }) - public CounterpartyName?: string; - - @Documentation('Amount') - @Column({ - name: 'EMPLOYEEPAYMENT_AMOUNT', - type: 'big_decimal', - precision: 16, - scale: 2, - }) - public Amount!: number; - - @Documentation('Currency') - @Column({ - name: 'EMPLOYEEPAYMENT_CURRENCY', - type: 'integer', - }) - public Currency!: number; - - @Documentation('Reason') - @Column({ - name: 'EMPLOYEEPAYMENT_REASON', - type: 'string', - length: 100, - }) - public Reason!: string; - - @Documentation('Description') - @Column({ - name: 'EMPLOYEEPAYMENT_DESCRIPTION', - type: 'string', - length: 100, - nullable: true, - }) - public Description?: string; - - @Documentation('Company') - @Column({ - name: 'EMPLOYEEPAYMENT_COMPANY', - type: 'integer', - nullable: true, - }) - public Company?: number; - - @Documentation('Name') - @Column({ - name: 'EMPLOYEEPAYMENT_NAME', - type: 'string', - length: 20, - nullable: true, - }) - public Name?: string; - - @Documentation('UUID') - @Column({ - name: 'EMPLOYEEPAYMENT_UUID', - type: 'string', - length: 36, - }) - public UUID?: string; - - @Documentation('Reference') - @Column({ - name: 'EMPLOYEEPAYMENT_REFERENCE', - type: 'string', - length: 36, - nullable: true, - }) - public Reference?: string; - - @Documentation('PaymentMethod') - @Column({ - name: 'EMPLOYEEPAYMENT_PAYMENTMETHOD', - type: 'integer', - }) - public PaymentMethod!: number; - - @Documentation('CreatedAt') - @Column({ - name: 'EMPLOYEEPAYMENT_CREATEDAT', - type: 'timestamp', - nullable: true, - }) - @CreatedAt() - public CreatedAt?: Date; - - @Documentation('CreatedBy') - @Column({ - name: 'EMPLOYEEPAYMENT_CREATEDBY', - type: 'string', - length: 20, - nullable: true, - }) - @CreatedBy() - public CreatedBy?: string; - - @Documentation('UpdatedAt') - @Column({ - name: 'EMPLOYEEPAYMENT_UPDATEDAT', - type: 'timestamp', - nullable: true, - }) - @UpdatedAt() - public UpdatedAt?: Date; - - @Documentation('UpdatedBy') - @Column({ - name: 'EMPLOYEEPAYMENT_UPDATEDBY', - type: 'string', - length: 20, - nullable: true, - }) - @UpdatedBy() - public UpdatedBy?: string; - -} - -(new EmployeePaymentEntity()); diff --git a/codbex-payments/gen/codbex-payments/data/EmployeePayment/EmployeePaymentRepository.ts b/codbex-payments/gen/codbex-payments/data/EmployeePayment/EmployeePaymentRepository.ts deleted file mode 100644 index 256efb2..0000000 --- a/codbex-payments/gen/codbex-payments/data/EmployeePayment/EmployeePaymentRepository.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { Repository, EntityEvent, EntityConstructor, Options } from '@aerokit/sdk/db' -import { Component } from '@aerokit/sdk/component' -import { Producer } from '@aerokit/sdk/messaging' -import { Extensions } from '@aerokit/sdk/extensions' -import { EmployeePaymentEntity } from './EmployeePaymentEntity' -// custom imports -import { NumberGeneratorService } from "/codbex-number-generator/service/generator"; - -@Component('EmployeePaymentRepository') -export class EmployeePaymentRepository extends Repository { - - constructor() { - super((EmployeePaymentEntity as EntityConstructor)); - } - - public override findById(id: string | number, options?: Options): EmployeePaymentEntity | undefined { - const entity = super.findById(id, options); - if (entity) { - entity.Date = entity.Date ? new Date(entity.Date) : undefined; - entity.Valor = entity.Valor ? new Date(entity.Valor) : undefined; - entity.CreatedAt = entity.CreatedAt ? new Date(entity.CreatedAt) : undefined; - entity.UpdatedAt = entity.UpdatedAt ? new Date(entity.UpdatedAt) : undefined; - } - return entity; - } - - public override findAll(options?: Options): EmployeePaymentEntity[] { - const entities = super.findAll(options); - entities.forEach(entity => { - entity.Date = entity.Date ? new Date(entity.Date) : undefined; - entity.Valor = entity.Valor ? new Date(entity.Valor) : undefined; - entity.CreatedAt = entity.CreatedAt ? new Date(entity.CreatedAt) : undefined; - entity.UpdatedAt = entity.UpdatedAt ? new Date(entity.UpdatedAt) : undefined; - }); - return entities; - } - - public override create(entity: EmployeePaymentEntity): string | number { - entity.Name = new NumberGeneratorService().generateByType('Employee Payment'); - entity.UUID = require("sdk/utils/uuid").random(); - return super.create(entity); - } - - public override upsert(entity: EmployeePaymentEntity): string | number { - entity.Name = new NumberGeneratorService().generateByType('Employee Payment'); - entity.UUID = require("sdk/utils/uuid").random(); - return super.upsert(entity); - } - - protected override async triggerEvent(data: EntityEvent): Promise { - const triggerExtensions = await Extensions.loadExtensionModules('codbex-payments-EmployeePayment-EmployeePayment', ['trigger']); - triggerExtensions.forEach(triggerExtension => { - try { - triggerExtension.trigger(data); - } catch (error) { - console.error(error); - } - }); - Producer.topic('codbex-payments-EmployeePayment-EmployeePayment').send(JSON.stringify(data)); - } -} diff --git a/codbex-payments/gen/codbex-payments/data/PaymentAdjustment/PaymentAdjustmentEntity.ts b/codbex-payments/gen/codbex-payments/data/PaymentAdjustment/PaymentAdjustmentEntity.ts deleted file mode 100644 index 47fe29e..0000000 --- a/codbex-payments/gen/codbex-payments/data/PaymentAdjustment/PaymentAdjustmentEntity.ts +++ /dev/null @@ -1,112 +0,0 @@ -import { Entity, Table, Id, Generated, Column, Documentation, CreatedAt, CreatedBy, UpdatedAt, UpdatedBy} from '@aerokit/sdk/db' - -@Entity('PaymentAdjustmentEntity') -@Table('CODBEX_PAYMENTADJUSTMENT') -@Documentation('PaymentAdjustment entity mapping') -export class PaymentAdjustmentEntity { - - @Id() - @Generated('sequence') - @Documentation('Id') - @Column({ - name: 'PAYMENTADJUSTMENT_ID', - type: 'integer', - }) - public Id?: number; - - @Documentation('Date') - @Column({ - name: 'PAYMENTADJUSTMENT_DATE', - type: 'date', - }) - public Date!: Date; - - @Documentation('Valor') - @Column({ - name: 'PAYMENTADJUSTMENT_VALOR', - type: 'date', - }) - public Valor!: Date; - - @Documentation('Amount') - @Column({ - name: 'PAYMENTADJUSTMENT_AMOUNT', - type: 'big_decimal', - precision: 16, - scale: 2, - }) - public Amount!: number; - - @Documentation('Currency') - @Column({ - name: 'PAYMENTADJUSTMENT_CURRENCY', - type: 'integer', - }) - public Currency!: number; - - @Documentation('Company') - @Column({ - name: 'PAYMENTADJUSTMENT_COMPANY', - type: 'integer', - }) - public Company!: number; - - @Documentation('Reason') - @Column({ - name: 'PAYMENTADJUSTMENT_REASON', - type: 'string', - length: 100, - nullable: true, - }) - public Reason?: string; - - @Documentation('UUID') - @Column({ - name: 'PAYMENTADJUSTMENT_UUID', - type: 'string', - length: 36, - nullable: true, - }) - public UUID?: string; - - @Documentation('CreatedAt') - @Column({ - name: 'PAYMENTADJUSTMENT_CREATEDAT', - type: 'timestamp', - nullable: true, - }) - @CreatedAt() - public CreatedAt?: Date; - - @Documentation('CreatedBy') - @Column({ - name: 'PAYMENTADJUSTMENT_CREATEDBY', - type: 'string', - length: 20, - nullable: true, - }) - @CreatedBy() - public CreatedBy?: string; - - @Documentation('UpdatedAt') - @Column({ - name: 'PAYMENTADJUSTMENT_UPDATEDAT', - type: 'timestamp', - nullable: true, - }) - @UpdatedAt() - public UpdatedAt?: Date; - - @Documentation('UpdatedBy') - @Column({ - name: 'PAYMENTADJUSTMENT_UPDATEDBY', - type: 'string', - length: 20, - nullable: true, - }) - @UpdatedBy() - public UpdatedBy?: string; - -} - -(new PaymentAdjustmentEntity()); diff --git a/codbex-payments/gen/codbex-payments/data/PaymentAdjustment/PaymentAdjustmentRepository.ts b/codbex-payments/gen/codbex-payments/data/PaymentAdjustment/PaymentAdjustmentRepository.ts deleted file mode 100644 index f05af9c..0000000 --- a/codbex-payments/gen/codbex-payments/data/PaymentAdjustment/PaymentAdjustmentRepository.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { Repository, EntityEvent, EntityConstructor, Options } from '@aerokit/sdk/db' -import { Component } from '@aerokit/sdk/component' -import { Producer } from '@aerokit/sdk/messaging' -import { Extensions } from '@aerokit/sdk/extensions' -import { PaymentAdjustmentEntity } from './PaymentAdjustmentEntity' - -@Component('PaymentAdjustmentRepository') -export class PaymentAdjustmentRepository extends Repository { - - constructor() { - super((PaymentAdjustmentEntity as EntityConstructor)); - } - - public override findById(id: string | number, options?: Options): PaymentAdjustmentEntity | undefined { - const entity = super.findById(id, options); - if (entity) { - entity.Date = entity.Date ? new Date(entity.Date) : undefined; - entity.Valor = entity.Valor ? new Date(entity.Valor) : undefined; - entity.CreatedAt = entity.CreatedAt ? new Date(entity.CreatedAt) : undefined; - entity.UpdatedAt = entity.UpdatedAt ? new Date(entity.UpdatedAt) : undefined; - } - return entity; - } - - public override findAll(options?: Options): PaymentAdjustmentEntity[] { - const entities = super.findAll(options); - entities.forEach(entity => { - entity.Date = entity.Date ? new Date(entity.Date) : undefined; - entity.Valor = entity.Valor ? new Date(entity.Valor) : undefined; - entity.CreatedAt = entity.CreatedAt ? new Date(entity.CreatedAt) : undefined; - entity.UpdatedAt = entity.UpdatedAt ? new Date(entity.UpdatedAt) : undefined; - }); - return entities; - } - - public override create(entity: PaymentAdjustmentEntity): string | number { - entity.UUID = require("sdk/utils/uuid").random(); - return super.create(entity); - } - - public override upsert(entity: PaymentAdjustmentEntity): string | number { - entity.UUID = require("sdk/utils/uuid").random(); - return super.upsert(entity); - } - - protected override async triggerEvent(data: EntityEvent): Promise { - const triggerExtensions = await Extensions.loadExtensionModules('codbex-payments-PaymentAdjustment-PaymentAdjustment', ['trigger']); - triggerExtensions.forEach(triggerExtension => { - try { - triggerExtension.trigger(data); - } catch (error) { - console.error(error); - } - }); - Producer.topic('codbex-payments-PaymentAdjustment-PaymentAdjustment').send(JSON.stringify(data)); - } -} diff --git a/codbex-payments/gen/codbex-payments/data/PaymentRecord/PaymentRecordEntity.ts b/codbex-payments/gen/codbex-payments/data/PaymentRecord/PaymentRecordEntity.ts deleted file mode 100644 index 60db789..0000000 --- a/codbex-payments/gen/codbex-payments/data/PaymentRecord/PaymentRecordEntity.ts +++ /dev/null @@ -1,194 +0,0 @@ -import { Entity, Table, Id, Generated, Column, Documentation, CreatedAt, CreatedBy, UpdatedAt, UpdatedBy} from '@aerokit/sdk/db' - -@Entity('PaymentRecordEntity') -@Table('CODBEX_PAYMENTRECORD') -@Documentation('PaymentRecord entity mapping') -export class PaymentRecordEntity { - - @Id() - @Generated('sequence') - @Documentation('Id') - @Column({ - name: 'PAYMENTRECORD_ID', - type: 'integer', - }) - public Id?: number; - - @Documentation('Date') - @Column({ - name: 'PAYMENTRECORD_DATE', - type: 'date', - }) - public Date!: Date; - - @Documentation('Valor') - @Column({ - name: 'PAYMENTRECORD_VALOR', - type: 'date', - }) - public Valor!: Date; - - @Documentation('OurPartyIBAN') - @Column({ - name: 'PAYMENTRECORD_OURPARTYIBAN', - type: 'string', - length: 34, - }) - public OurPartyIBAN!: string; - - @Documentation('CounterpartyIBAN') - @Column({ - name: 'PAYMENTRECORD_COUNTERPARTYIBAN', - type: 'string', - length: 34, - }) - public CounterpartyIBAN!: string; - - @Documentation('CounterpartyName') - @Column({ - name: 'PAYMENTRECORD_COUNTERPARTYNAME', - type: 'string', - length: 100, - nullable: true, - }) - public CounterpartyName?: string; - - @Documentation('Amount') - @Column({ - name: 'PAYMENTRECORD_AMOUNT', - type: 'big_decimal', - precision: 16, - scale: 2, - }) - public Amount!: number; - - @Documentation('Currency') - @Column({ - name: 'PAYMENTRECORD_CURRENCY', - type: 'integer', - }) - public Currency!: number; - - @Documentation('PaymentDirection') - @Column({ - name: 'PAYMENTRECORD_PAYMENTDIRECTION', - type: 'integer', - }) - public PaymentDirection!: number; - - @Documentation('PaymentType') - @Column({ - name: 'PAYMENTRECORD_PAYMENTTYPE', - type: 'integer', - }) - public PaymentType!: number; - - @Documentation('Reason') - @Column({ - name: 'PAYMENTRECORD_REASON', - type: 'string', - length: 100, - nullable: true, - }) - public Reason?: string; - - @Documentation('Description') - @Column({ - name: 'PAYMENTRECORD_DESCRIPTION', - type: 'string', - length: 100, - nullable: true, - }) - public Description?: string; - - @Documentation('Company') - @Column({ - name: 'PAYMENTRECORD_COMPANY', - type: 'integer', - nullable: true, - }) - public Company?: number; - - @Documentation('UUID') - @Column({ - name: 'PAYMENTRECORD_UUID', - type: 'string', - length: 36, - }) - public UUID?: string; - - @Documentation('Reference') - @Column({ - name: 'PAYMENTRECORD_REFERENCE', - type: 'string', - length: 36, - nullable: true, - }) - public Reference?: string; - - @Documentation('Deleted') - @Column({ - name: 'PAYMENTRECORD_DELETED', - type: 'boolean', - nullable: true, - }) - public Deleted?: boolean; - - @Documentation('DeletedAt') - @Column({ - name: 'PAYMENTRECORD_DELETEDAT', - type: 'timestamp', - nullable: true, - }) - public DeletedAt?: Date; - - @Documentation('DeletedReason') - @Column({ - name: 'PAYMENTRECORD_DELETEDREASON', - type: 'string', - length: 255, - nullable: true, - }) - public DeletedReason?: string; - - @Documentation('CreatedAt') - @Column({ - name: 'PAYMENTRECORD_CREATEDAT', - type: 'timestamp', - nullable: true, - }) - @CreatedAt() - public CreatedAt?: Date; - - @Documentation('CreatedBy') - @Column({ - name: 'PAYMENTRECORD_CREATEDBY', - type: 'string', - length: 20, - nullable: true, - }) - @CreatedBy() - public CreatedBy?: string; - - @Documentation('UpdatedAt') - @Column({ - name: 'PAYMENTRECORD_UPDATEDAT', - type: 'timestamp', - nullable: true, - }) - @UpdatedAt() - public UpdatedAt?: Date; - - @Documentation('UpdatedBy') - @Column({ - name: 'PAYMENTRECORD_UPDATEDBY', - type: 'string', - length: 20, - nullable: true, - }) - @UpdatedBy() - public UpdatedBy?: string; - -} - -(new PaymentRecordEntity()); diff --git a/codbex-payments/gen/codbex-payments/data/PaymentRecord/PaymentRecordRepository.ts b/codbex-payments/gen/codbex-payments/data/PaymentRecord/PaymentRecordRepository.ts deleted file mode 100644 index f5beeef..0000000 --- a/codbex-payments/gen/codbex-payments/data/PaymentRecord/PaymentRecordRepository.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { Repository, EntityEvent, EntityConstructor, Options } from '@aerokit/sdk/db' -import { Component } from '@aerokit/sdk/component' -import { Producer } from '@aerokit/sdk/messaging' -import { Extensions } from '@aerokit/sdk/extensions' -import { PaymentRecordEntity } from './PaymentRecordEntity' - -@Component('PaymentRecordRepository') -export class PaymentRecordRepository extends Repository { - - constructor() { - super((PaymentRecordEntity as EntityConstructor)); - } - - public override findById(id: string | number, options?: Options): PaymentRecordEntity | undefined { - const entity = super.findById(id, options); - if (entity) { - entity.Date = entity.Date ? new Date(entity.Date) : undefined; - entity.Valor = entity.Valor ? new Date(entity.Valor) : undefined; - entity.DeletedAt = entity.DeletedAt ? new Date(entity.DeletedAt) : undefined; - entity.CreatedAt = entity.CreatedAt ? new Date(entity.CreatedAt) : undefined; - entity.UpdatedAt = entity.UpdatedAt ? new Date(entity.UpdatedAt) : undefined; - } - return entity; - } - - public override findAll(options?: Options): PaymentRecordEntity[] { - const entities = super.findAll(options); - entities.forEach(entity => { - entity.Date = entity.Date ? new Date(entity.Date) : undefined; - entity.Valor = entity.Valor ? new Date(entity.Valor) : undefined; - entity.DeletedAt = entity.DeletedAt ? new Date(entity.DeletedAt) : undefined; - entity.CreatedAt = entity.CreatedAt ? new Date(entity.CreatedAt) : undefined; - entity.UpdatedAt = entity.UpdatedAt ? new Date(entity.UpdatedAt) : undefined; - }); - return entities; - } - - public override create(entity: PaymentRecordEntity): string | number { - entity.UUID = require("sdk/utils/uuid").random(); - return super.create(entity); - } - - public override upsert(entity: PaymentRecordEntity): string | number { - entity.UUID = require("sdk/utils/uuid").random(); - return super.upsert(entity); - } - - protected override async triggerEvent(data: EntityEvent): Promise { - const triggerExtensions = await Extensions.loadExtensionModules('codbex-payments-PaymentRecord-PaymentRecord', ['trigger']); - triggerExtensions.forEach(triggerExtension => { - try { - triggerExtension.trigger(data); - } catch (error) { - console.error(error); - } - }); - Producer.topic('codbex-payments-PaymentRecord-PaymentRecord').send(JSON.stringify(data)); - } -} diff --git a/codbex-payments/gen/codbex-payments/data/Settings/PaymentDirectionEntity.ts b/codbex-payments/gen/codbex-payments/data/Settings/PaymentDirectionEntity.ts deleted file mode 100644 index 7a89d4a..0000000 --- a/codbex-payments/gen/codbex-payments/data/Settings/PaymentDirectionEntity.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Entity, Table, Id, Generated, Column, Documentation, CreatedAt, CreatedBy, UpdatedAt, UpdatedBy} from '@aerokit/sdk/db' - -@Entity('PaymentDirectionEntity') -@Table('CODBEX_PAYMENTDIRECTION') -@Documentation('PaymentDirection entity mapping') -export class PaymentDirectionEntity { - - @Id() - @Generated('sequence') - @Documentation('Id') - @Column({ - name: 'PAYMENTDIRECTION_ID', - type: 'integer', - }) - public Id?: number; - - @Documentation('Name') - @Column({ - name: 'PAYMENTDIRECTION_NAME', - type: 'string', - length: 20, - }) - public Name!: string; - -} - -(new PaymentDirectionEntity()); diff --git a/codbex-payments/gen/codbex-payments/data/Settings/PaymentDirectionRepository.ts b/codbex-payments/gen/codbex-payments/data/Settings/PaymentDirectionRepository.ts deleted file mode 100644 index f6967a9..0000000 --- a/codbex-payments/gen/codbex-payments/data/Settings/PaymentDirectionRepository.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Repository, EntityEvent, EntityConstructor, Options } from '@aerokit/sdk/db' -import { Component } from '@aerokit/sdk/component' -import { Producer } from '@aerokit/sdk/messaging' -import { Extensions } from '@aerokit/sdk/extensions' -import { PaymentDirectionEntity } from './PaymentDirectionEntity' - -@Component('PaymentDirectionRepository') -export class PaymentDirectionRepository extends Repository { - - constructor() { - super((PaymentDirectionEntity as EntityConstructor)); - } - - protected override async triggerEvent(data: EntityEvent): Promise { - const triggerExtensions = await Extensions.loadExtensionModules('codbex-payments-Settings-PaymentDirection', ['trigger']); - triggerExtensions.forEach(triggerExtension => { - try { - triggerExtension.trigger(data); - } catch (error) { - console.error(error); - } - }); - Producer.topic('codbex-payments-Settings-PaymentDirection').send(JSON.stringify(data)); - } -} diff --git a/codbex-payments/gen/codbex-payments/data/Settings/PaymentTypeEntity.ts b/codbex-payments/gen/codbex-payments/data/Settings/PaymentTypeEntity.ts deleted file mode 100644 index ed6ee30..0000000 --- a/codbex-payments/gen/codbex-payments/data/Settings/PaymentTypeEntity.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Entity, Table, Id, Generated, Column, Documentation, CreatedAt, CreatedBy, UpdatedAt, UpdatedBy} from '@aerokit/sdk/db' - -@Entity('PaymentTypeEntity') -@Table('CODBEX_PAYMENTTYPE') -@Documentation('PaymentType entity mapping') -export class PaymentTypeEntity { - - @Id() - @Generated('sequence') - @Documentation('Id') - @Column({ - name: 'PAYMENTTYPE_ID', - type: 'integer', - }) - public Id?: number; - - @Documentation('Name') - @Column({ - name: 'PAYMENTTYPE_NAME', - type: 'string', - length: 20, - }) - public Name!: string; - -} - -(new PaymentTypeEntity()); diff --git a/codbex-payments/gen/codbex-payments/data/Settings/PaymentTypeRepository.ts b/codbex-payments/gen/codbex-payments/data/Settings/PaymentTypeRepository.ts deleted file mode 100644 index b089429..0000000 --- a/codbex-payments/gen/codbex-payments/data/Settings/PaymentTypeRepository.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Repository, EntityEvent, EntityConstructor, Options } from '@aerokit/sdk/db' -import { Component } from '@aerokit/sdk/component' -import { Producer } from '@aerokit/sdk/messaging' -import { Extensions } from '@aerokit/sdk/extensions' -import { PaymentTypeEntity } from './PaymentTypeEntity' - -@Component('PaymentTypeRepository') -export class PaymentTypeRepository extends Repository { - - constructor() { - super((PaymentTypeEntity as EntityConstructor)); - } - - protected override async triggerEvent(data: EntityEvent): Promise { - const triggerExtensions = await Extensions.loadExtensionModules('codbex-payments-Settings-PaymentType', ['trigger']); - triggerExtensions.forEach(triggerExtension => { - try { - triggerExtension.trigger(data); - } catch (error) { - console.error(error); - } - }); - Producer.topic('codbex-payments-Settings-PaymentType').send(JSON.stringify(data)); - } -} diff --git a/codbex-payments/gen/codbex-payments/data/SupplierPayment/SupplierPaymentEntity.ts b/codbex-payments/gen/codbex-payments/data/SupplierPayment/SupplierPaymentEntity.ts deleted file mode 100644 index d1600e9..0000000 --- a/codbex-payments/gen/codbex-payments/data/SupplierPayment/SupplierPaymentEntity.ts +++ /dev/null @@ -1,177 +0,0 @@ -import { Entity, Table, Id, Generated, Column, Documentation, CreatedAt, CreatedBy, UpdatedAt, UpdatedBy} from '@aerokit/sdk/db' - -@Entity('SupplierPaymentEntity') -@Table('CODBEX_SUPPLIERPAYMENT') -@Documentation('SupplierPayment entity mapping') -export class SupplierPaymentEntity { - - @Id() - @Generated('sequence') - @Documentation('Id') - @Column({ - name: 'SUPPLIERPAYMENT_ID', - type: 'integer', - }) - public Id?: number; - - @Documentation('Supplier') - @Column({ - name: 'SUPPLIERPAYMENT_SUPPLIER', - type: 'integer', - }) - public Supplier!: number; - - @Documentation('Date') - @Column({ - name: 'SUPPLIERPAYMENT_DATE', - type: 'date', - }) - public Date!: Date; - - @Documentation('Valor') - @Column({ - name: 'SUPPLIERPAYMENT_VALOR', - type: 'date', - }) - public Valor!: Date; - - @Documentation('OurPartyIBAN') - @Column({ - name: 'SUPPLIERPAYMENT_OURPARTYIBAN', - type: 'string', - length: 34, - }) - public OurPartyIBAN!: string; - - @Documentation('CounterpartyIBAN') - @Column({ - name: 'SUPPLIERPAYMENT_COUNTERPARTYIBAN', - type: 'string', - length: 34, - }) - public CounterpartyIBAN!: string; - - @Documentation('CounterpartyName') - @Column({ - name: 'SUPPLIERPAYMENT_COUNTERPARTYNAME', - type: 'string', - length: 100, - nullable: true, - }) - public CounterpartyName?: string; - - @Documentation('Amount') - @Column({ - name: 'SUPPLIERPAYMENT_AMOUNT', - type: 'big_decimal', - precision: 16, - scale: 2, - }) - public Amount!: number; - - @Documentation('Currency') - @Column({ - name: 'SUPPLIERPAYMENT_CURRENCY', - type: 'integer', - }) - public Currency!: number; - - @Documentation('Reason') - @Column({ - name: 'SUPPLIERPAYMENT_REASON', - type: 'string', - length: 100, - }) - public Reason!: string; - - @Documentation('Description') - @Column({ - name: 'SUPPLIERPAYMENT_DESCRIPTION', - type: 'string', - length: 100, - nullable: true, - }) - public Description?: string; - - @Documentation('Company') - @Column({ - name: 'SUPPLIERPAYMENT_COMPANY', - type: 'integer', - nullable: true, - }) - public Company?: number; - - @Documentation('Name') - @Column({ - name: 'SUPPLIERPAYMENT_NAME', - type: 'string', - length: 20, - nullable: true, - }) - public Name?: string; - - @Documentation('UUID') - @Column({ - name: 'SUPPLIERPAYMENT_UUID', - type: 'string', - length: 36, - }) - public UUID?: string; - - @Documentation('Reference') - @Column({ - name: 'SUPPLIERPAYMENT_REFERENCE', - type: 'string', - length: 36, - nullable: true, - }) - public Reference?: string; - - @Documentation('PaymentMethod') - @Column({ - name: 'SUPPLIERPAYMENT_PAYMENTMETHOD', - type: 'integer', - }) - public PaymentMethod!: number; - - @Documentation('CreatedAt') - @Column({ - name: 'SUPPLIERPAYMENT_CREATEDAT', - type: 'timestamp', - nullable: true, - }) - @CreatedAt() - public CreatedAt?: Date; - - @Documentation('CreatedBy') - @Column({ - name: 'SUPPLIERPAYMENT_CREATEDBY', - type: 'string', - length: 20, - nullable: true, - }) - @CreatedBy() - public CreatedBy?: string; - - @Documentation('UpdatedAt') - @Column({ - name: 'SUPPLIERPAYMENT_UPDATEDAT', - type: 'timestamp', - nullable: true, - }) - @UpdatedAt() - public UpdatedAt?: Date; - - @Documentation('UpdatedBy') - @Column({ - name: 'SUPPLIERPAYMENT_UPDATEDBY', - type: 'string', - length: 20, - nullable: true, - }) - @UpdatedBy() - public UpdatedBy?: string; - -} - -(new SupplierPaymentEntity()); diff --git a/codbex-payments/gen/codbex-payments/data/SupplierPayment/SupplierPaymentRepository.ts b/codbex-payments/gen/codbex-payments/data/SupplierPayment/SupplierPaymentRepository.ts deleted file mode 100644 index b586042..0000000 --- a/codbex-payments/gen/codbex-payments/data/SupplierPayment/SupplierPaymentRepository.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { Repository, EntityEvent, EntityConstructor, Options } from '@aerokit/sdk/db' -import { Component } from '@aerokit/sdk/component' -import { Producer } from '@aerokit/sdk/messaging' -import { Extensions } from '@aerokit/sdk/extensions' -import { SupplierPaymentEntity } from './SupplierPaymentEntity' -// custom imports -import { NumberGeneratorService } from "/codbex-number-generator/service/generator"; - -@Component('SupplierPaymentRepository') -export class SupplierPaymentRepository extends Repository { - - constructor() { - super((SupplierPaymentEntity as EntityConstructor)); - } - - public override findById(id: string | number, options?: Options): SupplierPaymentEntity | undefined { - const entity = super.findById(id, options); - if (entity) { - entity.Date = entity.Date ? new Date(entity.Date) : undefined; - entity.Valor = entity.Valor ? new Date(entity.Valor) : undefined; - entity.CreatedAt = entity.CreatedAt ? new Date(entity.CreatedAt) : undefined; - entity.UpdatedAt = entity.UpdatedAt ? new Date(entity.UpdatedAt) : undefined; - } - return entity; - } - - public override findAll(options?: Options): SupplierPaymentEntity[] { - const entities = super.findAll(options); - entities.forEach(entity => { - entity.Date = entity.Date ? new Date(entity.Date) : undefined; - entity.Valor = entity.Valor ? new Date(entity.Valor) : undefined; - entity.CreatedAt = entity.CreatedAt ? new Date(entity.CreatedAt) : undefined; - entity.UpdatedAt = entity.UpdatedAt ? new Date(entity.UpdatedAt) : undefined; - }); - return entities; - } - - public override create(entity: SupplierPaymentEntity): string | number { - entity.Name = new NumberGeneratorService().generateByType('Supplier Payment'); - entity.UUID = require("sdk/utils/uuid").random(); - return super.create(entity); - } - - public override upsert(entity: SupplierPaymentEntity): string | number { - entity.Name = new NumberGeneratorService().generateByType('Supplier Payment'); - entity.UUID = require("sdk/utils/uuid").random(); - return super.upsert(entity); - } - - protected override async triggerEvent(data: EntityEvent): Promise { - const triggerExtensions = await Extensions.loadExtensionModules('codbex-payments-SupplierPayment-SupplierPayment', ['trigger']); - triggerExtensions.forEach(triggerExtension => { - try { - triggerExtension.trigger(data); - } catch (error) { - console.error(error); - } - }); - Producer.topic('codbex-payments-SupplierPayment-SupplierPayment').send(JSON.stringify(data)); - } -} diff --git a/codbex-payments/gen/codbex-payments/odata/codbex-payments.odata b/codbex-payments/gen/codbex-payments/odata/codbex-payments.odata deleted file mode 100644 index f149140..0000000 --- a/codbex-payments/gen/codbex-payments/odata/codbex-payments.odata +++ /dev/null @@ -1,4 +0,0 @@ -{ - "namespace": "", - "entities": [] -} diff --git a/codbex-payments/gen/codbex-payments/schema/codbex-payments.schema b/codbex-payments/gen/codbex-payments/schema/codbex-payments.schema index b9b7950..89bd9bb 100644 --- a/codbex-payments/gen/codbex-payments/schema/codbex-payments.schema +++ b/codbex-payments/gen/codbex-payments/schema/codbex-payments.schema @@ -51,6 +51,11 @@ "type": "INTEGER", "name": "CUSTOMERPAYMENT_CURRENCY" }, + { + "type": "INTEGER", + "nullable": true, + "name": "CUSTOMERPAYMENT_COMPANY" + }, { "type": "VARCHAR", "length": 100, @@ -64,8 +69,7 @@ }, { "type": "INTEGER", - "nullable": true, - "name": "CUSTOMERPAYMENT_COMPANY" + "name": "CUSTOMERPAYMENT_PAYMENTMETHOD" }, { "type": "VARCHAR", @@ -85,10 +89,6 @@ "nullable": true, "name": "CUSTOMERPAYMENT_REFERENCE" }, - { - "type": "INTEGER", - "name": "CUSTOMERPAYMENT_PAYMENTMETHOD" - }, { "type": "TIMESTAMP", "nullable": true, @@ -163,6 +163,11 @@ "type": "INTEGER", "name": "SUPPLIERPAYMENT_CURRENCY" }, + { + "type": "INTEGER", + "nullable": true, + "name": "SUPPLIERPAYMENT_COMPANY" + }, { "type": "VARCHAR", "length": 100, @@ -176,8 +181,7 @@ }, { "type": "INTEGER", - "nullable": true, - "name": "SUPPLIERPAYMENT_COMPANY" + "name": "SUPPLIERPAYMENT_PAYMENTMETHOD" }, { "type": "VARCHAR", @@ -197,10 +201,6 @@ "nullable": true, "name": "SUPPLIERPAYMENT_REFERENCE" }, - { - "type": "INTEGER", - "name": "SUPPLIERPAYMENT_PAYMENTMETHOD" - }, { "type": "TIMESTAMP", "nullable": true, @@ -275,6 +275,11 @@ "type": "INTEGER", "name": "EMPLOYEEPAYMENT_CURRENCY" }, + { + "type": "INTEGER", + "nullable": true, + "name": "EMPLOYEEPAYMENT_COMPANY" + }, { "type": "VARCHAR", "length": 100, @@ -286,11 +291,6 @@ "nullable": true, "name": "EMPLOYEEPAYMENT_DESCRIPTION" }, - { - "type": "INTEGER", - "nullable": true, - "name": "EMPLOYEEPAYMENT_COMPANY" - }, { "type": "VARCHAR", "length": 20, @@ -309,10 +309,6 @@ "nullable": true, "name": "EMPLOYEEPAYMENT_REFERENCE" }, - { - "type": "INTEGER", - "name": "EMPLOYEEPAYMENT_PAYMENTMETHOD" - }, { "type": "TIMESTAMP", "nullable": true, @@ -379,6 +375,11 @@ "scale": "2", "name": "PAYMENTRECORD_AMOUNT" }, + { + "type": "INTEGER", + "nullable": true, + "name": "PAYMENTRECORD_COMPANY" + }, { "type": "INTEGER", "name": "PAYMENTRECORD_CURRENCY" @@ -403,11 +404,6 @@ "nullable": true, "name": "PAYMENTRECORD_DESCRIPTION" }, - { - "type": "INTEGER", - "nullable": true, - "name": "PAYMENTRECORD_COMPANY" - }, { "type": "VARCHAR", "length": 36, @@ -508,16 +504,16 @@ "type": "INTEGER", "name": "PAYMENTADJUSTMENT_CURRENCY" }, - { - "type": "INTEGER", - "name": "PAYMENTADJUSTMENT_COMPANY" - }, { "type": "VARCHAR", "length": 100, "nullable": true, "name": "PAYMENTADJUSTMENT_REASON" }, + { + "type": "INTEGER", + "name": "PAYMENTADJUSTMENT_COMPANY" + }, { "type": "VARCHAR", "length": 36, @@ -667,13 +663,13 @@ "referencedColumns": "COMPANY_ID" }, { - "name": "EmployeePayment_PaymentMethod", + "name": "PaymentRecord_Company", "type": "foreignKey", - "table": "CODBEX_EMPLOYEEPAYMENT", - "constraintName": "EmployeePayment_PaymentMethod", - "columns": "EMPLOYEEPAYMENT_PAYMENTMETHOD", - "referencedTable": "CODBEX_PAYMENTMETHOD", - "referencedColumns": "PAYMENTMETHOD_ID" + "table": "CODBEX_PAYMENTRECORD", + "constraintName": "PaymentRecord_Company", + "columns": "PAYMENTRECORD_COMPANY", + "referencedTable": "CODBEX_COMPANY", + "referencedColumns": "COMPANY_ID" }, { "name": "PaymentRecord_Currency", @@ -702,15 +698,6 @@ "referencedTable": "CODBEX_PAYMENTTYPE", "referencedColumns": "PAYMENTTYPE_ID" }, - { - "name": "PaymentRecord_Company", - "type": "foreignKey", - "table": "CODBEX_PAYMENTRECORD", - "constraintName": "PaymentRecord_Company", - "columns": "PAYMENTRECORD_COMPANY", - "referencedTable": "CODBEX_COMPANY", - "referencedColumns": "COMPANY_ID" - }, { "name": "PaymentAdjustment_Currency", "type": "foreignKey", diff --git a/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/controller.js b/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/controller.js index af1deba..bb96f65 100644 --- a/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/controller.js @@ -1,6 +1,6 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) .config(['EntityServiceProvider', (EntityServiceProvider) => { - EntityServiceProvider.baseUrl = '/services/ts/codbex-payments/gen/codbex-payments/api/CustomerPayment/CustomerPaymentController.ts'; + EntityServiceProvider.baseUrl = '/services/java/codbex-payments/gen/codbex_payments/api/customerpayment/CustomerPaymentController'; }]) .controller('PageController', ($scope, $http, EntityService, Extensions, LocaleService, ButtonStates) => { const Dialogs = new DialogHub(); @@ -105,7 +105,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer if (optionsCustomerHasMore) { const optionsCustomerSearchValues = Array.from(new Set(response.data.map(e => e.Customer))); if (optionsCustomerSearchValues.length > 0) { - $http.post('/services/ts/codbex-partners/gen/codbex-partners/api/Customers/CustomerController.ts/search', { + $http.post('/services/java/codbex-partners/gen/codbex_partners/api/customers/CustomerController/search', { conditions: [ { propertyName: 'Id', operator: 'IN', value: optionsCustomerSearchValues } ] @@ -128,7 +128,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer if (optionsCurrencyHasMore) { const optionsCurrencySearchValues = Array.from(new Set(response.data.map(e => e.Currency))); if (optionsCurrencySearchValues.length > 0) { - $http.post('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts/search', { + $http.post('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController/search', { conditions: [ { propertyName: 'Id', operator: 'IN', value: optionsCurrencySearchValues } ] @@ -151,7 +151,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer if (optionsCompanyHasMore) { const optionsCompanySearchValues = Array.from(new Set(response.data.map(e => e.Company))); if (optionsCompanySearchValues.length > 0) { - $http.post('/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts/search', { + $http.post('/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController/search', { conditions: [ { propertyName: 'Id', operator: 'IN', value: optionsCompanySearchValues } ] @@ -174,7 +174,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer if (optionsPaymentMethodHasMore) { const optionsPaymentMethodSearchValues = Array.from(new Set(response.data.map(e => e.PaymentMethod))); if (optionsPaymentMethodSearchValues.length > 0) { - $http.post('/services/ts/codbex-methods/gen/codbex-methods/api/Settings/PaymentMethodController.ts/search', { + $http.post('/services/java/codbex-methods/gen/codbex_methods/api/settings/PaymentMethodController/search', { conditions: [ { propertyName: 'Id', operator: 'IN', value: optionsPaymentMethodSearchValues } ] @@ -322,9 +322,9 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer let optionsCustomerHasMore = true; - $http.get('/services/ts/codbex-partners/gen/codbex-partners/api/Customers/CustomerController.ts/count').then((response) => { + $http.get('/services/java/codbex-partners/gen/codbex_partners/api/customers/CustomerController/count').then((response) => { const optionsCustomerCount = response.data.count; - $http.get('/services/ts/codbex-partners/gen/codbex-partners/api/Customers/CustomerController.ts').then((response) => { + $http.get('/services/java/codbex-partners/gen/codbex_partners/api/customers/CustomerController').then((response) => { $scope.optionsCustomer = response.data.map(e => ({ value: e.Id, text: e.Name @@ -350,9 +350,9 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer }); let optionsCurrencyHasMore = true; - $http.get('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts/count').then((response) => { + $http.get('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController/count').then((response) => { const optionsCurrencyCount = response.data.count; - $http.get('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts').then((response) => { + $http.get('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController').then((response) => { $scope.optionsCurrency = response.data.map(e => ({ value: e.Id, text: e.Code @@ -378,9 +378,9 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer }); let optionsCompanyHasMore = true; - $http.get('/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts/count').then((response) => { + $http.get('/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController/count').then((response) => { const optionsCompanyCount = response.data.count; - $http.get('/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts').then((response) => { + $http.get('/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController').then((response) => { $scope.optionsCompany = response.data.map(e => ({ value: e.Id, text: e.Name @@ -406,9 +406,9 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer }); let optionsPaymentMethodHasMore = true; - $http.get('/services/ts/codbex-methods/gen/codbex-methods/api/Settings/PaymentMethodController.ts/count').then((response) => { + $http.get('/services/java/codbex-methods/gen/codbex_methods/api/settings/PaymentMethodController/count').then((response) => { const optionsPaymentMethodCount = response.data.count; - $http.get('/services/ts/codbex-methods/gen/codbex-methods/api/Settings/PaymentMethodController.ts').then((response) => { + $http.get('/services/java/codbex-methods/gen/codbex_methods/api/settings/PaymentMethodController').then((response) => { $scope.optionsPaymentMethod = response.data.map(e => ({ value: e.Id, text: e.Name diff --git a/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-filter/controller.js b/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-filter/controller.js index 2aaa5fb..ade78d4 100644 --- a/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-filter/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-filter/controller.js @@ -102,6 +102,10 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle const condition = { propertyName: 'Currency', operator: 'EQ', value: entity.Currency }; filter.$filter.conditions.push(condition); } + if (entity.Company !== undefined) { + const condition = { propertyName: 'Company', operator: 'EQ', value: entity.Company }; + filter.$filter.conditions.push(condition); + } if (entity.Reason) { const condition = { propertyName: 'Reason', operator: 'LIKE', value: `%${entity.Reason}%` }; filter.$filter.conditions.push(condition); @@ -110,8 +114,8 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle const condition = { propertyName: 'Description', operator: 'LIKE', value: `%${entity.Description}%` }; filter.$filter.conditions.push(condition); } - if (entity.Company !== undefined) { - const condition = { propertyName: 'Company', operator: 'EQ', value: entity.Company }; + if (entity.PaymentMethod !== undefined) { + const condition = { propertyName: 'PaymentMethod', operator: 'EQ', value: entity.PaymentMethod }; filter.$filter.conditions.push(condition); } if (entity.Name) { @@ -126,10 +130,6 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle const condition = { propertyName: 'Reference', operator: 'LIKE', value: `%${entity.Reference}%` }; filter.$filter.conditions.push(condition); } - if (entity.PaymentMethod !== undefined) { - const condition = { propertyName: 'PaymentMethod', operator: 'EQ', value: entity.PaymentMethod }; - filter.$filter.conditions.push(condition); - } if (entity.CreatedAtFrom) { const condition = { propertyName: 'CreatedAt', operator: 'GE', value: entity.CreatedAtFrom }; filter.$filter.conditions.push(condition); @@ -192,7 +192,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle $scope.loadMoreOptionsCustomer = () => { const limit = 20; $scope.optionsCustomerLoading = true; - $http.get(`/services/ts/codbex-partners/gen/codbex-partners/api/Customers/CustomerController.ts?$limit=${limit}&$offset=${++loadMoreOptionsCustomerCounter * limit}`) + $http.get(`/services/java/codbex-partners/gen/codbex_partners/api/customers/CustomerController?$limit=${limit}&$offset=${++loadMoreOptionsCustomerCounter * limit}`) .then((response) => { const optionValues = allValuesCustomer.map(e => e.value); const resultValues = response.data.map(e => ({ @@ -242,7 +242,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle } }) if (!cacheHit) { - $http.post('/services/ts/codbex-partners/gen/codbex-partners/api/Customers/CustomerController.ts/search', { + $http.post('/services/java/codbex-partners/gen/codbex_partners/api/customers/CustomerController/search', { conditions: [ { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] @@ -281,7 +281,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle $scope.loadMoreOptionsCurrency = () => { const limit = 20; $scope.optionsCurrencyLoading = true; - $http.get(`/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts?$limit=${limit}&$offset=${++loadMoreOptionsCurrencyCounter * limit}`) + $http.get(`/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController?$limit=${limit}&$offset=${++loadMoreOptionsCurrencyCounter * limit}`) .then((response) => { const optionValues = allValuesCurrency.map(e => e.value); const resultValues = response.data.map(e => ({ @@ -331,7 +331,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle } }) if (!cacheHit) { - $http.post('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts/search', { + $http.post('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController/search', { conditions: [ { propertyName: 'Code', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] @@ -370,7 +370,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle $scope.loadMoreOptionsCompany = () => { const limit = 20; $scope.optionsCompanyLoading = true; - $http.get(`/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts?$limit=${limit}&$offset=${++loadMoreOptionsCompanyCounter * limit}`) + $http.get(`/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController?$limit=${limit}&$offset=${++loadMoreOptionsCompanyCounter * limit}`) .then((response) => { const optionValues = allValuesCompany.map(e => e.value); const resultValues = response.data.map(e => ({ @@ -420,7 +420,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle } }) if (!cacheHit) { - $http.post('/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts/search', { + $http.post('/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController/search', { conditions: [ { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] @@ -459,7 +459,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle $scope.loadMoreOptionsPaymentMethod = () => { const limit = 20; $scope.optionsPaymentMethodLoading = true; - $http.get(`/services/ts/codbex-methods/gen/codbex-methods/api/Settings/PaymentMethodController.ts?$limit=${limit}&$offset=${++loadMoreOptionsPaymentMethodCounter * limit}`) + $http.get(`/services/java/codbex-methods/gen/codbex_methods/api/settings/PaymentMethodController?$limit=${limit}&$offset=${++loadMoreOptionsPaymentMethodCounter * limit}`) .then((response) => { const optionValues = allValuesPaymentMethod.map(e => e.value); const resultValues = response.data.map(e => ({ @@ -509,7 +509,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle } }) if (!cacheHit) { - $http.post('/services/ts/codbex-methods/gen/codbex-methods/api/Settings/PaymentMethodController.ts/search', { + $http.post('/services/java/codbex-methods/gen/codbex_methods/api/settings/PaymentMethodController/search', { conditions: [ { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] diff --git a/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-filter/index.html b/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-filter/index.html index 022382d..255c5f8 100644 --- a/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-filter/index.html +++ b/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-filter/index.html @@ -179,6 +179,27 @@ + +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_COMPANY' | t }} +
+
+ + + + + More Options + + +
+
{{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_REASON' | t }} @@ -215,21 +236,21 @@
- {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_COMPANY' | t }} + {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_PAYMENTMETHOD' | t }}
- - - - - More Options + + + + + More Options
@@ -285,27 +306,6 @@
- -
- {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_PAYMENTMETHOD' | t }} -
-
- - - - - More Options - - -
-
{{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_CREATEDAT' | t }} diff --git a/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/controller.js b/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/controller.js index f4ea45d..c3c8e5f 100644 --- a/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/controller.js @@ -1,6 +1,6 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) .config(['EntityServiceProvider', (EntityServiceProvider) => { - EntityServiceProvider.baseUrl = '/services/ts/codbex-payments/gen/codbex-payments/api/CustomerPayment/CustomerPaymentController.ts'; + EntityServiceProvider.baseUrl = '/services/java/codbex-payments/gen/codbex_payments/api/customerpayment/CustomerPaymentController'; }]) .controller('PageController', ($scope, $http, ViewParameters, LocaleService, EntityService) => { const Dialogs = new DialogHub(); @@ -101,11 +101,11 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer }); }; - $scope.serviceCustomer = '/services/ts/codbex-partners/gen/codbex-partners/api/Customers/CustomerController.ts'; + $scope.serviceCustomer = '/services/java/codbex-partners/gen/codbex_partners/api/customers/CustomerController'; $scope.optionsCustomer = []; - $http.get('/services/ts/codbex-partners/gen/codbex-partners/api/Customers/CustomerController.ts').then((response) => { + $http.get('/services/java/codbex-partners/gen/codbex_partners/api/customers/CustomerController').then((response) => { $scope.optionsCustomer = response.data.map(e => ({ value: e.Id, text: e.Name @@ -129,7 +129,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.loadMoreOptionsCustomer = () => { const limit = 20; $scope.optionsCustomerLoading = true; - $http.get(`/services/ts/codbex-partners/gen/codbex-partners/api/Customers/CustomerController.ts?$limit=${limit}&$offset=${++loadMoreOptionsCustomerCounter * limit}`) + $http.get(`/services/java/codbex-partners/gen/codbex_partners/api/customers/CustomerController?$limit=${limit}&$offset=${++loadMoreOptionsCustomerCounter * limit}`) .then((response) => { const optionValues = allValuesCustomer.map(e => e.value); const resultValues = response.data.map(e => ({ @@ -179,7 +179,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } }) if (!cacheHit) { - $http.post('/services/ts/codbex-partners/gen/codbex-partners/api/Customers/CustomerController.ts/search', { + $http.post('/services/java/codbex-partners/gen/codbex_partners/api/customers/CustomerController/search', { conditions: [ { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] @@ -208,11 +208,11 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } } }; - $scope.serviceCurrency = '/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts'; + $scope.serviceCurrency = '/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController'; $scope.optionsCurrency = []; - $http.get('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts').then((response) => { + $http.get('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController').then((response) => { $scope.optionsCurrency = response.data.map(e => ({ value: e.Id, text: e.Code @@ -236,7 +236,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.loadMoreOptionsCurrency = () => { const limit = 20; $scope.optionsCurrencyLoading = true; - $http.get(`/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts?$limit=${limit}&$offset=${++loadMoreOptionsCurrencyCounter * limit}`) + $http.get(`/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController?$limit=${limit}&$offset=${++loadMoreOptionsCurrencyCounter * limit}`) .then((response) => { const optionValues = allValuesCurrency.map(e => e.value); const resultValues = response.data.map(e => ({ @@ -286,7 +286,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } }) if (!cacheHit) { - $http.post('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts/search', { + $http.post('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController/search', { conditions: [ { propertyName: 'Code', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] @@ -315,11 +315,11 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } } }; - $scope.serviceCompany = '/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts'; + $scope.serviceCompany = '/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController'; $scope.optionsCompany = []; - $http.get('/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts').then((response) => { + $http.get('/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController').then((response) => { $scope.optionsCompany = response.data.map(e => ({ value: e.Id, text: e.Name @@ -343,7 +343,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.loadMoreOptionsCompany = () => { const limit = 20; $scope.optionsCompanyLoading = true; - $http.get(`/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts?$limit=${limit}&$offset=${++loadMoreOptionsCompanyCounter * limit}`) + $http.get(`/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController?$limit=${limit}&$offset=${++loadMoreOptionsCompanyCounter * limit}`) .then((response) => { const optionValues = allValuesCompany.map(e => e.value); const resultValues = response.data.map(e => ({ @@ -393,7 +393,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } }) if (!cacheHit) { - $http.post('/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts/search', { + $http.post('/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController/search', { conditions: [ { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] @@ -422,11 +422,11 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } } }; - $scope.servicePaymentMethod = '/services/ts/codbex-methods/gen/codbex-methods/api/Settings/PaymentMethodController.ts'; + $scope.servicePaymentMethod = '/services/java/codbex-methods/gen/codbex_methods/api/settings/PaymentMethodController'; $scope.optionsPaymentMethod = []; - $http.get('/services/ts/codbex-methods/gen/codbex-methods/api/Settings/PaymentMethodController.ts').then((response) => { + $http.get('/services/java/codbex-methods/gen/codbex_methods/api/settings/PaymentMethodController').then((response) => { $scope.optionsPaymentMethod = response.data.map(e => ({ value: e.Id, text: e.Name @@ -450,7 +450,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.loadMoreOptionsPaymentMethod = () => { const limit = 20; $scope.optionsPaymentMethodLoading = true; - $http.get(`/services/ts/codbex-methods/gen/codbex-methods/api/Settings/PaymentMethodController.ts?$limit=${limit}&$offset=${++loadMoreOptionsPaymentMethodCounter * limit}`) + $http.get(`/services/java/codbex-methods/gen/codbex_methods/api/settings/PaymentMethodController?$limit=${limit}&$offset=${++loadMoreOptionsPaymentMethodCounter * limit}`) .then((response) => { const optionValues = allValuesPaymentMethod.map(e => e.value); const resultValues = response.data.map(e => ({ @@ -500,7 +500,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } }) if (!cacheHit) { - $http.post('/services/ts/codbex-methods/gen/codbex-methods/api/Settings/PaymentMethodController.ts/search', { + $http.post('/services/java/codbex-methods/gen/codbex_methods/api/settings/PaymentMethodController/search', { conditions: [ { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] diff --git a/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/index.html b/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/index.html index 3083c68..6711b0b 100644 --- a/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/index.html +++ b/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/index.html @@ -178,6 +178,29 @@
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_COMPANY' | t }} +
+
+ + + + + More Options + + +
+
{{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_REASON' | t }} @@ -222,23 +245,23 @@
- {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_COMPANY' | t }} + {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_PAYMENTMETHOD' | t }}
- - - - - More Options + dropdown-items="optionsPaymentMethod" + ng-keyup="onOptionsPaymentMethodChange($event)" + placeholder="{{ 'codbex-payments:codbex-payments-model.messages.inputSearch' | t:{'name':'$t(codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_PAYMENTMETHOD)'} }}" + btn-aria-label="{{ 'codbex-payments:codbex-payments-model.aria.showHide' | t:{'name':'PaymentMethod'} }}" list-aria-label="{{ 'codbex-payments:codbex-payments-model.aria.options' | t:{'name':'PaymentMethod'} }}"> + + + + More Options
@@ -292,29 +315,6 @@
- -
- {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_PAYMENTMETHOD' | t }} -
-
- - - - - More Options - - -
-
{{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_CREATEDAT' | t }} diff --git a/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/index.html b/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/index.html index 8734548..a0b5b6a 100644 --- a/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/index.html +++ b/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/index.html @@ -47,11 +47,11 @@ {{next.CounterpartyName}} | {{next.Amount}} | {{optionsCurrencyValue(next.Currency)}} | + {{optionsCompanyValue(next.Company)}} | {{next.Reason}} | {{next.Description}} | - {{optionsCompanyValue(next.Company)}} | - {{next.Name}} | {{optionsPaymentMethodValue(next.PaymentMethod)}} | + {{next.Name}} | {{next.CreatedAt}} | {{next.CreatedBy}} | {{next.UpdatedAt}} | diff --git a/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/main-details/controller.js b/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/main-details/controller.js index cba7917..6fafc7b 100644 --- a/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/main-details/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/main-details/controller.js @@ -1,6 +1,6 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) .config(["EntityServiceProvider", (EntityServiceProvider) => { - EntityServiceProvider.baseUrl = '/services/ts/codbex-payments/gen/codbex-payments/api/CustomerPayment/CustomerPaymentController.ts'; + EntityServiceProvider.baseUrl = '/services/java/codbex-payments/gen/codbex_payments/api/customerpayment/CustomerPaymentController'; }]) .controller('PageController', ($scope, $http, Extensions, LocaleService, EntityService) => { const Dialogs = new DialogHub(); @@ -112,10 +112,10 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer }); }}); - $scope.serviceCustomer = '/services/ts/codbex-partners/gen/codbex-partners/api/Customers/CustomerController.ts'; - $scope.serviceCurrency = '/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts'; - $scope.serviceCompany = '/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts'; - $scope.servicePaymentMethod = '/services/ts/codbex-methods/gen/codbex-methods/api/Settings/PaymentMethodController.ts'; + $scope.serviceCustomer = '/services/java/codbex-partners/gen/codbex_partners/api/customers/CustomerController'; + $scope.serviceCurrency = '/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController'; + $scope.serviceCompany = '/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController'; + $scope.servicePaymentMethod = '/services/java/codbex-methods/gen/codbex_methods/api/settings/PaymentMethodController'; //-----------------Events-------------------// @@ -229,7 +229,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.loadMoreOptionsCustomer = () => { const limit = 20; $scope.optionsCustomerLoading = true; - $http.get(`/services/ts/codbex-partners/gen/codbex-partners/api/Customers/CustomerController.ts?$limit=${limit}&$offset=${++loadMoreOptionsCustomerCounter * limit}`) + $http.get(`/services/java/codbex-partners/gen/codbex_partners/api/customers/CustomerController?$limit=${limit}&$offset=${++loadMoreOptionsCustomerCounter * limit}`) .then((response) => { const optionValues = allValuesCustomer.map(e => e.value); const resultValues = response.data.map(e => ({ @@ -279,7 +279,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } }) if (!cacheHit) { - $http.post('/services/ts/codbex-partners/gen/codbex-partners/api/Customers/CustomerController.ts/search', { + $http.post('/services/java/codbex-partners/gen/codbex_partners/api/customers/CustomerController/search', { conditions: [ { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] @@ -311,7 +311,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.refreshCustomer = () => { $scope.optionsCustomer = []; - $http.get('/services/ts/codbex-partners/gen/codbex-partners/api/Customers/CustomerController.ts').then((response) => { + $http.get('/services/java/codbex-partners/gen/codbex_partners/api/customers/CustomerController').then((response) => { $scope.optionsCustomer = response.data.map(e => ({ value: e.Id, text: e.Name @@ -336,7 +336,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.loadMoreOptionsCurrency = () => { const limit = 20; $scope.optionsCurrencyLoading = true; - $http.get(`/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts?$limit=${limit}&$offset=${++loadMoreOptionsCurrencyCounter * limit}`) + $http.get(`/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController?$limit=${limit}&$offset=${++loadMoreOptionsCurrencyCounter * limit}`) .then((response) => { const optionValues = allValuesCurrency.map(e => e.value); const resultValues = response.data.map(e => ({ @@ -386,7 +386,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } }) if (!cacheHit) { - $http.post('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts/search', { + $http.post('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController/search', { conditions: [ { propertyName: 'Code', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] @@ -418,7 +418,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.refreshCurrency = () => { $scope.optionsCurrency = []; - $http.get('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts').then((response) => { + $http.get('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController').then((response) => { $scope.optionsCurrency = response.data.map(e => ({ value: e.Id, text: e.Code @@ -443,7 +443,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.loadMoreOptionsCompany = () => { const limit = 20; $scope.optionsCompanyLoading = true; - $http.get(`/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts?$limit=${limit}&$offset=${++loadMoreOptionsCompanyCounter * limit}`) + $http.get(`/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController?$limit=${limit}&$offset=${++loadMoreOptionsCompanyCounter * limit}`) .then((response) => { const optionValues = allValuesCompany.map(e => e.value); const resultValues = response.data.map(e => ({ @@ -493,7 +493,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } }) if (!cacheHit) { - $http.post('/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts/search', { + $http.post('/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController/search', { conditions: [ { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] @@ -525,7 +525,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.refreshCompany = () => { $scope.optionsCompany = []; - $http.get('/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts').then((response) => { + $http.get('/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController').then((response) => { $scope.optionsCompany = response.data.map(e => ({ value: e.Id, text: e.Name @@ -550,7 +550,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.loadMoreOptionsPaymentMethod = () => { const limit = 20; $scope.optionsPaymentMethodLoading = true; - $http.get(`/services/ts/codbex-methods/gen/codbex-methods/api/Settings/PaymentMethodController.ts?$limit=${limit}&$offset=${++loadMoreOptionsPaymentMethodCounter * limit}`) + $http.get(`/services/java/codbex-methods/gen/codbex_methods/api/settings/PaymentMethodController?$limit=${limit}&$offset=${++loadMoreOptionsPaymentMethodCounter * limit}`) .then((response) => { const optionValues = allValuesPaymentMethod.map(e => e.value); const resultValues = response.data.map(e => ({ @@ -600,7 +600,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } }) if (!cacheHit) { - $http.post('/services/ts/codbex-methods/gen/codbex-methods/api/Settings/PaymentMethodController.ts/search', { + $http.post('/services/java/codbex-methods/gen/codbex_methods/api/settings/PaymentMethodController/search', { conditions: [ { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] @@ -632,7 +632,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.refreshPaymentMethod = () => { $scope.optionsPaymentMethod = []; - $http.get('/services/ts/codbex-methods/gen/codbex-methods/api/Settings/PaymentMethodController.ts').then((response) => { + $http.get('/services/java/codbex-methods/gen/codbex_methods/api/settings/PaymentMethodController').then((response) => { $scope.optionsPaymentMethod = response.data.map(e => ({ value: e.Id, text: e.Name diff --git a/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/main-details/index.html b/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/main-details/index.html index cd60618..ac951bc 100644 --- a/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/main-details/index.html +++ b/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/main-details/index.html @@ -184,6 +184,33 @@
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_COMPANY' | t }} +
+
+ + + + + More Options + + +
+
+ + +
+
{{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_REASON' | t }} @@ -228,29 +255,29 @@
- {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_COMPANY' | t }} + {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_PAYMENTMETHOD' | t }}
- - - - - More Options + dropdown-items="optionsPaymentMethod" + ng-keyup="onOptionsPaymentMethodChange($event)" + placeholder="{{ 'codbex-payments:codbex-payments-model.messages.inputSearch' | t:{'name':'$t(codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_PAYMENTMETHOD)'} }}" + btn-aria-label="{{ 'codbex-payments:codbex-payments-model.aria.showHide' | t:{'name':'PaymentMethod'} }}" list-aria-label="{{ 'codbex-payments:codbex-payments-model.aria.options' | t:{'name':'PaymentMethod'} }}"> + + + + More Options
- - + +
@@ -302,33 +329,6 @@
- -
- {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_PAYMENTMETHOD' | t }} -
-
- - - - - More Options - - -
-
- - -
-
{{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_CREATEDAT' | t }} diff --git a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/controller.js b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/controller.js index f9a04a5..6bddb84 100644 --- a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/controller.js @@ -1,6 +1,6 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) .config(['EntityServiceProvider', (EntityServiceProvider) => { - EntityServiceProvider.baseUrl = '/services/ts/codbex-payments/gen/codbex-payments/api/EmployeePayment/EmployeePaymentController.ts'; + EntityServiceProvider.baseUrl = '/services/java/codbex-payments/gen/codbex_payments/api/employeepayment/EmployeePaymentController'; }]) .controller('PageController', ($scope, $http, EntityService, Extensions, LocaleService, ButtonStates) => { const Dialogs = new DialogHub(); @@ -105,7 +105,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer if (optionsEmployeeHasMore) { const optionsEmployeeSearchValues = Array.from(new Set(response.data.map(e => e.Employee))); if (optionsEmployeeSearchValues.length > 0) { - $http.post('/services/ts/codbex-employees/gen/codbex-employees/api/Employees/EmployeeController.ts/search', { + $http.post('/services/java/codbex-employees/gen/codbex_employees/api/employees/EmployeeController/search', { conditions: [ { propertyName: 'Id', operator: 'IN', value: optionsEmployeeSearchValues } ] @@ -128,7 +128,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer if (optionsCurrencyHasMore) { const optionsCurrencySearchValues = Array.from(new Set(response.data.map(e => e.Currency))); if (optionsCurrencySearchValues.length > 0) { - $http.post('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts/search', { + $http.post('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController/search', { conditions: [ { propertyName: 'Id', operator: 'IN', value: optionsCurrencySearchValues } ] @@ -151,7 +151,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer if (optionsCompanyHasMore) { const optionsCompanySearchValues = Array.from(new Set(response.data.map(e => e.Company))); if (optionsCompanySearchValues.length > 0) { - $http.post('/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts/search', { + $http.post('/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController/search', { conditions: [ { propertyName: 'Id', operator: 'IN', value: optionsCompanySearchValues } ] @@ -294,9 +294,9 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer let optionsEmployeeHasMore = true; - $http.get('/services/ts/codbex-employees/gen/codbex-employees/api/Employees/EmployeeController.ts/count').then((response) => { + $http.get('/services/java/codbex-employees/gen/codbex_employees/api/employees/EmployeeController/count').then((response) => { const optionsEmployeeCount = response.data.count; - $http.get('/services/ts/codbex-employees/gen/codbex-employees/api/Employees/EmployeeController.ts').then((response) => { + $http.get('/services/java/codbex-employees/gen/codbex_employees/api/employees/EmployeeController').then((response) => { $scope.optionsEmployee = response.data.map(e => ({ value: e.Id, text: e.Name @@ -322,9 +322,9 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer }); let optionsCurrencyHasMore = true; - $http.get('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts/count').then((response) => { + $http.get('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController/count').then((response) => { const optionsCurrencyCount = response.data.count; - $http.get('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts').then((response) => { + $http.get('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController').then((response) => { $scope.optionsCurrency = response.data.map(e => ({ value: e.Id, text: e.Code @@ -350,9 +350,9 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer }); let optionsCompanyHasMore = true; - $http.get('/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts/count').then((response) => { + $http.get('/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController/count').then((response) => { const optionsCompanyCount = response.data.count; - $http.get('/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts').then((response) => { + $http.get('/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController').then((response) => { $scope.optionsCompany = response.data.map(e => ({ value: e.Id, text: e.Name diff --git a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-filter/controller.js b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-filter/controller.js index 824df39..321d34c 100644 --- a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-filter/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-filter/controller.js @@ -99,6 +99,10 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle const condition = { propertyName: 'Currency', operator: 'EQ', value: entity.Currency }; filter.$filter.conditions.push(condition); } + if (entity.Company !== undefined) { + const condition = { propertyName: 'Company', operator: 'EQ', value: entity.Company }; + filter.$filter.conditions.push(condition); + } if (entity.Reason) { const condition = { propertyName: 'Reason', operator: 'LIKE', value: `%${entity.Reason}%` }; filter.$filter.conditions.push(condition); @@ -107,10 +111,6 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle const condition = { propertyName: 'Description', operator: 'LIKE', value: `%${entity.Description}%` }; filter.$filter.conditions.push(condition); } - if (entity.Company !== undefined) { - const condition = { propertyName: 'Company', operator: 'EQ', value: entity.Company }; - filter.$filter.conditions.push(condition); - } if (entity.Name) { const condition = { propertyName: 'Name', operator: 'LIKE', value: `%${entity.Name}%` }; filter.$filter.conditions.push(condition); @@ -123,10 +123,6 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle const condition = { propertyName: 'Reference', operator: 'LIKE', value: `%${entity.Reference}%` }; filter.$filter.conditions.push(condition); } - if (entity.PaymentMethod !== undefined) { - const condition = { propertyName: 'PaymentMethod', operator: 'EQ', value: entity.PaymentMethod }; - filter.$filter.conditions.push(condition); - } if (entity.CreatedAtFrom) { const condition = { propertyName: 'CreatedAt', operator: 'GE', value: entity.CreatedAtFrom }; filter.$filter.conditions.push(condition); @@ -187,7 +183,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle $scope.loadMoreOptionsEmployee = () => { const limit = 20; $scope.optionsEmployeeLoading = true; - $http.get(`/services/ts/codbex-employees/gen/codbex-employees/api/Employees/EmployeeController.ts?$limit=${limit}&$offset=${++loadMoreOptionsEmployeeCounter * limit}`) + $http.get(`/services/java/codbex-employees/gen/codbex_employees/api/employees/EmployeeController?$limit=${limit}&$offset=${++loadMoreOptionsEmployeeCounter * limit}`) .then((response) => { const optionValues = allValuesEmployee.map(e => e.value); const resultValues = response.data.map(e => ({ @@ -237,7 +233,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle } }) if (!cacheHit) { - $http.post('/services/ts/codbex-employees/gen/codbex-employees/api/Employees/EmployeeController.ts/search', { + $http.post('/services/java/codbex-employees/gen/codbex_employees/api/employees/EmployeeController/search', { conditions: [ { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] @@ -276,7 +272,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle $scope.loadMoreOptionsCurrency = () => { const limit = 20; $scope.optionsCurrencyLoading = true; - $http.get(`/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts?$limit=${limit}&$offset=${++loadMoreOptionsCurrencyCounter * limit}`) + $http.get(`/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController?$limit=${limit}&$offset=${++loadMoreOptionsCurrencyCounter * limit}`) .then((response) => { const optionValues = allValuesCurrency.map(e => e.value); const resultValues = response.data.map(e => ({ @@ -326,7 +322,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle } }) if (!cacheHit) { - $http.post('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts/search', { + $http.post('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController/search', { conditions: [ { propertyName: 'Code', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] @@ -365,7 +361,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle $scope.loadMoreOptionsCompany = () => { const limit = 20; $scope.optionsCompanyLoading = true; - $http.get(`/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts?$limit=${limit}&$offset=${++loadMoreOptionsCompanyCounter * limit}`) + $http.get(`/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController?$limit=${limit}&$offset=${++loadMoreOptionsCompanyCounter * limit}`) .then((response) => { const optionValues = allValuesCompany.map(e => e.value); const resultValues = response.data.map(e => ({ @@ -415,7 +411,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle } }) if (!cacheHit) { - $http.post('/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts/search', { + $http.post('/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController/search', { conditions: [ { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] diff --git a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-filter/index.html b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-filter/index.html index bb5c1a5..9f312d2 100644 --- a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-filter/index.html +++ b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-filter/index.html @@ -179,6 +179,27 @@
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_COMPANY' | t }} +
+
+ + + + + More Options + + +
+
{{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_REASON' | t }} @@ -213,27 +234,6 @@
- -
- {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_COMPANY' | t }} -
-
- - - - - More Options - - -
-
{{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_NAME' | t }} @@ -285,22 +285,6 @@
- -
- {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_PAYMENTMETHOD' | t }} -
-
- - - - -
-
{{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_CREATEDAT' | t }} diff --git a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/controller.js b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/controller.js index 6200288..e50d922 100644 --- a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/controller.js @@ -1,6 +1,6 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) .config(['EntityServiceProvider', (EntityServiceProvider) => { - EntityServiceProvider.baseUrl = '/services/ts/codbex-payments/gen/codbex-payments/api/EmployeePayment/EmployeePaymentController.ts'; + EntityServiceProvider.baseUrl = '/services/java/codbex-payments/gen/codbex_payments/api/employeepayment/EmployeePaymentController'; }]) .controller('PageController', ($scope, $http, ViewParameters, LocaleService, EntityService) => { const Dialogs = new DialogHub(); @@ -98,11 +98,11 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer }); }; - $scope.serviceEmployee = '/services/ts/codbex-employees/gen/codbex-employees/api/Employees/EmployeeController.ts'; + $scope.serviceEmployee = '/services/java/codbex-employees/gen/codbex_employees/api/employees/EmployeeController'; $scope.optionsEmployee = []; - $http.get('/services/ts/codbex-employees/gen/codbex-employees/api/Employees/EmployeeController.ts').then((response) => { + $http.get('/services/java/codbex-employees/gen/codbex_employees/api/employees/EmployeeController').then((response) => { $scope.optionsEmployee = response.data.map(e => ({ value: e.Id, text: e.Name @@ -126,7 +126,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.loadMoreOptionsEmployee = () => { const limit = 20; $scope.optionsEmployeeLoading = true; - $http.get(`/services/ts/codbex-employees/gen/codbex-employees/api/Employees/EmployeeController.ts?$limit=${limit}&$offset=${++loadMoreOptionsEmployeeCounter * limit}`) + $http.get(`/services/java/codbex-employees/gen/codbex_employees/api/employees/EmployeeController?$limit=${limit}&$offset=${++loadMoreOptionsEmployeeCounter * limit}`) .then((response) => { const optionValues = allValuesEmployee.map(e => e.value); const resultValues = response.data.map(e => ({ @@ -176,7 +176,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } }) if (!cacheHit) { - $http.post('/services/ts/codbex-employees/gen/codbex-employees/api/Employees/EmployeeController.ts/search', { + $http.post('/services/java/codbex-employees/gen/codbex_employees/api/employees/EmployeeController/search', { conditions: [ { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] @@ -205,11 +205,11 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } } }; - $scope.serviceCurrency = '/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts'; + $scope.serviceCurrency = '/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController'; $scope.optionsCurrency = []; - $http.get('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts').then((response) => { + $http.get('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController').then((response) => { $scope.optionsCurrency = response.data.map(e => ({ value: e.Id, text: e.Code @@ -233,7 +233,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.loadMoreOptionsCurrency = () => { const limit = 20; $scope.optionsCurrencyLoading = true; - $http.get(`/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts?$limit=${limit}&$offset=${++loadMoreOptionsCurrencyCounter * limit}`) + $http.get(`/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController?$limit=${limit}&$offset=${++loadMoreOptionsCurrencyCounter * limit}`) .then((response) => { const optionValues = allValuesCurrency.map(e => e.value); const resultValues = response.data.map(e => ({ @@ -283,7 +283,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } }) if (!cacheHit) { - $http.post('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts/search', { + $http.post('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController/search', { conditions: [ { propertyName: 'Code', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] @@ -312,11 +312,11 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } } }; - $scope.serviceCompany = '/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts'; + $scope.serviceCompany = '/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController'; $scope.optionsCompany = []; - $http.get('/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts').then((response) => { + $http.get('/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController').then((response) => { $scope.optionsCompany = response.data.map(e => ({ value: e.Id, text: e.Name @@ -340,7 +340,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.loadMoreOptionsCompany = () => { const limit = 20; $scope.optionsCompanyLoading = true; - $http.get(`/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts?$limit=${limit}&$offset=${++loadMoreOptionsCompanyCounter * limit}`) + $http.get(`/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController?$limit=${limit}&$offset=${++loadMoreOptionsCompanyCounter * limit}`) .then((response) => { const optionValues = allValuesCompany.map(e => e.value); const resultValues = response.data.map(e => ({ @@ -390,7 +390,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } }) if (!cacheHit) { - $http.post('/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts/search', { + $http.post('/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController/search', { conditions: [ { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] diff --git a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/index.html b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/index.html index 9f853ba..f6468cd 100644 --- a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/index.html +++ b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/index.html @@ -178,6 +178,29 @@
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_COMPANY' | t }} +
+
+ + + + + More Options + + +
+
{{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_REASON' | t }} @@ -220,29 +243,6 @@
- -
- {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_COMPANY' | t }} -
-
- - - - - More Options - - -
-
{{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_NAME' | t }} @@ -292,26 +292,6 @@
- -
- {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_PAYMENTMETHOD' | t }} -
-
- - - - -
-
{{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_CREATEDAT' | t }} diff --git a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/index.html b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/index.html index 81cd3f8..e5d8af0 100644 --- a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/index.html +++ b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/index.html @@ -47,13 +47,12 @@ {{next.CounterpartyName}} | {{next.Amount}} | {{optionsCurrencyValue(next.Currency)}} | + {{optionsCompanyValue(next.Company)}} | {{next.Reason}} | {{next.Description}} | - {{optionsCompanyValue(next.Company)}} | {{next.Name}} | {{next.UUID}} | {{next.Reference}} | - {{next.PaymentMethod}} | {{next.CreatedAt}} | {{next.CreatedBy}} | {{next.UpdatedAt}} | diff --git a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/main-details/controller.js b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/main-details/controller.js index 989fbb1..3542415 100644 --- a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/main-details/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/main-details/controller.js @@ -1,6 +1,6 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) .config(["EntityServiceProvider", (EntityServiceProvider) => { - EntityServiceProvider.baseUrl = '/services/ts/codbex-payments/gen/codbex-payments/api/EmployeePayment/EmployeePaymentController.ts'; + EntityServiceProvider.baseUrl = '/services/java/codbex-payments/gen/codbex_payments/api/employeepayment/EmployeePaymentController'; }]) .controller('PageController', ($scope, $http, Extensions, LocaleService, EntityService) => { const Dialogs = new DialogHub(); @@ -108,9 +108,9 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer }); }}); - $scope.serviceEmployee = '/services/ts/codbex-employees/gen/codbex-employees/api/Employees/EmployeeController.ts'; - $scope.serviceCurrency = '/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts'; - $scope.serviceCompany = '/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts'; + $scope.serviceEmployee = '/services/java/codbex-employees/gen/codbex_employees/api/employees/EmployeeController'; + $scope.serviceCurrency = '/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController'; + $scope.serviceCompany = '/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController'; //-----------------Events-------------------// @@ -214,7 +214,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.loadMoreOptionsEmployee = () => { const limit = 20; $scope.optionsEmployeeLoading = true; - $http.get(`/services/ts/codbex-employees/gen/codbex-employees/api/Employees/EmployeeController.ts?$limit=${limit}&$offset=${++loadMoreOptionsEmployeeCounter * limit}`) + $http.get(`/services/java/codbex-employees/gen/codbex_employees/api/employees/EmployeeController?$limit=${limit}&$offset=${++loadMoreOptionsEmployeeCounter * limit}`) .then((response) => { const optionValues = allValuesEmployee.map(e => e.value); const resultValues = response.data.map(e => ({ @@ -264,7 +264,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } }) if (!cacheHit) { - $http.post('/services/ts/codbex-employees/gen/codbex-employees/api/Employees/EmployeeController.ts/search', { + $http.post('/services/java/codbex-employees/gen/codbex_employees/api/employees/EmployeeController/search', { conditions: [ { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] @@ -296,7 +296,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.refreshEmployee = () => { $scope.optionsEmployee = []; - $http.get('/services/ts/codbex-employees/gen/codbex-employees/api/Employees/EmployeeController.ts').then((response) => { + $http.get('/services/java/codbex-employees/gen/codbex_employees/api/employees/EmployeeController').then((response) => { $scope.optionsEmployee = response.data.map(e => ({ value: e.Id, text: e.Name @@ -321,7 +321,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.loadMoreOptionsCurrency = () => { const limit = 20; $scope.optionsCurrencyLoading = true; - $http.get(`/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts?$limit=${limit}&$offset=${++loadMoreOptionsCurrencyCounter * limit}`) + $http.get(`/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController?$limit=${limit}&$offset=${++loadMoreOptionsCurrencyCounter * limit}`) .then((response) => { const optionValues = allValuesCurrency.map(e => e.value); const resultValues = response.data.map(e => ({ @@ -371,7 +371,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } }) if (!cacheHit) { - $http.post('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts/search', { + $http.post('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController/search', { conditions: [ { propertyName: 'Code', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] @@ -403,7 +403,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.refreshCurrency = () => { $scope.optionsCurrency = []; - $http.get('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts').then((response) => { + $http.get('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController').then((response) => { $scope.optionsCurrency = response.data.map(e => ({ value: e.Id, text: e.Code @@ -428,7 +428,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.loadMoreOptionsCompany = () => { const limit = 20; $scope.optionsCompanyLoading = true; - $http.get(`/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts?$limit=${limit}&$offset=${++loadMoreOptionsCompanyCounter * limit}`) + $http.get(`/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController?$limit=${limit}&$offset=${++loadMoreOptionsCompanyCounter * limit}`) .then((response) => { const optionValues = allValuesCompany.map(e => e.value); const resultValues = response.data.map(e => ({ @@ -478,7 +478,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } }) if (!cacheHit) { - $http.post('/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts/search', { + $http.post('/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController/search', { conditions: [ { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] @@ -510,7 +510,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.refreshCompany = () => { $scope.optionsCompany = []; - $http.get('/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts').then((response) => { + $http.get('/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController').then((response) => { $scope.optionsCompany = response.data.map(e => ({ value: e.Id, text: e.Name diff --git a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/main-details/index.html b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/main-details/index.html index 0041695..1b151da 100644 --- a/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/main-details/index.html +++ b/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/main-details/index.html @@ -184,6 +184,33 @@
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_COMPANY' | t }} +
+
+ + + + + More Options + + +
+
+ + +
+
{{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_REASON' | t }} @@ -226,33 +253,6 @@
- -
- {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_COMPANY' | t }} -
-
- - - - - More Options - - -
-
- - -
-
{{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_NAME' | t }} @@ -302,26 +302,6 @@
- -
- {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_PAYMENTMETHOD' | t }} -
-
- - - - -
-
{{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_CREATEDAT' | t }} diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/controller.js b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/controller.js index cc16eaa..b1bb805 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/controller.js @@ -1,6 +1,6 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) .config(['EntityServiceProvider', (EntityServiceProvider) => { - EntityServiceProvider.baseUrl = '/services/ts/codbex-payments/gen/codbex-payments/api/PaymentAdjustment/PaymentAdjustmentController.ts'; + EntityServiceProvider.baseUrl = '/services/java/codbex-payments/gen/codbex_payments/api/paymentadjustment/PaymentAdjustmentController'; }]) .controller('PageController', ($scope, $http, EntityService, Extensions, LocaleService, ButtonStates) => { const Dialogs = new DialogHub(); @@ -105,14 +105,14 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer if (optionsCurrencyHasMore) { const optionsCurrencySearchValues = Array.from(new Set(response.data.map(e => e.Currency))); if (optionsCurrencySearchValues.length > 0) { - $http.post('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts/search', { + $http.post('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController/search', { conditions: [ { propertyName: 'Id', operator: 'IN', value: optionsCurrencySearchValues } ] }).then((response) => { $scope.optionsCurrency.push(...response.data.map(e => ({ value: e.Id, - text: e.Name + text: e.Code }))); }, (error) => { console.error(error); @@ -128,7 +128,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer if (optionsCompanyHasMore) { const optionsCompanySearchValues = Array.from(new Set(response.data.map(e => e.Company))); if (optionsCompanySearchValues.length > 0) { - $http.post('/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts/search', { + $http.post('/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController/search', { conditions: [ { propertyName: 'Id', operator: 'IN', value: optionsCompanySearchValues } ] @@ -266,12 +266,12 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer let optionsCurrencyHasMore = true; - $http.get('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts/count').then((response) => { + $http.get('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController/count').then((response) => { const optionsCurrencyCount = response.data.count; - $http.get('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts').then((response) => { + $http.get('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController').then((response) => { $scope.optionsCurrency = response.data.map(e => ({ value: e.Id, - text: e.Name + text: e.Code })); optionsCurrencyHasMore = optionsCurrencyCount > $scope.optionsCurrency.length; }, (error) => { @@ -294,9 +294,9 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer }); let optionsCompanyHasMore = true; - $http.get('/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts/count').then((response) => { + $http.get('/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController/count').then((response) => { const optionsCompanyCount = response.data.count; - $http.get('/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts').then((response) => { + $http.get('/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController').then((response) => { $scope.optionsCompany = response.data.map(e => ({ value: e.Id, text: e.Name diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-filter/controller.js b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-filter/controller.js index 77090ce..f33c697 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-filter/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-filter/controller.js @@ -80,14 +80,14 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle const condition = { propertyName: 'Currency', operator: 'EQ', value: entity.Currency }; filter.$filter.conditions.push(condition); } - if (entity.Company !== undefined) { - const condition = { propertyName: 'Company', operator: 'EQ', value: entity.Company }; - filter.$filter.conditions.push(condition); - } if (entity.Reason) { const condition = { propertyName: 'Reason', operator: 'LIKE', value: `%${entity.Reason}%` }; filter.$filter.conditions.push(condition); } + if (entity.Company !== undefined) { + const condition = { propertyName: 'Company', operator: 'EQ', value: entity.Company }; + filter.$filter.conditions.push(condition); + } if (entity.UUID) { const condition = { propertyName: 'UUID', operator: 'LIKE', value: `%${entity.UUID}%` }; filter.$filter.conditions.push(condition); @@ -150,12 +150,12 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle $scope.loadMoreOptionsCurrency = () => { const limit = 20; $scope.optionsCurrencyLoading = true; - $http.get(`/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts?$limit=${limit}&$offset=${++loadMoreOptionsCurrencyCounter * limit}`) + $http.get(`/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController?$limit=${limit}&$offset=${++loadMoreOptionsCurrencyCounter * limit}`) .then((response) => { const optionValues = allValuesCurrency.map(e => e.value); const resultValues = response.data.map(e => ({ value: e.Id, - text: e.Name + text: e.Code })); const newValues = []; resultValues.forEach(e => { @@ -200,15 +200,15 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle } }) if (!cacheHit) { - $http.post('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts/search', { + $http.post('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController/search', { conditions: [ - { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } + { propertyName: 'Code', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] }).then((response) => { const optionValues = allValuesCurrency.map(e => e.value); const searchResult = response.data.map(e => ({ value: e.Id, - text: e.Name + text: e.Code })); searchResult.forEach(e => { if (!optionValues.includes(e.value)) { @@ -239,7 +239,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle $scope.loadMoreOptionsCompany = () => { const limit = 20; $scope.optionsCompanyLoading = true; - $http.get(`/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts?$limit=${limit}&$offset=${++loadMoreOptionsCompanyCounter * limit}`) + $http.get(`/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController?$limit=${limit}&$offset=${++loadMoreOptionsCompanyCounter * limit}`) .then((response) => { const optionValues = allValuesCompany.map(e => e.value); const resultValues = response.data.map(e => ({ @@ -289,7 +289,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle } }) if (!cacheHit) { - $http.post('/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts/search', { + $http.post('/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController/search', { conditions: [ { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-filter/index.html b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-filter/index.html index b584ee6..0d6216c 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-filter/index.html +++ b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-filter/index.html @@ -107,6 +107,23 @@
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_REASON' | t }} +
+
+ + + + +
+
{{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_COMPANY' | t }} @@ -128,23 +145,6 @@
- -
- {{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_REASON' | t }} -
-
- - - - -
-
{{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_UUID' | t }} diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-window/controller.js b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-window/controller.js index e944190..276c78b 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-window/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-window/controller.js @@ -1,6 +1,6 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) .config(['EntityServiceProvider', (EntityServiceProvider) => { - EntityServiceProvider.baseUrl = '/services/ts/codbex-payments/gen/codbex-payments/api/PaymentAdjustment/PaymentAdjustmentController.ts'; + EntityServiceProvider.baseUrl = '/services/java/codbex-payments/gen/codbex_payments/api/paymentadjustment/PaymentAdjustmentController'; }]) .controller('PageController', ($scope, $http, ViewParameters, LocaleService, EntityService) => { const Dialogs = new DialogHub(); @@ -95,14 +95,14 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer }); }; - $scope.serviceCurrency = '/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts'; + $scope.serviceCurrency = '/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController'; $scope.optionsCurrency = []; - $http.get('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts').then((response) => { + $http.get('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController').then((response) => { $scope.optionsCurrency = response.data.map(e => ({ value: e.Id, - text: e.Name + text: e.Code })); }, (error) => { console.error(error); @@ -123,12 +123,12 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.loadMoreOptionsCurrency = () => { const limit = 20; $scope.optionsCurrencyLoading = true; - $http.get(`/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts?$limit=${limit}&$offset=${++loadMoreOptionsCurrencyCounter * limit}`) + $http.get(`/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController?$limit=${limit}&$offset=${++loadMoreOptionsCurrencyCounter * limit}`) .then((response) => { const optionValues = allValuesCurrency.map(e => e.value); const resultValues = response.data.map(e => ({ value: e.Id, - text: e.Name + text: e.Code })); const newValues = []; resultValues.forEach(e => { @@ -173,15 +173,15 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } }) if (!cacheHit) { - $http.post('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts/search', { + $http.post('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController/search', { conditions: [ - { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } + { propertyName: 'Code', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] }).then((response) => { const optionValues = allValuesCurrency.map(e => e.value); const searchResult = response.data.map(e => ({ value: e.Id, - text: e.Name + text: e.Code })); searchResult.forEach(e => { if (!optionValues.includes(e.value)) { @@ -202,11 +202,11 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } } }; - $scope.serviceCompany = '/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts'; + $scope.serviceCompany = '/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController'; $scope.optionsCompany = []; - $http.get('/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts').then((response) => { + $http.get('/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController').then((response) => { $scope.optionsCompany = response.data.map(e => ({ value: e.Id, text: e.Name @@ -230,7 +230,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.loadMoreOptionsCompany = () => { const limit = 20; $scope.optionsCompanyLoading = true; - $http.get(`/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts?$limit=${limit}&$offset=${++loadMoreOptionsCompanyCounter * limit}`) + $http.get(`/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController?$limit=${limit}&$offset=${++loadMoreOptionsCompanyCounter * limit}`) .then((response) => { const optionValues = allValuesCompany.map(e => e.value); const resultValues = response.data.map(e => ({ @@ -280,7 +280,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } }) if (!cacheHit) { - $http.post('/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts/search', { + $http.post('/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController/search', { conditions: [ { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-window/index.html b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-window/index.html index 59111a1..f523853 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-window/index.html +++ b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-window/index.html @@ -90,6 +90,27 @@
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_REASON' | t }} +
+
+ + + + +
+
{{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_COMPANY' | t }} @@ -113,27 +134,6 @@
- -
- {{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_REASON' | t }} -
-
- - - - -
-
{{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_UUID' | t }} diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/index.html b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/index.html index 3963230..00b2ed8 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/index.html +++ b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/index.html @@ -43,8 +43,8 @@ {{next.Valor | date: "dd/MMM/yyyy"}} | {{next.Amount}} | {{optionsCurrencyValue(next.Currency)}} | - {{optionsCompanyValue(next.Company)}} | {{next.Reason}} | + {{optionsCompanyValue(next.Company)}} | {{next.UUID}} | {{next.CreatedAt}} | {{next.CreatedBy}} | diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/main-details/controller.js b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/main-details/controller.js index 37fa898..a45011d 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/main-details/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/main-details/controller.js @@ -1,6 +1,6 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) .config(["EntityServiceProvider", (EntityServiceProvider) => { - EntityServiceProvider.baseUrl = '/services/ts/codbex-payments/gen/codbex-payments/api/PaymentAdjustment/PaymentAdjustmentController.ts'; + EntityServiceProvider.baseUrl = '/services/java/codbex-payments/gen/codbex_payments/api/paymentadjustment/PaymentAdjustmentController'; }]) .controller('PageController', ($scope, $http, Extensions, LocaleService, EntityService) => { const Dialogs = new DialogHub(); @@ -104,8 +104,8 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer }); }}); - $scope.serviceCurrency = '/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts'; - $scope.serviceCompany = '/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts'; + $scope.serviceCurrency = '/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController'; + $scope.serviceCompany = '/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController'; //-----------------Events-------------------// @@ -199,12 +199,12 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.loadMoreOptionsCurrency = () => { const limit = 20; $scope.optionsCurrencyLoading = true; - $http.get(`/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts?$limit=${limit}&$offset=${++loadMoreOptionsCurrencyCounter * limit}`) + $http.get(`/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController?$limit=${limit}&$offset=${++loadMoreOptionsCurrencyCounter * limit}`) .then((response) => { const optionValues = allValuesCurrency.map(e => e.value); const resultValues = response.data.map(e => ({ value: e.Id, - text: e.Name + text: e.Code })); const newValues = []; resultValues.forEach(e => { @@ -249,15 +249,15 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } }) if (!cacheHit) { - $http.post('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts/search', { + $http.post('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController/search', { conditions: [ - { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } + { propertyName: 'Code', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] }).then((response) => { const optionValues = allValuesCurrency.map(e => e.value); const searchResult = response.data.map(e => ({ value: e.Id, - text: e.Name + text: e.Code })); searchResult.forEach(e => { if (!optionValues.includes(e.value)) { @@ -281,10 +281,10 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.refreshCurrency = () => { $scope.optionsCurrency = []; - $http.get('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts').then((response) => { + $http.get('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController').then((response) => { $scope.optionsCurrency = response.data.map(e => ({ value: e.Id, - text: e.Name + text: e.Code })); allValuesCurrency.length === 0; }, (error) => { @@ -306,7 +306,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.loadMoreOptionsCompany = () => { const limit = 20; $scope.optionsCompanyLoading = true; - $http.get(`/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts?$limit=${limit}&$offset=${++loadMoreOptionsCompanyCounter * limit}`) + $http.get(`/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController?$limit=${limit}&$offset=${++loadMoreOptionsCompanyCounter * limit}`) .then((response) => { const optionValues = allValuesCompany.map(e => e.value); const resultValues = response.data.map(e => ({ @@ -356,7 +356,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } }) if (!cacheHit) { - $http.post('/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts/search', { + $http.post('/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController/search', { conditions: [ { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] @@ -388,7 +388,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.refreshCompany = () => { $scope.optionsCompany = []; - $http.get('/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts').then((response) => { + $http.get('/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController').then((response) => { $scope.optionsCompany = response.data.map(e => ({ value: e.Id, text: e.Name diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/main-details/index.html b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/main-details/index.html index 7dd56d2..12d70f2 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/main-details/index.html +++ b/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/main-details/index.html @@ -92,6 +92,27 @@
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_REASON' | t }} +
+
+ + + + +
+
{{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_COMPANY' | t }} @@ -119,27 +140,6 @@
- -
- {{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_REASON' | t }} -
-
- - - - -
-
{{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_UUID' | t }} diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/controller.js b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/controller.js index 48b3466..8450af7 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/controller.js @@ -1,6 +1,6 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) .config(['EntityServiceProvider', (EntityServiceProvider) => { - EntityServiceProvider.baseUrl = '/services/ts/codbex-payments/gen/codbex-payments/api/PaymentRecord/PaymentRecordController.ts'; + EntityServiceProvider.baseUrl = '/services/java/codbex-payments/gen/codbex_payments/api/paymentrecord/PaymentRecordController'; }]) .controller('PageController', ($scope, $http, EntityService, Extensions, LocaleService, ButtonStates) => { const Dialogs = new DialogHub(); @@ -102,10 +102,33 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.data = []; $scope.dataReset = false; } + if (optionsCompanyHasMore) { + const optionsCompanySearchValues = Array.from(new Set(response.data.map(e => e.Company))); + if (optionsCompanySearchValues.length > 0) { + $http.post('/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController/search', { + conditions: [ + { propertyName: 'Id', operator: 'IN', value: optionsCompanySearchValues } + ] + }).then((response) => { + $scope.optionsCompany.push(...response.data.map(e => ({ + value: e.Id, + text: e.Name + }))); + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Company', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + } + } if (optionsCurrencyHasMore) { const optionsCurrencySearchValues = Array.from(new Set(response.data.map(e => e.Currency))); if (optionsCurrencySearchValues.length > 0) { - $http.post('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts/search', { + $http.post('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController/search', { conditions: [ { propertyName: 'Id', operator: 'IN', value: optionsCurrencySearchValues } ] @@ -128,7 +151,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer if (optionsPaymentDirectionHasMore) { const optionsPaymentDirectionSearchValues = Array.from(new Set(response.data.map(e => e.PaymentDirection))); if (optionsPaymentDirectionSearchValues.length > 0) { - $http.post('/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentDirectionController.ts/search', { + $http.post('/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentDirectionController/search', { conditions: [ { propertyName: 'Id', operator: 'IN', value: optionsPaymentDirectionSearchValues } ] @@ -151,7 +174,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer if (optionsPaymentTypeHasMore) { const optionsPaymentTypeSearchValues = Array.from(new Set(response.data.map(e => e.PaymentType))); if (optionsPaymentTypeSearchValues.length > 0) { - $http.post('/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeController.ts/search', { + $http.post('/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentTypeController/search', { conditions: [ { propertyName: 'Id', operator: 'IN', value: optionsPaymentTypeSearchValues } ] @@ -171,29 +194,6 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer }); } } - if (optionsCompanyHasMore) { - const optionsCompanySearchValues = Array.from(new Set(response.data.map(e => e.Company))); - if (optionsCompanySearchValues.length > 0) { - $http.post('/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts/search', { - conditions: [ - { propertyName: 'Id', operator: 'IN', value: optionsCompanySearchValues } - ] - }).then((response) => { - $scope.optionsCompany.push(...response.data.map(e => ({ - value: e.Id, - text: e.Name - }))); - }, (error) => { - console.error(error); - const message = error.data ? error.data.message : ''; - Dialogs.showAlert({ - title: 'Company', - message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), - type: AlertTypes.Error - }); - }); - } - } response.data.forEach(e => { if (e.Date) { e.Date = new Date(e.Date); @@ -240,10 +240,10 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer Dialogs.postMessage({ topic: 'codbex-payments.PaymentRecord.PaymentRecord.entitySelected', data: { entity: entity, selectedMainEntityId: entity.Id, + optionsCompany: $scope.optionsCompany, optionsCurrency: $scope.optionsCurrency, optionsPaymentDirection: $scope.optionsPaymentDirection, optionsPaymentType: $scope.optionsPaymentType, - optionsCompany: $scope.optionsCompany, }}); }; @@ -253,10 +253,10 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer Dialogs.postMessage({ topic: 'codbex-payments.PaymentRecord.PaymentRecord.createEntity', data: { entity: {}, + optionsCompany: $scope.optionsCompany, optionsCurrency: $scope.optionsCurrency, optionsPaymentDirection: $scope.optionsPaymentDirection, optionsPaymentType: $scope.optionsPaymentType, - optionsCompany: $scope.optionsCompany, }}); }; @@ -264,10 +264,10 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.action = 'update'; Dialogs.postMessage({ topic: 'codbex-payments.PaymentRecord.PaymentRecord.updateEntity', data: { entity: $scope.selectedEntity, + optionsCompany: $scope.optionsCompany, optionsCurrency: $scope.optionsCurrency, optionsPaymentDirection: $scope.optionsPaymentDirection, optionsPaymentType: $scope.optionsPaymentType, - optionsCompany: $scope.optionsCompany, }}); }; @@ -309,35 +309,35 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer id: 'PaymentRecord-filter', params: { entity: $scope.filterEntity, + optionsCompany: $scope.optionsCompany, optionsCurrency: $scope.optionsCurrency, optionsPaymentDirection: $scope.optionsPaymentDirection, optionsPaymentType: $scope.optionsPaymentType, - optionsCompany: $scope.optionsCompany, }, }); }; //----------------Dropdowns-----------------// + $scope.optionsCompany = []; $scope.optionsCurrency = []; $scope.optionsPaymentDirection = []; $scope.optionsPaymentType = []; - $scope.optionsCompany = []; - let optionsCurrencyHasMore = true; + let optionsCompanyHasMore = true; - $http.get('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts/count').then((response) => { - const optionsCurrencyCount = response.data.count; - $http.get('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts').then((response) => { - $scope.optionsCurrency = response.data.map(e => ({ + $http.get('/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController/count').then((response) => { + const optionsCompanyCount = response.data.count; + $http.get('/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController').then((response) => { + $scope.optionsCompany = response.data.map(e => ({ value: e.Id, - text: e.Code + text: e.Name })); - optionsCurrencyHasMore = optionsCurrencyCount > $scope.optionsCurrency.length; + optionsCompanyHasMore = optionsCompanyCount > $scope.optionsCompany.length; }, (error) => { console.error(error); const message = error.data ? error.data.message : ''; Dialogs.showAlert({ - title: 'Currency', + title: 'Company', message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), type: AlertTypes.Error }); @@ -346,26 +346,26 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer console.error(error); const message = error.data ? error.data.message : ''; Dialogs.showAlert({ - title: 'Currency', + title: 'Company', message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), type: AlertTypes.Error }); }); - let optionsPaymentDirectionHasMore = true; + let optionsCurrencyHasMore = true; - $http.get('/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentDirectionController.ts/count').then((response) => { - const optionsPaymentDirectionCount = response.data.count; - $http.get('/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentDirectionController.ts').then((response) => { - $scope.optionsPaymentDirection = response.data.map(e => ({ + $http.get('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController/count').then((response) => { + const optionsCurrencyCount = response.data.count; + $http.get('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController').then((response) => { + $scope.optionsCurrency = response.data.map(e => ({ value: e.Id, - text: e.Name + text: e.Code })); - optionsPaymentDirectionHasMore = optionsPaymentDirectionCount > $scope.optionsPaymentDirection.length; + optionsCurrencyHasMore = optionsCurrencyCount > $scope.optionsCurrency.length; }, (error) => { console.error(error); const message = error.data ? error.data.message : ''; Dialogs.showAlert({ - title: 'PaymentDirection', + title: 'Currency', message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), type: AlertTypes.Error }); @@ -374,26 +374,26 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer console.error(error); const message = error.data ? error.data.message : ''; Dialogs.showAlert({ - title: 'PaymentDirection', + title: 'Currency', message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), type: AlertTypes.Error }); }); - let optionsPaymentTypeHasMore = true; + let optionsPaymentDirectionHasMore = true; - $http.get('/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeController.ts/count').then((response) => { - const optionsPaymentTypeCount = response.data.count; - $http.get('/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeController.ts').then((response) => { - $scope.optionsPaymentType = response.data.map(e => ({ + $http.get('/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentDirectionController/count').then((response) => { + const optionsPaymentDirectionCount = response.data.count; + $http.get('/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentDirectionController').then((response) => { + $scope.optionsPaymentDirection = response.data.map(e => ({ value: e.Id, text: e.Name })); - optionsPaymentTypeHasMore = optionsPaymentTypeCount > $scope.optionsPaymentType.length; + optionsPaymentDirectionHasMore = optionsPaymentDirectionCount > $scope.optionsPaymentDirection.length; }, (error) => { console.error(error); const message = error.data ? error.data.message : ''; Dialogs.showAlert({ - title: 'PaymentType', + title: 'PaymentDirection', message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), type: AlertTypes.Error }); @@ -402,26 +402,26 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer console.error(error); const message = error.data ? error.data.message : ''; Dialogs.showAlert({ - title: 'PaymentType', + title: 'PaymentDirection', message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), type: AlertTypes.Error }); }); - let optionsCompanyHasMore = true; + let optionsPaymentTypeHasMore = true; - $http.get('/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts/count').then((response) => { - const optionsCompanyCount = response.data.count; - $http.get('/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts').then((response) => { - $scope.optionsCompany = response.data.map(e => ({ + $http.get('/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentTypeController/count').then((response) => { + const optionsPaymentTypeCount = response.data.count; + $http.get('/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentTypeController').then((response) => { + $scope.optionsPaymentType = response.data.map(e => ({ value: e.Id, text: e.Name })); - optionsCompanyHasMore = optionsCompanyCount > $scope.optionsCompany.length; + optionsPaymentTypeHasMore = optionsPaymentTypeCount > $scope.optionsPaymentType.length; }, (error) => { console.error(error); const message = error.data ? error.data.message : ''; Dialogs.showAlert({ - title: 'Company', + title: 'PaymentType', message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), type: AlertTypes.Error }); @@ -430,12 +430,20 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer console.error(error); const message = error.data ? error.data.message : ''; Dialogs.showAlert({ - title: 'Company', + title: 'PaymentType', message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), type: AlertTypes.Error }); }); + $scope.optionsCompanyValue = (optionKey) => { + for (let i = 0; i < $scope.optionsCompany.length; i++) { + if ($scope.optionsCompany[i].value === optionKey) { + return $scope.optionsCompany[i].text; + } + } + return null; + }; $scope.optionsCurrencyValue = (optionKey) => { for (let i = 0; i < $scope.optionsCurrency.length; i++) { if ($scope.optionsCurrency[i].value === optionKey) { @@ -460,13 +468,5 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } return null; }; - $scope.optionsCompanyValue = (optionKey) => { - for (let i = 0; i < $scope.optionsCompany.length; i++) { - if ($scope.optionsCompany[i].value === optionKey) { - return $scope.optionsCompany[i].text; - } - } - return null; - }; //----------------Dropdowns-----------------// }); diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/controller.js b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/controller.js index 6b538f3..140f122 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/controller.js @@ -40,6 +40,9 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle $scope.entity = params.entity ?? {}; $scope.selectedMainEntityKey = params.selectedMainEntityKey; $scope.selectedMainEntityId = params.selectedMainEntityId; + const optionsCompanyMap = new Map(); + params.optionsCompany.forEach(e => optionsCompanyMap.set(e.value, e)); + $scope.optionsCompany = Array.from(optionsCompanyMap.values()); const optionsCurrencyMap = new Map(); params.optionsCurrency.forEach(e => optionsCurrencyMap.set(e.value, e)); $scope.optionsCurrency = Array.from(optionsCurrencyMap.values()); @@ -49,9 +52,6 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle const optionsPaymentTypeMap = new Map(); params.optionsPaymentType.forEach(e => optionsPaymentTypeMap.set(e.value, e)); $scope.optionsPaymentType = Array.from(optionsPaymentTypeMap.values()); - const optionsCompanyMap = new Map(); - params.optionsCompany.forEach(e => optionsCompanyMap.set(e.value, e)); - $scope.optionsCompany = Array.from(optionsCompanyMap.values()); } $scope.filter = () => { @@ -100,6 +100,10 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle const condition = { propertyName: 'Amount', operator: 'EQ', value: entity.Amount }; filter.$filter.conditions.push(condition); } + if (entity.Company !== undefined) { + const condition = { propertyName: 'Company', operator: 'EQ', value: entity.Company }; + filter.$filter.conditions.push(condition); + } if (entity.Currency !== undefined) { const condition = { propertyName: 'Currency', operator: 'EQ', value: entity.Currency }; filter.$filter.conditions.push(condition); @@ -120,10 +124,6 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle const condition = { propertyName: 'Description', operator: 'LIKE', value: `%${entity.Description}%` }; filter.$filter.conditions.push(condition); } - if (entity.Company !== undefined) { - const condition = { propertyName: 'Company', operator: 'EQ', value: entity.Company }; - filter.$filter.conditions.push(condition); - } if (entity.UUID) { const condition = { propertyName: 'UUID', operator: 'LIKE', value: `%${entity.UUID}%` }; filter.$filter.conditions.push(condition); @@ -183,14 +183,14 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle $scope.resetFilter = () => { $scope.entity = {}; $scope.filter(); + lastSearchValuesCompany.clear(); + allValuesCompany.length = 0; lastSearchValuesCurrency.clear(); allValuesCurrency.length = 0; lastSearchValuesPaymentDirection.clear(); allValuesPaymentDirection.length = 0; lastSearchValuesPaymentType.clear(); allValuesPaymentType.length = 0; - lastSearchValuesCompany.clear(); - allValuesCompany.length = 0; }; $scope.cancel = () => { @@ -201,6 +201,95 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle $scope.errorMessage = null; }; + const lastSearchValuesCompany = new Set(); + const allValuesCompany = []; + let loadMoreOptionsCompanyCounter = 0; + $scope.optionsCompanyLoading = false; + $scope.optionsCompanyHasMore = true; + + $scope.loadMoreOptionsCompany = () => { + const limit = 20; + $scope.optionsCompanyLoading = true; + $http.get(`/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController?$limit=${limit}&$offset=${++loadMoreOptionsCompanyCounter * limit}`) + .then((response) => { + const optionValues = allValuesCompany.map(e => e.value); + const resultValues = response.data.map(e => ({ + value: e.Id, + text: e.Name + })); + const newValues = []; + resultValues.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesCompany.push(e); + newValues.push(e); + } + }); + newValues.forEach(e => { + if (!$scope.optionsCompany.find(o => o.value === e.value)) { + $scope.optionsCompany.push(e); + } + }) + $scope.optionsCompanyHasMore = resultValues.length > 0; + $scope.optionsCompanyLoading = false; + }, (error) => { + $scope.optionsCompanyLoading = false; + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Company', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }; + + $scope.onOptionsCompanyChange = (event) => { + if (allValuesCompany.length === 0) { + allValuesCompany.push(...$scope.optionsCompany); + } + if (event.originalEvent.target.value === '') { + allValuesCompany.sort((a, b) => a.text.localeCompare(b.text)); + $scope.optionsCompany = allValuesCompany; + $scope.optionsCompanyHasMore = true; + } else if (isText(event.which)) { + $scope.optionsCompanyHasMore = false; + let cacheHit = false; + Array.from(lastSearchValuesCompany).forEach(e => { + if (event.originalEvent.target.value.startsWith(e)) { + cacheHit = true; + } + }) + if (!cacheHit) { + $http.post('/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController/search', { + conditions: [ + { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } + ] + }).then((response) => { + const optionValues = allValuesCompany.map(e => e.value); + const searchResult = response.data.map(e => ({ + value: e.Id, + text: e.Name + })); + searchResult.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesCompany.push(e); + } + }); + $scope.optionsCompany = allValuesCompany.filter(e => e.text.toLowerCase().startsWith(event.originalEvent.target.value.toLowerCase())); + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Company', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + lastSearchValuesCompany.add(event.originalEvent.target.value); + } + } + }; + const lastSearchValuesCurrency = new Set(); const allValuesCurrency = []; let loadMoreOptionsCurrencyCounter = 0; @@ -210,7 +299,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle $scope.loadMoreOptionsCurrency = () => { const limit = 20; $scope.optionsCurrencyLoading = true; - $http.get(`/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts?$limit=${limit}&$offset=${++loadMoreOptionsCurrencyCounter * limit}`) + $http.get(`/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController?$limit=${limit}&$offset=${++loadMoreOptionsCurrencyCounter * limit}`) .then((response) => { const optionValues = allValuesCurrency.map(e => e.value); const resultValues = response.data.map(e => ({ @@ -260,7 +349,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle } }) if (!cacheHit) { - $http.post('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts/search', { + $http.post('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController/search', { conditions: [ { propertyName: 'Code', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] @@ -299,7 +388,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle $scope.loadMoreOptionsPaymentDirection = () => { const limit = 20; $scope.optionsPaymentDirectionLoading = true; - $http.get(`/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentDirectionController.ts?$limit=${limit}&$offset=${++loadMoreOptionsPaymentDirectionCounter * limit}`) + $http.get(`/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentDirectionController?$limit=${limit}&$offset=${++loadMoreOptionsPaymentDirectionCounter * limit}`) .then((response) => { const optionValues = allValuesPaymentDirection.map(e => e.value); const resultValues = response.data.map(e => ({ @@ -349,7 +438,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle } }) if (!cacheHit) { - $http.post('/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentDirectionController.ts/search', { + $http.post('/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentDirectionController/search', { conditions: [ { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] @@ -388,7 +477,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle $scope.loadMoreOptionsPaymentType = () => { const limit = 20; $scope.optionsPaymentTypeLoading = true; - $http.get(`/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeController.ts?$limit=${limit}&$offset=${++loadMoreOptionsPaymentTypeCounter * limit}`) + $http.get(`/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentTypeController?$limit=${limit}&$offset=${++loadMoreOptionsPaymentTypeCounter * limit}`) .then((response) => { const optionValues = allValuesPaymentType.map(e => e.value); const resultValues = response.data.map(e => ({ @@ -438,7 +527,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle } }) if (!cacheHit) { - $http.post('/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeController.ts/search', { + $http.post('/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentTypeController/search', { conditions: [ { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] @@ -468,95 +557,6 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle } }; - const lastSearchValuesCompany = new Set(); - const allValuesCompany = []; - let loadMoreOptionsCompanyCounter = 0; - $scope.optionsCompanyLoading = false; - $scope.optionsCompanyHasMore = true; - - $scope.loadMoreOptionsCompany = () => { - const limit = 20; - $scope.optionsCompanyLoading = true; - $http.get(`/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts?$limit=${limit}&$offset=${++loadMoreOptionsCompanyCounter * limit}`) - .then((response) => { - const optionValues = allValuesCompany.map(e => e.value); - const resultValues = response.data.map(e => ({ - value: e.Id, - text: e.Name - })); - const newValues = []; - resultValues.forEach(e => { - if (!optionValues.includes(e.value)) { - allValuesCompany.push(e); - newValues.push(e); - } - }); - newValues.forEach(e => { - if (!$scope.optionsCompany.find(o => o.value === e.value)) { - $scope.optionsCompany.push(e); - } - }) - $scope.optionsCompanyHasMore = resultValues.length > 0; - $scope.optionsCompanyLoading = false; - }, (error) => { - $scope.optionsCompanyLoading = false; - console.error(error); - const message = error.data ? error.data.message : ''; - Dialogs.showAlert({ - title: 'Company', - message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), - type: AlertTypes.Error - }); - }); - }; - - $scope.onOptionsCompanyChange = (event) => { - if (allValuesCompany.length === 0) { - allValuesCompany.push(...$scope.optionsCompany); - } - if (event.originalEvent.target.value === '') { - allValuesCompany.sort((a, b) => a.text.localeCompare(b.text)); - $scope.optionsCompany = allValuesCompany; - $scope.optionsCompanyHasMore = true; - } else if (isText(event.which)) { - $scope.optionsCompanyHasMore = false; - let cacheHit = false; - Array.from(lastSearchValuesCompany).forEach(e => { - if (event.originalEvent.target.value.startsWith(e)) { - cacheHit = true; - } - }) - if (!cacheHit) { - $http.post('/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts/search', { - conditions: [ - { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } - ] - }).then((response) => { - const optionValues = allValuesCompany.map(e => e.value); - const searchResult = response.data.map(e => ({ - value: e.Id, - text: e.Name - })); - searchResult.forEach(e => { - if (!optionValues.includes(e.value)) { - allValuesCompany.push(e); - } - }); - $scope.optionsCompany = allValuesCompany.filter(e => e.text.toLowerCase().startsWith(event.originalEvent.target.value.toLowerCase())); - }, (error) => { - console.error(error); - const message = error.data ? error.data.message : ''; - Dialogs.showAlert({ - title: 'Company', - message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), - type: AlertTypes.Error - }); - }); - lastSearchValuesCompany.add(event.originalEvent.target.value); - } - } - }; - function isText(keycode) { if ((keycode >= 48 && keycode <= 90) || (keycode >= 96 && keycode <= 111) || (keycode >= 186 && keycode <= 222) || [8, 46, 173].includes(keycode)) return true; return false; diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/index.html b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/index.html index c0a2c3e..6dbd0f8 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/index.html +++ b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/index.html @@ -137,6 +137,27 @@
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COMPANY' | t }} +
+
+ + + + + More Options + + +
+
{{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_CURRENCY' | t }} @@ -234,27 +255,6 @@
- -
- {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COMPANY' | t }} -
-
- - - - - More Options - - -
-
{{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_UUID' | t }} diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/controller.js b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/controller.js index 007e57b..594ffe6 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/controller.js @@ -1,6 +1,6 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) .config(['EntityServiceProvider', (EntityServiceProvider) => { - EntityServiceProvider.baseUrl = '/services/ts/codbex-payments/gen/codbex-payments/api/PaymentRecord/PaymentRecordController.ts'; + EntityServiceProvider.baseUrl = '/services/java/codbex-payments/gen/codbex_payments/api/paymentrecord/PaymentRecordController'; }]) .controller('PageController', ($scope, $http, ViewParameters, LocaleService, EntityService) => { const Dialogs = new DialogHub(); @@ -49,6 +49,9 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.entity = params.entity; $scope.selectedMainEntityKey = params.selectedMainEntityKey; $scope.selectedMainEntityId = params.selectedMainEntityId; + const optionsCompanyMap = new Map(); + params.optionsCompany?.forEach(e => optionsCompanyMap.set(e.value, e)); + $scope.optionsCompany = Array.from(optionsCompanyMap.values()); const optionsCurrencyMap = new Map(); params.optionsCurrency?.forEach(e => optionsCurrencyMap.set(e.value, e)); $scope.optionsCurrency = Array.from(optionsCurrencyMap.values()); @@ -58,9 +61,6 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer const optionsPaymentTypeMap = new Map(); params.optionsPaymentType?.forEach(e => optionsPaymentTypeMap.set(e.value, e)); $scope.optionsPaymentType = Array.from(optionsPaymentTypeMap.values()); - const optionsCompanyMap = new Map(); - params.optionsCompany?.forEach(e => optionsCompanyMap.set(e.value, e)); - $scope.optionsCompany = Array.from(optionsCompanyMap.values()); } $scope.create = () => { @@ -104,11 +104,118 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer }); }; - $scope.serviceCurrency = '/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts'; + $scope.serviceCompany = '/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController'; + + $scope.optionsCompany = []; + + $http.get('/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController').then((response) => { + $scope.optionsCompany = response.data.map(e => ({ + value: e.Id, + text: e.Name + })); + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Company', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + + const lastSearchValuesCompany = new Set(); + const allValuesCompany = []; + let loadMoreOptionsCompanyCounter = 0; + $scope.optionsCompanyLoading = false; + $scope.optionsCompanyHasMore = true; + + $scope.loadMoreOptionsCompany = () => { + const limit = 20; + $scope.optionsCompanyLoading = true; + $http.get(`/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController?$limit=${limit}&$offset=${++loadMoreOptionsCompanyCounter * limit}`) + .then((response) => { + const optionValues = allValuesCompany.map(e => e.value); + const resultValues = response.data.map(e => ({ + value: e.Id, + text: e.Name + })); + const newValues = []; + resultValues.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesCompany.push(e); + newValues.push(e); + } + }); + newValues.forEach(e => { + if (!$scope.optionsCompany.find(o => o.value === e.value)) { + $scope.optionsCompany.push(e); + } + }) + $scope.optionsCompanyHasMore = resultValues.length > 0; + $scope.optionsCompanyLoading = false; + }, (error) => { + $scope.optionsCompanyLoading = false; + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Company', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }; + + $scope.onOptionsCompanyChange = (event) => { + if (allValuesCompany.length === 0) { + allValuesCompany.push(...$scope.optionsCompany); + } + if (event.originalEvent.target.value === '') { + allValuesCompany.sort((a, b) => a.text.localeCompare(b.text)); + $scope.optionsCompany = allValuesCompany; + $scope.optionsCompanyHasMore = true; + } else if (isText(event.which)) { + $scope.optionsCompanyHasMore = false; + let cacheHit = false; + Array.from(lastSearchValuesCompany).forEach(e => { + if (event.originalEvent.target.value.startsWith(e)) { + cacheHit = true; + } + }) + if (!cacheHit) { + $http.post('/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController/search', { + conditions: [ + { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } + ] + }).then((response) => { + const optionValues = allValuesCompany.map(e => e.value); + const searchResult = response.data.map(e => ({ + value: e.Id, + text: e.Name + })); + searchResult.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesCompany.push(e); + } + }); + $scope.optionsCompany = allValuesCompany.filter(e => e.text.toLowerCase().startsWith(event.originalEvent.target.value.toLowerCase())); + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Company', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + lastSearchValuesCompany.add(event.originalEvent.target.value); + } + } + }; + $scope.serviceCurrency = '/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController'; $scope.optionsCurrency = []; - $http.get('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts').then((response) => { + $http.get('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController').then((response) => { $scope.optionsCurrency = response.data.map(e => ({ value: e.Id, text: e.Code @@ -132,7 +239,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.loadMoreOptionsCurrency = () => { const limit = 20; $scope.optionsCurrencyLoading = true; - $http.get(`/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts?$limit=${limit}&$offset=${++loadMoreOptionsCurrencyCounter * limit}`) + $http.get(`/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController?$limit=${limit}&$offset=${++loadMoreOptionsCurrencyCounter * limit}`) .then((response) => { const optionValues = allValuesCurrency.map(e => e.value); const resultValues = response.data.map(e => ({ @@ -182,7 +289,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } }) if (!cacheHit) { - $http.post('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts/search', { + $http.post('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController/search', { conditions: [ { propertyName: 'Code', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] @@ -211,11 +318,11 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } } }; - $scope.servicePaymentDirection = '/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentDirectionController.ts'; + $scope.servicePaymentDirection = '/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentDirectionController'; $scope.optionsPaymentDirection = []; - $http.get('/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentDirectionController.ts').then((response) => { + $http.get('/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentDirectionController').then((response) => { $scope.optionsPaymentDirection = response.data.map(e => ({ value: e.Id, text: e.Name @@ -239,7 +346,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.loadMoreOptionsPaymentDirection = () => { const limit = 20; $scope.optionsPaymentDirectionLoading = true; - $http.get(`/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentDirectionController.ts?$limit=${limit}&$offset=${++loadMoreOptionsPaymentDirectionCounter * limit}`) + $http.get(`/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentDirectionController?$limit=${limit}&$offset=${++loadMoreOptionsPaymentDirectionCounter * limit}`) .then((response) => { const optionValues = allValuesPaymentDirection.map(e => e.value); const resultValues = response.data.map(e => ({ @@ -289,7 +396,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } }) if (!cacheHit) { - $http.post('/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentDirectionController.ts/search', { + $http.post('/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentDirectionController/search', { conditions: [ { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] @@ -318,11 +425,11 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } } }; - $scope.servicePaymentType = '/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeController.ts'; + $scope.servicePaymentType = '/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentTypeController'; $scope.optionsPaymentType = []; - $http.get('/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeController.ts').then((response) => { + $http.get('/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentTypeController').then((response) => { $scope.optionsPaymentType = response.data.map(e => ({ value: e.Id, text: e.Name @@ -346,7 +453,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.loadMoreOptionsPaymentType = () => { const limit = 20; $scope.optionsPaymentTypeLoading = true; - $http.get(`/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeController.ts?$limit=${limit}&$offset=${++loadMoreOptionsPaymentTypeCounter * limit}`) + $http.get(`/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentTypeController?$limit=${limit}&$offset=${++loadMoreOptionsPaymentTypeCounter * limit}`) .then((response) => { const optionValues = allValuesPaymentType.map(e => e.value); const resultValues = response.data.map(e => ({ @@ -396,7 +503,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } }) if (!cacheHit) { - $http.post('/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeController.ts/search', { + $http.post('/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentTypeController/search', { conditions: [ { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] @@ -425,113 +532,6 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } } }; - $scope.serviceCompany = '/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts'; - - $scope.optionsCompany = []; - - $http.get('/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts').then((response) => { - $scope.optionsCompany = response.data.map(e => ({ - value: e.Id, - text: e.Name - })); - }, (error) => { - console.error(error); - const message = error.data ? error.data.message : ''; - Dialogs.showAlert({ - title: 'Company', - message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), - type: AlertTypes.Error - }); - }); - - const lastSearchValuesCompany = new Set(); - const allValuesCompany = []; - let loadMoreOptionsCompanyCounter = 0; - $scope.optionsCompanyLoading = false; - $scope.optionsCompanyHasMore = true; - - $scope.loadMoreOptionsCompany = () => { - const limit = 20; - $scope.optionsCompanyLoading = true; - $http.get(`/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts?$limit=${limit}&$offset=${++loadMoreOptionsCompanyCounter * limit}`) - .then((response) => { - const optionValues = allValuesCompany.map(e => e.value); - const resultValues = response.data.map(e => ({ - value: e.Id, - text: e.Name - })); - const newValues = []; - resultValues.forEach(e => { - if (!optionValues.includes(e.value)) { - allValuesCompany.push(e); - newValues.push(e); - } - }); - newValues.forEach(e => { - if (!$scope.optionsCompany.find(o => o.value === e.value)) { - $scope.optionsCompany.push(e); - } - }) - $scope.optionsCompanyHasMore = resultValues.length > 0; - $scope.optionsCompanyLoading = false; - }, (error) => { - $scope.optionsCompanyLoading = false; - console.error(error); - const message = error.data ? error.data.message : ''; - Dialogs.showAlert({ - title: 'Company', - message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), - type: AlertTypes.Error - }); - }); - }; - - $scope.onOptionsCompanyChange = (event) => { - if (allValuesCompany.length === 0) { - allValuesCompany.push(...$scope.optionsCompany); - } - if (event.originalEvent.target.value === '') { - allValuesCompany.sort((a, b) => a.text.localeCompare(b.text)); - $scope.optionsCompany = allValuesCompany; - $scope.optionsCompanyHasMore = true; - } else if (isText(event.which)) { - $scope.optionsCompanyHasMore = false; - let cacheHit = false; - Array.from(lastSearchValuesCompany).forEach(e => { - if (event.originalEvent.target.value.startsWith(e)) { - cacheHit = true; - } - }) - if (!cacheHit) { - $http.post('/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts/search', { - conditions: [ - { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } - ] - }).then((response) => { - const optionValues = allValuesCompany.map(e => e.value); - const searchResult = response.data.map(e => ({ - value: e.Id, - text: e.Name - })); - searchResult.forEach(e => { - if (!optionValues.includes(e.value)) { - allValuesCompany.push(e); - } - }); - $scope.optionsCompany = allValuesCompany.filter(e => e.text.toLowerCase().startsWith(event.originalEvent.target.value.toLowerCase())); - }, (error) => { - console.error(error); - const message = error.data ? error.data.message : ''; - Dialogs.showAlert({ - title: 'Company', - message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), - type: AlertTypes.Error - }); - }); - lastSearchValuesCompany.add(event.originalEvent.target.value); - } - } - }; function isText(keycode) { if ((keycode >= 48 && keycode <= 90) || (keycode >= 96 && keycode <= 111) || (keycode >= 186 && keycode <= 222) || [8, 46, 173].includes(keycode)) return true; return false; diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/index.html b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/index.html index e86cf48..0943693 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/index.html +++ b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/index.html @@ -132,6 +132,29 @@
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COMPANY' | t }} +
+
+ + + + + More Options + + +
+
{{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_CURRENCY' | t }} @@ -243,29 +266,6 @@
- -
- {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COMPANY' | t }} -
-
- - - - - More Options - - -
-
{{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_UUID' | t }} diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/index.html b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/index.html index 1bc0682..1867f80 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/index.html +++ b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/index.html @@ -45,12 +45,12 @@ {{next.CounterpartyIBAN}} | {{next.CounterpartyName}} | {{next.Amount}} | + {{optionsCompanyValue(next.Company)}} | {{optionsCurrencyValue(next.Currency)}} | {{optionsPaymentDirectionValue(next.PaymentDirection)}} | {{optionsPaymentTypeValue(next.PaymentType)}} | {{next.Reason}} | {{next.Description}} | - {{optionsCompanyValue(next.Company)}} | {{next.UUID}} | {{next.Reference}} | {{next.Deleted}} | diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/controller.js b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/controller.js index d2e22b9..74f97f1 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/controller.js @@ -1,6 +1,6 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) .config(["EntityServiceProvider", (EntityServiceProvider) => { - EntityServiceProvider.baseUrl = '/services/ts/codbex-payments/gen/codbex-payments/api/PaymentRecord/PaymentRecordController.ts'; + EntityServiceProvider.baseUrl = '/services/java/codbex-payments/gen/codbex_payments/api/paymentrecord/PaymentRecordController'; }]) .controller('PageController', ($scope, $http, Extensions, LocaleService, EntityService) => { const Dialogs = new DialogHub(); @@ -50,10 +50,10 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer Dialogs.addMessageListener({ topic: 'codbex-payments.PaymentRecord.PaymentRecord.clearDetails', handler: () => { $scope.$evalAsync(() => { $scope.entity = {}; + $scope.optionsCompany = []; $scope.optionsCurrency = []; $scope.optionsPaymentDirection = []; $scope.optionsPaymentType = []; - $scope.optionsCompany = []; $scope.action = 'select'; }); }}); @@ -75,20 +75,20 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer data.entity.UpdatedAt = new Date(data.entity.UpdatedAt); } $scope.entity = data.entity; + $scope.optionsCompany = data.optionsCompany; $scope.optionsCurrency = data.optionsCurrency; $scope.optionsPaymentDirection = data.optionsPaymentDirection; $scope.optionsPaymentType = data.optionsPaymentType; - $scope.optionsCompany = data.optionsCompany; $scope.action = 'select'; }); }}); Dialogs.addMessageListener({ topic: 'codbex-payments.PaymentRecord.PaymentRecord.createEntity', handler: (data) => { $scope.$evalAsync(() => { $scope.entity = {}; + $scope.optionsCompany = data.optionsCompany; $scope.optionsCurrency = data.optionsCurrency; $scope.optionsPaymentDirection = data.optionsPaymentDirection; $scope.optionsPaymentType = data.optionsPaymentType; - $scope.optionsCompany = data.optionsCompany; $scope.action = 'create'; }); }}); @@ -110,18 +110,18 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer data.entity.UpdatedAt = new Date(data.entity.UpdatedAt); } $scope.entity = data.entity; + $scope.optionsCompany = data.optionsCompany; $scope.optionsCurrency = data.optionsCurrency; $scope.optionsPaymentDirection = data.optionsPaymentDirection; $scope.optionsPaymentType = data.optionsPaymentType; - $scope.optionsCompany = data.optionsCompany; $scope.action = 'update'; }); }}); - $scope.serviceCurrency = '/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts'; - $scope.servicePaymentDirection = '/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentDirectionController.ts'; - $scope.servicePaymentType = '/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeController.ts'; - $scope.serviceCompany = '/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts'; + $scope.serviceCompany = '/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController'; + $scope.serviceCurrency = '/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController'; + $scope.servicePaymentDirection = '/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentDirectionController'; + $scope.servicePaymentType = '/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentTypeController'; //-----------------Events-------------------// @@ -179,9 +179,9 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer }); }; - $scope.createCurrency = () => { + $scope.createCompany = () => { Dialogs.showWindow({ - id: 'Currency-details', + id: 'Company-details', params: { action: 'create', entity: {}, @@ -189,9 +189,9 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer closeButton: false }); }; - $scope.createPaymentDirection = () => { + $scope.createCurrency = () => { Dialogs.showWindow({ - id: 'PaymentDirection-details', + id: 'Currency-details', params: { action: 'create', entity: {}, @@ -199,9 +199,9 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer closeButton: false }); }; - $scope.createPaymentType = () => { + $scope.createPaymentDirection = () => { Dialogs.showWindow({ - id: 'PaymentType-details', + id: 'PaymentDirection-details', params: { action: 'create', entity: {}, @@ -209,9 +209,9 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer closeButton: false }); }; - $scope.createCompany = () => { + $scope.createPaymentType = () => { Dialogs.showWindow({ - id: 'Company-details', + id: 'PaymentType-details', params: { action: 'create', entity: {}, @@ -226,6 +226,113 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer //----------------Dropdowns-----------------// + const lastSearchValuesCompany = new Set(); + const allValuesCompany = []; + let loadMoreOptionsCompanyCounter = 0; + $scope.optionsCompanyLoading = false; + $scope.optionsCompanyHasMore = true; + + $scope.loadMoreOptionsCompany = () => { + const limit = 20; + $scope.optionsCompanyLoading = true; + $http.get(`/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController?$limit=${limit}&$offset=${++loadMoreOptionsCompanyCounter * limit}`) + .then((response) => { + const optionValues = allValuesCompany.map(e => e.value); + const resultValues = response.data.map(e => ({ + value: e.Id, + text: e.Name + })); + const newValues = []; + resultValues.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesCompany.push(e); + newValues.push(e); + } + }); + newValues.forEach(e => { + if (!$scope.optionsCompany.find(o => o.value === e.value)) { + $scope.optionsCompany.push(e); + } + }) + $scope.optionsCompanyHasMore = resultValues.length > 0; + $scope.optionsCompanyLoading = false; + }, (error) => { + $scope.optionsCompanyLoading = false; + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Company', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }; + + $scope.onOptionsCompanyChange = (event) => { + if (allValuesCompany.length === 0) { + allValuesCompany.push(...$scope.optionsCompany); + } + if (event.originalEvent.target.value === '') { + allValuesCompany.sort((a, b) => a.text.localeCompare(b.text)); + $scope.optionsCompany = allValuesCompany; + $scope.optionsCompanyHasMore = true; + } else if (isText(event.which)) { + $scope.optionsCompanyHasMore = false; + let cacheHit = false; + Array.from(lastSearchValuesCompany).forEach(e => { + if (event.originalEvent.target.value.startsWith(e)) { + cacheHit = true; + } + }) + if (!cacheHit) { + $http.post('/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController/search', { + conditions: [ + { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } + ] + }).then((response) => { + const optionValues = allValuesCompany.map(e => e.value); + const searchResult = response.data.map(e => ({ + value: e.Id, + text: e.Name + })); + searchResult.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesCompany.push(e); + } + }); + $scope.optionsCompany = allValuesCompany.filter(e => e.text.toLowerCase().startsWith(event.originalEvent.target.value.toLowerCase())); + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Company', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + lastSearchValuesCompany.add(event.originalEvent.target.value); + } + } + }; + + $scope.refreshCompany = () => { + $scope.optionsCompany = []; + $http.get('/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController').then((response) => { + $scope.optionsCompany = response.data.map(e => ({ + value: e.Id, + text: e.Name + })); + allValuesCompany.length === 0; + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Company', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }; const lastSearchValuesCurrency = new Set(); const allValuesCurrency = []; let loadMoreOptionsCurrencyCounter = 0; @@ -235,7 +342,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.loadMoreOptionsCurrency = () => { const limit = 20; $scope.optionsCurrencyLoading = true; - $http.get(`/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts?$limit=${limit}&$offset=${++loadMoreOptionsCurrencyCounter * limit}`) + $http.get(`/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController?$limit=${limit}&$offset=${++loadMoreOptionsCurrencyCounter * limit}`) .then((response) => { const optionValues = allValuesCurrency.map(e => e.value); const resultValues = response.data.map(e => ({ @@ -285,7 +392,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } }) if (!cacheHit) { - $http.post('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts/search', { + $http.post('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController/search', { conditions: [ { propertyName: 'Code', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] @@ -317,7 +424,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.refreshCurrency = () => { $scope.optionsCurrency = []; - $http.get('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts').then((response) => { + $http.get('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController').then((response) => { $scope.optionsCurrency = response.data.map(e => ({ value: e.Id, text: e.Code @@ -342,7 +449,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.loadMoreOptionsPaymentDirection = () => { const limit = 20; $scope.optionsPaymentDirectionLoading = true; - $http.get(`/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentDirectionController.ts?$limit=${limit}&$offset=${++loadMoreOptionsPaymentDirectionCounter * limit}`) + $http.get(`/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentDirectionController?$limit=${limit}&$offset=${++loadMoreOptionsPaymentDirectionCounter * limit}`) .then((response) => { const optionValues = allValuesPaymentDirection.map(e => e.value); const resultValues = response.data.map(e => ({ @@ -392,7 +499,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } }) if (!cacheHit) { - $http.post('/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentDirectionController.ts/search', { + $http.post('/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentDirectionController/search', { conditions: [ { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] @@ -424,7 +531,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.refreshPaymentDirection = () => { $scope.optionsPaymentDirection = []; - $http.get('/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentDirectionController.ts').then((response) => { + $http.get('/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentDirectionController').then((response) => { $scope.optionsPaymentDirection = response.data.map(e => ({ value: e.Id, text: e.Name @@ -449,7 +556,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.loadMoreOptionsPaymentType = () => { const limit = 20; $scope.optionsPaymentTypeLoading = true; - $http.get(`/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeController.ts?$limit=${limit}&$offset=${++loadMoreOptionsPaymentTypeCounter * limit}`) + $http.get(`/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentTypeController?$limit=${limit}&$offset=${++loadMoreOptionsPaymentTypeCounter * limit}`) .then((response) => { const optionValues = allValuesPaymentType.map(e => e.value); const resultValues = response.data.map(e => ({ @@ -499,7 +606,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } }) if (!cacheHit) { - $http.post('/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeController.ts/search', { + $http.post('/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentTypeController/search', { conditions: [ { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] @@ -531,7 +638,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.refreshPaymentType = () => { $scope.optionsPaymentType = []; - $http.get('/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeController.ts').then((response) => { + $http.get('/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentTypeController').then((response) => { $scope.optionsPaymentType = response.data.map(e => ({ value: e.Id, text: e.Name @@ -547,113 +654,6 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer }); }); }; - const lastSearchValuesCompany = new Set(); - const allValuesCompany = []; - let loadMoreOptionsCompanyCounter = 0; - $scope.optionsCompanyLoading = false; - $scope.optionsCompanyHasMore = true; - - $scope.loadMoreOptionsCompany = () => { - const limit = 20; - $scope.optionsCompanyLoading = true; - $http.get(`/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts?$limit=${limit}&$offset=${++loadMoreOptionsCompanyCounter * limit}`) - .then((response) => { - const optionValues = allValuesCompany.map(e => e.value); - const resultValues = response.data.map(e => ({ - value: e.Id, - text: e.Name - })); - const newValues = []; - resultValues.forEach(e => { - if (!optionValues.includes(e.value)) { - allValuesCompany.push(e); - newValues.push(e); - } - }); - newValues.forEach(e => { - if (!$scope.optionsCompany.find(o => o.value === e.value)) { - $scope.optionsCompany.push(e); - } - }) - $scope.optionsCompanyHasMore = resultValues.length > 0; - $scope.optionsCompanyLoading = false; - }, (error) => { - $scope.optionsCompanyLoading = false; - console.error(error); - const message = error.data ? error.data.message : ''; - Dialogs.showAlert({ - title: 'Company', - message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), - type: AlertTypes.Error - }); - }); - }; - - $scope.onOptionsCompanyChange = (event) => { - if (allValuesCompany.length === 0) { - allValuesCompany.push(...$scope.optionsCompany); - } - if (event.originalEvent.target.value === '') { - allValuesCompany.sort((a, b) => a.text.localeCompare(b.text)); - $scope.optionsCompany = allValuesCompany; - $scope.optionsCompanyHasMore = true; - } else if (isText(event.which)) { - $scope.optionsCompanyHasMore = false; - let cacheHit = false; - Array.from(lastSearchValuesCompany).forEach(e => { - if (event.originalEvent.target.value.startsWith(e)) { - cacheHit = true; - } - }) - if (!cacheHit) { - $http.post('/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts/search', { - conditions: [ - { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } - ] - }).then((response) => { - const optionValues = allValuesCompany.map(e => e.value); - const searchResult = response.data.map(e => ({ - value: e.Id, - text: e.Name - })); - searchResult.forEach(e => { - if (!optionValues.includes(e.value)) { - allValuesCompany.push(e); - } - }); - $scope.optionsCompany = allValuesCompany.filter(e => e.text.toLowerCase().startsWith(event.originalEvent.target.value.toLowerCase())); - }, (error) => { - console.error(error); - const message = error.data ? error.data.message : ''; - Dialogs.showAlert({ - title: 'Company', - message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), - type: AlertTypes.Error - }); - }); - lastSearchValuesCompany.add(event.originalEvent.target.value); - } - } - }; - - $scope.refreshCompany = () => { - $scope.optionsCompany = []; - $http.get('/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts').then((response) => { - $scope.optionsCompany = response.data.map(e => ({ - value: e.Id, - text: e.Name - })); - allValuesCompany.length === 0; - }, (error) => { - console.error(error); - const message = error.data ? error.data.message : ''; - Dialogs.showAlert({ - title: 'Company', - message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), - type: AlertTypes.Error - }); - }); - }; function isText(keycode) { if ((keycode >= 48 && keycode <= 90) || (keycode >= 96 && keycode <= 111) || (keycode >= 186 && keycode <= 222) || [8, 46, 173].includes(keycode)) return true; diff --git a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/index.html b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/index.html index 8456960..12f0117 100644 --- a/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/index.html +++ b/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/index.html @@ -130,6 +130,33 @@
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COMPANY' | t }} +
+
+ + + + + More Options + + +
+
+ + +
+
{{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_CURRENCY' | t }} @@ -253,33 +280,6 @@
- -
- {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COMPANY' | t }} -
-
- - - - - More Options - - -
-
- - -
-
{{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_UUID' | t }} diff --git a/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/controller.js b/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/controller.js index 331c825..d1bc2c8 100644 --- a/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/controller.js @@ -1,6 +1,6 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) .config(['EntityServiceProvider', (EntityServiceProvider) => { - EntityServiceProvider.baseUrl = '/services/ts/codbex-payments/gen/codbex-payments/api/PaymentRecord/PaymentRecordController.ts'; + EntityServiceProvider.baseUrl = '/services/java/codbex-payments/gen/codbex_payments/api/paymentrecord/PaymentRecordController'; }]) .controller('PageController', ($scope, $http, EntityService, LocaleService, Extensions) => { const Dialogs = new DialogHub(); @@ -21,10 +21,10 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer path: action.path, params: { filterEntity: $scope.filterEntity, + optionsCompany: $scope.optionsCompany, optionsCurrency: $scope.optionsCurrency, optionsPaymentDirection: $scope.optionsPaymentDirection, optionsPaymentType: $scope.optionsPaymentType, - optionsCompany: $scope.optionsCompany, }, maxWidth: action.maxWidth, maxHeight: action.maxHeight, @@ -135,10 +135,10 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer params: { action: "select", entity: entity, + optionsCompany: $scope.optionsCompany, optionsCurrency: $scope.optionsCurrency, optionsPaymentDirection: $scope.optionsPaymentDirection, optionsPaymentType: $scope.optionsPaymentType, - optionsCompany: $scope.optionsCompany, }, }); }; @@ -148,52 +148,52 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer id: 'PaymentRecord-Report-filter', params: { entity: $scope.filterEntity, + optionsCompany: $scope.optionsCompany, optionsCurrency: $scope.optionsCurrency, optionsPaymentDirection: $scope.optionsPaymentDirection, optionsPaymentType: $scope.optionsPaymentType, - optionsCompany: $scope.optionsCompany, }, }); }; //----------------Dropdowns-----------------// + $scope.optionsCompany = []; $scope.optionsCurrency = []; $scope.optionsPaymentDirection = []; $scope.optionsPaymentType = []; - $scope.optionsCompany = []; - $http.get('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts').then((response) => { - $scope.optionsCurrency = response.data.map(e => ({ + $http.get('/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController').then((response) => { + $scope.optionsCompany = response.data.map(e => ({ value: e.Id, - text: e.Code + text: e.Name })); }, (error) => { console.error(error); const message = error.data ? error.data.message : ''; Dialogs.showAlert({ - title: 'Currency', + title: 'Company', message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), type: AlertTypes.Error }); }); - $http.get('/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentDirectionController.ts').then((response) => { - $scope.optionsPaymentDirection = response.data.map(e => ({ + $http.get('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController').then((response) => { + $scope.optionsCurrency = response.data.map(e => ({ value: e.Id, - text: e.Name + text: e.Code })); }, (error) => { console.error(error); const message = error.data ? error.data.message : ''; Dialogs.showAlert({ - title: 'PaymentDirection', + title: 'Currency', message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), type: AlertTypes.Error }); }); - $http.get('/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeController.ts').then((response) => { - $scope.optionsPaymentType = response.data.map(e => ({ + $http.get('/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentDirectionController').then((response) => { + $scope.optionsPaymentDirection = response.data.map(e => ({ value: e.Id, text: e.Name })); @@ -201,14 +201,14 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer console.error(error); const message = error.data ? error.data.message : ''; Dialogs.showAlert({ - title: 'PaymentType', + title: 'PaymentDirection', message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), type: AlertTypes.Error }); }); - $http.get('/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts').then((response) => { - $scope.optionsCompany = response.data.map(e => ({ + $http.get('/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentTypeController').then((response) => { + $scope.optionsPaymentType = response.data.map(e => ({ value: e.Id, text: e.Name })); @@ -216,11 +216,19 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer console.error(error); const message = error.data ? error.data.message : ''; Dialogs.showAlert({ - title: 'Company', + title: 'PaymentType', message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), type: AlertTypes.Error }); }); + $scope.optionsCompanyValue = (optionKey) => { + for (let i = 0; i < $scope.optionsCompany.length; i++) { + if ($scope.optionsCompany[i].value === optionKey) { + return $scope.optionsCompany[i].text; + } + } + return null; + }; $scope.optionsCurrencyValue = (optionKey) => { for (let i = 0; i < $scope.optionsCurrency.length; i++) { if ($scope.optionsCurrency[i].value === optionKey) { @@ -245,13 +253,5 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } return null; }; - $scope.optionsCompanyValue = (optionKey) => { - for (let i = 0; i < $scope.optionsCompany.length; i++) { - if ($scope.optionsCompany[i].value === optionKey) { - return $scope.optionsCompany[i].text; - } - } - return null; - }; //----------------Dropdowns-----------------// }); \ No newline at end of file diff --git a/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-filter/controller.js b/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-filter/controller.js index c5145c9..9a1a78c 100644 --- a/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-filter/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-filter/controller.js @@ -40,10 +40,10 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle $scope.entity = params.entity ?? {}; $scope.selectedMainEntityKey = params.selectedMainEntityKey; $scope.selectedMainEntityId = params.selectedMainEntityId; + $scope.optionsCompany = params.optionsCompany; $scope.optionsCurrency = params.optionsCurrency; $scope.optionsPaymentDirection = params.optionsPaymentDirection; $scope.optionsPaymentType = params.optionsPaymentType; - $scope.optionsCompany = params.optionsCompany; } $scope.filter = () => { @@ -92,6 +92,10 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle const condition = { propertyName: 'Amount', operator: 'EQ', value: entity.Amount }; filter.$filter.conditions.push(condition); } + if (entity.Company !== undefined) { + const condition = { propertyName: 'Company', operator: 'EQ', value: entity.Company }; + filter.$filter.conditions.push(condition); + } if (entity.Currency !== undefined) { const condition = { propertyName: 'Currency', operator: 'EQ', value: entity.Currency }; filter.$filter.conditions.push(condition); @@ -112,10 +116,6 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle const condition = { propertyName: 'Description', operator: 'LIKE', value: `%${entity.Description}%` }; filter.$filter.conditions.push(condition); } - if (entity.Company !== undefined) { - const condition = { propertyName: 'Company', operator: 'EQ', value: entity.Company }; - filter.$filter.conditions.push(condition); - } if (entity.UUID) { const condition = { propertyName: 'UUID', operator: 'LIKE', value: `%${entity.UUID}%` }; filter.$filter.conditions.push(condition); diff --git a/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-filter/index.html b/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-filter/index.html index 5e4d6fa..84a660f 100644 --- a/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-filter/index.html +++ b/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-filter/index.html @@ -138,6 +138,21 @@
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COMPANY' | t }} +
+
+ + +
+
{{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_CURRENCY' | t }} @@ -217,21 +232,6 @@
- -
- {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COMPANY' | t }} -
-
- - -
-
{{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_UUID' | t }} diff --git a/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-print/controller.js b/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-print/controller.js index bf19960..91f1a9d 100644 --- a/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-print/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-print/controller.js @@ -1,6 +1,6 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) .config(['EntityServiceProvider', (EntityServiceProvider) => { - EntityServiceProvider.baseUrl = '/services/ts/codbex-payments/gen/codbex-payments/api/PaymentRecord/PaymentRecordController.ts'; + EntityServiceProvider.baseUrl = '/services/java/codbex-payments/gen/codbex_payments/api/paymentrecord/PaymentRecordController'; }]) .controller('PageController', ($scope, EntityService, LocaleService, ViewParameters) => { const Dialogs = new DialogHub(); @@ -52,6 +52,10 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer const condition = { propertyName: 'Amount', operator: 'EQ', value: entity.Amount }; filter.$filter.conditions.push(condition); } + if (entity.Company !== undefined) { + const condition = { propertyName: 'Company', operator: 'EQ', value: entity.Company }; + filter.$filter.conditions.push(condition); + } if (entity.Currency !== undefined) { const condition = { propertyName: 'Currency', operator: 'EQ', value: entity.Currency }; filter.$filter.conditions.push(condition); @@ -72,10 +76,6 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer const condition = { propertyName: 'Description', operator: 'LIKE', value: `%${entity.Description}%` }; filter.$filter.conditions.push(condition); } - if (entity.Company !== undefined) { - const condition = { propertyName: 'Company', operator: 'EQ', value: entity.Company }; - filter.$filter.conditions.push(condition); - } if (entity.UUID) { const condition = { propertyName: 'UUID', operator: 'LIKE', value: `%${entity.UUID}%` }; filter.$filter.conditions.push(condition); @@ -127,10 +127,10 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.filter = filter; + $scope.optionsCompany = params.optionsCompany; $scope.optionsCurrency = params.optionsCurrency; $scope.optionsPaymentDirection = params.optionsPaymentDirection; $scope.optionsPaymentType = params.optionsPaymentType; - $scope.optionsCompany = params.optionsCompany; } $scope.loadPage = (filter) => { @@ -178,6 +178,14 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer }; $scope.loadPage($scope.filter); + $scope.optionsCompanyValue = (optionKey) => { + for (let i = 0; i < $scope.optionsCompany.length; i++) { + if ($scope.optionsCompany[i].value === optionKey) { + return $scope.optionsCompany[i].text; + } + } + return null; + }; $scope.optionsCurrencyValue = (optionKey) => { for (let i = 0; i < $scope.optionsCurrency.length; i++) { if ($scope.optionsCurrency[i].value === optionKey) { @@ -202,14 +210,6 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } return null; }; - $scope.optionsCompanyValue = (optionKey) => { - for (let i = 0; i < $scope.optionsCompany.length; i++) { - if ($scope.optionsCompany[i].value === optionKey) { - return $scope.optionsCompany[i].text; - } - } - return null; - }; window.onafterprint = () => { Dialogs.closeWindow({ path: viewData.path }); } diff --git a/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-print/index.html b/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-print/index.html index 5703623..a01d3f8 100644 --- a/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-print/index.html +++ b/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-print/index.html @@ -26,12 +26,12 @@ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COUNTERPARTYIBAN' | t:'CounterpartyIBAN' }} {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COUNTERPARTYNAME' | t:'CounterpartyName' }} {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_AMOUNT' | t:'Amount' }} + {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COMPANY' | t:'Company' }} {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_CURRENCY' | t:'Currency' }} {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_PAYMENTDIRECTION' | t:'PaymentDirection' }} {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_PAYMENTTYPE' | t:'PaymentType' }} {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_REASON' | t:'Reason' }} {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DESCRIPTION' | t:'Description' }} - {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COMPANY' | t:'Company' }} {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_UUID' | t:'UUID' }} {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_REFERENCE' | t:'Reference' }} {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETED' | t:'Deleted' }} @@ -58,12 +58,12 @@ {{next.CounterpartyIBAN}} {{next.CounterpartyName}} {{next.Amount}} + {{optionsCompanyValue(next.Company)}} {{optionsCurrencyValue(next.Currency)}} {{optionsPaymentDirectionValue(next.PaymentDirection)}} {{optionsPaymentTypeValue(next.PaymentType)}} {{next.Reason}} {{next.Description}} - {{optionsCompanyValue(next.Company)}} {{next.UUID}} {{next.Reference}} diff --git a/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/controller.js b/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/controller.js index cfa3989..9568936 100644 --- a/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/controller.js @@ -21,9 +21,9 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle params.entity.UpdatedAt = new Date(params.entity.UpdatedAt); } $scope.entity = params.entity; + $scope.optionsCompany = params.optionsCompany; $scope.optionsCurrency = params.optionsCurrency; $scope.optionsPaymentDirection = params.optionsPaymentDirection; $scope.optionsPaymentType = params.optionsPaymentType; - $scope.optionsCompany = params.optionsCompany; } }); \ No newline at end of file diff --git a/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/index.html b/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/index.html index 8a9c118..986b187 100644 --- a/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/index.html +++ b/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/index.html @@ -103,6 +103,22 @@
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COMPANY' | t }} +
+
+ + +
+
{{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_CURRENCY' | t }} @@ -181,22 +197,6 @@
- -
- {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COMPANY' | t }} -
-
- - -
-
{{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_UUID' | t }} diff --git a/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/index.html b/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/index.html index e340fa8..7de046b 100644 --- a/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/index.html +++ b/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/index.html @@ -30,12 +30,12 @@ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COUNTERPARTYIBAN' | t:'CounterpartyIBAN' }} {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COUNTERPARTYNAME' | t:'CounterpartyName' }} {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_AMOUNT' | t:'Amount' }} + {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COMPANY' | t:'Company' }} {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_CURRENCY' | t:'Currency' }} {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_PAYMENTDIRECTION' | t:'PaymentDirection' }} {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_PAYMENTTYPE' | t:'PaymentType' }} {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_REASON' | t:'Reason' }} {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DESCRIPTION' | t:'Description' }} - {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COMPANY' | t:'Company' }} {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_UUID' | t:'UUID' }} {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_REFERENCE' | t:'Reference' }} {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETED' | t:'Deleted' }} @@ -64,6 +64,9 @@ {{next.CounterpartyIBAN}} {{next.CounterpartyName}} {{next.Amount}} + + {{optionsCompanyValue(next.Company)}} + {{optionsCurrencyValue(next.Currency)}} @@ -75,9 +78,6 @@ {{next.Reason}} {{next.Description}} - - {{optionsCompanyValue(next.Company)}} - {{next.UUID}} {{next.Reference}} diff --git a/codbex-payments/gen/codbex-payments/ui/Settings/PaymentDirection/controller.js b/codbex-payments/gen/codbex-payments/ui/Settings/PaymentDirection/controller.js index 82ee113..e05dfdb 100644 --- a/codbex-payments/gen/codbex-payments/ui/Settings/PaymentDirection/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/Settings/PaymentDirection/controller.js @@ -1,6 +1,6 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) .config(['EntityServiceProvider', (EntityServiceProvider) => { - EntityServiceProvider.baseUrl = '/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentDirectionController.ts'; + EntityServiceProvider.baseUrl = '/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentDirectionController'; }]) .controller('PageController', ($scope, EntityService, Extensions, LocaleService, ButtonStates) => { const Dialogs = new DialogHub(); diff --git a/codbex-payments/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-window/controller.js b/codbex-payments/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-window/controller.js index f7b68dc..606276f 100644 --- a/codbex-payments/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-window/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-window/controller.js @@ -1,6 +1,6 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) .config(['EntityServiceProvider', (EntityServiceProvider) => { - EntityServiceProvider.baseUrl = '/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentDirectionController.ts'; + EntityServiceProvider.baseUrl = '/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentDirectionController'; }]) .controller('PageController', ($scope, $http, ViewParameters, LocaleService, EntityService) => { const Dialogs = new DialogHub(); diff --git a/codbex-payments/gen/codbex-payments/ui/Settings/PaymentType/controller.js b/codbex-payments/gen/codbex-payments/ui/Settings/PaymentType/controller.js index db3699f..0f5e2cc 100644 --- a/codbex-payments/gen/codbex-payments/ui/Settings/PaymentType/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/Settings/PaymentType/controller.js @@ -1,6 +1,6 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) .config(['EntityServiceProvider', (EntityServiceProvider) => { - EntityServiceProvider.baseUrl = '/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeController.ts'; + EntityServiceProvider.baseUrl = '/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentTypeController'; }]) .controller('PageController', ($scope, EntityService, Extensions, LocaleService, ButtonStates) => { const Dialogs = new DialogHub(); diff --git a/codbex-payments/gen/codbex-payments/ui/Settings/PaymentType/dialog-window/controller.js b/codbex-payments/gen/codbex-payments/ui/Settings/PaymentType/dialog-window/controller.js index a7433c5..d4b1ba4 100644 --- a/codbex-payments/gen/codbex-payments/ui/Settings/PaymentType/dialog-window/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/Settings/PaymentType/dialog-window/controller.js @@ -1,6 +1,6 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) .config(['EntityServiceProvider', (EntityServiceProvider) => { - EntityServiceProvider.baseUrl = '/services/ts/codbex-payments/gen/codbex-payments/api/Settings/PaymentTypeController.ts'; + EntityServiceProvider.baseUrl = '/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentTypeController'; }]) .controller('PageController', ($scope, $http, ViewParameters, LocaleService, EntityService) => { const Dialogs = new DialogHub(); diff --git a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/controller.js b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/controller.js index 2746552..72cf60d 100644 --- a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/controller.js @@ -1,6 +1,6 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) .config(['EntityServiceProvider', (EntityServiceProvider) => { - EntityServiceProvider.baseUrl = '/services/ts/codbex-payments/gen/codbex-payments/api/SupplierPayment/SupplierPaymentController.ts'; + EntityServiceProvider.baseUrl = '/services/java/codbex-payments/gen/codbex_payments/api/supplierpayment/SupplierPaymentController'; }]) .controller('PageController', ($scope, $http, EntityService, Extensions, LocaleService, ButtonStates) => { const Dialogs = new DialogHub(); @@ -105,7 +105,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer if (optionsSupplierHasMore) { const optionsSupplierSearchValues = Array.from(new Set(response.data.map(e => e.Supplier))); if (optionsSupplierSearchValues.length > 0) { - $http.post('/services/ts/codbex-partners/gen/codbex-partners/api/Suppliers/SupplierController.ts/search', { + $http.post('/services/java/codbex-partners/gen/codbex_partners/api/suppliers/SupplierController/search', { conditions: [ { propertyName: 'Id', operator: 'IN', value: optionsSupplierSearchValues } ] @@ -128,7 +128,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer if (optionsCurrencyHasMore) { const optionsCurrencySearchValues = Array.from(new Set(response.data.map(e => e.Currency))); if (optionsCurrencySearchValues.length > 0) { - $http.post('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts/search', { + $http.post('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController/search', { conditions: [ { propertyName: 'Id', operator: 'IN', value: optionsCurrencySearchValues } ] @@ -151,7 +151,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer if (optionsCompanyHasMore) { const optionsCompanySearchValues = Array.from(new Set(response.data.map(e => e.Company))); if (optionsCompanySearchValues.length > 0) { - $http.post('/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts/search', { + $http.post('/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController/search', { conditions: [ { propertyName: 'Id', operator: 'IN', value: optionsCompanySearchValues } ] @@ -171,6 +171,29 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer }); } } + if (optionsPaymentMethodHasMore) { + const optionsPaymentMethodSearchValues = Array.from(new Set(response.data.map(e => e.PaymentMethod))); + if (optionsPaymentMethodSearchValues.length > 0) { + $http.post('/services/java/codbex-methods/gen/codbex_methods/api/settings/PaymentMethodController/search', { + conditions: [ + { propertyName: 'Id', operator: 'IN', value: optionsPaymentMethodSearchValues } + ] + }).then((response) => { + $scope.optionsPaymentMethod.push(...response.data.map(e => ({ + value: e.Id, + text: e.Name + }))); + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'PaymentMethod', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + } + } response.data.forEach(e => { if (e.Date) { e.Date = new Date(e.Date); @@ -217,6 +240,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer optionsSupplier: $scope.optionsSupplier, optionsCurrency: $scope.optionsCurrency, optionsCompany: $scope.optionsCompany, + optionsPaymentMethod: $scope.optionsPaymentMethod, }}); }; @@ -229,6 +253,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer optionsSupplier: $scope.optionsSupplier, optionsCurrency: $scope.optionsCurrency, optionsCompany: $scope.optionsCompany, + optionsPaymentMethod: $scope.optionsPaymentMethod, }}); }; @@ -239,6 +264,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer optionsSupplier: $scope.optionsSupplier, optionsCurrency: $scope.optionsCurrency, optionsCompany: $scope.optionsCompany, + optionsPaymentMethod: $scope.optionsPaymentMethod, }}); }; @@ -283,6 +309,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer optionsSupplier: $scope.optionsSupplier, optionsCurrency: $scope.optionsCurrency, optionsCompany: $scope.optionsCompany, + optionsPaymentMethod: $scope.optionsPaymentMethod, }, }); }; @@ -291,12 +318,13 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.optionsSupplier = []; $scope.optionsCurrency = []; $scope.optionsCompany = []; + $scope.optionsPaymentMethod = []; let optionsSupplierHasMore = true; - $http.get('/services/ts/codbex-partners/gen/codbex-partners/api/Suppliers/SupplierController.ts/count').then((response) => { + $http.get('/services/java/codbex-partners/gen/codbex_partners/api/suppliers/SupplierController/count').then((response) => { const optionsSupplierCount = response.data.count; - $http.get('/services/ts/codbex-partners/gen/codbex-partners/api/Suppliers/SupplierController.ts').then((response) => { + $http.get('/services/java/codbex-partners/gen/codbex_partners/api/suppliers/SupplierController').then((response) => { $scope.optionsSupplier = response.data.map(e => ({ value: e.Id, text: e.Name @@ -322,9 +350,9 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer }); let optionsCurrencyHasMore = true; - $http.get('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts/count').then((response) => { + $http.get('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController/count').then((response) => { const optionsCurrencyCount = response.data.count; - $http.get('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts').then((response) => { + $http.get('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController').then((response) => { $scope.optionsCurrency = response.data.map(e => ({ value: e.Id, text: e.Code @@ -350,9 +378,9 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer }); let optionsCompanyHasMore = true; - $http.get('/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts/count').then((response) => { + $http.get('/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController/count').then((response) => { const optionsCompanyCount = response.data.count; - $http.get('/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts').then((response) => { + $http.get('/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController').then((response) => { $scope.optionsCompany = response.data.map(e => ({ value: e.Id, text: e.Name @@ -376,6 +404,34 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer type: AlertTypes.Error }); }); + let optionsPaymentMethodHasMore = true; + + $http.get('/services/java/codbex-methods/gen/codbex_methods/api/settings/PaymentMethodController/count').then((response) => { + const optionsPaymentMethodCount = response.data.count; + $http.get('/services/java/codbex-methods/gen/codbex_methods/api/settings/PaymentMethodController').then((response) => { + $scope.optionsPaymentMethod = response.data.map(e => ({ + value: e.Id, + text: e.Name + })); + optionsPaymentMethodHasMore = optionsPaymentMethodCount > $scope.optionsPaymentMethod.length; + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'PaymentMethod', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'PaymentMethod', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); $scope.optionsSupplierValue = (optionKey) => { for (let i = 0; i < $scope.optionsSupplier.length; i++) { @@ -401,5 +457,13 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } return null; }; + $scope.optionsPaymentMethodValue = (optionKey) => { + for (let i = 0; i < $scope.optionsPaymentMethod.length; i++) { + if ($scope.optionsPaymentMethod[i].value === optionKey) { + return $scope.optionsPaymentMethod[i].text; + } + } + return null; + }; //----------------Dropdowns-----------------// }); diff --git a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-filter/controller.js b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-filter/controller.js index 34d871d..626b1aa 100644 --- a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-filter/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-filter/controller.js @@ -43,6 +43,9 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle const optionsCompanyMap = new Map(); params.optionsCompany.forEach(e => optionsCompanyMap.set(e.value, e)); $scope.optionsCompany = Array.from(optionsCompanyMap.values()); + const optionsPaymentMethodMap = new Map(); + params.optionsPaymentMethod.forEach(e => optionsPaymentMethodMap.set(e.value, e)); + $scope.optionsPaymentMethod = Array.from(optionsPaymentMethodMap.values()); } $scope.filter = () => { @@ -99,6 +102,10 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle const condition = { propertyName: 'Currency', operator: 'EQ', value: entity.Currency }; filter.$filter.conditions.push(condition); } + if (entity.Company !== undefined) { + const condition = { propertyName: 'Company', operator: 'EQ', value: entity.Company }; + filter.$filter.conditions.push(condition); + } if (entity.Reason) { const condition = { propertyName: 'Reason', operator: 'LIKE', value: `%${entity.Reason}%` }; filter.$filter.conditions.push(condition); @@ -107,8 +114,8 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle const condition = { propertyName: 'Description', operator: 'LIKE', value: `%${entity.Description}%` }; filter.$filter.conditions.push(condition); } - if (entity.Company !== undefined) { - const condition = { propertyName: 'Company', operator: 'EQ', value: entity.Company }; + if (entity.PaymentMethod !== undefined) { + const condition = { propertyName: 'PaymentMethod', operator: 'EQ', value: entity.PaymentMethod }; filter.$filter.conditions.push(condition); } if (entity.Name) { @@ -123,10 +130,6 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle const condition = { propertyName: 'Reference', operator: 'LIKE', value: `%${entity.Reference}%` }; filter.$filter.conditions.push(condition); } - if (entity.PaymentMethod !== undefined) { - const condition = { propertyName: 'PaymentMethod', operator: 'EQ', value: entity.PaymentMethod }; - filter.$filter.conditions.push(condition); - } if (entity.CreatedAtFrom) { const condition = { propertyName: 'CreatedAt', operator: 'GE', value: entity.CreatedAtFrom }; filter.$filter.conditions.push(condition); @@ -168,6 +171,8 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle allValuesCurrency.length = 0; lastSearchValuesCompany.clear(); allValuesCompany.length = 0; + lastSearchValuesPaymentMethod.clear(); + allValuesPaymentMethod.length = 0; }; $scope.cancel = () => { @@ -187,7 +192,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle $scope.loadMoreOptionsSupplier = () => { const limit = 20; $scope.optionsSupplierLoading = true; - $http.get(`/services/ts/codbex-partners/gen/codbex-partners/api/Suppliers/SupplierController.ts?$limit=${limit}&$offset=${++loadMoreOptionsSupplierCounter * limit}`) + $http.get(`/services/java/codbex-partners/gen/codbex_partners/api/suppliers/SupplierController?$limit=${limit}&$offset=${++loadMoreOptionsSupplierCounter * limit}`) .then((response) => { const optionValues = allValuesSupplier.map(e => e.value); const resultValues = response.data.map(e => ({ @@ -237,7 +242,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle } }) if (!cacheHit) { - $http.post('/services/ts/codbex-partners/gen/codbex-partners/api/Suppliers/SupplierController.ts/search', { + $http.post('/services/java/codbex-partners/gen/codbex_partners/api/suppliers/SupplierController/search', { conditions: [ { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] @@ -276,7 +281,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle $scope.loadMoreOptionsCurrency = () => { const limit = 20; $scope.optionsCurrencyLoading = true; - $http.get(`/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts?$limit=${limit}&$offset=${++loadMoreOptionsCurrencyCounter * limit}`) + $http.get(`/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController?$limit=${limit}&$offset=${++loadMoreOptionsCurrencyCounter * limit}`) .then((response) => { const optionValues = allValuesCurrency.map(e => e.value); const resultValues = response.data.map(e => ({ @@ -326,7 +331,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle } }) if (!cacheHit) { - $http.post('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts/search', { + $http.post('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController/search', { conditions: [ { propertyName: 'Code', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] @@ -365,7 +370,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle $scope.loadMoreOptionsCompany = () => { const limit = 20; $scope.optionsCompanyLoading = true; - $http.get(`/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts?$limit=${limit}&$offset=${++loadMoreOptionsCompanyCounter * limit}`) + $http.get(`/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController?$limit=${limit}&$offset=${++loadMoreOptionsCompanyCounter * limit}`) .then((response) => { const optionValues = allValuesCompany.map(e => e.value); const resultValues = response.data.map(e => ({ @@ -415,7 +420,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle } }) if (!cacheHit) { - $http.post('/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts/search', { + $http.post('/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController/search', { conditions: [ { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] @@ -445,6 +450,95 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controlle } }; + const lastSearchValuesPaymentMethod = new Set(); + const allValuesPaymentMethod = []; + let loadMoreOptionsPaymentMethodCounter = 0; + $scope.optionsPaymentMethodLoading = false; + $scope.optionsPaymentMethodHasMore = true; + + $scope.loadMoreOptionsPaymentMethod = () => { + const limit = 20; + $scope.optionsPaymentMethodLoading = true; + $http.get(`/services/java/codbex-methods/gen/codbex_methods/api/settings/PaymentMethodController?$limit=${limit}&$offset=${++loadMoreOptionsPaymentMethodCounter * limit}`) + .then((response) => { + const optionValues = allValuesPaymentMethod.map(e => e.value); + const resultValues = response.data.map(e => ({ + value: e.Id, + text: e.Name + })); + const newValues = []; + resultValues.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesPaymentMethod.push(e); + newValues.push(e); + } + }); + newValues.forEach(e => { + if (!$scope.optionsPaymentMethod.find(o => o.value === e.value)) { + $scope.optionsPaymentMethod.push(e); + } + }) + $scope.optionsPaymentMethodHasMore = resultValues.length > 0; + $scope.optionsPaymentMethodLoading = false; + }, (error) => { + $scope.optionsPaymentMethodLoading = false; + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'PaymentMethod', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }; + + $scope.onOptionsPaymentMethodChange = (event) => { + if (allValuesPaymentMethod.length === 0) { + allValuesPaymentMethod.push(...$scope.optionsPaymentMethod); + } + if (event.originalEvent.target.value === '') { + allValuesPaymentMethod.sort((a, b) => a.text.localeCompare(b.text)); + $scope.optionsPaymentMethod = allValuesPaymentMethod; + $scope.optionsPaymentMethodHasMore = true; + } else if (isText(event.which)) { + $scope.optionsPaymentMethodHasMore = false; + let cacheHit = false; + Array.from(lastSearchValuesPaymentMethod).forEach(e => { + if (event.originalEvent.target.value.startsWith(e)) { + cacheHit = true; + } + }) + if (!cacheHit) { + $http.post('/services/java/codbex-methods/gen/codbex_methods/api/settings/PaymentMethodController/search', { + conditions: [ + { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } + ] + }).then((response) => { + const optionValues = allValuesPaymentMethod.map(e => e.value); + const searchResult = response.data.map(e => ({ + value: e.Id, + text: e.Name + })); + searchResult.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesPaymentMethod.push(e); + } + }); + $scope.optionsPaymentMethod = allValuesPaymentMethod.filter(e => e.text.toLowerCase().startsWith(event.originalEvent.target.value.toLowerCase())); + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'PaymentMethod', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + lastSearchValuesPaymentMethod.add(event.originalEvent.target.value); + } + } + }; + function isText(keycode) { if ((keycode >= 48 && keycode <= 90) || (keycode >= 96 && keycode <= 111) || (keycode >= 186 && keycode <= 222) || [8, 46, 173].includes(keycode)) return true; return false; diff --git a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-filter/index.html b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-filter/index.html index b13bf8d..7a81cef 100644 --- a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-filter/index.html +++ b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-filter/index.html @@ -179,6 +179,27 @@
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_COMPANY' | t }} +
+
+ + + + + More Options + + +
+
{{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_REASON' | t }} @@ -215,21 +236,21 @@
- {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_COMPANY' | t }} + {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_PAYMENTMETHOD' | t }}
- - - - - More Options + + + + + More Options
@@ -285,22 +306,6 @@
- -
- {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_PAYMENTMETHOD' | t }} -
-
- - - - -
-
{{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_CREATEDAT' | t }} diff --git a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/controller.js b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/controller.js index 5c3ca30..be41065 100644 --- a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/controller.js @@ -1,6 +1,6 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) .config(['EntityServiceProvider', (EntityServiceProvider) => { - EntityServiceProvider.baseUrl = '/services/ts/codbex-payments/gen/codbex-payments/api/SupplierPayment/SupplierPaymentController.ts'; + EntityServiceProvider.baseUrl = '/services/java/codbex-payments/gen/codbex_payments/api/supplierpayment/SupplierPaymentController'; }]) .controller('PageController', ($scope, $http, ViewParameters, LocaleService, EntityService) => { const Dialogs = new DialogHub(); @@ -55,6 +55,9 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer const optionsCompanyMap = new Map(); params.optionsCompany?.forEach(e => optionsCompanyMap.set(e.value, e)); $scope.optionsCompany = Array.from(optionsCompanyMap.values()); + const optionsPaymentMethodMap = new Map(); + params.optionsPaymentMethod?.forEach(e => optionsPaymentMethodMap.set(e.value, e)); + $scope.optionsPaymentMethod = Array.from(optionsPaymentMethodMap.values()); } $scope.create = () => { @@ -98,11 +101,11 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer }); }; - $scope.serviceSupplier = '/services/ts/codbex-partners/gen/codbex-partners/api/Suppliers/SupplierController.ts'; + $scope.serviceSupplier = '/services/java/codbex-partners/gen/codbex_partners/api/suppliers/SupplierController'; $scope.optionsSupplier = []; - $http.get('/services/ts/codbex-partners/gen/codbex-partners/api/Suppliers/SupplierController.ts').then((response) => { + $http.get('/services/java/codbex-partners/gen/codbex_partners/api/suppliers/SupplierController').then((response) => { $scope.optionsSupplier = response.data.map(e => ({ value: e.Id, text: e.Name @@ -126,7 +129,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.loadMoreOptionsSupplier = () => { const limit = 20; $scope.optionsSupplierLoading = true; - $http.get(`/services/ts/codbex-partners/gen/codbex-partners/api/Suppliers/SupplierController.ts?$limit=${limit}&$offset=${++loadMoreOptionsSupplierCounter * limit}`) + $http.get(`/services/java/codbex-partners/gen/codbex_partners/api/suppliers/SupplierController?$limit=${limit}&$offset=${++loadMoreOptionsSupplierCounter * limit}`) .then((response) => { const optionValues = allValuesSupplier.map(e => e.value); const resultValues = response.data.map(e => ({ @@ -176,7 +179,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } }) if (!cacheHit) { - $http.post('/services/ts/codbex-partners/gen/codbex-partners/api/Suppliers/SupplierController.ts/search', { + $http.post('/services/java/codbex-partners/gen/codbex_partners/api/suppliers/SupplierController/search', { conditions: [ { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] @@ -205,11 +208,11 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } } }; - $scope.serviceCurrency = '/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts'; + $scope.serviceCurrency = '/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController'; $scope.optionsCurrency = []; - $http.get('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts').then((response) => { + $http.get('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController').then((response) => { $scope.optionsCurrency = response.data.map(e => ({ value: e.Id, text: e.Code @@ -233,7 +236,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.loadMoreOptionsCurrency = () => { const limit = 20; $scope.optionsCurrencyLoading = true; - $http.get(`/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts?$limit=${limit}&$offset=${++loadMoreOptionsCurrencyCounter * limit}`) + $http.get(`/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController?$limit=${limit}&$offset=${++loadMoreOptionsCurrencyCounter * limit}`) .then((response) => { const optionValues = allValuesCurrency.map(e => e.value); const resultValues = response.data.map(e => ({ @@ -283,7 +286,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } }) if (!cacheHit) { - $http.post('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts/search', { + $http.post('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController/search', { conditions: [ { propertyName: 'Code', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] @@ -312,11 +315,11 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } } }; - $scope.serviceCompany = '/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts'; + $scope.serviceCompany = '/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController'; $scope.optionsCompany = []; - $http.get('/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts').then((response) => { + $http.get('/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController').then((response) => { $scope.optionsCompany = response.data.map(e => ({ value: e.Id, text: e.Name @@ -340,7 +343,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.loadMoreOptionsCompany = () => { const limit = 20; $scope.optionsCompanyLoading = true; - $http.get(`/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts?$limit=${limit}&$offset=${++loadMoreOptionsCompanyCounter * limit}`) + $http.get(`/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController?$limit=${limit}&$offset=${++loadMoreOptionsCompanyCounter * limit}`) .then((response) => { const optionValues = allValuesCompany.map(e => e.value); const resultValues = response.data.map(e => ({ @@ -390,7 +393,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } }) if (!cacheHit) { - $http.post('/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts/search', { + $http.post('/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController/search', { conditions: [ { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] @@ -419,6 +422,113 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } } }; + $scope.servicePaymentMethod = '/services/java/codbex-methods/gen/codbex_methods/api/settings/PaymentMethodController'; + + $scope.optionsPaymentMethod = []; + + $http.get('/services/java/codbex-methods/gen/codbex_methods/api/settings/PaymentMethodController').then((response) => { + $scope.optionsPaymentMethod = response.data.map(e => ({ + value: e.Id, + text: e.Name + })); + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'PaymentMethod', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + + const lastSearchValuesPaymentMethod = new Set(); + const allValuesPaymentMethod = []; + let loadMoreOptionsPaymentMethodCounter = 0; + $scope.optionsPaymentMethodLoading = false; + $scope.optionsPaymentMethodHasMore = true; + + $scope.loadMoreOptionsPaymentMethod = () => { + const limit = 20; + $scope.optionsPaymentMethodLoading = true; + $http.get(`/services/java/codbex-methods/gen/codbex_methods/api/settings/PaymentMethodController?$limit=${limit}&$offset=${++loadMoreOptionsPaymentMethodCounter * limit}`) + .then((response) => { + const optionValues = allValuesPaymentMethod.map(e => e.value); + const resultValues = response.data.map(e => ({ + value: e.Id, + text: e.Name + })); + const newValues = []; + resultValues.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesPaymentMethod.push(e); + newValues.push(e); + } + }); + newValues.forEach(e => { + if (!$scope.optionsPaymentMethod.find(o => o.value === e.value)) { + $scope.optionsPaymentMethod.push(e); + } + }) + $scope.optionsPaymentMethodHasMore = resultValues.length > 0; + $scope.optionsPaymentMethodLoading = false; + }, (error) => { + $scope.optionsPaymentMethodLoading = false; + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'PaymentMethod', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }; + + $scope.onOptionsPaymentMethodChange = (event) => { + if (allValuesPaymentMethod.length === 0) { + allValuesPaymentMethod.push(...$scope.optionsPaymentMethod); + } + if (event.originalEvent.target.value === '') { + allValuesPaymentMethod.sort((a, b) => a.text.localeCompare(b.text)); + $scope.optionsPaymentMethod = allValuesPaymentMethod; + $scope.optionsPaymentMethodHasMore = true; + } else if (isText(event.which)) { + $scope.optionsPaymentMethodHasMore = false; + let cacheHit = false; + Array.from(lastSearchValuesPaymentMethod).forEach(e => { + if (event.originalEvent.target.value.startsWith(e)) { + cacheHit = true; + } + }) + if (!cacheHit) { + $http.post('/services/java/codbex-methods/gen/codbex_methods/api/settings/PaymentMethodController/search', { + conditions: [ + { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } + ] + }).then((response) => { + const optionValues = allValuesPaymentMethod.map(e => e.value); + const searchResult = response.data.map(e => ({ + value: e.Id, + text: e.Name + })); + searchResult.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesPaymentMethod.push(e); + } + }); + $scope.optionsPaymentMethod = allValuesPaymentMethod.filter(e => e.text.toLowerCase().startsWith(event.originalEvent.target.value.toLowerCase())); + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'PaymentMethod', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + lastSearchValuesPaymentMethod.add(event.originalEvent.target.value); + } + } + }; function isText(keycode) { if ((keycode >= 48 && keycode <= 90) || (keycode >= 96 && keycode <= 111) || (keycode >= 186 && keycode <= 222) || [8, 46, 173].includes(keycode)) return true; return false; diff --git a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/index.html b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/index.html index 77c532a..cc3d8c5 100644 --- a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/index.html +++ b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/index.html @@ -178,6 +178,29 @@
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_COMPANY' | t }} +
+
+ + + + + More Options + + +
+
{{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_REASON' | t }} @@ -222,23 +245,23 @@
- {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_COMPANY' | t }} + {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_PAYMENTMETHOD' | t }}
- - - - - More Options + dropdown-items="optionsPaymentMethod" + ng-keyup="onOptionsPaymentMethodChange($event)" + placeholder="{{ 'codbex-payments:codbex-payments-model.messages.inputSearch' | t:{'name':'$t(codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_PAYMENTMETHOD)'} }}" + btn-aria-label="{{ 'codbex-payments:codbex-payments-model.aria.showHide' | t:{'name':'PaymentMethod'} }}" list-aria-label="{{ 'codbex-payments:codbex-payments-model.aria.options' | t:{'name':'PaymentMethod'} }}"> + + + + More Options
@@ -292,26 +315,6 @@
- -
- {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_PAYMENTMETHOD' | t }} -
-
- - - - -
-
{{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_CREATEDAT' | t }} diff --git a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/index.html b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/index.html index 0d917df..0239a52 100644 --- a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/index.html +++ b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/index.html @@ -47,13 +47,13 @@ {{next.CounterpartyName}} | {{next.Amount}} | {{optionsCurrencyValue(next.Currency)}} | + {{optionsCompanyValue(next.Company)}} | {{next.Reason}} | {{next.Description}} | - {{optionsCompanyValue(next.Company)}} | + {{optionsPaymentMethodValue(next.PaymentMethod)}} | {{next.Name}} | {{next.UUID}} | {{next.Reference}} | - {{next.PaymentMethod}} | {{next.CreatedAt}} | {{next.CreatedBy}} | {{next.UpdatedAt}} | diff --git a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/controller.js b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/controller.js index 067b14d..6583814 100644 --- a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/controller.js +++ b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/controller.js @@ -1,6 +1,6 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) .config(["EntityServiceProvider", (EntityServiceProvider) => { - EntityServiceProvider.baseUrl = '/services/ts/codbex-payments/gen/codbex-payments/api/SupplierPayment/SupplierPaymentController.ts'; + EntityServiceProvider.baseUrl = '/services/java/codbex-payments/gen/codbex_payments/api/supplierpayment/SupplierPaymentController'; }]) .controller('PageController', ($scope, $http, Extensions, LocaleService, EntityService) => { const Dialogs = new DialogHub(); @@ -53,6 +53,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.optionsSupplier = []; $scope.optionsCurrency = []; $scope.optionsCompany = []; + $scope.optionsPaymentMethod = []; $scope.action = 'select'; }); }}); @@ -74,6 +75,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.optionsSupplier = data.optionsSupplier; $scope.optionsCurrency = data.optionsCurrency; $scope.optionsCompany = data.optionsCompany; + $scope.optionsPaymentMethod = data.optionsPaymentMethod; $scope.action = 'select'; }); }}); @@ -83,6 +85,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.optionsSupplier = data.optionsSupplier; $scope.optionsCurrency = data.optionsCurrency; $scope.optionsCompany = data.optionsCompany; + $scope.optionsPaymentMethod = data.optionsPaymentMethod; $scope.action = 'create'; }); }}); @@ -104,13 +107,15 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.optionsSupplier = data.optionsSupplier; $scope.optionsCurrency = data.optionsCurrency; $scope.optionsCompany = data.optionsCompany; + $scope.optionsPaymentMethod = data.optionsPaymentMethod; $scope.action = 'update'; }); }}); - $scope.serviceSupplier = '/services/ts/codbex-partners/gen/codbex-partners/api/Suppliers/SupplierController.ts'; - $scope.serviceCurrency = '/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts'; - $scope.serviceCompany = '/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts'; + $scope.serviceSupplier = '/services/java/codbex-partners/gen/codbex_partners/api/suppliers/SupplierController'; + $scope.serviceCurrency = '/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController'; + $scope.serviceCompany = '/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController'; + $scope.servicePaymentMethod = '/services/java/codbex-methods/gen/codbex_methods/api/settings/PaymentMethodController'; //-----------------Events-------------------// @@ -198,6 +203,16 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer closeButton: false }); }; + $scope.createPaymentMethod = () => { + Dialogs.showWindow({ + id: 'PaymentMethod-details', + params: { + action: 'create', + entity: {}, + }, + closeButton: false + }); + }; //-----------------Dialogs-------------------// @@ -214,7 +229,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.loadMoreOptionsSupplier = () => { const limit = 20; $scope.optionsSupplierLoading = true; - $http.get(`/services/ts/codbex-partners/gen/codbex-partners/api/Suppliers/SupplierController.ts?$limit=${limit}&$offset=${++loadMoreOptionsSupplierCounter * limit}`) + $http.get(`/services/java/codbex-partners/gen/codbex_partners/api/suppliers/SupplierController?$limit=${limit}&$offset=${++loadMoreOptionsSupplierCounter * limit}`) .then((response) => { const optionValues = allValuesSupplier.map(e => e.value); const resultValues = response.data.map(e => ({ @@ -264,7 +279,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } }) if (!cacheHit) { - $http.post('/services/ts/codbex-partners/gen/codbex-partners/api/Suppliers/SupplierController.ts/search', { + $http.post('/services/java/codbex-partners/gen/codbex_partners/api/suppliers/SupplierController/search', { conditions: [ { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] @@ -296,7 +311,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.refreshSupplier = () => { $scope.optionsSupplier = []; - $http.get('/services/ts/codbex-partners/gen/codbex-partners/api/Suppliers/SupplierController.ts').then((response) => { + $http.get('/services/java/codbex-partners/gen/codbex_partners/api/suppliers/SupplierController').then((response) => { $scope.optionsSupplier = response.data.map(e => ({ value: e.Id, text: e.Name @@ -321,7 +336,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.loadMoreOptionsCurrency = () => { const limit = 20; $scope.optionsCurrencyLoading = true; - $http.get(`/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts?$limit=${limit}&$offset=${++loadMoreOptionsCurrencyCounter * limit}`) + $http.get(`/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController?$limit=${limit}&$offset=${++loadMoreOptionsCurrencyCounter * limit}`) .then((response) => { const optionValues = allValuesCurrency.map(e => e.value); const resultValues = response.data.map(e => ({ @@ -371,7 +386,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } }) if (!cacheHit) { - $http.post('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts/search', { + $http.post('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController/search', { conditions: [ { propertyName: 'Code', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] @@ -403,7 +418,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.refreshCurrency = () => { $scope.optionsCurrency = []; - $http.get('/services/ts/codbex-currencies/gen/codbex-currencies/api/Settings/CurrencyController.ts').then((response) => { + $http.get('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController').then((response) => { $scope.optionsCurrency = response.data.map(e => ({ value: e.Id, text: e.Code @@ -428,7 +443,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.loadMoreOptionsCompany = () => { const limit = 20; $scope.optionsCompanyLoading = true; - $http.get(`/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts?$limit=${limit}&$offset=${++loadMoreOptionsCompanyCounter * limit}`) + $http.get(`/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController?$limit=${limit}&$offset=${++loadMoreOptionsCompanyCounter * limit}`) .then((response) => { const optionValues = allValuesCompany.map(e => e.value); const resultValues = response.data.map(e => ({ @@ -478,7 +493,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer } }) if (!cacheHit) { - $http.post('/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts/search', { + $http.post('/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController/search', { conditions: [ { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } ] @@ -510,7 +525,7 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer $scope.refreshCompany = () => { $scope.optionsCompany = []; - $http.get('/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyController.ts').then((response) => { + $http.get('/services/java/codbex-companies/gen/codbex_companies/api/companies/CompanyController').then((response) => { $scope.optionsCompany = response.data.map(e => ({ value: e.Id, text: e.Name @@ -526,6 +541,113 @@ angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntitySer }); }); }; + const lastSearchValuesPaymentMethod = new Set(); + const allValuesPaymentMethod = []; + let loadMoreOptionsPaymentMethodCounter = 0; + $scope.optionsPaymentMethodLoading = false; + $scope.optionsPaymentMethodHasMore = true; + + $scope.loadMoreOptionsPaymentMethod = () => { + const limit = 20; + $scope.optionsPaymentMethodLoading = true; + $http.get(`/services/java/codbex-methods/gen/codbex_methods/api/settings/PaymentMethodController?$limit=${limit}&$offset=${++loadMoreOptionsPaymentMethodCounter * limit}`) + .then((response) => { + const optionValues = allValuesPaymentMethod.map(e => e.value); + const resultValues = response.data.map(e => ({ + value: e.Id, + text: e.Name + })); + const newValues = []; + resultValues.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesPaymentMethod.push(e); + newValues.push(e); + } + }); + newValues.forEach(e => { + if (!$scope.optionsPaymentMethod.find(o => o.value === e.value)) { + $scope.optionsPaymentMethod.push(e); + } + }) + $scope.optionsPaymentMethodHasMore = resultValues.length > 0; + $scope.optionsPaymentMethodLoading = false; + }, (error) => { + $scope.optionsPaymentMethodLoading = false; + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'PaymentMethod', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }; + + $scope.onOptionsPaymentMethodChange = (event) => { + if (allValuesPaymentMethod.length === 0) { + allValuesPaymentMethod.push(...$scope.optionsPaymentMethod); + } + if (event.originalEvent.target.value === '') { + allValuesPaymentMethod.sort((a, b) => a.text.localeCompare(b.text)); + $scope.optionsPaymentMethod = allValuesPaymentMethod; + $scope.optionsPaymentMethodHasMore = true; + } else if (isText(event.which)) { + $scope.optionsPaymentMethodHasMore = false; + let cacheHit = false; + Array.from(lastSearchValuesPaymentMethod).forEach(e => { + if (event.originalEvent.target.value.startsWith(e)) { + cacheHit = true; + } + }) + if (!cacheHit) { + $http.post('/services/java/codbex-methods/gen/codbex_methods/api/settings/PaymentMethodController/search', { + conditions: [ + { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } + ] + }).then((response) => { + const optionValues = allValuesPaymentMethod.map(e => e.value); + const searchResult = response.data.map(e => ({ + value: e.Id, + text: e.Name + })); + searchResult.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesPaymentMethod.push(e); + } + }); + $scope.optionsPaymentMethod = allValuesPaymentMethod.filter(e => e.text.toLowerCase().startsWith(event.originalEvent.target.value.toLowerCase())); + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'PaymentMethod', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + lastSearchValuesPaymentMethod.add(event.originalEvent.target.value); + } + } + }; + + $scope.refreshPaymentMethod = () => { + $scope.optionsPaymentMethod = []; + $http.get('/services/java/codbex-methods/gen/codbex_methods/api/settings/PaymentMethodController').then((response) => { + $scope.optionsPaymentMethod = response.data.map(e => ({ + value: e.Id, + text: e.Name + })); + allValuesPaymentMethod.length === 0; + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'PaymentMethod', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }; function isText(keycode) { if ((keycode >= 48 && keycode <= 90) || (keycode >= 96 && keycode <= 111) || (keycode >= 186 && keycode <= 222) || [8, 46, 173].includes(keycode)) return true; diff --git a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/index.html b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/index.html index b396a8f..5092505 100644 --- a/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/index.html +++ b/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/index.html @@ -184,6 +184,33 @@
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_COMPANY' | t }} +
+
+ + + + + More Options + + +
+
+ + +
+
{{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_REASON' | t }} @@ -228,29 +255,29 @@
- {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_COMPANY' | t }} + {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_PAYMENTMETHOD' | t }}
- - - - - More Options + dropdown-items="optionsPaymentMethod" + ng-keyup="onOptionsPaymentMethodChange($event)" + placeholder="{{ 'codbex-payments:codbex-payments-model.messages.inputSearch' | t:{'name':'$t(codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_PAYMENTMETHOD)'} }}" + btn-aria-label="{{ 'codbex-payments:codbex-payments-model.aria.showHide' | t:{'name':'PaymentMethod'} }}" list-aria-label="{{ 'codbex-payments:codbex-payments-model.aria.options' | t:{'name':'PaymentMethod'} }}"> + + + + More Options
- - + +
@@ -302,26 +329,6 @@
- -
- {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_PAYMENTMETHOD' | t }} -
-
- - - - -
-
{{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_CREATEDAT' | t }} diff --git a/codbex-payments/gen/codbex_payments/api/customerpayment/CustomerPaymentController.java b/codbex-payments/gen/codbex_payments/api/customerpayment/CustomerPaymentController.java new file mode 100644 index 0000000..fc04637 --- /dev/null +++ b/codbex-payments/gen/codbex_payments/api/customerpayment/CustomerPaymentController.java @@ -0,0 +1,227 @@ +package gen.codbex_payments.api.customerpayment; + +import gen.codbex_payments.data.customerpayment.CustomerPaymentEntity; +import gen.codbex_payments.data.customerpayment.CustomerPaymentRepository; + +import org.eclipse.dirigible.components.api.security.UserFacade; +import org.eclipse.dirigible.engine.java.annotations.Documentation; +import org.eclipse.dirigible.engine.java.annotations.Inject; +import org.eclipse.dirigible.engine.java.annotations.http.Body; +import org.eclipse.dirigible.engine.java.annotations.http.Controller; +import org.eclipse.dirigible.engine.java.annotations.http.Delete; +import org.eclipse.dirigible.engine.java.annotations.http.Get; +import org.eclipse.dirigible.engine.java.annotations.http.PathParam; +import org.eclipse.dirigible.engine.java.annotations.http.Post; +import org.eclipse.dirigible.engine.java.annotations.http.Put; +import org.eclipse.dirigible.engine.java.annotations.http.QueryParam; +import org.springframework.http.HttpStatus; +import org.springframework.web.server.ResponseStatusException; + +import java.util.Collection; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Set; + +@Controller +@Documentation("codbex-payments - CustomerPayment Controller") +public class CustomerPaymentController { + + private static final Set FILTER_FIELDS = Set.of("Id", "Customer", "Date", "Valor", "OurPartyIBAN", "CounterpartyIBAN", "CounterpartyName", "Amount", "Currency", "Company", "Reason", "Description", "PaymentMethod", "Name", "UUID", "Reference", "CreatedAt", "CreatedBy", "UpdatedAt", "UpdatedBy"); + + @Inject + private CustomerPaymentRepository repository; + + @Get + @Documentation("List CustomerPayment") + public List getAll(@QueryParam("$limit") Integer limit, + @QueryParam("$offset") Integer offset) { + checkPermissions("read"); + int actualLimit = limit != null ? limit.intValue() : 20; + int actualOffset = offset != null ? offset.intValue() : 0; + List result = repository.findAll(actualLimit, actualOffset); + return result; + } + + @Get("/count") + @Documentation("Count CustomerPayment") + public Map count() { + checkPermissions("read"); + return Map.of("count", repository.count()); + } + + @Post("/count") + @Documentation("Count CustomerPayment with filter") + public Map countWithFilter(@Body Map filter) { + checkPermissions("read"); + return Map.of("count", (long) runFilter(filter).size()); + } + + @Post("/search") + @Documentation("Search CustomerPayment") + public List search(@Body Map filter) { + checkPermissions("read"); + List result = runFilter(filter); + return result; + } + + @Get("/{id}") + @Documentation("Get CustomerPayment by id") + public CustomerPaymentEntity getById(@PathParam("id") Integer id) { + checkPermissions("read"); + CustomerPaymentEntity entity = repository.findOne(id) + .orElseThrow(() -> new ResponseStatusException(HttpStatus.NOT_FOUND, "CustomerPayment not found")); + return entity; + } + + @Post + @Documentation("Create CustomerPayment") + public CustomerPaymentEntity create(@Body CustomerPaymentEntity entity) { + checkPermissions("write"); + validate(entity); + return repository.save(entity); + } + + @Put("/{id}") + @Documentation("Update CustomerPayment by id") + public CustomerPaymentEntity update(@PathParam("id") Integer id, @Body CustomerPaymentEntity entity) { + checkPermissions("write"); + entity.Id = id; + validate(entity); + return repository.update(entity); + } + + @Delete("/{id}") + @Documentation("Delete CustomerPayment by id") + public void deleteById(@PathParam("id") Integer id) { + checkPermissions("write"); + if (repository.findOne(id).isEmpty()) { + throw new ResponseStatusException(HttpStatus.NOT_FOUND, "CustomerPayment not found"); + } + repository.deleteById(id); + } + + private List runFilter(Map filter) { + StringBuilder hql = new StringBuilder("from CustomerPaymentEntity e"); + Map params = new LinkedHashMap<>(); + boolean first = true; + if (filter != null && filter.get("equals") instanceof Map equals) { + for (Map.Entry entry : equals.entrySet()) { + String field = requireKnownField(String.valueOf(entry.getKey())); + String paramName = "p" + params.size(); + hql.append(first ? " where e." : " and e.").append(field).append(" = :").append(paramName); + params.put(paramName, entry.getValue()); + first = false; + } + } + if (filter != null && filter.get("conditions") instanceof List conditions) { + for (Object raw : conditions) { + if (!(raw instanceof Map condition)) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Invalid filter condition"); + } + String field = requireKnownField(String.valueOf(condition.get("propertyName"))); + String operator = String.valueOf(condition.get("operator")).toUpperCase(Locale.ROOT); + Object value = condition.get("value"); + String paramName = "p" + params.size(); + String clause = switch (operator) { + case "EQ" -> "e." + field + " = :" + paramName; + case "IN" -> { + if (!(value instanceof Collection)) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "IN value must be a list for field: " + field); + } + yield "e." + field + " in (:" + paramName + ")"; + } + case "LIKE" -> "e." + field + " like :" + paramName; + default -> throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Unsupported operator: " + operator); + }; + hql.append(first ? " where " : " and ").append(clause); + params.put(paramName, value); + first = false; + } + } + return repository.query(hql.toString(), params); + } + + private static String requireKnownField(String field) { + if (!FILTER_FIELDS.contains(field)) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Unknown filter field: " + field); + } + return field; + } + + private void checkPermissions(String op) { + if ("read".equals(op) && !(UserFacade.isInRole("codbex-payments.CustomerPayment.CustomerPaymentReadOnly") || UserFacade.isInRole("codbex-payments.CustomerPayment.CustomerPaymentFullAccess"))) { + throw new ResponseStatusException(HttpStatus.FORBIDDEN); + } + if ("write".equals(op) && !UserFacade.isInRole("codbex-payments.CustomerPayment.CustomerPaymentFullAccess")) { + throw new ResponseStatusException(HttpStatus.FORBIDDEN); + } + } + + private static void validate(CustomerPaymentEntity entity) { + if (entity.Customer == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Customer' property is required"); + } + if (entity.Date == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Date' property is required"); + } + if (entity.Valor == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Valor' property is required"); + } + if (entity.OurPartyIBAN == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'OurPartyIBAN' property is required"); + } + if (entity.OurPartyIBAN != null && entity.OurPartyIBAN.length() > 34) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'OurPartyIBAN' exceeds the maximum length of 34"); + } + if (entity.OurPartyIBAN != null && !entity.OurPartyIBAN.toString().matches("^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$")) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The value of 'OurPartyIBAN' does not match the required pattern '^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'"); + } + if (entity.CounterpartyIBAN == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'CounterpartyIBAN' property is required"); + } + if (entity.CounterpartyIBAN != null && entity.CounterpartyIBAN.length() > 34) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'CounterpartyIBAN' exceeds the maximum length of 34"); + } + if (entity.CounterpartyIBAN != null && !entity.CounterpartyIBAN.toString().matches("^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$")) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The value of 'CounterpartyIBAN' does not match the required pattern '^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'"); + } + if (entity.CounterpartyName != null && entity.CounterpartyName.length() > 100) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'CounterpartyName' exceeds the maximum length of 100"); + } + if (entity.Amount == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Amount' property is required"); + } + if (entity.Currency == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Currency' property is required"); + } + if (entity.Reason == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Reason' property is required"); + } + if (entity.Reason != null && entity.Reason.length() > 100) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Reason' exceeds the maximum length of 100"); + } + if (entity.Description != null && entity.Description.length() > 100) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Description' exceeds the maximum length of 100"); + } + if (entity.PaymentMethod == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'PaymentMethod' property is required"); + } + if (entity.Name != null && entity.Name.length() > 20) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Name' exceeds the maximum length of 20"); + } + if (entity.UUID != null && entity.UUID.length() > 36) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'UUID' exceeds the maximum length of 36"); + } + if (entity.Reference != null && entity.Reference.length() > 36) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Reference' exceeds the maximum length of 36"); + } + if (entity.CreatedBy != null && entity.CreatedBy.length() > 20) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'CreatedBy' exceeds the maximum length of 20"); + } + if (entity.UpdatedBy != null && entity.UpdatedBy.length() > 20) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'UpdatedBy' exceeds the maximum length of 20"); + } + } +} diff --git a/codbex-payments/gen/codbex_payments/api/employeepayment/EmployeePaymentController.java b/codbex-payments/gen/codbex_payments/api/employeepayment/EmployeePaymentController.java new file mode 100644 index 0000000..d0c5e0c --- /dev/null +++ b/codbex-payments/gen/codbex_payments/api/employeepayment/EmployeePaymentController.java @@ -0,0 +1,224 @@ +package gen.codbex_payments.api.employeepayment; + +import gen.codbex_payments.data.employeepayment.EmployeePaymentEntity; +import gen.codbex_payments.data.employeepayment.EmployeePaymentRepository; + +import org.eclipse.dirigible.components.api.security.UserFacade; +import org.eclipse.dirigible.engine.java.annotations.Documentation; +import org.eclipse.dirigible.engine.java.annotations.Inject; +import org.eclipse.dirigible.engine.java.annotations.http.Body; +import org.eclipse.dirigible.engine.java.annotations.http.Controller; +import org.eclipse.dirigible.engine.java.annotations.http.Delete; +import org.eclipse.dirigible.engine.java.annotations.http.Get; +import org.eclipse.dirigible.engine.java.annotations.http.PathParam; +import org.eclipse.dirigible.engine.java.annotations.http.Post; +import org.eclipse.dirigible.engine.java.annotations.http.Put; +import org.eclipse.dirigible.engine.java.annotations.http.QueryParam; +import org.springframework.http.HttpStatus; +import org.springframework.web.server.ResponseStatusException; + +import java.util.Collection; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Set; + +@Controller +@Documentation("codbex-payments - EmployeePayment Controller") +public class EmployeePaymentController { + + private static final Set FILTER_FIELDS = Set.of("Id", "Employee", "Date", "Valor", "OurPartyIBAN", "CounterpartyIBAN", "CounterpartyName", "Amount", "Currency", "Company", "Reason", "Description", "Name", "UUID", "Reference", "CreatedAt", "CreatedBy", "UpdatedAt", "UpdatedBy"); + + @Inject + private EmployeePaymentRepository repository; + + @Get + @Documentation("List EmployeePayment") + public List getAll(@QueryParam("$limit") Integer limit, + @QueryParam("$offset") Integer offset) { + checkPermissions("read"); + int actualLimit = limit != null ? limit.intValue() : 20; + int actualOffset = offset != null ? offset.intValue() : 0; + List result = repository.findAll(actualLimit, actualOffset); + return result; + } + + @Get("/count") + @Documentation("Count EmployeePayment") + public Map count() { + checkPermissions("read"); + return Map.of("count", repository.count()); + } + + @Post("/count") + @Documentation("Count EmployeePayment with filter") + public Map countWithFilter(@Body Map filter) { + checkPermissions("read"); + return Map.of("count", (long) runFilter(filter).size()); + } + + @Post("/search") + @Documentation("Search EmployeePayment") + public List search(@Body Map filter) { + checkPermissions("read"); + List result = runFilter(filter); + return result; + } + + @Get("/{id}") + @Documentation("Get EmployeePayment by id") + public EmployeePaymentEntity getById(@PathParam("id") Integer id) { + checkPermissions("read"); + EmployeePaymentEntity entity = repository.findOne(id) + .orElseThrow(() -> new ResponseStatusException(HttpStatus.NOT_FOUND, "EmployeePayment not found")); + return entity; + } + + @Post + @Documentation("Create EmployeePayment") + public EmployeePaymentEntity create(@Body EmployeePaymentEntity entity) { + checkPermissions("write"); + validate(entity); + return repository.save(entity); + } + + @Put("/{id}") + @Documentation("Update EmployeePayment by id") + public EmployeePaymentEntity update(@PathParam("id") Integer id, @Body EmployeePaymentEntity entity) { + checkPermissions("write"); + entity.Id = id; + validate(entity); + return repository.update(entity); + } + + @Delete("/{id}") + @Documentation("Delete EmployeePayment by id") + public void deleteById(@PathParam("id") Integer id) { + checkPermissions("write"); + if (repository.findOne(id).isEmpty()) { + throw new ResponseStatusException(HttpStatus.NOT_FOUND, "EmployeePayment not found"); + } + repository.deleteById(id); + } + + private List runFilter(Map filter) { + StringBuilder hql = new StringBuilder("from EmployeePaymentEntity e"); + Map params = new LinkedHashMap<>(); + boolean first = true; + if (filter != null && filter.get("equals") instanceof Map equals) { + for (Map.Entry entry : equals.entrySet()) { + String field = requireKnownField(String.valueOf(entry.getKey())); + String paramName = "p" + params.size(); + hql.append(first ? " where e." : " and e.").append(field).append(" = :").append(paramName); + params.put(paramName, entry.getValue()); + first = false; + } + } + if (filter != null && filter.get("conditions") instanceof List conditions) { + for (Object raw : conditions) { + if (!(raw instanceof Map condition)) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Invalid filter condition"); + } + String field = requireKnownField(String.valueOf(condition.get("propertyName"))); + String operator = String.valueOf(condition.get("operator")).toUpperCase(Locale.ROOT); + Object value = condition.get("value"); + String paramName = "p" + params.size(); + String clause = switch (operator) { + case "EQ" -> "e." + field + " = :" + paramName; + case "IN" -> { + if (!(value instanceof Collection)) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "IN value must be a list for field: " + field); + } + yield "e." + field + " in (:" + paramName + ")"; + } + case "LIKE" -> "e." + field + " like :" + paramName; + default -> throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Unsupported operator: " + operator); + }; + hql.append(first ? " where " : " and ").append(clause); + params.put(paramName, value); + first = false; + } + } + return repository.query(hql.toString(), params); + } + + private static String requireKnownField(String field) { + if (!FILTER_FIELDS.contains(field)) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Unknown filter field: " + field); + } + return field; + } + + private void checkPermissions(String op) { + if ("read".equals(op) && !(UserFacade.isInRole("codbex-payments.EmployeePayment.EmployeePaymentReadOnly") || UserFacade.isInRole("codbex-payments.EmployeePayment.EmployeePaymentFullAccess"))) { + throw new ResponseStatusException(HttpStatus.FORBIDDEN); + } + if ("write".equals(op) && !UserFacade.isInRole("codbex-payments.EmployeePayment.EmployeePaymentFullAccess")) { + throw new ResponseStatusException(HttpStatus.FORBIDDEN); + } + } + + private static void validate(EmployeePaymentEntity entity) { + if (entity.Employee == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Employee' property is required"); + } + if (entity.Date == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Date' property is required"); + } + if (entity.Valor == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Valor' property is required"); + } + if (entity.OurPartyIBAN == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'OurPartyIBAN' property is required"); + } + if (entity.OurPartyIBAN != null && entity.OurPartyIBAN.length() > 34) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'OurPartyIBAN' exceeds the maximum length of 34"); + } + if (entity.OurPartyIBAN != null && !entity.OurPartyIBAN.toString().matches("^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$")) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The value of 'OurPartyIBAN' does not match the required pattern '^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'"); + } + if (entity.CounterpartyIBAN == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'CounterpartyIBAN' property is required"); + } + if (entity.CounterpartyIBAN != null && entity.CounterpartyIBAN.length() > 34) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'CounterpartyIBAN' exceeds the maximum length of 34"); + } + if (entity.CounterpartyIBAN != null && !entity.CounterpartyIBAN.toString().matches("^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$")) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The value of 'CounterpartyIBAN' does not match the required pattern '^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'"); + } + if (entity.CounterpartyName != null && entity.CounterpartyName.length() > 100) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'CounterpartyName' exceeds the maximum length of 100"); + } + if (entity.Amount == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Amount' property is required"); + } + if (entity.Currency == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Currency' property is required"); + } + if (entity.Reason == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Reason' property is required"); + } + if (entity.Reason != null && entity.Reason.length() > 100) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Reason' exceeds the maximum length of 100"); + } + if (entity.Description != null && entity.Description.length() > 100) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Description' exceeds the maximum length of 100"); + } + if (entity.Name != null && entity.Name.length() > 20) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Name' exceeds the maximum length of 20"); + } + if (entity.UUID != null && entity.UUID.length() > 36) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'UUID' exceeds the maximum length of 36"); + } + if (entity.Reference != null && entity.Reference.length() > 36) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Reference' exceeds the maximum length of 36"); + } + if (entity.CreatedBy != null && entity.CreatedBy.length() > 20) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'CreatedBy' exceeds the maximum length of 20"); + } + if (entity.UpdatedBy != null && entity.UpdatedBy.length() > 20) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'UpdatedBy' exceeds the maximum length of 20"); + } + } +} diff --git a/codbex-payments/gen/codbex_payments/api/paymentadjustment/PaymentAdjustmentController.java b/codbex-payments/gen/codbex_payments/api/paymentadjustment/PaymentAdjustmentController.java new file mode 100644 index 0000000..af71b35 --- /dev/null +++ b/codbex-payments/gen/codbex_payments/api/paymentadjustment/PaymentAdjustmentController.java @@ -0,0 +1,191 @@ +package gen.codbex_payments.api.paymentadjustment; + +import gen.codbex_payments.data.paymentadjustment.PaymentAdjustmentEntity; +import gen.codbex_payments.data.paymentadjustment.PaymentAdjustmentRepository; + +import org.eclipse.dirigible.components.api.security.UserFacade; +import org.eclipse.dirigible.engine.java.annotations.Documentation; +import org.eclipse.dirigible.engine.java.annotations.Inject; +import org.eclipse.dirigible.engine.java.annotations.http.Body; +import org.eclipse.dirigible.engine.java.annotations.http.Controller; +import org.eclipse.dirigible.engine.java.annotations.http.Delete; +import org.eclipse.dirigible.engine.java.annotations.http.Get; +import org.eclipse.dirigible.engine.java.annotations.http.PathParam; +import org.eclipse.dirigible.engine.java.annotations.http.Post; +import org.eclipse.dirigible.engine.java.annotations.http.Put; +import org.eclipse.dirigible.engine.java.annotations.http.QueryParam; +import org.springframework.http.HttpStatus; +import org.springframework.web.server.ResponseStatusException; + +import java.util.Collection; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Set; + +@Controller +@Documentation("codbex-payments - PaymentAdjustment Controller") +public class PaymentAdjustmentController { + + private static final Set FILTER_FIELDS = Set.of("Id", "Date", "Valor", "Amount", "Currency", "Reason", "Company", "UUID", "CreatedAt", "CreatedBy", "UpdatedAt", "UpdatedBy"); + + @Inject + private PaymentAdjustmentRepository repository; + + @Get + @Documentation("List PaymentAdjustment") + public List getAll(@QueryParam("$limit") Integer limit, + @QueryParam("$offset") Integer offset) { + checkPermissions("read"); + int actualLimit = limit != null ? limit.intValue() : 20; + int actualOffset = offset != null ? offset.intValue() : 0; + List result = repository.findAll(actualLimit, actualOffset); + return result; + } + + @Get("/count") + @Documentation("Count PaymentAdjustment") + public Map count() { + checkPermissions("read"); + return Map.of("count", repository.count()); + } + + @Post("/count") + @Documentation("Count PaymentAdjustment with filter") + public Map countWithFilter(@Body Map filter) { + checkPermissions("read"); + return Map.of("count", (long) runFilter(filter).size()); + } + + @Post("/search") + @Documentation("Search PaymentAdjustment") + public List search(@Body Map filter) { + checkPermissions("read"); + List result = runFilter(filter); + return result; + } + + @Get("/{id}") + @Documentation("Get PaymentAdjustment by id") + public PaymentAdjustmentEntity getById(@PathParam("id") Integer id) { + checkPermissions("read"); + PaymentAdjustmentEntity entity = repository.findOne(id) + .orElseThrow(() -> new ResponseStatusException(HttpStatus.NOT_FOUND, "PaymentAdjustment not found")); + return entity; + } + + @Post + @Documentation("Create PaymentAdjustment") + public PaymentAdjustmentEntity create(@Body PaymentAdjustmentEntity entity) { + checkPermissions("write"); + validate(entity); + return repository.save(entity); + } + + @Put("/{id}") + @Documentation("Update PaymentAdjustment by id") + public PaymentAdjustmentEntity update(@PathParam("id") Integer id, @Body PaymentAdjustmentEntity entity) { + checkPermissions("write"); + entity.Id = id; + validate(entity); + return repository.update(entity); + } + + @Delete("/{id}") + @Documentation("Delete PaymentAdjustment by id") + public void deleteById(@PathParam("id") Integer id) { + checkPermissions("write"); + if (repository.findOne(id).isEmpty()) { + throw new ResponseStatusException(HttpStatus.NOT_FOUND, "PaymentAdjustment not found"); + } + repository.deleteById(id); + } + + private List runFilter(Map filter) { + StringBuilder hql = new StringBuilder("from PaymentAdjustmentEntity e"); + Map params = new LinkedHashMap<>(); + boolean first = true; + if (filter != null && filter.get("equals") instanceof Map equals) { + for (Map.Entry entry : equals.entrySet()) { + String field = requireKnownField(String.valueOf(entry.getKey())); + String paramName = "p" + params.size(); + hql.append(first ? " where e." : " and e.").append(field).append(" = :").append(paramName); + params.put(paramName, entry.getValue()); + first = false; + } + } + if (filter != null && filter.get("conditions") instanceof List conditions) { + for (Object raw : conditions) { + if (!(raw instanceof Map condition)) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Invalid filter condition"); + } + String field = requireKnownField(String.valueOf(condition.get("propertyName"))); + String operator = String.valueOf(condition.get("operator")).toUpperCase(Locale.ROOT); + Object value = condition.get("value"); + String paramName = "p" + params.size(); + String clause = switch (operator) { + case "EQ" -> "e." + field + " = :" + paramName; + case "IN" -> { + if (!(value instanceof Collection)) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "IN value must be a list for field: " + field); + } + yield "e." + field + " in (:" + paramName + ")"; + } + case "LIKE" -> "e." + field + " like :" + paramName; + default -> throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Unsupported operator: " + operator); + }; + hql.append(first ? " where " : " and ").append(clause); + params.put(paramName, value); + first = false; + } + } + return repository.query(hql.toString(), params); + } + + private static String requireKnownField(String field) { + if (!FILTER_FIELDS.contains(field)) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Unknown filter field: " + field); + } + return field; + } + + private void checkPermissions(String op) { + if ("read".equals(op) && !(UserFacade.isInRole("codbex-payments.PaymentAdjustment.PaymentAdjustmentReadOnly") || UserFacade.isInRole("codbex-payments.PaymentAdjustment.PaymentAdjustmentFullAccess"))) { + throw new ResponseStatusException(HttpStatus.FORBIDDEN); + } + if ("write".equals(op) && !UserFacade.isInRole("codbex-payments.PaymentAdjustment.PaymentAdjustmentFullAccess")) { + throw new ResponseStatusException(HttpStatus.FORBIDDEN); + } + } + + private static void validate(PaymentAdjustmentEntity entity) { + if (entity.Date == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Date' property is required"); + } + if (entity.Valor == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Valor' property is required"); + } + if (entity.Amount == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Amount' property is required"); + } + if (entity.Currency == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Currency' property is required"); + } + if (entity.Reason != null && entity.Reason.length() > 100) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Reason' exceeds the maximum length of 100"); + } + if (entity.Company == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Company' property is required"); + } + if (entity.UUID != null && entity.UUID.length() > 36) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'UUID' exceeds the maximum length of 36"); + } + if (entity.CreatedBy != null && entity.CreatedBy.length() > 20) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'CreatedBy' exceeds the maximum length of 20"); + } + if (entity.UpdatedBy != null && entity.UpdatedBy.length() > 20) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'UpdatedBy' exceeds the maximum length of 20"); + } + } +} diff --git a/codbex-payments/gen/codbex_payments/api/paymentrecord/PaymentRecordController.java b/codbex-payments/gen/codbex_payments/api/paymentrecord/PaymentRecordController.java new file mode 100644 index 0000000..efe4bbb --- /dev/null +++ b/codbex-payments/gen/codbex_payments/api/paymentrecord/PaymentRecordController.java @@ -0,0 +1,224 @@ +package gen.codbex_payments.api.paymentrecord; + +import gen.codbex_payments.data.paymentrecord.PaymentRecordEntity; +import gen.codbex_payments.data.paymentrecord.PaymentRecordRepository; + +import org.eclipse.dirigible.components.api.security.UserFacade; +import org.eclipse.dirigible.engine.java.annotations.Documentation; +import org.eclipse.dirigible.engine.java.annotations.Inject; +import org.eclipse.dirigible.engine.java.annotations.http.Body; +import org.eclipse.dirigible.engine.java.annotations.http.Controller; +import org.eclipse.dirigible.engine.java.annotations.http.Delete; +import org.eclipse.dirigible.engine.java.annotations.http.Get; +import org.eclipse.dirigible.engine.java.annotations.http.PathParam; +import org.eclipse.dirigible.engine.java.annotations.http.Post; +import org.eclipse.dirigible.engine.java.annotations.http.Put; +import org.eclipse.dirigible.engine.java.annotations.http.QueryParam; +import org.springframework.http.HttpStatus; +import org.springframework.web.server.ResponseStatusException; + +import java.util.Collection; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Set; + +@Controller +@Documentation("codbex-payments - PaymentRecord Controller") +public class PaymentRecordController { + + private static final Set FILTER_FIELDS = Set.of("Id", "Date", "Valor", "OurPartyIBAN", "CounterpartyIBAN", "CounterpartyName", "Amount", "Company", "Currency", "PaymentDirection", "PaymentType", "Reason", "Description", "UUID", "Reference", "Deleted", "DeletedAt", "DeletedReason", "CreatedAt", "CreatedBy", "UpdatedAt", "UpdatedBy"); + + @Inject + private PaymentRecordRepository repository; + + @Get + @Documentation("List PaymentRecord") + public List getAll(@QueryParam("$limit") Integer limit, + @QueryParam("$offset") Integer offset) { + checkPermissions("read"); + int actualLimit = limit != null ? limit.intValue() : 20; + int actualOffset = offset != null ? offset.intValue() : 0; + List result = repository.findAll(actualLimit, actualOffset); + return result; + } + + @Get("/count") + @Documentation("Count PaymentRecord") + public Map count() { + checkPermissions("read"); + return Map.of("count", repository.count()); + } + + @Post("/count") + @Documentation("Count PaymentRecord with filter") + public Map countWithFilter(@Body Map filter) { + checkPermissions("read"); + return Map.of("count", (long) runFilter(filter).size()); + } + + @Post("/search") + @Documentation("Search PaymentRecord") + public List search(@Body Map filter) { + checkPermissions("read"); + List result = runFilter(filter); + return result; + } + + @Get("/{id}") + @Documentation("Get PaymentRecord by id") + public PaymentRecordEntity getById(@PathParam("id") Integer id) { + checkPermissions("read"); + PaymentRecordEntity entity = repository.findOne(id) + .orElseThrow(() -> new ResponseStatusException(HttpStatus.NOT_FOUND, "PaymentRecord not found")); + return entity; + } + + @Post + @Documentation("Create PaymentRecord") + public PaymentRecordEntity create(@Body PaymentRecordEntity entity) { + checkPermissions("write"); + validate(entity); + return repository.save(entity); + } + + @Put("/{id}") + @Documentation("Update PaymentRecord by id") + public PaymentRecordEntity update(@PathParam("id") Integer id, @Body PaymentRecordEntity entity) { + checkPermissions("write"); + entity.Id = id; + validate(entity); + return repository.update(entity); + } + + @Delete("/{id}") + @Documentation("Delete PaymentRecord by id") + public void deleteById(@PathParam("id") Integer id) { + checkPermissions("write"); + if (repository.findOne(id).isEmpty()) { + throw new ResponseStatusException(HttpStatus.NOT_FOUND, "PaymentRecord not found"); + } + repository.deleteById(id); + } + + private List runFilter(Map filter) { + StringBuilder hql = new StringBuilder("from PaymentRecordEntity e"); + Map params = new LinkedHashMap<>(); + boolean first = true; + if (filter != null && filter.get("equals") instanceof Map equals) { + for (Map.Entry entry : equals.entrySet()) { + String field = requireKnownField(String.valueOf(entry.getKey())); + String paramName = "p" + params.size(); + hql.append(first ? " where e." : " and e.").append(field).append(" = :").append(paramName); + params.put(paramName, entry.getValue()); + first = false; + } + } + if (filter != null && filter.get("conditions") instanceof List conditions) { + for (Object raw : conditions) { + if (!(raw instanceof Map condition)) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Invalid filter condition"); + } + String field = requireKnownField(String.valueOf(condition.get("propertyName"))); + String operator = String.valueOf(condition.get("operator")).toUpperCase(Locale.ROOT); + Object value = condition.get("value"); + String paramName = "p" + params.size(); + String clause = switch (operator) { + case "EQ" -> "e." + field + " = :" + paramName; + case "IN" -> { + if (!(value instanceof Collection)) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "IN value must be a list for field: " + field); + } + yield "e." + field + " in (:" + paramName + ")"; + } + case "LIKE" -> "e." + field + " like :" + paramName; + default -> throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Unsupported operator: " + operator); + }; + hql.append(first ? " where " : " and ").append(clause); + params.put(paramName, value); + first = false; + } + } + return repository.query(hql.toString(), params); + } + + private static String requireKnownField(String field) { + if (!FILTER_FIELDS.contains(field)) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Unknown filter field: " + field); + } + return field; + } + + private void checkPermissions(String op) { + if ("read".equals(op) && !(UserFacade.isInRole("codbex-payments.PaymentRecord.PaymentRecordReadOnly") || UserFacade.isInRole("codbex-payments.PaymentRecord.PaymentRecordFullAccess"))) { + throw new ResponseStatusException(HttpStatus.FORBIDDEN); + } + if ("write".equals(op) && !UserFacade.isInRole("codbex-payments.PaymentRecord.PaymentRecordFullAccess")) { + throw new ResponseStatusException(HttpStatus.FORBIDDEN); + } + } + + private static void validate(PaymentRecordEntity entity) { + if (entity.Date == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Date' property is required"); + } + if (entity.Valor == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Valor' property is required"); + } + if (entity.OurPartyIBAN == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'OurPartyIBAN' property is required"); + } + if (entity.OurPartyIBAN != null && entity.OurPartyIBAN.length() > 34) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'OurPartyIBAN' exceeds the maximum length of 34"); + } + if (entity.OurPartyIBAN != null && !entity.OurPartyIBAN.toString().matches("^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$")) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The value of 'OurPartyIBAN' does not match the required pattern '^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'"); + } + if (entity.CounterpartyIBAN == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'CounterpartyIBAN' property is required"); + } + if (entity.CounterpartyIBAN != null && entity.CounterpartyIBAN.length() > 34) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'CounterpartyIBAN' exceeds the maximum length of 34"); + } + if (entity.CounterpartyIBAN != null && !entity.CounterpartyIBAN.toString().matches("^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$")) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The value of 'CounterpartyIBAN' does not match the required pattern '^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'"); + } + if (entity.CounterpartyName != null && entity.CounterpartyName.length() > 100) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'CounterpartyName' exceeds the maximum length of 100"); + } + if (entity.Amount == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Amount' property is required"); + } + if (entity.Currency == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Currency' property is required"); + } + if (entity.PaymentDirection == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'PaymentDirection' property is required"); + } + if (entity.PaymentType == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'PaymentType' property is required"); + } + if (entity.Reason != null && entity.Reason.length() > 100) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Reason' exceeds the maximum length of 100"); + } + if (entity.Description != null && entity.Description.length() > 100) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Description' exceeds the maximum length of 100"); + } + if (entity.UUID != null && entity.UUID.length() > 36) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'UUID' exceeds the maximum length of 36"); + } + if (entity.Reference != null && entity.Reference.length() > 36) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Reference' exceeds the maximum length of 36"); + } + if (entity.DeletedReason != null && entity.DeletedReason.length() > 255) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'DeletedReason' exceeds the maximum length of 255"); + } + if (entity.CreatedBy != null && entity.CreatedBy.length() > 20) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'CreatedBy' exceeds the maximum length of 20"); + } + if (entity.UpdatedBy != null && entity.UpdatedBy.length() > 20) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'UpdatedBy' exceeds the maximum length of 20"); + } + } +} diff --git a/codbex-payments/gen/codbex_payments/api/settings/PaymentDirectionController.java b/codbex-payments/gen/codbex_payments/api/settings/PaymentDirectionController.java new file mode 100644 index 0000000..b133939 --- /dev/null +++ b/codbex-payments/gen/codbex_payments/api/settings/PaymentDirectionController.java @@ -0,0 +1,153 @@ +package gen.codbex_payments.api.settings; + +import gen.codbex_payments.data.settings.PaymentDirectionEntity; +import gen.codbex_payments.data.settings.PaymentDirectionRepository; + +import org.eclipse.dirigible.components.api.security.UserFacade; +import org.eclipse.dirigible.engine.java.annotations.Documentation; +import org.eclipse.dirigible.engine.java.annotations.Inject; +import org.eclipse.dirigible.engine.java.annotations.http.Body; +import org.eclipse.dirigible.engine.java.annotations.http.Controller; +import org.eclipse.dirigible.engine.java.annotations.http.Delete; +import org.eclipse.dirigible.engine.java.annotations.http.Get; +import org.eclipse.dirigible.engine.java.annotations.http.PathParam; +import org.eclipse.dirigible.engine.java.annotations.http.Post; +import org.eclipse.dirigible.engine.java.annotations.http.Put; +import org.eclipse.dirigible.engine.java.annotations.http.QueryParam; +import org.springframework.http.HttpStatus; +import org.springframework.web.server.ResponseStatusException; + +import java.util.Collection; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Set; + +@Controller +@Documentation("codbex-payments - PaymentDirection Controller") +public class PaymentDirectionController { + + private static final Set FILTER_FIELDS = Set.of("Id", "Name"); + + @Inject + private PaymentDirectionRepository repository; + + @Get + @Documentation("List PaymentDirection") + public List getAll(@QueryParam("$limit") Integer limit, + @QueryParam("$offset") Integer offset) { + int actualLimit = limit != null ? limit.intValue() : 20; + int actualOffset = offset != null ? offset.intValue() : 0; + List result = repository.findAll(actualLimit, actualOffset); + return result; + } + + @Get("/count") + @Documentation("Count PaymentDirection") + public Map count() { + return Map.of("count", repository.count()); + } + + @Post("/count") + @Documentation("Count PaymentDirection with filter") + public Map countWithFilter(@Body Map filter) { + return Map.of("count", (long) runFilter(filter).size()); + } + + @Post("/search") + @Documentation("Search PaymentDirection") + public List search(@Body Map filter) { + List result = runFilter(filter); + return result; + } + + @Get("/{id}") + @Documentation("Get PaymentDirection by id") + public PaymentDirectionEntity getById(@PathParam("id") Integer id) { + PaymentDirectionEntity entity = repository.findOne(id) + .orElseThrow(() -> new ResponseStatusException(HttpStatus.NOT_FOUND, "PaymentDirection not found")); + return entity; + } + + @Post + @Documentation("Create PaymentDirection") + public PaymentDirectionEntity create(@Body PaymentDirectionEntity entity) { + validate(entity); + return repository.save(entity); + } + + @Put("/{id}") + @Documentation("Update PaymentDirection by id") + public PaymentDirectionEntity update(@PathParam("id") Integer id, @Body PaymentDirectionEntity entity) { + entity.Id = id; + validate(entity); + return repository.update(entity); + } + + @Delete("/{id}") + @Documentation("Delete PaymentDirection by id") + public void deleteById(@PathParam("id") Integer id) { + if (repository.findOne(id).isEmpty()) { + throw new ResponseStatusException(HttpStatus.NOT_FOUND, "PaymentDirection not found"); + } + repository.deleteById(id); + } + + private List runFilter(Map filter) { + StringBuilder hql = new StringBuilder("from PaymentDirectionEntity e"); + Map params = new LinkedHashMap<>(); + boolean first = true; + if (filter != null && filter.get("equals") instanceof Map equals) { + for (Map.Entry entry : equals.entrySet()) { + String field = requireKnownField(String.valueOf(entry.getKey())); + String paramName = "p" + params.size(); + hql.append(first ? " where e." : " and e.").append(field).append(" = :").append(paramName); + params.put(paramName, entry.getValue()); + first = false; + } + } + if (filter != null && filter.get("conditions") instanceof List conditions) { + for (Object raw : conditions) { + if (!(raw instanceof Map condition)) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Invalid filter condition"); + } + String field = requireKnownField(String.valueOf(condition.get("propertyName"))); + String operator = String.valueOf(condition.get("operator")).toUpperCase(Locale.ROOT); + Object value = condition.get("value"); + String paramName = "p" + params.size(); + String clause = switch (operator) { + case "EQ" -> "e." + field + " = :" + paramName; + case "IN" -> { + if (!(value instanceof Collection)) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "IN value must be a list for field: " + field); + } + yield "e." + field + " in (:" + paramName + ")"; + } + case "LIKE" -> "e." + field + " like :" + paramName; + default -> throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Unsupported operator: " + operator); + }; + hql.append(first ? " where " : " and ").append(clause); + params.put(paramName, value); + first = false; + } + } + return repository.query(hql.toString(), params); + } + + private static String requireKnownField(String field) { + if (!FILTER_FIELDS.contains(field)) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Unknown filter field: " + field); + } + return field; + } + + private static void validate(PaymentDirectionEntity entity) { + if (entity.Name == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Name' property is required"); + } + if (entity.Name != null && entity.Name.length() > 20) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Name' exceeds the maximum length of 20"); + } + } +} diff --git a/codbex-payments/gen/codbex_payments/api/settings/PaymentTypeController.java b/codbex-payments/gen/codbex_payments/api/settings/PaymentTypeController.java new file mode 100644 index 0000000..17d6fcb --- /dev/null +++ b/codbex-payments/gen/codbex_payments/api/settings/PaymentTypeController.java @@ -0,0 +1,170 @@ +package gen.codbex_payments.api.settings; + +import gen.codbex_payments.data.settings.PaymentTypeEntity; +import gen.codbex_payments.data.settings.PaymentTypeRepository; + +import org.eclipse.dirigible.components.api.security.UserFacade; +import org.eclipse.dirigible.engine.java.annotations.Documentation; +import org.eclipse.dirigible.engine.java.annotations.Inject; +import org.eclipse.dirigible.engine.java.annotations.http.Body; +import org.eclipse.dirigible.engine.java.annotations.http.Controller; +import org.eclipse.dirigible.engine.java.annotations.http.Delete; +import org.eclipse.dirigible.engine.java.annotations.http.Get; +import org.eclipse.dirigible.engine.java.annotations.http.PathParam; +import org.eclipse.dirigible.engine.java.annotations.http.Post; +import org.eclipse.dirigible.engine.java.annotations.http.Put; +import org.eclipse.dirigible.engine.java.annotations.http.QueryParam; +import org.springframework.http.HttpStatus; +import org.springframework.web.server.ResponseStatusException; + +import java.util.Collection; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Set; + +@Controller +@Documentation("codbex-payments - PaymentType Controller") +public class PaymentTypeController { + + private static final Set FILTER_FIELDS = Set.of("Id", "Name"); + + @Inject + private PaymentTypeRepository repository; + + @Get + @Documentation("List PaymentType") + public List getAll(@QueryParam("$limit") Integer limit, + @QueryParam("$offset") Integer offset) { + checkPermissions("read"); + int actualLimit = limit != null ? limit.intValue() : 20; + int actualOffset = offset != null ? offset.intValue() : 0; + List result = repository.findAll(actualLimit, actualOffset); + return result; + } + + @Get("/count") + @Documentation("Count PaymentType") + public Map count() { + checkPermissions("read"); + return Map.of("count", repository.count()); + } + + @Post("/count") + @Documentation("Count PaymentType with filter") + public Map countWithFilter(@Body Map filter) { + checkPermissions("read"); + return Map.of("count", (long) runFilter(filter).size()); + } + + @Post("/search") + @Documentation("Search PaymentType") + public List search(@Body Map filter) { + checkPermissions("read"); + List result = runFilter(filter); + return result; + } + + @Get("/{id}") + @Documentation("Get PaymentType by id") + public PaymentTypeEntity getById(@PathParam("id") Integer id) { + checkPermissions("read"); + PaymentTypeEntity entity = repository.findOne(id) + .orElseThrow(() -> new ResponseStatusException(HttpStatus.NOT_FOUND, "PaymentType not found")); + return entity; + } + + @Post + @Documentation("Create PaymentType") + public PaymentTypeEntity create(@Body PaymentTypeEntity entity) { + checkPermissions("write"); + validate(entity); + return repository.save(entity); + } + + @Put("/{id}") + @Documentation("Update PaymentType by id") + public PaymentTypeEntity update(@PathParam("id") Integer id, @Body PaymentTypeEntity entity) { + checkPermissions("write"); + entity.Id = id; + validate(entity); + return repository.update(entity); + } + + @Delete("/{id}") + @Documentation("Delete PaymentType by id") + public void deleteById(@PathParam("id") Integer id) { + checkPermissions("write"); + if (repository.findOne(id).isEmpty()) { + throw new ResponseStatusException(HttpStatus.NOT_FOUND, "PaymentType not found"); + } + repository.deleteById(id); + } + + private List runFilter(Map filter) { + StringBuilder hql = new StringBuilder("from PaymentTypeEntity e"); + Map params = new LinkedHashMap<>(); + boolean first = true; + if (filter != null && filter.get("equals") instanceof Map equals) { + for (Map.Entry entry : equals.entrySet()) { + String field = requireKnownField(String.valueOf(entry.getKey())); + String paramName = "p" + params.size(); + hql.append(first ? " where e." : " and e.").append(field).append(" = :").append(paramName); + params.put(paramName, entry.getValue()); + first = false; + } + } + if (filter != null && filter.get("conditions") instanceof List conditions) { + for (Object raw : conditions) { + if (!(raw instanceof Map condition)) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Invalid filter condition"); + } + String field = requireKnownField(String.valueOf(condition.get("propertyName"))); + String operator = String.valueOf(condition.get("operator")).toUpperCase(Locale.ROOT); + Object value = condition.get("value"); + String paramName = "p" + params.size(); + String clause = switch (operator) { + case "EQ" -> "e." + field + " = :" + paramName; + case "IN" -> { + if (!(value instanceof Collection)) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "IN value must be a list for field: " + field); + } + yield "e." + field + " in (:" + paramName + ")"; + } + case "LIKE" -> "e." + field + " like :" + paramName; + default -> throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Unsupported operator: " + operator); + }; + hql.append(first ? " where " : " and ").append(clause); + params.put(paramName, value); + first = false; + } + } + return repository.query(hql.toString(), params); + } + + private static String requireKnownField(String field) { + if (!FILTER_FIELDS.contains(field)) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Unknown filter field: " + field); + } + return field; + } + + private void checkPermissions(String op) { + if ("read".equals(op) && !(UserFacade.isInRole("codbex-payments.Settings.PaymentTypeReadOnly") || UserFacade.isInRole("codbex-payments.Settings.PaymentTypeFullAccess"))) { + throw new ResponseStatusException(HttpStatus.FORBIDDEN); + } + if ("write".equals(op) && !UserFacade.isInRole("codbex-payments.Settings.PaymentTypeFullAccess")) { + throw new ResponseStatusException(HttpStatus.FORBIDDEN); + } + } + + private static void validate(PaymentTypeEntity entity) { + if (entity.Name == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Name' property is required"); + } + if (entity.Name != null && entity.Name.length() > 20) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Name' exceeds the maximum length of 20"); + } + } +} diff --git a/codbex-payments/gen/codbex_payments/api/supplierpayment/SupplierPaymentController.java b/codbex-payments/gen/codbex_payments/api/supplierpayment/SupplierPaymentController.java new file mode 100644 index 0000000..9f1e54e --- /dev/null +++ b/codbex-payments/gen/codbex_payments/api/supplierpayment/SupplierPaymentController.java @@ -0,0 +1,227 @@ +package gen.codbex_payments.api.supplierpayment; + +import gen.codbex_payments.data.supplierpayment.SupplierPaymentEntity; +import gen.codbex_payments.data.supplierpayment.SupplierPaymentRepository; + +import org.eclipse.dirigible.components.api.security.UserFacade; +import org.eclipse.dirigible.engine.java.annotations.Documentation; +import org.eclipse.dirigible.engine.java.annotations.Inject; +import org.eclipse.dirigible.engine.java.annotations.http.Body; +import org.eclipse.dirigible.engine.java.annotations.http.Controller; +import org.eclipse.dirigible.engine.java.annotations.http.Delete; +import org.eclipse.dirigible.engine.java.annotations.http.Get; +import org.eclipse.dirigible.engine.java.annotations.http.PathParam; +import org.eclipse.dirigible.engine.java.annotations.http.Post; +import org.eclipse.dirigible.engine.java.annotations.http.Put; +import org.eclipse.dirigible.engine.java.annotations.http.QueryParam; +import org.springframework.http.HttpStatus; +import org.springframework.web.server.ResponseStatusException; + +import java.util.Collection; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Set; + +@Controller +@Documentation("codbex-payments - SupplierPayment Controller") +public class SupplierPaymentController { + + private static final Set FILTER_FIELDS = Set.of("Id", "Supplier", "Date", "Valor", "OurPartyIBAN", "CounterpartyIBAN", "CounterpartyName", "Amount", "Currency", "Company", "Reason", "Description", "PaymentMethod", "Name", "UUID", "Reference", "CreatedAt", "CreatedBy", "UpdatedAt", "UpdatedBy"); + + @Inject + private SupplierPaymentRepository repository; + + @Get + @Documentation("List SupplierPayment") + public List getAll(@QueryParam("$limit") Integer limit, + @QueryParam("$offset") Integer offset) { + checkPermissions("read"); + int actualLimit = limit != null ? limit.intValue() : 20; + int actualOffset = offset != null ? offset.intValue() : 0; + List result = repository.findAll(actualLimit, actualOffset); + return result; + } + + @Get("/count") + @Documentation("Count SupplierPayment") + public Map count() { + checkPermissions("read"); + return Map.of("count", repository.count()); + } + + @Post("/count") + @Documentation("Count SupplierPayment with filter") + public Map countWithFilter(@Body Map filter) { + checkPermissions("read"); + return Map.of("count", (long) runFilter(filter).size()); + } + + @Post("/search") + @Documentation("Search SupplierPayment") + public List search(@Body Map filter) { + checkPermissions("read"); + List result = runFilter(filter); + return result; + } + + @Get("/{id}") + @Documentation("Get SupplierPayment by id") + public SupplierPaymentEntity getById(@PathParam("id") Integer id) { + checkPermissions("read"); + SupplierPaymentEntity entity = repository.findOne(id) + .orElseThrow(() -> new ResponseStatusException(HttpStatus.NOT_FOUND, "SupplierPayment not found")); + return entity; + } + + @Post + @Documentation("Create SupplierPayment") + public SupplierPaymentEntity create(@Body SupplierPaymentEntity entity) { + checkPermissions("write"); + validate(entity); + return repository.save(entity); + } + + @Put("/{id}") + @Documentation("Update SupplierPayment by id") + public SupplierPaymentEntity update(@PathParam("id") Integer id, @Body SupplierPaymentEntity entity) { + checkPermissions("write"); + entity.Id = id; + validate(entity); + return repository.update(entity); + } + + @Delete("/{id}") + @Documentation("Delete SupplierPayment by id") + public void deleteById(@PathParam("id") Integer id) { + checkPermissions("write"); + if (repository.findOne(id).isEmpty()) { + throw new ResponseStatusException(HttpStatus.NOT_FOUND, "SupplierPayment not found"); + } + repository.deleteById(id); + } + + private List runFilter(Map filter) { + StringBuilder hql = new StringBuilder("from SupplierPaymentEntity e"); + Map params = new LinkedHashMap<>(); + boolean first = true; + if (filter != null && filter.get("equals") instanceof Map equals) { + for (Map.Entry entry : equals.entrySet()) { + String field = requireKnownField(String.valueOf(entry.getKey())); + String paramName = "p" + params.size(); + hql.append(first ? " where e." : " and e.").append(field).append(" = :").append(paramName); + params.put(paramName, entry.getValue()); + first = false; + } + } + if (filter != null && filter.get("conditions") instanceof List conditions) { + for (Object raw : conditions) { + if (!(raw instanceof Map condition)) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Invalid filter condition"); + } + String field = requireKnownField(String.valueOf(condition.get("propertyName"))); + String operator = String.valueOf(condition.get("operator")).toUpperCase(Locale.ROOT); + Object value = condition.get("value"); + String paramName = "p" + params.size(); + String clause = switch (operator) { + case "EQ" -> "e." + field + " = :" + paramName; + case "IN" -> { + if (!(value instanceof Collection)) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "IN value must be a list for field: " + field); + } + yield "e." + field + " in (:" + paramName + ")"; + } + case "LIKE" -> "e." + field + " like :" + paramName; + default -> throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Unsupported operator: " + operator); + }; + hql.append(first ? " where " : " and ").append(clause); + params.put(paramName, value); + first = false; + } + } + return repository.query(hql.toString(), params); + } + + private static String requireKnownField(String field) { + if (!FILTER_FIELDS.contains(field)) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Unknown filter field: " + field); + } + return field; + } + + private void checkPermissions(String op) { + if ("read".equals(op) && !(UserFacade.isInRole("codbex-payments.SupplierPayment.SupplierPaymentReadOnly") || UserFacade.isInRole("codbex-payments.SupplierPayment.SupplierPaymentFullAccess"))) { + throw new ResponseStatusException(HttpStatus.FORBIDDEN); + } + if ("write".equals(op) && !UserFacade.isInRole("codbex-payments.SupplierPayment.SupplierPaymentFullAccess")) { + throw new ResponseStatusException(HttpStatus.FORBIDDEN); + } + } + + private static void validate(SupplierPaymentEntity entity) { + if (entity.Supplier == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Supplier' property is required"); + } + if (entity.Date == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Date' property is required"); + } + if (entity.Valor == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Valor' property is required"); + } + if (entity.OurPartyIBAN == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'OurPartyIBAN' property is required"); + } + if (entity.OurPartyIBAN != null && entity.OurPartyIBAN.length() > 34) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'OurPartyIBAN' exceeds the maximum length of 34"); + } + if (entity.OurPartyIBAN != null && !entity.OurPartyIBAN.toString().matches("^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$")) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The value of 'OurPartyIBAN' does not match the required pattern '^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'"); + } + if (entity.CounterpartyIBAN == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'CounterpartyIBAN' property is required"); + } + if (entity.CounterpartyIBAN != null && entity.CounterpartyIBAN.length() > 34) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'CounterpartyIBAN' exceeds the maximum length of 34"); + } + if (entity.CounterpartyIBAN != null && !entity.CounterpartyIBAN.toString().matches("^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$")) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The value of 'CounterpartyIBAN' does not match the required pattern '^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$'"); + } + if (entity.CounterpartyName != null && entity.CounterpartyName.length() > 100) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'CounterpartyName' exceeds the maximum length of 100"); + } + if (entity.Amount == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Amount' property is required"); + } + if (entity.Currency == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Currency' property is required"); + } + if (entity.Reason == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Reason' property is required"); + } + if (entity.Reason != null && entity.Reason.length() > 100) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Reason' exceeds the maximum length of 100"); + } + if (entity.Description != null && entity.Description.length() > 100) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Description' exceeds the maximum length of 100"); + } + if (entity.PaymentMethod == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'PaymentMethod' property is required"); + } + if (entity.Name != null && entity.Name.length() > 20) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Name' exceeds the maximum length of 20"); + } + if (entity.UUID != null && entity.UUID.length() > 36) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'UUID' exceeds the maximum length of 36"); + } + if (entity.Reference != null && entity.Reference.length() > 36) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'Reference' exceeds the maximum length of 36"); + } + if (entity.CreatedBy != null && entity.CreatedBy.length() > 20) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'CreatedBy' exceeds the maximum length of 20"); + } + if (entity.UpdatedBy != null && entity.UpdatedBy.length() > 20) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The 'UpdatedBy' exceeds the maximum length of 20"); + } + } +} diff --git a/codbex-payments/gen/codbex-payments/data/CustomerPayment/CustomerPayment.extensionpoint b/codbex-payments/gen/codbex_payments/data/customerpayment/CustomerPayment.extensionpoint similarity index 98% rename from codbex-payments/gen/codbex-payments/data/CustomerPayment/CustomerPayment.extensionpoint rename to codbex-payments/gen/codbex_payments/data/customerpayment/CustomerPayment.extensionpoint index 4136418..f4092b6 100644 --- a/codbex-payments/gen/codbex-payments/data/CustomerPayment/CustomerPayment.extensionpoint +++ b/codbex-payments/gen/codbex_payments/data/customerpayment/CustomerPayment.extensionpoint @@ -1,4 +1,4 @@ { "name": "codbex-payments-CustomerPayment-CustomerPayment", "description": "Extension Point for the codbex-payments-CustomerPayment-CustomerPayment entity" -} \ No newline at end of file +} diff --git a/codbex-payments/gen/codbex_payments/data/customerpayment/CustomerPaymentEntity.java b/codbex-payments/gen/codbex_payments/data/customerpayment/CustomerPaymentEntity.java new file mode 100644 index 0000000..6cbc415 --- /dev/null +++ b/codbex-payments/gen/codbex_payments/data/customerpayment/CustomerPaymentEntity.java @@ -0,0 +1,106 @@ +package gen.codbex_payments.data.customerpayment; + +import org.eclipse.dirigible.engine.java.annotations.Column; +import org.eclipse.dirigible.engine.java.annotations.CreatedAt; +import org.eclipse.dirigible.engine.java.annotations.CreatedBy; +import org.eclipse.dirigible.engine.java.annotations.Documentation; +import org.eclipse.dirigible.engine.java.annotations.Entity; +import org.eclipse.dirigible.engine.java.annotations.GeneratedValue; +import org.eclipse.dirigible.engine.java.annotations.GenerationType; +import org.eclipse.dirigible.engine.java.annotations.Id; +import org.eclipse.dirigible.engine.java.annotations.Table; +import org.eclipse.dirigible.engine.java.annotations.UpdatedAt; +import org.eclipse.dirigible.engine.java.annotations.UpdatedBy; + +@Entity +@Table(name = "CODBEX_CUSTOMERPAYMENT") +@Documentation("CustomerPayment entity mapping") +public class CustomerPaymentEntity { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "CUSTOMERPAYMENT_ID") + @Documentation("Id") + public Integer Id; + + @Column(name = "CUSTOMERPAYMENT_CUSTOMER", nullable = false) + @Documentation("Customer") + public Integer Customer; + + @Column(name = "CUSTOMERPAYMENT_DATE", nullable = false) + @Documentation("Date") + public java.time.LocalDate Date; + + @Column(name = "CUSTOMERPAYMENT_VALOR", nullable = false) + @Documentation("Valor") + public java.time.LocalDate Valor; + + @Column(name = "CUSTOMERPAYMENT_OURPARTYIBAN", length = 34, nullable = false) + @Documentation("OurPartyIBAN") + public String OurPartyIBAN; + + @Column(name = "CUSTOMERPAYMENT_COUNTERPARTYIBAN", length = 34, nullable = false) + @Documentation("CounterpartyIBAN") + public String CounterpartyIBAN; + + @Column(name = "CUSTOMERPAYMENT_COUNTERPARTYNAME", length = 100, nullable = true) + @Documentation("CounterpartyName") + public String CounterpartyName; + + @Column(name = "CUSTOMERPAYMENT_AMOUNT", precision = 16, scale = 2, nullable = false) + @Documentation("Amount") + public java.math.BigDecimal Amount; + + @Column(name = "CUSTOMERPAYMENT_CURRENCY", nullable = false) + @Documentation("Currency") + public Integer Currency; + + @Column(name = "CUSTOMERPAYMENT_COMPANY", nullable = true) + @Documentation("Company") + public Integer Company; + + @Column(name = "CUSTOMERPAYMENT_REASON", length = 100, nullable = false) + @Documentation("Reason") + public String Reason; + + @Column(name = "CUSTOMERPAYMENT_DESCRIPTION", length = 100, nullable = true) + @Documentation("Description") + public String Description; + + @Column(name = "CUSTOMERPAYMENT_PAYMENTMETHOD", nullable = false) + @Documentation("PaymentMethod") + public Integer PaymentMethod; + + @Column(name = "CUSTOMERPAYMENT_NAME", length = 20, nullable = true) + @Documentation("Name") + public String Name; + + @Column(name = "CUSTOMERPAYMENT_UUID", length = 36, nullable = false, unique = true) + @Documentation("UUID") + public String UUID; + + @Column(name = "CUSTOMERPAYMENT_REFERENCE", length = 36, nullable = true) + @Documentation("Reference") + public String Reference; + + @CreatedAt + @Column(name = "CUSTOMERPAYMENT_CREATEDAT", nullable = true) + @Documentation("CreatedAt") + public java.time.Instant CreatedAt; + + @CreatedBy + @Column(name = "CUSTOMERPAYMENT_CREATEDBY", length = 20, nullable = true) + @Documentation("CreatedBy") + public String CreatedBy; + + @UpdatedAt + @Column(name = "CUSTOMERPAYMENT_UPDATEDAT", nullable = true) + @Documentation("UpdatedAt") + public java.time.Instant UpdatedAt; + + @UpdatedBy + @Column(name = "CUSTOMERPAYMENT_UPDATEDBY", length = 20, nullable = true) + @Documentation("UpdatedBy") + public String UpdatedBy; + +} diff --git a/codbex-payments/gen/codbex_payments/data/customerpayment/CustomerPaymentRepository.java b/codbex-payments/gen/codbex_payments/data/customerpayment/CustomerPaymentRepository.java new file mode 100644 index 0000000..a45e8f9 --- /dev/null +++ b/codbex-payments/gen/codbex_payments/data/customerpayment/CustomerPaymentRepository.java @@ -0,0 +1,19 @@ +package gen.codbex_payments.data.customerpayment; + +import org.eclipse.dirigible.components.data.store.java.repository.JavaRepository; +import org.eclipse.dirigible.engine.java.annotations.Repository; + +@Repository +public class CustomerPaymentRepository extends JavaRepository { + + public CustomerPaymentRepository() { + super(CustomerPaymentEntity.class); + } + + @Override + public CustomerPaymentEntity save(CustomerPaymentEntity entity) { + entity.Name = new NumberGeneratorService().generateByType('Customer Payment'); + entity.UUID = require("sdk/utils/uuid").random(); + return super.save(entity); + } +} diff --git a/codbex-payments/gen/codbex-payments/data/EmployeePayment/EmployeePayment.extensionpoint b/codbex-payments/gen/codbex_payments/data/employeepayment/EmployeePayment.extensionpoint similarity index 98% rename from codbex-payments/gen/codbex-payments/data/EmployeePayment/EmployeePayment.extensionpoint rename to codbex-payments/gen/codbex_payments/data/employeepayment/EmployeePayment.extensionpoint index 3516966..d253298 100644 --- a/codbex-payments/gen/codbex-payments/data/EmployeePayment/EmployeePayment.extensionpoint +++ b/codbex-payments/gen/codbex_payments/data/employeepayment/EmployeePayment.extensionpoint @@ -1,4 +1,4 @@ { "name": "codbex-payments-EmployeePayment-EmployeePayment", "description": "Extension Point for the codbex-payments-EmployeePayment-EmployeePayment entity" -} \ No newline at end of file +} diff --git a/codbex-payments/gen/codbex_payments/data/employeepayment/EmployeePaymentEntity.java b/codbex-payments/gen/codbex_payments/data/employeepayment/EmployeePaymentEntity.java new file mode 100644 index 0000000..3a5a519 --- /dev/null +++ b/codbex-payments/gen/codbex_payments/data/employeepayment/EmployeePaymentEntity.java @@ -0,0 +1,102 @@ +package gen.codbex_payments.data.employeepayment; + +import org.eclipse.dirigible.engine.java.annotations.Column; +import org.eclipse.dirigible.engine.java.annotations.CreatedAt; +import org.eclipse.dirigible.engine.java.annotations.CreatedBy; +import org.eclipse.dirigible.engine.java.annotations.Documentation; +import org.eclipse.dirigible.engine.java.annotations.Entity; +import org.eclipse.dirigible.engine.java.annotations.GeneratedValue; +import org.eclipse.dirigible.engine.java.annotations.GenerationType; +import org.eclipse.dirigible.engine.java.annotations.Id; +import org.eclipse.dirigible.engine.java.annotations.Table; +import org.eclipse.dirigible.engine.java.annotations.UpdatedAt; +import org.eclipse.dirigible.engine.java.annotations.UpdatedBy; + +@Entity +@Table(name = "CODBEX_EMPLOYEEPAYMENT") +@Documentation("EmployeePayment entity mapping") +public class EmployeePaymentEntity { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "EMPLOYEEPAYMENT_ID") + @Documentation("Id") + public Integer Id; + + @Column(name = "EMPLOYEEPAYMENT_EMPLOYEE", nullable = false) + @Documentation("Employee") + public Integer Employee; + + @Column(name = "EMPLOYEEPAYMENT_DATE", nullable = false) + @Documentation("Date") + public java.time.LocalDate Date; + + @Column(name = "EMPLOYEEPAYMENT_VALOR", nullable = false) + @Documentation("Valor") + public java.time.LocalDate Valor; + + @Column(name = "EMPLOYEEPAYMENT_OURPARTYIBAN", length = 34, nullable = false) + @Documentation("OurPartyIBAN") + public String OurPartyIBAN; + + @Column(name = "EMPLOYEEPAYMENT_COUNTERPARTYIBAN", length = 34, nullable = false) + @Documentation("CounterpartyIBAN") + public String CounterpartyIBAN; + + @Column(name = "EMPLOYEEPAYMENT_COUNTERPARTYNAME", length = 100, nullable = true) + @Documentation("CounterpartyName") + public String CounterpartyName; + + @Column(name = "EMPLOYEEPAYMENT_AMOUNT", precision = 16, scale = 2, nullable = false) + @Documentation("Amount") + public java.math.BigDecimal Amount; + + @Column(name = "EMPLOYEEPAYMENT_CURRENCY", nullable = false) + @Documentation("Currency") + public Integer Currency; + + @Column(name = "EMPLOYEEPAYMENT_COMPANY", nullable = true) + @Documentation("Company") + public Integer Company; + + @Column(name = "EMPLOYEEPAYMENT_REASON", length = 100, nullable = false) + @Documentation("Reason") + public String Reason; + + @Column(name = "EMPLOYEEPAYMENT_DESCRIPTION", length = 100, nullable = true) + @Documentation("Description") + public String Description; + + @Column(name = "EMPLOYEEPAYMENT_NAME", length = 20, nullable = true) + @Documentation("Name") + public String Name; + + @Column(name = "EMPLOYEEPAYMENT_UUID", length = 36, nullable = false, unique = true) + @Documentation("UUID") + public String UUID; + + @Column(name = "EMPLOYEEPAYMENT_REFERENCE", length = 36, nullable = true) + @Documentation("Reference") + public String Reference; + + @CreatedAt + @Column(name = "EMPLOYEEPAYMENT_CREATEDAT", nullable = true) + @Documentation("CreatedAt") + public java.time.Instant CreatedAt; + + @CreatedBy + @Column(name = "EMPLOYEEPAYMENT_CREATEDBY", length = 20, nullable = true) + @Documentation("CreatedBy") + public String CreatedBy; + + @UpdatedAt + @Column(name = "EMPLOYEEPAYMENT_UPDATEDAT", nullable = true) + @Documentation("UpdatedAt") + public java.time.Instant UpdatedAt; + + @UpdatedBy + @Column(name = "EMPLOYEEPAYMENT_UPDATEDBY", length = 20, nullable = true) + @Documentation("UpdatedBy") + public String UpdatedBy; + +} diff --git a/codbex-payments/gen/codbex_payments/data/employeepayment/EmployeePaymentRepository.java b/codbex-payments/gen/codbex_payments/data/employeepayment/EmployeePaymentRepository.java new file mode 100644 index 0000000..0dac71c --- /dev/null +++ b/codbex-payments/gen/codbex_payments/data/employeepayment/EmployeePaymentRepository.java @@ -0,0 +1,19 @@ +package gen.codbex_payments.data.employeepayment; + +import org.eclipse.dirigible.components.data.store.java.repository.JavaRepository; +import org.eclipse.dirigible.engine.java.annotations.Repository; + +@Repository +public class EmployeePaymentRepository extends JavaRepository { + + public EmployeePaymentRepository() { + super(EmployeePaymentEntity.class); + } + + @Override + public EmployeePaymentEntity save(EmployeePaymentEntity entity) { + entity.Name = new NumberGeneratorService().generateByType('Employee Payment'); + entity.UUID = require("sdk/utils/uuid").random(); + return super.save(entity); + } +} diff --git a/codbex-payments/gen/codbex-payments/data/PaymentAdjustment/PaymentAdjustment.extensionpoint b/codbex-payments/gen/codbex_payments/data/paymentadjustment/PaymentAdjustment.extensionpoint similarity index 98% rename from codbex-payments/gen/codbex-payments/data/PaymentAdjustment/PaymentAdjustment.extensionpoint rename to codbex-payments/gen/codbex_payments/data/paymentadjustment/PaymentAdjustment.extensionpoint index 98bfe6f..3d4208b 100644 --- a/codbex-payments/gen/codbex-payments/data/PaymentAdjustment/PaymentAdjustment.extensionpoint +++ b/codbex-payments/gen/codbex_payments/data/paymentadjustment/PaymentAdjustment.extensionpoint @@ -1,4 +1,4 @@ { "name": "codbex-payments-PaymentAdjustment-PaymentAdjustment", "description": "Extension Point for the codbex-payments-PaymentAdjustment-PaymentAdjustment entity" -} \ No newline at end of file +} diff --git a/codbex-payments/gen/codbex_payments/data/paymentadjustment/PaymentAdjustmentEntity.java b/codbex-payments/gen/codbex_payments/data/paymentadjustment/PaymentAdjustmentEntity.java new file mode 100644 index 0000000..8d8b5a9 --- /dev/null +++ b/codbex-payments/gen/codbex_payments/data/paymentadjustment/PaymentAdjustmentEntity.java @@ -0,0 +1,74 @@ +package gen.codbex_payments.data.paymentadjustment; + +import org.eclipse.dirigible.engine.java.annotations.Column; +import org.eclipse.dirigible.engine.java.annotations.CreatedAt; +import org.eclipse.dirigible.engine.java.annotations.CreatedBy; +import org.eclipse.dirigible.engine.java.annotations.Documentation; +import org.eclipse.dirigible.engine.java.annotations.Entity; +import org.eclipse.dirigible.engine.java.annotations.GeneratedValue; +import org.eclipse.dirigible.engine.java.annotations.GenerationType; +import org.eclipse.dirigible.engine.java.annotations.Id; +import org.eclipse.dirigible.engine.java.annotations.Table; +import org.eclipse.dirigible.engine.java.annotations.UpdatedAt; +import org.eclipse.dirigible.engine.java.annotations.UpdatedBy; + +@Entity +@Table(name = "CODBEX_PAYMENTADJUSTMENT") +@Documentation("PaymentAdjustment entity mapping") +public class PaymentAdjustmentEntity { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "PAYMENTADJUSTMENT_ID") + @Documentation("Id") + public Integer Id; + + @Column(name = "PAYMENTADJUSTMENT_DATE", nullable = false) + @Documentation("Date") + public java.time.LocalDate Date; + + @Column(name = "PAYMENTADJUSTMENT_VALOR", nullable = false) + @Documentation("Valor") + public java.time.LocalDate Valor; + + @Column(name = "PAYMENTADJUSTMENT_AMOUNT", precision = 16, scale = 2, nullable = false) + @Documentation("Amount") + public java.math.BigDecimal Amount; + + @Column(name = "PAYMENTADJUSTMENT_CURRENCY", nullable = false) + @Documentation("Currency") + public Integer Currency; + + @Column(name = "PAYMENTADJUSTMENT_REASON", length = 100, nullable = true) + @Documentation("Reason") + public String Reason; + + @Column(name = "PAYMENTADJUSTMENT_COMPANY", nullable = false) + @Documentation("Company") + public Integer Company; + + @Column(name = "PAYMENTADJUSTMENT_UUID", length = 36, nullable = true, unique = true) + @Documentation("UUID") + public String UUID; + + @CreatedAt + @Column(name = "PAYMENTADJUSTMENT_CREATEDAT", nullable = true) + @Documentation("CreatedAt") + public java.time.Instant CreatedAt; + + @CreatedBy + @Column(name = "PAYMENTADJUSTMENT_CREATEDBY", length = 20, nullable = true) + @Documentation("CreatedBy") + public String CreatedBy; + + @UpdatedAt + @Column(name = "PAYMENTADJUSTMENT_UPDATEDAT", nullable = true) + @Documentation("UpdatedAt") + public java.time.Instant UpdatedAt; + + @UpdatedBy + @Column(name = "PAYMENTADJUSTMENT_UPDATEDBY", length = 20, nullable = true) + @Documentation("UpdatedBy") + public String UpdatedBy; + +} diff --git a/codbex-payments/gen/codbex_payments/data/paymentadjustment/PaymentAdjustmentRepository.java b/codbex-payments/gen/codbex_payments/data/paymentadjustment/PaymentAdjustmentRepository.java new file mode 100644 index 0000000..4fa5919 --- /dev/null +++ b/codbex-payments/gen/codbex_payments/data/paymentadjustment/PaymentAdjustmentRepository.java @@ -0,0 +1,18 @@ +package gen.codbex_payments.data.paymentadjustment; + +import org.eclipse.dirigible.components.data.store.java.repository.JavaRepository; +import org.eclipse.dirigible.engine.java.annotations.Repository; + +@Repository +public class PaymentAdjustmentRepository extends JavaRepository { + + public PaymentAdjustmentRepository() { + super(PaymentAdjustmentEntity.class); + } + + @Override + public PaymentAdjustmentEntity save(PaymentAdjustmentEntity entity) { + entity.UUID = require("sdk/utils/uuid").random(); + return super.save(entity); + } +} diff --git a/codbex-payments/gen/codbex-payments/data/PaymentRecord/PaymentRecord.extensionpoint b/codbex-payments/gen/codbex_payments/data/paymentrecord/PaymentRecord.extensionpoint similarity index 98% rename from codbex-payments/gen/codbex-payments/data/PaymentRecord/PaymentRecord.extensionpoint rename to codbex-payments/gen/codbex_payments/data/paymentrecord/PaymentRecord.extensionpoint index b1251db..ea0c354 100644 --- a/codbex-payments/gen/codbex-payments/data/PaymentRecord/PaymentRecord.extensionpoint +++ b/codbex-payments/gen/codbex_payments/data/paymentrecord/PaymentRecord.extensionpoint @@ -1,4 +1,4 @@ { "name": "codbex-payments-PaymentRecord-PaymentRecord", "description": "Extension Point for the codbex-payments-PaymentRecord-PaymentRecord entity" -} \ No newline at end of file +} diff --git a/codbex-payments/gen/codbex_payments/data/paymentrecord/PaymentRecordEntity.java b/codbex-payments/gen/codbex_payments/data/paymentrecord/PaymentRecordEntity.java new file mode 100644 index 0000000..83ee954 --- /dev/null +++ b/codbex-payments/gen/codbex_payments/data/paymentrecord/PaymentRecordEntity.java @@ -0,0 +1,114 @@ +package gen.codbex_payments.data.paymentrecord; + +import org.eclipse.dirigible.engine.java.annotations.Column; +import org.eclipse.dirigible.engine.java.annotations.CreatedAt; +import org.eclipse.dirigible.engine.java.annotations.CreatedBy; +import org.eclipse.dirigible.engine.java.annotations.Documentation; +import org.eclipse.dirigible.engine.java.annotations.Entity; +import org.eclipse.dirigible.engine.java.annotations.GeneratedValue; +import org.eclipse.dirigible.engine.java.annotations.GenerationType; +import org.eclipse.dirigible.engine.java.annotations.Id; +import org.eclipse.dirigible.engine.java.annotations.Table; +import org.eclipse.dirigible.engine.java.annotations.UpdatedAt; +import org.eclipse.dirigible.engine.java.annotations.UpdatedBy; + +@Entity +@Table(name = "CODBEX_PAYMENTRECORD") +@Documentation("PaymentRecord entity mapping") +public class PaymentRecordEntity { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "PAYMENTRECORD_ID") + @Documentation("Id") + public Integer Id; + + @Column(name = "PAYMENTRECORD_DATE", nullable = false) + @Documentation("Date") + public java.time.LocalDate Date; + + @Column(name = "PAYMENTRECORD_VALOR", nullable = false) + @Documentation("Valor") + public java.time.LocalDate Valor; + + @Column(name = "PAYMENTRECORD_OURPARTYIBAN", length = 34, nullable = false) + @Documentation("OurPartyIBAN") + public String OurPartyIBAN; + + @Column(name = "PAYMENTRECORD_COUNTERPARTYIBAN", length = 34, nullable = false) + @Documentation("CounterpartyIBAN") + public String CounterpartyIBAN; + + @Column(name = "PAYMENTRECORD_COUNTERPARTYNAME", length = 100, nullable = true) + @Documentation("CounterpartyName") + public String CounterpartyName; + + @Column(name = "PAYMENTRECORD_AMOUNT", precision = 16, scale = 2, nullable = false) + @Documentation("Amount") + public java.math.BigDecimal Amount; + + @Column(name = "PAYMENTRECORD_COMPANY", nullable = true) + @Documentation("Company") + public Integer Company; + + @Column(name = "PAYMENTRECORD_CURRENCY", nullable = false) + @Documentation("Currency") + public Integer Currency; + + @Column(name = "PAYMENTRECORD_PAYMENTDIRECTION", nullable = false) + @Documentation("PaymentDirection") + public Integer PaymentDirection; + + @Column(name = "PAYMENTRECORD_PAYMENTTYPE", nullable = false) + @Documentation("PaymentType") + public Integer PaymentType; + + @Column(name = "PAYMENTRECORD_REASON", length = 100, nullable = true) + @Documentation("Reason") + public String Reason; + + @Column(name = "PAYMENTRECORD_DESCRIPTION", length = 100, nullable = true) + @Documentation("Description") + public String Description; + + @Column(name = "PAYMENTRECORD_UUID", length = 36, nullable = false, unique = true) + @Documentation("UUID") + public String UUID; + + @Column(name = "PAYMENTRECORD_REFERENCE", length = 36, nullable = true) + @Documentation("Reference") + public String Reference; + + @Column(name = "PAYMENTRECORD_DELETED", nullable = true) + @Documentation("Deleted") + public Boolean Deleted; + + @Column(name = "PAYMENTRECORD_DELETEDAT", nullable = true) + @Documentation("DeletedAt") + public java.time.Instant DeletedAt; + + @Column(name = "PAYMENTRECORD_DELETEDREASON", length = 255, nullable = true) + @Documentation("DeletedReason") + public String DeletedReason; + + @CreatedAt + @Column(name = "PAYMENTRECORD_CREATEDAT", nullable = true) + @Documentation("CreatedAt") + public java.time.Instant CreatedAt; + + @CreatedBy + @Column(name = "PAYMENTRECORD_CREATEDBY", length = 20, nullable = true) + @Documentation("CreatedBy") + public String CreatedBy; + + @UpdatedAt + @Column(name = "PAYMENTRECORD_UPDATEDAT", nullable = true) + @Documentation("UpdatedAt") + public java.time.Instant UpdatedAt; + + @UpdatedBy + @Column(name = "PAYMENTRECORD_UPDATEDBY", length = 20, nullable = true) + @Documentation("UpdatedBy") + public String UpdatedBy; + +} diff --git a/codbex-payments/gen/codbex_payments/data/paymentrecord/PaymentRecordRepository.java b/codbex-payments/gen/codbex_payments/data/paymentrecord/PaymentRecordRepository.java new file mode 100644 index 0000000..029fb44 --- /dev/null +++ b/codbex-payments/gen/codbex_payments/data/paymentrecord/PaymentRecordRepository.java @@ -0,0 +1,18 @@ +package gen.codbex_payments.data.paymentrecord; + +import org.eclipse.dirigible.components.data.store.java.repository.JavaRepository; +import org.eclipse.dirigible.engine.java.annotations.Repository; + +@Repository +public class PaymentRecordRepository extends JavaRepository { + + public PaymentRecordRepository() { + super(PaymentRecordEntity.class); + } + + @Override + public PaymentRecordEntity save(PaymentRecordEntity entity) { + entity.UUID = require("sdk/utils/uuid").random(); + return super.save(entity); + } +} diff --git a/codbex-payments/gen/codbex-payments/data/Settings/PaymentDirection.extensionpoint b/codbex-payments/gen/codbex_payments/data/settings/PaymentDirection.extensionpoint similarity index 98% rename from codbex-payments/gen/codbex-payments/data/Settings/PaymentDirection.extensionpoint rename to codbex-payments/gen/codbex_payments/data/settings/PaymentDirection.extensionpoint index 44517c5..7a74d59 100644 --- a/codbex-payments/gen/codbex-payments/data/Settings/PaymentDirection.extensionpoint +++ b/codbex-payments/gen/codbex_payments/data/settings/PaymentDirection.extensionpoint @@ -1,4 +1,4 @@ { "name": "codbex-payments-Settings-PaymentDirection", "description": "Extension Point for the codbex-payments-Settings-PaymentDirection entity" -} \ No newline at end of file +} diff --git a/codbex-payments/gen/codbex_payments/data/settings/PaymentDirectionEntity.java b/codbex-payments/gen/codbex_payments/data/settings/PaymentDirectionEntity.java new file mode 100644 index 0000000..b0b6d21 --- /dev/null +++ b/codbex-payments/gen/codbex_payments/data/settings/PaymentDirectionEntity.java @@ -0,0 +1,30 @@ +package gen.codbex_payments.data.settings; + +import org.eclipse.dirigible.engine.java.annotations.Column; +import org.eclipse.dirigible.engine.java.annotations.CreatedAt; +import org.eclipse.dirigible.engine.java.annotations.CreatedBy; +import org.eclipse.dirigible.engine.java.annotations.Documentation; +import org.eclipse.dirigible.engine.java.annotations.Entity; +import org.eclipse.dirigible.engine.java.annotations.GeneratedValue; +import org.eclipse.dirigible.engine.java.annotations.GenerationType; +import org.eclipse.dirigible.engine.java.annotations.Id; +import org.eclipse.dirigible.engine.java.annotations.Table; +import org.eclipse.dirigible.engine.java.annotations.UpdatedAt; +import org.eclipse.dirigible.engine.java.annotations.UpdatedBy; + +@Entity +@Table(name = "CODBEX_PAYMENTDIRECTION") +@Documentation("PaymentDirection entity mapping") +public class PaymentDirectionEntity { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "PAYMENTDIRECTION_ID") + @Documentation("Id") + public Integer Id; + + @Column(name = "PAYMENTDIRECTION_NAME", length = 20, nullable = false) + @Documentation("Name") + public String Name; + +} diff --git a/codbex-payments/gen/codbex_payments/data/settings/PaymentDirectionRepository.java b/codbex-payments/gen/codbex_payments/data/settings/PaymentDirectionRepository.java new file mode 100644 index 0000000..415636f --- /dev/null +++ b/codbex-payments/gen/codbex_payments/data/settings/PaymentDirectionRepository.java @@ -0,0 +1,12 @@ +package gen.codbex_payments.data.settings; + +import org.eclipse.dirigible.components.data.store.java.repository.JavaRepository; +import org.eclipse.dirigible.engine.java.annotations.Repository; + +@Repository +public class PaymentDirectionRepository extends JavaRepository { + + public PaymentDirectionRepository() { + super(PaymentDirectionEntity.class); + } +} diff --git a/codbex-payments/gen/codbex-payments/data/Settings/PaymentType.extensionpoint b/codbex-payments/gen/codbex_payments/data/settings/PaymentType.extensionpoint similarity index 98% rename from codbex-payments/gen/codbex-payments/data/Settings/PaymentType.extensionpoint rename to codbex-payments/gen/codbex_payments/data/settings/PaymentType.extensionpoint index 5e9fecc..a310cb5 100644 --- a/codbex-payments/gen/codbex-payments/data/Settings/PaymentType.extensionpoint +++ b/codbex-payments/gen/codbex_payments/data/settings/PaymentType.extensionpoint @@ -1,4 +1,4 @@ { "name": "codbex-payments-Settings-PaymentType", "description": "Extension Point for the codbex-payments-Settings-PaymentType entity" -} \ No newline at end of file +} diff --git a/codbex-payments/gen/codbex_payments/data/settings/PaymentTypeEntity.java b/codbex-payments/gen/codbex_payments/data/settings/PaymentTypeEntity.java new file mode 100644 index 0000000..578d54a --- /dev/null +++ b/codbex-payments/gen/codbex_payments/data/settings/PaymentTypeEntity.java @@ -0,0 +1,30 @@ +package gen.codbex_payments.data.settings; + +import org.eclipse.dirigible.engine.java.annotations.Column; +import org.eclipse.dirigible.engine.java.annotations.CreatedAt; +import org.eclipse.dirigible.engine.java.annotations.CreatedBy; +import org.eclipse.dirigible.engine.java.annotations.Documentation; +import org.eclipse.dirigible.engine.java.annotations.Entity; +import org.eclipse.dirigible.engine.java.annotations.GeneratedValue; +import org.eclipse.dirigible.engine.java.annotations.GenerationType; +import org.eclipse.dirigible.engine.java.annotations.Id; +import org.eclipse.dirigible.engine.java.annotations.Table; +import org.eclipse.dirigible.engine.java.annotations.UpdatedAt; +import org.eclipse.dirigible.engine.java.annotations.UpdatedBy; + +@Entity +@Table(name = "CODBEX_PAYMENTTYPE") +@Documentation("PaymentType entity mapping") +public class PaymentTypeEntity { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "PAYMENTTYPE_ID") + @Documentation("Id") + public Integer Id; + + @Column(name = "PAYMENTTYPE_NAME", length = 20, nullable = false) + @Documentation("Name") + public String Name; + +} diff --git a/codbex-payments/gen/codbex_payments/data/settings/PaymentTypeRepository.java b/codbex-payments/gen/codbex_payments/data/settings/PaymentTypeRepository.java new file mode 100644 index 0000000..db1c09b --- /dev/null +++ b/codbex-payments/gen/codbex_payments/data/settings/PaymentTypeRepository.java @@ -0,0 +1,12 @@ +package gen.codbex_payments.data.settings; + +import org.eclipse.dirigible.components.data.store.java.repository.JavaRepository; +import org.eclipse.dirigible.engine.java.annotations.Repository; + +@Repository +public class PaymentTypeRepository extends JavaRepository { + + public PaymentTypeRepository() { + super(PaymentTypeEntity.class); + } +} diff --git a/codbex-payments/gen/codbex-payments/data/SupplierPayment/SupplierPayment.extensionpoint b/codbex-payments/gen/codbex_payments/data/supplierpayment/SupplierPayment.extensionpoint similarity index 98% rename from codbex-payments/gen/codbex-payments/data/SupplierPayment/SupplierPayment.extensionpoint rename to codbex-payments/gen/codbex_payments/data/supplierpayment/SupplierPayment.extensionpoint index b8295aa..b2af2c8 100644 --- a/codbex-payments/gen/codbex-payments/data/SupplierPayment/SupplierPayment.extensionpoint +++ b/codbex-payments/gen/codbex_payments/data/supplierpayment/SupplierPayment.extensionpoint @@ -1,4 +1,4 @@ { "name": "codbex-payments-SupplierPayment-SupplierPayment", "description": "Extension Point for the codbex-payments-SupplierPayment-SupplierPayment entity" -} \ No newline at end of file +} diff --git a/codbex-payments/gen/codbex_payments/data/supplierpayment/SupplierPaymentEntity.java b/codbex-payments/gen/codbex_payments/data/supplierpayment/SupplierPaymentEntity.java new file mode 100644 index 0000000..4681424 --- /dev/null +++ b/codbex-payments/gen/codbex_payments/data/supplierpayment/SupplierPaymentEntity.java @@ -0,0 +1,106 @@ +package gen.codbex_payments.data.supplierpayment; + +import org.eclipse.dirigible.engine.java.annotations.Column; +import org.eclipse.dirigible.engine.java.annotations.CreatedAt; +import org.eclipse.dirigible.engine.java.annotations.CreatedBy; +import org.eclipse.dirigible.engine.java.annotations.Documentation; +import org.eclipse.dirigible.engine.java.annotations.Entity; +import org.eclipse.dirigible.engine.java.annotations.GeneratedValue; +import org.eclipse.dirigible.engine.java.annotations.GenerationType; +import org.eclipse.dirigible.engine.java.annotations.Id; +import org.eclipse.dirigible.engine.java.annotations.Table; +import org.eclipse.dirigible.engine.java.annotations.UpdatedAt; +import org.eclipse.dirigible.engine.java.annotations.UpdatedBy; + +@Entity +@Table(name = "CODBEX_SUPPLIERPAYMENT") +@Documentation("SupplierPayment entity mapping") +public class SupplierPaymentEntity { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "SUPPLIERPAYMENT_ID") + @Documentation("Id") + public Integer Id; + + @Column(name = "SUPPLIERPAYMENT_SUPPLIER", nullable = false) + @Documentation("Supplier") + public Integer Supplier; + + @Column(name = "SUPPLIERPAYMENT_DATE", nullable = false) + @Documentation("Date") + public java.time.LocalDate Date; + + @Column(name = "SUPPLIERPAYMENT_VALOR", nullable = false) + @Documentation("Valor") + public java.time.LocalDate Valor; + + @Column(name = "SUPPLIERPAYMENT_OURPARTYIBAN", length = 34, nullable = false) + @Documentation("OurPartyIBAN") + public String OurPartyIBAN; + + @Column(name = "SUPPLIERPAYMENT_COUNTERPARTYIBAN", length = 34, nullable = false) + @Documentation("CounterpartyIBAN") + public String CounterpartyIBAN; + + @Column(name = "SUPPLIERPAYMENT_COUNTERPARTYNAME", length = 100, nullable = true) + @Documentation("CounterpartyName") + public String CounterpartyName; + + @Column(name = "SUPPLIERPAYMENT_AMOUNT", precision = 16, scale = 2, nullable = false) + @Documentation("Amount") + public java.math.BigDecimal Amount; + + @Column(name = "SUPPLIERPAYMENT_CURRENCY", nullable = false) + @Documentation("Currency") + public Integer Currency; + + @Column(name = "SUPPLIERPAYMENT_COMPANY", nullable = true) + @Documentation("Company") + public Integer Company; + + @Column(name = "SUPPLIERPAYMENT_REASON", length = 100, nullable = false) + @Documentation("Reason") + public String Reason; + + @Column(name = "SUPPLIERPAYMENT_DESCRIPTION", length = 100, nullable = true) + @Documentation("Description") + public String Description; + + @Column(name = "SUPPLIERPAYMENT_PAYMENTMETHOD", nullable = false) + @Documentation("PaymentMethod") + public Integer PaymentMethod; + + @Column(name = "SUPPLIERPAYMENT_NAME", length = 20, nullable = true) + @Documentation("Name") + public String Name; + + @Column(name = "SUPPLIERPAYMENT_UUID", length = 36, nullable = false, unique = true) + @Documentation("UUID") + public String UUID; + + @Column(name = "SUPPLIERPAYMENT_REFERENCE", length = 36, nullable = true) + @Documentation("Reference") + public String Reference; + + @CreatedAt + @Column(name = "SUPPLIERPAYMENT_CREATEDAT", nullable = true) + @Documentation("CreatedAt") + public java.time.Instant CreatedAt; + + @CreatedBy + @Column(name = "SUPPLIERPAYMENT_CREATEDBY", length = 20, nullable = true) + @Documentation("CreatedBy") + public String CreatedBy; + + @UpdatedAt + @Column(name = "SUPPLIERPAYMENT_UPDATEDAT", nullable = true) + @Documentation("UpdatedAt") + public java.time.Instant UpdatedAt; + + @UpdatedBy + @Column(name = "SUPPLIERPAYMENT_UPDATEDBY", length = 20, nullable = true) + @Documentation("UpdatedBy") + public String UpdatedBy; + +} diff --git a/codbex-payments/gen/codbex_payments/data/supplierpayment/SupplierPaymentRepository.java b/codbex-payments/gen/codbex_payments/data/supplierpayment/SupplierPaymentRepository.java new file mode 100644 index 0000000..9193a92 --- /dev/null +++ b/codbex-payments/gen/codbex_payments/data/supplierpayment/SupplierPaymentRepository.java @@ -0,0 +1,19 @@ +package gen.codbex_payments.data.supplierpayment; + +import org.eclipse.dirigible.components.data.store.java.repository.JavaRepository; +import org.eclipse.dirigible.engine.java.annotations.Repository; + +@Repository +public class SupplierPaymentRepository extends JavaRepository { + + public SupplierPaymentRepository() { + super(SupplierPaymentEntity.class); + } + + @Override + public SupplierPaymentEntity save(SupplierPaymentEntity entity) { + entity.Name = new NumberGeneratorService().generateByType('Supplier Payment'); + entity.UUID = require("sdk/utils/uuid").random(); + return super.save(entity); + } +} diff --git a/codbex-payments/gen/codbex-payments/roles/default-roles.roles b/codbex-payments/gen/codbex_payments/roles/default-roles.roles similarity index 99% rename from codbex-payments/gen/codbex-payments/roles/default-roles.roles rename to codbex-payments/gen/codbex_payments/roles/default-roles.roles index 83a1f87..aae9a47 100644 --- a/codbex-payments/gen/codbex-payments/roles/default-roles.roles +++ b/codbex-payments/gen/codbex_payments/roles/default-roles.roles @@ -47,4 +47,4 @@ "name": "codbex-payments.PaymentAdjustment.PaymentAdjustmentFullAccess", "description": "A role that grants full access for PaymentAdjustment." } -] \ No newline at end of file +] diff --git a/codbex-payments/translations/en-US/codbex-payments.model.json b/codbex-payments/translations/en-US/codbex-payments.model.json index 60149c4..8711f19 100644 --- a/codbex-payments/translations/en-US/codbex-payments.model.json +++ b/codbex-payments/translations/en-US/codbex-payments.model.json @@ -76,13 +76,13 @@ "CUSTOMERPAYMENT_COUNTERPARTYNAME": "CounterpartyName", "CUSTOMERPAYMENT_AMOUNT": "Amount", "CUSTOMERPAYMENT_CURRENCY": "Currency", + "CUSTOMERPAYMENT_COMPANY": "Company", "CUSTOMERPAYMENT_REASON": "Reason", "CUSTOMERPAYMENT_DESCRIPTION": "Description", - "CUSTOMERPAYMENT_COMPANY": "Company", + "CUSTOMERPAYMENT_PAYMENTMETHOD": "PaymentMethod", "CUSTOMERPAYMENT_NAME": "Name", "CUSTOMERPAYMENT_UUID": "UUID", "CUSTOMERPAYMENT_REFERENCE": "Reference", - "CUSTOMERPAYMENT_PAYMENTMETHOD": "PaymentMethod", "CUSTOMERPAYMENT_CREATEDAT": "CreatedAt", "CUSTOMERPAYMENT_CREATEDBY": "CreatedBy", "CUSTOMERPAYMENT_UPDATEDAT": "UpdatedAt", @@ -97,13 +97,13 @@ "SUPPLIERPAYMENT_COUNTERPARTYNAME": "CounterpartyName", "SUPPLIERPAYMENT_AMOUNT": "Amount", "SUPPLIERPAYMENT_CURRENCY": "Currency", + "SUPPLIERPAYMENT_COMPANY": "Company", "SUPPLIERPAYMENT_REASON": "Reason", "SUPPLIERPAYMENT_DESCRIPTION": "Description", - "SUPPLIERPAYMENT_COMPANY": "Company", + "SUPPLIERPAYMENT_PAYMENTMETHOD": "PaymentMethod", "SUPPLIERPAYMENT_NAME": "Name", "SUPPLIERPAYMENT_UUID": "UUID", "SUPPLIERPAYMENT_REFERENCE": "Reference", - "SUPPLIERPAYMENT_PAYMENTMETHOD": "PaymentMethod", "SUPPLIERPAYMENT_CREATEDAT": "CreatedAt", "SUPPLIERPAYMENT_CREATEDBY": "CreatedBy", "SUPPLIERPAYMENT_UPDATEDAT": "UpdatedAt", @@ -118,13 +118,12 @@ "EMPLOYEEPAYMENT_COUNTERPARTYNAME": "CounterpartyName", "EMPLOYEEPAYMENT_AMOUNT": "Amount", "EMPLOYEEPAYMENT_CURRENCY": "Currency", + "EMPLOYEEPAYMENT_COMPANY": "Company", "EMPLOYEEPAYMENT_REASON": "Reason", "EMPLOYEEPAYMENT_DESCRIPTION": "Description", - "EMPLOYEEPAYMENT_COMPANY": "Company", "EMPLOYEEPAYMENT_NAME": "Name", "EMPLOYEEPAYMENT_UUID": "UUID", "EMPLOYEEPAYMENT_REFERENCE": "Reference", - "EMPLOYEEPAYMENT_PAYMENTMETHOD": "PaymentMethod", "EMPLOYEEPAYMENT_CREATEDAT": "CreatedAt", "EMPLOYEEPAYMENT_CREATEDBY": "CreatedBy", "EMPLOYEEPAYMENT_UPDATEDAT": "UpdatedAt", @@ -137,12 +136,12 @@ "PAYMENTRECORD_COUNTERPARTYIBAN": "CounterpartyIBAN", "PAYMENTRECORD_COUNTERPARTYNAME": "CounterpartyName", "PAYMENTRECORD_AMOUNT": "Amount", + "PAYMENTRECORD_COMPANY": "Company", "PAYMENTRECORD_CURRENCY": "Currency", "PAYMENTRECORD_PAYMENTDIRECTION": "PaymentDirection", "PAYMENTRECORD_PAYMENTTYPE": "PaymentType", "PAYMENTRECORD_REASON": "Reason", "PAYMENTRECORD_DESCRIPTION": "Description", - "PAYMENTRECORD_COMPANY": "Company", "PAYMENTRECORD_UUID": "UUID", "PAYMENTRECORD_REFERENCE": "Reference", "PAYMENTRECORD_DELETED": "Deleted", @@ -152,52 +151,17 @@ "PAYMENTRECORD_CREATEDBY": "CreatedBy", "PAYMENTRECORD_UPDATEDAT": "UpdatedAt", "PAYMENTRECORD_UPDATEDBY": "UpdatedBy", - "CURRENCY": "Currency", - "CURRENCY_ID": "Id", - "CURRENCY_CODE": "Code", - "CURRENCY_NAME": "Name", - "CURRENCY_NUMERIC": "Numeric", - "CURRENCY_ROUNDING": "Rounding", - "CURRENCY_BASE": "Base", - "CURRENCY_RATE": "Rate", - "COMPANY": "Company", - "COMPANY_ID": "Id", - "COMPANY_NAME": "Name", - "COMPANY_MANAGER": "Manager", - "COMPANY_EMAIL": "Email", - "COMPANY_PHONE": "Phone", - "COMPANY_ADDRESS": "Address", - "COMPANY_POSTCODE": "PostCode", - "COMPANY_CITY": "City", - "COMPANY_COUNTRY": "Country", - "COMPANY_TIN": "TIN", - "COMPANY_IBAN": "IBAN", "PAYMENTTYPE": "PaymentType", "PAYMENTTYPE_ID": "Id", "PAYMENTTYPE_NAME": "Name", - "PAYMENTMETHOD": "PaymentMethod", - "PAYMENTMETHOD_ID": "Id", - "PAYMENTMETHOD_NAME": "Name", - "CUSTOMER": "Customer", - "CUSTOMER_ID": "Id", - "CUSTOMER_NAME": "Name", - "CUSTOMER_ADDRESS": "Address", - "CUSTOMER_POSTALCODE": "PostalCode", - "CUSTOMER_EMAIL": "Email", - "CUSTOMER_PHONE": "Phone", - "CUSTOMER_FAX": "Fax", - "CUSTOMER_COUNTRY": "Country", - "CUSTOMER_CITY": "City", - "CUSTOMER_TIN": "TIN", - "CUSTOMER_IBAN": "IBAN", "PAYMENTADJUSTMENT": "PaymentAdjustment", "PAYMENTADJUSTMENT_ID": "Id", "PAYMENTADJUSTMENT_DATE": "Date", "PAYMENTADJUSTMENT_VALOR": "Valor", "PAYMENTADJUSTMENT_AMOUNT": "Amount", "PAYMENTADJUSTMENT_CURRENCY": "Currency", - "PAYMENTADJUSTMENT_COMPANY": "Company", "PAYMENTADJUSTMENT_REASON": "Reason", + "PAYMENTADJUSTMENT_COMPANY": "Company", "PAYMENTADJUSTMENT_UUID": "UUID", "PAYMENTADJUSTMENT_CREATEDAT": "CreatedAt", "PAYMENTADJUSTMENT_CREATEDBY": "CreatedBy", @@ -206,6 +170,26 @@ "PAYMENTDIRECTION": "PaymentDirection", "PAYMENTDIRECTION_ID": "Id", "PAYMENTDIRECTION_NAME": "Name", + "CUSTOMER": "Customer", + "CUSTOMER_ID": "Id", + "CUSTOMER_FIRSTNAME": "FirstName", + "CUSTOMER_LASTNAME": "LastName", + "CUSTOMER_LEGALENTITYNAME": "LegalEntityName", + "CUSTOMER_NAME": "Name", + "CUSTOMER_EMAIL": "Email", + "CUSTOMER_PHONE": "Phone", + "CUSTOMER_COUNTRY": "Country", + "CUSTOMER_CITY": "City", + "CUSTOMER_FAX": "Fax", + "CUSTOMER_ADDRESS": "Address", + "CUSTOMER_POSTALCODE": "PostalCode", + "CUSTOMER_TIN": "TIN", + "CUSTOMER_IBAN": "IBAN", + "CUSTOMER_RESPONSIBLEPERSON": "ResponsiblePerson", + "CUSTOMER_CREATEDAT": "CreatedAt", + "CUSTOMER_CREATEDBY": "CreatedBy", + "CUSTOMER_UPDATEDAT": "UpdatedAt", + "CUSTOMER_UPDATEDBY": "UpdatedBy", "EMPLOYEE": "Employee", "EMPLOYEE_ID": "Id", "EMPLOYEE_FIRSTNAME": "First Name", @@ -220,6 +204,10 @@ "EMPLOYEE_GENDER": "Gender", "EMPLOYEE_MARTIALSTATUS": "MartialStatus", "EMPLOYEE_IBAN": "IBAN", + "EMPLOYEE_CREATEDAT": "CreatedAt", + "EMPLOYEE_CREATEDBY": "CreatedBy", + "EMPLOYEE_UPDATEDAT": "UpdatedAt", + "EMPLOYEE_UPDATEDBY": "UpdatedBy", "SUPPLIER": "Supplier", "SUPPLIER_ID": "Id", "SUPPLIER_FIRSTNAME": "FirstName", @@ -232,6 +220,40 @@ "SUPPLIER_TIN": "TIN", "SUPPLIER_IBAN": "IBAN", "SUPPLIER_CREATEDAT": "CreatedAt", + "SUPPLIER_CREATEDBY": "CreatedBy", + "SUPPLIER_UPDATEDAT": "UpdatedAt", + "SUPPLIER_UPDATEDBY": "UpdatedBy", + "PAYMENTMETHOD": "PaymentMethod", + "PAYMENTMETHOD_ID": "Id", + "PAYMENTMETHOD_NAME": "Name", + "CURRENCY": "Currency", + "CURRENCY_ID": "Id", + "CURRENCY_CODE": "Code", + "CURRENCY_NAME": "Name", + "CURRENCY_NUMERIC": "Numeric", + "CURRENCY_ROUNDING": "Rounding", + "CURRENCY_BASE": "Base", + "CURRENCY_RATE": "Rate", + "CURRENCY_CREATEDAT": "CreatedAt", + "CURRENCY_CREATEDBY": "CreatedBy", + "CURRENCY_UPDATEDAT": "UpdatedAt", + "CURRENCY_UPDATEDBY": "UpdatedBy", + "COMPANY": "Company", + "COMPANY_ID": "Id", + "COMPANY_NAME": "Name", + "COMPANY_EMAIL": "Email", + "COMPANY_MANAGER": "Manager", + "COMPANY_PHONE": "Phone", + "COMPANY_ADDRESS": "Address", + "COMPANY_COUNTRY": "Country", + "COMPANY_CITY": "City", + "COMPANY_POSTCODE": "PostCode", + "COMPANY_TIN": "TIN", + "COMPANY_IBAN": "IBAN", + "COMPANY_CREATEDAT": "CreatedAt", + "COMPANY_CREATEDBY": "CreatedBy", + "COMPANY_UPDATEDAT": "UpdatedAt", + "COMPANY_UPDATEDBY": "UpdatedBy", "CustomerPayment": "CustomerPayment", "SupplierPayment": "SupplierPayment", "PaymentRecord": "PaymentRecord", From 1a0969ec6d9b24d6ac81065472c7f70e7038f71c Mon Sep 17 00:00:00 2001 From: NicoleNG18 Date: Thu, 11 Jun 2026 15:48:03 +0300 Subject: [PATCH 2/2] migrate calculated properties to java --- codbex-payments/codbex-payments.edm | 28 +++++++------- codbex-payments/codbex-payments.gen | 38 ++++++++++--------- codbex-payments/codbex-payments.model | 24 ++++++------ .../CustomerPaymentRepository.java | 4 +- .../EmployeePaymentRepository.java | 4 +- .../PaymentAdjustmentRepository.java | 2 +- .../PaymentRecordRepository.java | 2 +- .../SupplierPaymentRepository.java | 4 +- 8 files changed, 55 insertions(+), 51 deletions(-) diff --git a/codbex-payments/codbex-payments.edm b/codbex-payments/codbex-payments.edm index 26c7370..a9f8cdc 100644 --- a/codbex-payments/codbex-payments.edm +++ b/codbex-payments/codbex-payments.edm @@ -1,6 +1,6 @@ - + @@ -14,15 +14,15 @@ - - + + - + @@ -36,15 +36,15 @@ - - + + - + @@ -57,15 +57,15 @@ - - + + - + @@ -79,7 +79,7 @@ - + @@ -95,7 +95,7 @@ - + @@ -103,7 +103,7 @@ - + @@ -245,5 +245,5 @@ - + \ No newline at end of file diff --git a/codbex-payments/codbex-payments.gen b/codbex-payments/codbex-payments.gen index dcc3ba7..90d44f9 100644 --- a/codbex-payments/codbex-payments.gen +++ b/codbex-payments/codbex-payments.gen @@ -669,7 +669,7 @@ }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generateByType('Customer Payment')", + "calculatedPropertyExpressionCreate": "new Generator().generateByType(\"Customer Payment\")", "dataLength": "20", "dataName": "CUSTOMERPAYMENT_NAME", "dataNullable": true, @@ -700,7 +700,7 @@ }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "require(\"sdk/utils/uuid\").random()", + "calculatedPropertyExpressionCreate": "Uuid.random()", "dataLength": "36", "dataName": "CUSTOMERPAYMENT_UUID", "dataNullable": false, @@ -886,7 +886,7 @@ "generateDefaultRoles": "true", "generateReport": "false", "icon": "/services/web/resources/unicons/file.svg", - "importsCode": "import { NumberGeneratorService } from \"/codbex-number-generator/service/generator\";", + "importsCode": "import codbex-number-generator.service.Generator;\nimport org.eclipse.dirigible.sdk.utils;", "layoutType": "MANAGE_MASTER", "menuIndex": "100", "menuKey": "customerpayment", @@ -1310,7 +1310,7 @@ }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generateByType('Customer Payment')", + "calculatedPropertyExpressionCreate": "new Generator().generateByType(\"Customer Payment\")", "dataLength": "20", "dataName": "CUSTOMERPAYMENT_NAME", "dataNullable": true, @@ -1862,7 +1862,7 @@ }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generateByType('Supplier Payment')", + "calculatedPropertyExpressionCreate": "new Generator().generateByType(\"Employee Payment\")", "dataLength": "20", "dataName": "SUPPLIERPAYMENT_NAME", "dataNullable": true, @@ -1893,7 +1893,7 @@ }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "require(\"sdk/utils/uuid\").random()", + "calculatedPropertyExpressionCreate": "Uuid.random()", "dataLength": "36", "dataName": "SUPPLIERPAYMENT_UUID", "dataNullable": false, @@ -2079,7 +2079,7 @@ "generateDefaultRoles": "true", "generateReport": "false", "icon": "/services/web/resources/unicons/file.svg", - "importsCode": "import { NumberGeneratorService } from \"/codbex-number-generator/service/generator\";", + "importsCode": "import codbex-number-generator.service.Generator;\nimport org.eclipse.dirigible.sdk.utils;", "layoutType": "MANAGE_MASTER", "menuIndex": "100", "menuKey": "supplierpayment", @@ -2503,7 +2503,7 @@ }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generateByType('Supplier Payment')", + "calculatedPropertyExpressionCreate": "new Generator().generateByType(\"Employee Payment\")", "dataLength": "20", "dataName": "SUPPLIERPAYMENT_NAME", "dataNullable": true, @@ -2534,7 +2534,7 @@ }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "require(\"sdk/utils/uuid\").random()", + "calculatedPropertyExpressionCreate": "Uuid.random()", "dataLength": "36", "dataName": "SUPPLIERPAYMENT_UUID", "dataNullable": false, @@ -3083,7 +3083,7 @@ }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generateByType('Employee Payment')", + "calculatedPropertyExpressionCreate": "new Generator().generateByType(\"Employee Payment\")", "dataLength": "20", "dataName": "EMPLOYEEPAYMENT_NAME", "dataNullable": true, @@ -3114,7 +3114,7 @@ }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "require(\"sdk/utils/uuid\").random()", + "calculatedPropertyExpressionCreate": "Uuid.random()", "dataLength": "36", "dataName": "EMPLOYEEPAYMENT_UUID", "dataNullable": false, @@ -3300,7 +3300,7 @@ "generateDefaultRoles": "true", "generateReport": "false", "icon": "/services/web/resources/unicons/file.svg", - "importsCode": "import { NumberGeneratorService } from \"/codbex-number-generator/service/generator\";", + "importsCode": "import codbex-number-generator.service.Generator;\nimport org.eclipse.dirigible.sdk.utils;", "layoutType": "MANAGE_MASTER", "menuIndex": "100", "menuKey": "employeepayment", @@ -3686,7 +3686,7 @@ }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generateByType('Employee Payment')", + "calculatedPropertyExpressionCreate": "new Generator().generateByType(\"Employee Payment\")", "dataLength": "20", "dataName": "EMPLOYEEPAYMENT_NAME", "dataNullable": true, @@ -3717,7 +3717,7 @@ }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "require(\"sdk/utils/uuid\").random()", + "calculatedPropertyExpressionCreate": "Uuid.random()", "dataLength": "36", "dataName": "EMPLOYEEPAYMENT_UUID", "dataNullable": false, @@ -4299,7 +4299,7 @@ }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "require(\"sdk/utils/uuid\").random()", + "calculatedPropertyExpressionCreate": "Uuid.random()", "dataLength": "36", "dataName": "PAYMENTRECORD_UUID", "dataNullable": false, @@ -4570,6 +4570,7 @@ "generateDefaultRoles": "true", "generateReport": "true", "icon": "/services/web/resources/unicons/file.svg", + "importsCode": "import org.eclipse.dirigible.sdk.utils;", "layoutType": "MANAGE_MASTER", "menuIndex": "100", "menuKey": "paymentrecord", @@ -4983,7 +4984,7 @@ }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "require(\"sdk/utils/uuid\").random()", + "calculatedPropertyExpressionCreate": "Uuid.random()", "dataLength": "36", "dataName": "PAYMENTRECORD_UUID", "dataNullable": false, @@ -5555,7 +5556,7 @@ }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "require(\"sdk/utils/uuid\").random()", + "calculatedPropertyExpressionCreate": "Uuid.random()", "dataLength": "36", "dataName": "PAYMENTADJUSTMENT_UUID", "dataNullable": true, @@ -5711,6 +5712,7 @@ "generateDefaultRoles": "true", "generateReport": "false", "icon": "/services/web/resources/unicons/file.svg", + "importsCode": "import org.eclipse.dirigible.sdk.utils;", "layoutType": "MANAGE_MASTER", "menuIndex": "100", "menuKey": "paymentadjustment", @@ -5933,7 +5935,7 @@ }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "require(\"sdk/utils/uuid\").random()", + "calculatedPropertyExpressionCreate": "Uuid.random()", "dataLength": "36", "dataName": "PAYMENTADJUSTMENT_UUID", "dataNullable": true, diff --git a/codbex-payments/codbex-payments.model b/codbex-payments/codbex-payments.model index fee4601..c806d61 100644 --- a/codbex-payments/codbex-payments.model +++ b/codbex-payments/codbex-payments.model @@ -220,7 +220,7 @@ }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generateByType('Customer Payment')", + "calculatedPropertyExpressionCreate": "new Generator().generateByType(\"Customer Payment\")", "dataLength": "20", "dataName": "CUSTOMERPAYMENT_NAME", "dataNullable": "true", @@ -236,7 +236,7 @@ }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "require(\"sdk/utils/uuid\").random()", + "calculatedPropertyExpressionCreate": "Uuid.random()", "dataLength": "36", "dataName": "CUSTOMERPAYMENT_UUID", "dataNullable": "false", @@ -334,7 +334,7 @@ "generateDefaultRoles": "true", "generateReport": "false", "icon": "/services/web/resources/unicons/file.svg", - "importsCode": "aW1wb3J0IHsgTnVtYmVyR2VuZXJhdG9yU2VydmljZSB9IGZyb20gIi9jb2RiZXgtbnVtYmVyLWdlbmVyYXRvci9zZXJ2aWNlL2dlbmVyYXRvciI7", + "importsCode": "aW1wb3J0IGNvZGJleC1udW1iZXItZ2VuZXJhdG9yLnNlcnZpY2UuR2VuZXJhdG9yOwppbXBvcnQgb3JnLmVjbGlwc2UuZGlyaWdpYmxlLnNkay51dGlsczs=", "layoutType": "MANAGE_MASTER", "menuIndex": "100", "menuKey": "customerpayment", @@ -573,7 +573,7 @@ }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generateByType('Supplier Payment')", + "calculatedPropertyExpressionCreate": "new Generator().generateByType(\"Employee Payment\")", "dataLength": "20", "dataName": "SUPPLIERPAYMENT_NAME", "dataNullable": "true", @@ -589,7 +589,7 @@ }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "require(\"sdk/utils/uuid\").random()", + "calculatedPropertyExpressionCreate": "Uuid.random()", "dataLength": "36", "dataName": "SUPPLIERPAYMENT_UUID", "dataNullable": "false", @@ -687,7 +687,7 @@ "generateDefaultRoles": "true", "generateReport": "false", "icon": "/services/web/resources/unicons/file.svg", - "importsCode": "aW1wb3J0IHsgTnVtYmVyR2VuZXJhdG9yU2VydmljZSB9IGZyb20gIi9jb2RiZXgtbnVtYmVyLWdlbmVyYXRvci9zZXJ2aWNlL2dlbmVyYXRvciI7", + "importsCode": "aW1wb3J0IGNvZGJleC1udW1iZXItZ2VuZXJhdG9yLnNlcnZpY2UuR2VuZXJhdG9yOwppbXBvcnQgb3JnLmVjbGlwc2UuZGlyaWdpYmxlLnNkay51dGlsczs=", "layoutType": "MANAGE_MASTER", "menuIndex": "100", "menuKey": "supplierpayment", @@ -906,7 +906,7 @@ }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "new NumberGeneratorService().generateByType('Employee Payment')", + "calculatedPropertyExpressionCreate": "new Generator().generateByType(\"Employee Payment\")", "dataLength": "20", "dataName": "EMPLOYEEPAYMENT_NAME", "dataNullable": "true", @@ -922,7 +922,7 @@ }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "require(\"sdk/utils/uuid\").random()", + "calculatedPropertyExpressionCreate": "Uuid.random()", "dataLength": "36", "dataName": "EMPLOYEEPAYMENT_UUID", "dataNullable": "false", @@ -1020,7 +1020,7 @@ "generateDefaultRoles": "true", "generateReport": "false", "icon": "/services/web/resources/unicons/file.svg", - "importsCode": "aW1wb3J0IHsgTnVtYmVyR2VuZXJhdG9yU2VydmljZSB9IGZyb20gIi9jb2RiZXgtbnVtYmVyLWdlbmVyYXRvci9zZXJ2aWNlL2dlbmVyYXRvciI7", + "importsCode": "aW1wb3J0IGNvZGJleC1udW1iZXItZ2VuZXJhdG9yLnNlcnZpY2UuR2VuZXJhdG9yOwppbXBvcnQgb3JnLmVjbGlwc2UuZGlyaWdpYmxlLnNkay51dGlsczs=", "layoutType": "MANAGE_MASTER", "menuIndex": "100", "menuKey": "employeepayment", @@ -1258,7 +1258,7 @@ }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "require(\"sdk/utils/uuid\").random()", + "calculatedPropertyExpressionCreate": "Uuid.random()", "dataLength": "36", "dataName": "PAYMENTRECORD_UUID", "dataNullable": "false", @@ -1396,6 +1396,7 @@ "generateDefaultRoles": "true", "generateReport": "true", "icon": "/services/web/resources/unicons/file.svg", + "importsCode": "aW1wb3J0IG9yZy5lY2xpcHNlLmRpcmlnaWJsZS5zZGsudXRpbHM7", "layoutType": "MANAGE_MASTER", "menuIndex": "100", "menuKey": "paymentrecord", @@ -1595,7 +1596,7 @@ }, { "auditType": "NONE", - "calculatedPropertyExpressionCreate": "require(\"sdk/utils/uuid\").random()", + "calculatedPropertyExpressionCreate": "Uuid.random()", "dataLength": "36", "dataName": "PAYMENTADJUSTMENT_UUID", "dataNullable": "true", @@ -1679,6 +1680,7 @@ "generateDefaultRoles": "true", "generateReport": "false", "icon": "/services/web/resources/unicons/file.svg", + "importsCode": "aW1wb3J0IG9yZy5lY2xpcHNlLmRpcmlnaWJsZS5zZGsudXRpbHM7", "layoutType": "MANAGE_MASTER", "menuIndex": "100", "menuKey": "paymentadjustment", diff --git a/codbex-payments/gen/codbex_payments/data/customerpayment/CustomerPaymentRepository.java b/codbex-payments/gen/codbex_payments/data/customerpayment/CustomerPaymentRepository.java index a45e8f9..62e1a6e 100644 --- a/codbex-payments/gen/codbex_payments/data/customerpayment/CustomerPaymentRepository.java +++ b/codbex-payments/gen/codbex_payments/data/customerpayment/CustomerPaymentRepository.java @@ -12,8 +12,8 @@ public CustomerPaymentRepository() { @Override public CustomerPaymentEntity save(CustomerPaymentEntity entity) { - entity.Name = new NumberGeneratorService().generateByType('Customer Payment'); - entity.UUID = require("sdk/utils/uuid").random(); + entity.Name = new Generator().generateByType("Customer Payment"); + entity.UUID = Uuid.random(); return super.save(entity); } } diff --git a/codbex-payments/gen/codbex_payments/data/employeepayment/EmployeePaymentRepository.java b/codbex-payments/gen/codbex_payments/data/employeepayment/EmployeePaymentRepository.java index 0dac71c..98708b9 100644 --- a/codbex-payments/gen/codbex_payments/data/employeepayment/EmployeePaymentRepository.java +++ b/codbex-payments/gen/codbex_payments/data/employeepayment/EmployeePaymentRepository.java @@ -12,8 +12,8 @@ public EmployeePaymentRepository() { @Override public EmployeePaymentEntity save(EmployeePaymentEntity entity) { - entity.Name = new NumberGeneratorService().generateByType('Employee Payment'); - entity.UUID = require("sdk/utils/uuid").random(); + entity.Name = new Generator().generateByType("Employee Payment"); + entity.UUID = Uuid.random(); return super.save(entity); } } diff --git a/codbex-payments/gen/codbex_payments/data/paymentadjustment/PaymentAdjustmentRepository.java b/codbex-payments/gen/codbex_payments/data/paymentadjustment/PaymentAdjustmentRepository.java index 4fa5919..f6a8c58 100644 --- a/codbex-payments/gen/codbex_payments/data/paymentadjustment/PaymentAdjustmentRepository.java +++ b/codbex-payments/gen/codbex_payments/data/paymentadjustment/PaymentAdjustmentRepository.java @@ -12,7 +12,7 @@ public PaymentAdjustmentRepository() { @Override public PaymentAdjustmentEntity save(PaymentAdjustmentEntity entity) { - entity.UUID = require("sdk/utils/uuid").random(); + entity.UUID = Uuid.random(); return super.save(entity); } } diff --git a/codbex-payments/gen/codbex_payments/data/paymentrecord/PaymentRecordRepository.java b/codbex-payments/gen/codbex_payments/data/paymentrecord/PaymentRecordRepository.java index 029fb44..9bc83cc 100644 --- a/codbex-payments/gen/codbex_payments/data/paymentrecord/PaymentRecordRepository.java +++ b/codbex-payments/gen/codbex_payments/data/paymentrecord/PaymentRecordRepository.java @@ -12,7 +12,7 @@ public PaymentRecordRepository() { @Override public PaymentRecordEntity save(PaymentRecordEntity entity) { - entity.UUID = require("sdk/utils/uuid").random(); + entity.UUID = Uuid.random(); return super.save(entity); } } diff --git a/codbex-payments/gen/codbex_payments/data/supplierpayment/SupplierPaymentRepository.java b/codbex-payments/gen/codbex_payments/data/supplierpayment/SupplierPaymentRepository.java index 9193a92..210d9aa 100644 --- a/codbex-payments/gen/codbex_payments/data/supplierpayment/SupplierPaymentRepository.java +++ b/codbex-payments/gen/codbex_payments/data/supplierpayment/SupplierPaymentRepository.java @@ -12,8 +12,8 @@ public SupplierPaymentRepository() { @Override public SupplierPaymentEntity save(SupplierPaymentEntity entity) { - entity.Name = new NumberGeneratorService().generateByType('Supplier Payment'); - entity.UUID = require("sdk/utils/uuid").random(); + entity.Name = new Generator().generateByType("Employee Payment"); + entity.UUID = Uuid.random(); return super.save(entity); } }