diff --git a/codbex-payments/.classpath b/codbex-payments/.classpath new file mode 100644 index 0000000..16c58b0 --- /dev/null +++ b/codbex-payments/.classpath @@ -0,0 +1,1056 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/codbex-payments/.project b/codbex-payments/.project new file mode 100644 index 0000000..39a4d46 --- /dev/null +++ b/codbex-payments/.project @@ -0,0 +1,28 @@ + + + codbex-payments + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + + + 1782902900204 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/codbex-payments/bin/.classpath b/codbex-payments/bin/.classpath new file mode 100644 index 0000000..16c58b0 --- /dev/null +++ b/codbex-payments/bin/.classpath @@ -0,0 +1,1056 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/codbex-payments/bin/.npmrc b/codbex-payments/bin/.npmrc new file mode 100644 index 0000000..3bdca56 --- /dev/null +++ b/codbex-payments/bin/.npmrc @@ -0,0 +1,2 @@ +@codbex:registry=https://npm.pkg.github.com +//npm.pkg.github.com/:_authToken=${NPM_TOKEN} diff --git a/codbex-payments/bin/.project b/codbex-payments/bin/.project new file mode 100644 index 0000000..39a4d46 --- /dev/null +++ b/codbex-payments/bin/.project @@ -0,0 +1,28 @@ + + + codbex-payments + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + + + 1782902900204 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/codbex-payments/bin/codbex-payments.edm b/codbex-payments/bin/codbex-payments.edm new file mode 100644 index 0000000..a9f8cdc --- /dev/null +++ b/codbex-payments/bin/codbex-payments.edm @@ -0,0 +1,249 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CustomerPaymentsales-navigation-group/services/web/resources/unicons/usd-square.svg300 + SupplierPaymentpurchasing-navigation-group/services/web/resources/unicons/box.svg300 + PaymentRecordaccounting-navigation-group/services/web/resources/unicons/align-justify.svg40 + EmployeePaymentsalaries-navigation-group/services/web/resources/unicons/folder-check.svg300 + PaymentAdjustmentsales-navigation-group/services/web/resources/unicons/paypal.svg700 + + + + + \ No newline at end of file diff --git a/codbex-payments/bin/codbex-payments.gen b/codbex-payments/bin/codbex-payments.gen new file mode 100644 index 0000000..07a157d --- /dev/null +++ b/codbex-payments/bin/codbex-payments.gen @@ -0,0 +1,8825 @@ +{ + "tablePrefix": "CODBEX_", + "brand": "codbex", + "brandUrl": "https://www.codbex.com", + "title": "Payments Management System", + "description": "Managing payments data", + "projectName": "codbex-payments", + "workspaceName": "workspace", + "filePath": "codbex-payments.model", + "templateId": "template-application-angular-java/template/template.js", + "fileName": "codbex-payments", + "genFolderName": "codbex-payments", + "javaRuntime": true, + "javaGenFolderName": "codbex_payments", + "dataSource": "DefaultDB", + "perspectives": { + "CustomerPayment": { + "views": [ + "CustomerPayment", + "CustomerPayment-details", + "CustomerPayment-details", + "CustomerPayment-details", + "CustomerPayment-details", + "CustomerPayment-details", + "CustomerPayment-details", + "CustomerPayment-details", + "CustomerPayment-details", + "CustomerPayment-details", + "CustomerPayment-details", + "CustomerPayment-details", + "CustomerPayment-details", + "CustomerPayment-details", + "CustomerPayment-details", + "CustomerPayment-details", + "CustomerPayment-details", + "CustomerPayment-details", + "CustomerPayment-details", + "CustomerPayment-details" + ], + "name": "CustomerPayment", + "label": "CustomerPayment", + "header": "", + "order": "300", + "navId": "sales-navigation-group", + "icon": "/services/web/resources/unicons/usd-square.svg", + "role": "" + }, + "SupplierPayment": { + "views": [ + "SupplierPayment", + "SupplierPayment-details", + "SupplierPayment-details", + "SupplierPayment-details", + "SupplierPayment-details", + "SupplierPayment-details", + "SupplierPayment-details", + "SupplierPayment-details", + "SupplierPayment-details", + "SupplierPayment-details", + "SupplierPayment-details", + "SupplierPayment-details", + "SupplierPayment-details", + "SupplierPayment-details", + "SupplierPayment-details", + "SupplierPayment-details", + "SupplierPayment-details", + "SupplierPayment-details", + "SupplierPayment-details", + "SupplierPayment-details" + ], + "name": "SupplierPayment", + "label": "SupplierPayment", + "header": "", + "order": "300", + "navId": "purchasing-navigation-group", + "icon": "/services/web/resources/unicons/box.svg", + "role": "" + }, + "EmployeePayment": { + "views": [ + "EmployeePayment", + "EmployeePayment-details", + "EmployeePayment-details", + "EmployeePayment-details", + "EmployeePayment-details", + "EmployeePayment-details", + "EmployeePayment-details", + "EmployeePayment-details", + "EmployeePayment-details", + "EmployeePayment-details", + "EmployeePayment-details", + "EmployeePayment-details", + "EmployeePayment-details", + "EmployeePayment-details", + "EmployeePayment-details", + "EmployeePayment-details", + "EmployeePayment-details", + "EmployeePayment-details", + "EmployeePayment-details", + "EmployeePayment-details" + ], + "name": "EmployeePayment", + "label": "EmployeePayment", + "header": "", + "order": "300", + "navId": "salaries-navigation-group", + "icon": "/services/web/resources/unicons/folder-check.svg", + "role": "" + }, + "PaymentRecord": { + "views": [ + "PaymentRecord", + "PaymentRecord-details", + "PaymentRecord-details", + "PaymentRecord-details", + "PaymentRecord-details", + "PaymentRecord-details", + "PaymentRecord-details", + "PaymentRecord-details", + "PaymentRecord-details", + "PaymentRecord-details", + "PaymentRecord-details", + "PaymentRecord-details", + "PaymentRecord-details", + "PaymentRecord-details", + "PaymentRecord-details", + "PaymentRecord-details", + "PaymentRecord-details", + "PaymentRecord-details", + "PaymentRecord-details", + "PaymentRecord-details" + ], + "name": "PaymentRecord", + "label": "PaymentRecord", + "header": "", + "order": "40", + "navId": "accounting-navigation-group", + "icon": "/services/web/resources/unicons/align-justify.svg", + "role": "" + }, + "Settings": { + "views": [ + "PaymentType", + "PaymentDirection", + "PaymentMethod", + "Currency" + ], + "name": "Settings", + "label": "Settings", + "header": "", + "order": "100", + "navId": "", + "icon": "/services/web/resources/unicons/copy.svg", + "role": "" + }, + "PaymentAdjustment": { + "views": [ + "PaymentAdjustment", + "PaymentAdjustment-details", + "PaymentAdjustment-details", + "PaymentAdjustment-details", + "PaymentAdjustment-details", + "PaymentAdjustment-details", + "PaymentAdjustment-details", + "PaymentAdjustment-details", + "PaymentAdjustment-details", + "PaymentAdjustment-details", + "PaymentAdjustment-details", + "PaymentAdjustment-details", + "PaymentAdjustment-details", + "PaymentAdjustment-details", + "PaymentAdjustment-details", + "PaymentAdjustment-details", + "PaymentAdjustment-details", + "PaymentAdjustment-details", + "PaymentAdjustment-details", + "PaymentAdjustment-details" + ], + "name": "PaymentAdjustment", + "label": "PaymentAdjustment", + "header": "", + "order": "700", + "navId": "sales-navigation-group", + "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" + ], + "name": "Employees", + "label": "Employees", + "header": "", + "order": "100", + "navId": "", + "icon": "/services/web/resources/unicons/user.svg", + "role": "" + }, + "Suppliers": { + "views": [ + "Supplier" + ], + "name": "Suppliers", + "label": "Suppliers", + "header": "", + "order": "200", + "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": [ + { + "entityName": "CustomerPayment", + "roleRead": "codbex-payments.CustomerPayment.CustomerPaymentReadOnly", + "roleWrite": "codbex-payments.CustomerPayment.CustomerPaymentFullAccess" + }, + { + "entityName": "SupplierPayment", + "roleRead": "codbex-payments.SupplierPayment.SupplierPaymentReadOnly", + "roleWrite": "codbex-payments.SupplierPayment.SupplierPaymentFullAccess" + }, + { + "entityName": "EmployeePayment", + "roleRead": "codbex-payments.EmployeePayment.EmployeePaymentReadOnly", + "roleWrite": "codbex-payments.EmployeePayment.EmployeePaymentFullAccess" + }, + { + "entityName": "PaymentRecord", + "roleRead": "codbex-payments.PaymentRecord.PaymentRecordReadOnly", + "roleWrite": "codbex-payments.PaymentRecord.PaymentRecordFullAccess" + }, + { + "entityName": "PaymentType", + "roleRead": "codbex-payments.Settings.PaymentTypeReadOnly", + "roleWrite": "codbex-payments.Settings.PaymentTypeFullAccess" + }, + { + "entityName": "PaymentAdjustment", + "roleRead": "codbex-payments.PaymentAdjustment.PaymentAdjustmentReadOnly", + "roleWrite": "codbex-payments.PaymentAdjustment.PaymentAdjustmentFullAccess" + } + ], + "tprefix": "codbex-payments-model", + "models": [ + { + "properties": [ + { + "auditType": "NONE", + "dataAutoIncrement": true, + "dataName": "CUSTOMERPAYMENT_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", + "isNumberType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "CUSTOMERPAYMENT_CUSTOMER", + "dataNullable": false, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "Customer", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "CustomerPayment_Customer", + "relationshipEntityName": "Customer", + "relationshipEntityPerspectiveName": "Customers", + "relationshipEntityPerspectiveLabel": "Customers", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Customer", + "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", + "isNumberType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "CUSTOMERPAYMENT_DATE", + "dataNullable": false, + "dataOrderBy": "DESC", + "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", + "dataTypeJavaClass": "java.time.LocalDate", + "isDateType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "CUSTOMERPAYMENT_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", + "dataTypeJavaClass": "java.time.LocalDate", + "isDateType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "34", + "dataName": "CUSTOMERPAYMENT_OURPARTYIBAN", + "dataNullable": false, + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": true, + "name": "OurPartyIBAN", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "OurPartyIBAN", + "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": "34", + "dataName": "CUSTOMERPAYMENT_COUNTERPARTYIBAN", + "dataNullable": false, + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": true, + "name": "CounterpartyIBAN", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "CounterpartyIBAN", + "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": "100", + "dataName": "CUSTOMERPAYMENT_COUNTERPARTYNAME", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "CounterpartyName", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "100", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "CounterpartyName", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 100, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "16", + "dataName": "CUSTOMERPAYMENT_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", + "dataTypeJavaClass": "java.math.BigDecimal", + "isNumberType": true, + "isFloatType": true, + "formatPattern": "### ### ### ##0.00", + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "CUSTOMERPAYMENT_CURRENCY", + "dataNullable": false, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "Currency", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Code", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "CustomerPayment_Currency", + "relationshipEntityName": "Currency", + "relationshipEntityPerspectiveName": "Settings", + "relationshipEntityPerspectiveLabel": "Settings", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "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", + "isNumberType": true, + "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", + "isNumberType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "100", + "dataName": "CUSTOMERPAYMENT_REASON", + "dataNullable": false, + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": true, + "name": "Reason", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "100", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Reason", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 100, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "100", + "dataName": "CUSTOMERPAYMENT_DESCRIPTION", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "Description", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "100", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Description", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 100, + "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": "Settings", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "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", + "isNumberType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "calculatedPropertyExpressionCreate": "new Generator().generateByType(\"Customer Payment\")", + "dataLength": "20", + "dataName": "CUSTOMERPAYMENT_NAME", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "isCalculatedProperty": true, + "name": "Name", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "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": 20, + "inputRule": "" + }, + { + "auditType": "NONE", + "calculatedPropertyExpressionCreate": "Uuid.random()", + "dataLength": "36", + "dataName": "CUSTOMERPAYMENT_UUID", + "dataNullable": false, + "dataType": "VARCHAR", + "dataUnique": true, + "description": "", + "isCalculatedProperty": true, + "name": "UUID", + "tooltip": "", + "widgetIsMajor": false, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "isRequiredProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "UUID", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "36", + "dataName": "CUSTOMERPAYMENT_REFERENCE", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "Reference", + "tooltip": "", + "widgetIsMajor": false, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Reference", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + }, + { + "auditType": "CREATED_AT", + "dataName": "CUSTOMERPAYMENT_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": "CUSTOMERPAYMENT_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": "CUSTOMERPAYMENT_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": "CUSTOMERPAYMENT_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 CustomerPayment", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"CODBEX_CUSTOMERPAYMENT\"", + "dataName": "CUSTOMERPAYMENT", + "dataQuery": "", + "description": "Manage entity CustomerPayment", + "feedPassword": "YWRtaW4=", + "feedUsername": "YWRtaW4=", + "generateDefaultRoles": "true", + "generateReport": "false", + "icon": "/services/web/resources/unicons/file.svg", + "importsCode": "import codbex-number-generator.service.Generator;\nimport org.eclipse.dirigible.sdk.utils;", + "layoutType": "MANAGE_MASTER", + "menuIndex": "100", + "menuKey": "customerpayment", + "menuLabel": "CustomerPayment", + "multilingual": "false", + "name": "CustomerPayment", + "perspectiveHeader": "", + "perspectiveIcon": "/services/web/resources/unicons/usd-square.svg", + "perspectiveLabel": "CustomerPayment", + "perspectiveName": "CustomerPayment", + "perspectiveNavId": "sales-navigation-group", + "perspectiveOrder": "300", + "perspectiveRole": "", + "roleRead": "codbex-payments.CustomerPayment.CustomerPaymentReadOnly", + "roleWrite": "codbex-payments.CustomerPayment.CustomerPaymentFullAccess", + "title": "CustomerPayment", + "tooltip": "CustomerPayment", + "type": "PRIMARY", + "dataSource": "DefaultDB", + "javaPerspectiveName": "customerpayment", + "referencedProjections": [ + { + "name": "Customer", + "project": "codbex-partners", + "genFolderName": "codbex-partners" + }, + { + "name": "Currency", + "project": "codbex-currencies", + "genFolderName": "codbex-currencies" + }, + { + "name": "Company", + "project": "codbex-companies", + "genFolderName": "codbex-companies" + }, + { + "name": "PaymentMethod", + "project": "codbex-methods", + "genFolderName": "codbex-methods" + } + ], + "dataOrderBy": "DESC", + "dataOrderBySort": "Date", + "primaryKeys": [ + "Id" + ], + "primaryKeysString": "Id", + "masterProperties": { + "title": { + "auditType": "NONE", + "dataName": "CUSTOMERPAYMENT_CUSTOMER", + "dataNullable": false, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "Customer", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "CustomerPayment_Customer", + "relationshipEntityName": "Customer", + "relationshipEntityPerspectiveName": "Customers", + "relationshipEntityPerspectiveLabel": "Customers", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Customer", + "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", + "isNumberType": true, + "inputRule": "" + }, + "properties": [ + { + "auditType": "NONE", + "dataName": "CUSTOMERPAYMENT_DATE", + "dataNullable": false, + "dataOrderBy": "DESC", + "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", + "dataTypeJavaClass": "java.time.LocalDate", + "isDateType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "CUSTOMERPAYMENT_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", + "dataTypeJavaClass": "java.time.LocalDate", + "isDateType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "34", + "dataName": "CUSTOMERPAYMENT_OURPARTYIBAN", + "dataNullable": false, + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": true, + "name": "OurPartyIBAN", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "OurPartyIBAN", + "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": "34", + "dataName": "CUSTOMERPAYMENT_COUNTERPARTYIBAN", + "dataNullable": false, + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": true, + "name": "CounterpartyIBAN", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "CounterpartyIBAN", + "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": "100", + "dataName": "CUSTOMERPAYMENT_COUNTERPARTYNAME", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "CounterpartyName", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "100", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "CounterpartyName", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 100, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "16", + "dataName": "CUSTOMERPAYMENT_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", + "dataTypeJavaClass": "java.math.BigDecimal", + "isNumberType": true, + "isFloatType": true, + "formatPattern": "### ### ### ##0.00", + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "CUSTOMERPAYMENT_CURRENCY", + "dataNullable": false, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "Currency", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Code", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "CustomerPayment_Currency", + "relationshipEntityName": "Currency", + "relationshipEntityPerspectiveName": "Settings", + "relationshipEntityPerspectiveLabel": "Settings", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "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", + "isNumberType": true, + "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", + "isNumberType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "100", + "dataName": "CUSTOMERPAYMENT_REASON", + "dataNullable": false, + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": true, + "name": "Reason", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "100", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Reason", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 100, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "100", + "dataName": "CUSTOMERPAYMENT_DESCRIPTION", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "Description", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "100", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Description", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 100, + "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": "Settings", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "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", + "isNumberType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "calculatedPropertyExpressionCreate": "new Generator().generateByType(\"Customer Payment\")", + "dataLength": "20", + "dataName": "CUSTOMERPAYMENT_NAME", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "isCalculatedProperty": true, + "name": "Name", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "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": 20, + "inputRule": "" + }, + { + "auditType": "CREATED_AT", + "dataName": "CUSTOMERPAYMENT_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": "CUSTOMERPAYMENT_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": "CUSTOMERPAYMENT_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": "CUSTOMERPAYMENT_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": "" + } + ] + }, + "hasDropdowns": true, + "hasDates": true, + "hasFloats": true + }, + { + "properties": [ + { + "auditType": "NONE", + "dataAutoIncrement": true, + "dataName": "SUPPLIERPAYMENT_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", + "isNumberType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "SUPPLIERPAYMENT_SUPPLIER", + "dataNullable": false, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "Supplier", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "SupplierPayment_Supplier", + "relationshipEntityName": "Supplier", + "relationshipEntityPerspectiveName": "Suppliers", + "relationshipEntityPerspectiveLabel": "Suppliers", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Supplier", + "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", + "isNumberType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "SUPPLIERPAYMENT_DATE", + "dataNullable": false, + "dataOrderBy": "DESC", + "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", + "dataTypeJavaClass": "java.time.LocalDate", + "isDateType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "SUPPLIERPAYMENT_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", + "dataTypeJavaClass": "java.time.LocalDate", + "isDateType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "34", + "dataName": "SUPPLIERPAYMENT_OURPARTYIBAN", + "dataNullable": false, + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": true, + "name": "OurPartyIBAN", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "OurPartyIBAN", + "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": "34", + "dataName": "SUPPLIERPAYMENT_COUNTERPARTYIBAN", + "dataNullable": false, + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": true, + "name": "CounterpartyIBAN", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "CounterpartyIBAN", + "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": "100", + "dataName": "SUPPLIERPAYMENT_COUNTERPARTYNAME", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "CounterpartyName", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "100", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "CounterpartyName", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 100, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "16", + "dataName": "SUPPLIERPAYMENT_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", + "dataTypeJavaClass": "java.math.BigDecimal", + "isNumberType": true, + "isFloatType": true, + "formatPattern": "### ### ### ##0.00", + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "SUPPLIERPAYMENT_CURRENCY", + "dataNullable": false, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "Currency", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Code", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "SupplierPayment_Currency", + "relationshipEntityName": "Currency", + "relationshipEntityPerspectiveName": "Settings", + "relationshipEntityPerspectiveLabel": "Settings", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "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", + "isNumberType": true, + "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", + "isNumberType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "100", + "dataName": "SUPPLIERPAYMENT_REASON", + "dataNullable": false, + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": true, + "name": "Reason", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "100", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Reason", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 100, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "100", + "dataName": "SUPPLIERPAYMENT_DESCRIPTION", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "Description", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "100", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Description", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 100, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "SUPPLIERPAYMENT_PAYMENTMETHOD", + "dataNullable": false, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "PaymentMethod", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "SupplierPayment_PaymentMethod", + "relationshipEntityName": "PaymentMethod", + "relationshipEntityPerspectiveName": "Settings", + "relationshipEntityPerspectiveLabel": "Settings", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "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", + "isNumberType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "calculatedPropertyExpressionCreate": "new Generator().generateByType(\"Employee Payment\")", + "dataLength": "20", + "dataName": "SUPPLIERPAYMENT_NAME", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "isCalculatedProperty": true, + "name": "Name", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "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": 20, + "inputRule": "" + }, + { + "auditType": "NONE", + "calculatedPropertyExpressionCreate": "Uuid.random()", + "dataLength": "36", + "dataName": "SUPPLIERPAYMENT_UUID", + "dataNullable": false, + "dataType": "VARCHAR", + "dataUnique": true, + "description": "", + "isCalculatedProperty": true, + "name": "UUID", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "isRequiredProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "UUID", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "36", + "dataName": "SUPPLIERPAYMENT_REFERENCE", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "Reference", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Reference", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + }, + { + "auditType": "CREATED_AT", + "dataName": "SUPPLIERPAYMENT_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": "SUPPLIERPAYMENT_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": "SUPPLIERPAYMENT_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": "SUPPLIERPAYMENT_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 SupplierPayment", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"CODBEX_SUPPLIERPAYMENT\"", + "dataName": "SUPPLIERPAYMENT", + "dataQuery": "", + "description": "Manage entity SupplierPayment", + "feedPassword": "YWRtaW4=", + "feedUsername": "YWRtaW4=", + "generateDefaultRoles": "true", + "generateReport": "false", + "icon": "/services/web/resources/unicons/file.svg", + "importsCode": "import codbex-number-generator.service.Generator;\nimport org.eclipse.dirigible.sdk.utils;", + "layoutType": "MANAGE_MASTER", + "menuIndex": "100", + "menuKey": "supplierpayment", + "menuLabel": "SupplierPayment", + "multilingual": "false", + "name": "SupplierPayment", + "perspectiveHeader": "", + "perspectiveIcon": "/services/web/resources/unicons/box.svg", + "perspectiveLabel": "SupplierPayment", + "perspectiveName": "SupplierPayment", + "perspectiveNavId": "purchasing-navigation-group", + "perspectiveOrder": "300", + "perspectiveRole": "", + "roleRead": "codbex-payments.SupplierPayment.SupplierPaymentReadOnly", + "roleWrite": "codbex-payments.SupplierPayment.SupplierPaymentFullAccess", + "title": "SupplierPayment", + "tooltip": "SupplierPayment", + "type": "PRIMARY", + "dataSource": "DefaultDB", + "javaPerspectiveName": "supplierpayment", + "referencedProjections": [ + { + "name": "Supplier", + "project": "codbex-partners", + "genFolderName": "codbex-partners" + }, + { + "name": "Currency", + "project": "codbex-currencies", + "genFolderName": "codbex-currencies" + }, + { + "name": "Company", + "project": "codbex-companies", + "genFolderName": "codbex-companies" + }, + { + "name": "PaymentMethod", + "project": "codbex-methods", + "genFolderName": "codbex-methods" + } + ], + "dataOrderBy": "DESC", + "dataOrderBySort": "Date", + "primaryKeys": [ + "Id" + ], + "primaryKeysString": "Id", + "masterProperties": { + "title": { + "auditType": "NONE", + "dataName": "SUPPLIERPAYMENT_SUPPLIER", + "dataNullable": false, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "Supplier", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "SupplierPayment_Supplier", + "relationshipEntityName": "Supplier", + "relationshipEntityPerspectiveName": "Suppliers", + "relationshipEntityPerspectiveLabel": "Suppliers", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Supplier", + "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", + "isNumberType": true, + "inputRule": "" + }, + "properties": [ + { + "auditType": "NONE", + "dataName": "SUPPLIERPAYMENT_DATE", + "dataNullable": false, + "dataOrderBy": "DESC", + "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", + "dataTypeJavaClass": "java.time.LocalDate", + "isDateType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "SUPPLIERPAYMENT_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", + "dataTypeJavaClass": "java.time.LocalDate", + "isDateType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "34", + "dataName": "SUPPLIERPAYMENT_OURPARTYIBAN", + "dataNullable": false, + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": true, + "name": "OurPartyIBAN", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "OurPartyIBAN", + "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": "34", + "dataName": "SUPPLIERPAYMENT_COUNTERPARTYIBAN", + "dataNullable": false, + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": true, + "name": "CounterpartyIBAN", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "CounterpartyIBAN", + "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": "100", + "dataName": "SUPPLIERPAYMENT_COUNTERPARTYNAME", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "CounterpartyName", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "100", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "CounterpartyName", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 100, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "16", + "dataName": "SUPPLIERPAYMENT_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", + "dataTypeJavaClass": "java.math.BigDecimal", + "isNumberType": true, + "isFloatType": true, + "formatPattern": "### ### ### ##0.00", + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "SUPPLIERPAYMENT_CURRENCY", + "dataNullable": false, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "Currency", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Code", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "SupplierPayment_Currency", + "relationshipEntityName": "Currency", + "relationshipEntityPerspectiveName": "Settings", + "relationshipEntityPerspectiveLabel": "Settings", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "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", + "isNumberType": true, + "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", + "isNumberType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "100", + "dataName": "SUPPLIERPAYMENT_REASON", + "dataNullable": false, + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": true, + "name": "Reason", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "100", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Reason", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 100, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "100", + "dataName": "SUPPLIERPAYMENT_DESCRIPTION", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "Description", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "100", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Description", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 100, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "SUPPLIERPAYMENT_PAYMENTMETHOD", + "dataNullable": false, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "PaymentMethod", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "SupplierPayment_PaymentMethod", + "relationshipEntityName": "PaymentMethod", + "relationshipEntityPerspectiveName": "Settings", + "relationshipEntityPerspectiveLabel": "Settings", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "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", + "isNumberType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "calculatedPropertyExpressionCreate": "new Generator().generateByType(\"Employee Payment\")", + "dataLength": "20", + "dataName": "SUPPLIERPAYMENT_NAME", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "isCalculatedProperty": true, + "name": "Name", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "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": 20, + "inputRule": "" + }, + { + "auditType": "NONE", + "calculatedPropertyExpressionCreate": "Uuid.random()", + "dataLength": "36", + "dataName": "SUPPLIERPAYMENT_UUID", + "dataNullable": false, + "dataType": "VARCHAR", + "dataUnique": true, + "description": "", + "isCalculatedProperty": true, + "name": "UUID", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "isRequiredProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "UUID", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "36", + "dataName": "SUPPLIERPAYMENT_REFERENCE", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "Reference", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Reference", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + }, + { + "auditType": "CREATED_AT", + "dataName": "SUPPLIERPAYMENT_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": "SUPPLIERPAYMENT_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": "SUPPLIERPAYMENT_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": "SUPPLIERPAYMENT_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": "" + } + ] + }, + "hasDropdowns": true, + "hasDates": true, + "hasFloats": true + }, + { + "properties": [ + { + "auditType": "NONE", + "dataAutoIncrement": true, + "dataName": "EMPLOYEEPAYMENT_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", + "isNumberType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "EMPLOYEEPAYMENT_EMPLOYEE", + "dataNullable": false, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "Employee", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "EmployeePayment_Employee", + "relationshipEntityName": "Employee", + "relationshipEntityPerspectiveName": "Employees", + "relationshipEntityPerspectiveLabel": "Employees", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Employee", + "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", + "isNumberType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "EMPLOYEEPAYMENT_DATE", + "dataNullable": false, + "dataOrderBy": "DESC", + "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", + "dataTypeJavaClass": "java.time.LocalDate", + "isDateType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "EMPLOYEEPAYMENT_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", + "dataTypeJavaClass": "java.time.LocalDate", + "isDateType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "34", + "dataName": "EMPLOYEEPAYMENT_OURPARTYIBAN", + "dataNullable": false, + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": true, + "name": "OurPartyIBAN", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "OurPartyIBAN", + "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": "34", + "dataName": "EMPLOYEEPAYMENT_COUNTERPARTYIBAN", + "dataNullable": false, + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": true, + "name": "CounterpartyIBAN", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "CounterpartyIBAN", + "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": "100", + "dataName": "EMPLOYEEPAYMENT_COUNTERPARTYNAME", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "CounterpartyName", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "100", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "CounterpartyName", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 100, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "16", + "dataName": "EMPLOYEEPAYMENT_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", + "dataTypeJavaClass": "java.math.BigDecimal", + "isNumberType": true, + "isFloatType": true, + "formatPattern": "### ### ### ##0.00", + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "EMPLOYEEPAYMENT_CURRENCY", + "dataNullable": false, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "Currency", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Code", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "EmployeePayment_Currency", + "relationshipEntityName": "Currency", + "relationshipEntityPerspectiveName": "Settings", + "relationshipEntityPerspectiveLabel": "Settings", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "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", + "isNumberType": true, + "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", + "isNumberType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "100", + "dataName": "EMPLOYEEPAYMENT_REASON", + "dataNullable": false, + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": true, + "name": "Reason", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "100", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Reason", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 100, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "100", + "dataName": "EMPLOYEEPAYMENT_DESCRIPTION", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "Description", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "100", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Description", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 100, + "inputRule": "" + }, + { + "auditType": "NONE", + "calculatedPropertyExpressionCreate": "new Generator().generateByType(\"Employee Payment\")", + "dataLength": "20", + "dataName": "EMPLOYEEPAYMENT_NAME", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "isCalculatedProperty": true, + "name": "Name", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "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": 20, + "inputRule": "" + }, + { + "auditType": "NONE", + "calculatedPropertyExpressionCreate": "Uuid.random()", + "dataLength": "36", + "dataName": "EMPLOYEEPAYMENT_UUID", + "dataNullable": false, + "dataType": "VARCHAR", + "dataUnique": true, + "description": "", + "isCalculatedProperty": true, + "name": "UUID", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "isRequiredProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "UUID", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "36", + "dataName": "EMPLOYEEPAYMENT_REFERENCE", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "Reference", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "36", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Reference", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 36, + "inputRule": "" + }, + { + "auditType": "CREATED_AT", + "dataName": "EMPLOYEEPAYMENT_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": "EMPLOYEEPAYMENT_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": "EMPLOYEEPAYMENT_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": "EMPLOYEEPAYMENT_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 EmployeePayment", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"CODBEX_EMPLOYEEPAYMENT\"", + "dataName": "EMPLOYEEPAYMENT", + "dataQuery": "", + "description": "Manage entity EmployeePayment", + "feedPassword": "YWRtaW4=", + "feedUsername": "YWRtaW4=", + "generateDefaultRoles": "true", + "generateReport": "false", + "icon": "/services/web/resources/unicons/file.svg", + "importsCode": "import codbex-number-generator.service.Generator;\nimport org.eclipse.dirigible.sdk.utils;", + "layoutType": "MANAGE_MASTER", + "menuIndex": "100", + "menuKey": "employeepayment", + "menuLabel": "EmployeePayment", + "multilingual": "false", + "name": "EmployeePayment", + "perspectiveHeader": "", + "perspectiveIcon": "/services/web/resources/unicons/folder-check.svg", + "perspectiveLabel": "EmployeePayment", + "perspectiveName": "EmployeePayment", + "perspectiveNavId": "salaries-navigation-group", + "perspectiveOrder": "300", + "perspectiveRole": "", + "roleRead": "codbex-payments.EmployeePayment.EmployeePaymentReadOnly", + "roleWrite": "codbex-payments.EmployeePayment.EmployeePaymentFullAccess", + "title": "EmployeePayment", + "tooltip": "EmployeePayment", + "type": "PRIMARY", + "dataSource": "DefaultDB", + "javaPerspectiveName": "employeepayment", + "referencedProjections": [ + { + "name": "Employee", + "project": "codbex-employees", + "genFolderName": "codbex-employees" + }, + { + "name": "Currency", + "project": "codbex-currencies", + "genFolderName": "codbex-currencies" + }, + { + "name": "Company", + "project": "codbex-companies", + "genFolderName": "codbex-companies" + } + ], + "dataOrderBy": "DESC", + "dataOrderBySort": "Date", + "primaryKeys": [ + "Id" + ], + "primaryKeysString": "Id", + "masterProperties": { + "title": { + "auditType": "NONE", + "dataName": "EMPLOYEEPAYMENT_EMPLOYEE", + "dataNullable": false, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "Employee", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "EmployeePayment_Employee", + "relationshipEntityName": "Employee", + "relationshipEntityPerspectiveName": "Employees", + "relationshipEntityPerspectiveLabel": "Employees", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Employee", + "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", + "isNumberType": true, + "inputRule": "" + }, + "properties": [ + { + "auditType": "NONE", + "dataName": "EMPLOYEEPAYMENT_DATE", + "dataNullable": false, + "dataOrderBy": "DESC", + "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", + "dataTypeJavaClass": "java.time.LocalDate", + "isDateType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "EMPLOYEEPAYMENT_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", + "dataTypeJavaClass": "java.time.LocalDate", + "isDateType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "34", + "dataName": "EMPLOYEEPAYMENT_OURPARTYIBAN", + "dataNullable": false, + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": true, + "name": "OurPartyIBAN", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "OurPartyIBAN", + "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": "34", + "dataName": "EMPLOYEEPAYMENT_COUNTERPARTYIBAN", + "dataNullable": false, + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": true, + "name": "CounterpartyIBAN", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "CounterpartyIBAN", + "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": "100", + "dataName": "EMPLOYEEPAYMENT_COUNTERPARTYNAME", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "CounterpartyName", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "100", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "CounterpartyName", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 100, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "16", + "dataName": "EMPLOYEEPAYMENT_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", + "dataTypeJavaClass": "java.math.BigDecimal", + "isNumberType": true, + "isFloatType": true, + "formatPattern": "### ### ### ##0.00", + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "EMPLOYEEPAYMENT_CURRENCY", + "dataNullable": false, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "Currency", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Code", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "EmployeePayment_Currency", + "relationshipEntityName": "Currency", + "relationshipEntityPerspectiveName": "Settings", + "relationshipEntityPerspectiveLabel": "Settings", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "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", + "isNumberType": true, + "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", + "isNumberType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "100", + "dataName": "EMPLOYEEPAYMENT_REASON", + "dataNullable": false, + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": true, + "name": "Reason", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "100", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Reason", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 100, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "100", + "dataName": "EMPLOYEEPAYMENT_DESCRIPTION", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "Description", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "100", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Description", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 100, + "inputRule": "" + }, + { + "auditType": "NONE", + "calculatedPropertyExpressionCreate": "new Generator().generateByType(\"Employee Payment\")", + "dataLength": "20", + "dataName": "EMPLOYEEPAYMENT_NAME", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "isCalculatedProperty": true, + "name": "Name", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "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": 20, + "inputRule": "" + }, + { + "auditType": "NONE", + "calculatedPropertyExpressionCreate": "Uuid.random()", + "dataLength": "36", + "dataName": "EMPLOYEEPAYMENT_UUID", + "dataNullable": false, + "dataType": "VARCHAR", + "dataUnique": true, + "description": "", + "isCalculatedProperty": true, + "name": "UUID", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "isRequiredProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "UUID", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "36", + "dataName": "EMPLOYEEPAYMENT_REFERENCE", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "Reference", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "36", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Reference", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 36, + "inputRule": "" + }, + { + "auditType": "CREATED_AT", + "dataName": "EMPLOYEEPAYMENT_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": "EMPLOYEEPAYMENT_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": "EMPLOYEEPAYMENT_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": "EMPLOYEEPAYMENT_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": "" + } + ] + }, + "hasDropdowns": true, + "hasDates": true, + "hasFloats": true + }, + { + "properties": [ + { + "auditType": "NONE", + "dataAutoIncrement": true, + "dataName": "PAYMENTRECORD_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", + "isNumberType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "PAYMENTRECORD_DATE", + "dataNullable": false, + "dataOrderBy": "DESC", + "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", + "dataTypeJavaClass": "java.time.LocalDate", + "isDateType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "PAYMENTRECORD_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", + "dataTypeJavaClass": "java.time.LocalDate", + "isDateType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "34", + "dataName": "PAYMENTRECORD_OURPARTYIBAN", + "dataNullable": false, + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": true, + "name": "OurPartyIBAN", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "OurPartyIBAN", + "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": "34", + "dataName": "PAYMENTRECORD_COUNTERPARTYIBAN", + "dataNullable": false, + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": true, + "name": "CounterpartyIBAN", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "CounterpartyIBAN", + "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": "100", + "dataName": "PAYMENTRECORD_COUNTERPARTYNAME", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "CounterpartyName", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "CounterpartyName", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "16", + "dataName": "PAYMENTRECORD_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", + "dataTypeJavaClass": "java.math.BigDecimal", + "isNumberType": true, + "isFloatType": true, + "formatPattern": "### ### ### ##0.00", + "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", + "isNumberType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "PAYMENTRECORD_CURRENCY", + "dataNullable": false, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "Currency", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Code", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "PaymentRecord_Currency", + "relationshipEntityName": "Currency", + "relationshipEntityPerspectiveName": "Settings", + "relationshipEntityPerspectiveLabel": "Settings", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "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", + "isNumberType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "PAYMENTRECORD_PAYMENTDIRECTION", + "dataNullable": false, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "PaymentDirection", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "PaymentRecord_PaymentDirection", + "relationshipEntityName": "PaymentDirection", + "relationshipEntityPerspectiveName": "Settings", + "relationshipEntityPerspectiveLabel": "Settings", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "PaymentDirection", + "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", + "isNumberType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "PAYMENTRECORD_PAYMENTTYPE", + "dataNullable": false, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "PaymentType", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "PaymentRecord_PaymentType", + "relationshipEntityName": "PaymentType", + "relationshipEntityPerspectiveName": "Settings", + "relationshipEntityPerspectiveLabel": "Settings", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "PaymentType", + "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", + "isNumberType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "100", + "dataName": "PAYMENTRECORD_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", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "100", + "dataName": "PAYMENTRECORD_DESCRIPTION", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "Description", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Description", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + }, + { + "auditType": "NONE", + "calculatedPropertyExpressionCreate": "Uuid.random()", + "dataLength": "36", + "dataName": "PAYMENTRECORD_UUID", + "dataNullable": false, + "dataType": "VARCHAR", + "dataUnique": true, + "description": "", + "isCalculatedProperty": true, + "name": "UUID", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "isRequiredProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "UUID", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "36", + "dataName": "PAYMENTRECORD_REFERENCE", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "Reference", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "36", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Reference", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 36, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "PAYMENTRECORD_DELETED", + "dataNullable": true, + "dataType": "BOOLEAN", + "description": "", + "name": "Deleted", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "CHECKBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Deleted", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "boolean", + "dataTypeTypescript": "boolean", + "dataTypeJavaClass": "Boolean", + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "PAYMENTRECORD_DELETEDAT", + "dataNullable": true, + "dataType": "TIMESTAMP", + "description": "", + "name": "DeletedAt", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "DeletedAt", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "timestamp", + "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.Instant", + "isDateType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "255", + "dataName": "PAYMENTRECORD_DELETEDREASON", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "DeletedReason", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "255", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "DeletedReason", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 255, + "inputRule": "" + }, + { + "auditType": "CREATED_AT", + "dataName": "PAYMENTRECORD_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": "PAYMENTRECORD_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": "PAYMENTRECORD_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": "PAYMENTRECORD_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 PaymentRecord", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"CODBEX_PAYMENTRECORD\"", + "dataName": "PAYMENTRECORD", + "dataQuery": "", + "description": "Manage entity PaymentRecord", + "feedPassword": "YWRtaW4=", + "feedUsername": "YWRtaW4=", + "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", + "menuLabel": "PaymentRecord", + "multilingual": "false", + "name": "PaymentRecord", + "perspectiveHeader": "", + "perspectiveIcon": "/services/web/resources/unicons/align-justify.svg", + "perspectiveLabel": "PaymentRecord", + "perspectiveName": "PaymentRecord", + "perspectiveNavId": "accounting-navigation-group", + "perspectiveOrder": "40", + "perspectiveRole": "", + "roleRead": "codbex-payments.PaymentRecord.PaymentRecordReadOnly", + "roleWrite": "codbex-payments.PaymentRecord.PaymentRecordFullAccess", + "title": "PaymentRecord", + "tooltip": "PaymentRecord", + "type": "PRIMARY", + "dataSource": "DefaultDB", + "javaPerspectiveName": "paymentrecord", + "referencedProjections": [ + { + "name": "Company", + "project": "codbex-companies", + "genFolderName": "codbex-companies" + }, + { + "name": "Currency", + "project": "codbex-currencies", + "genFolderName": "codbex-currencies" + } + ], + "dataOrderBy": "DESC", + "dataOrderBySort": "Date", + "primaryKeys": [ + "Id" + ], + "primaryKeysString": "Id", + "masterProperties": { + "title": { + "auditType": "NONE", + "dataName": "PAYMENTRECORD_DATE", + "dataNullable": false, + "dataOrderBy": "DESC", + "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", + "dataTypeJavaClass": "java.time.LocalDate", + "isDateType": true, + "inputRule": "" + }, + "properties": [ + { + "auditType": "NONE", + "dataName": "PAYMENTRECORD_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", + "dataTypeJavaClass": "java.time.LocalDate", + "isDateType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "34", + "dataName": "PAYMENTRECORD_OURPARTYIBAN", + "dataNullable": false, + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": true, + "name": "OurPartyIBAN", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "OurPartyIBAN", + "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": "34", + "dataName": "PAYMENTRECORD_COUNTERPARTYIBAN", + "dataNullable": false, + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": true, + "name": "CounterpartyIBAN", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "CounterpartyIBAN", + "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": "100", + "dataName": "PAYMENTRECORD_COUNTERPARTYNAME", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "CounterpartyName", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "CounterpartyName", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "16", + "dataName": "PAYMENTRECORD_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", + "dataTypeJavaClass": "java.math.BigDecimal", + "isNumberType": true, + "isFloatType": true, + "formatPattern": "### ### ### ##0.00", + "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", + "isNumberType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "PAYMENTRECORD_CURRENCY", + "dataNullable": false, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "Currency", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Code", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "PaymentRecord_Currency", + "relationshipEntityName": "Currency", + "relationshipEntityPerspectiveName": "Settings", + "relationshipEntityPerspectiveLabel": "Settings", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "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", + "isNumberType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "PAYMENTRECORD_PAYMENTDIRECTION", + "dataNullable": false, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "PaymentDirection", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "PaymentRecord_PaymentDirection", + "relationshipEntityName": "PaymentDirection", + "relationshipEntityPerspectiveName": "Settings", + "relationshipEntityPerspectiveLabel": "Settings", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "PaymentDirection", + "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", + "isNumberType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "PAYMENTRECORD_PAYMENTTYPE", + "dataNullable": false, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "PaymentType", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "PaymentRecord_PaymentType", + "relationshipEntityName": "PaymentType", + "relationshipEntityPerspectiveName": "Settings", + "relationshipEntityPerspectiveLabel": "Settings", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "PaymentType", + "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", + "isNumberType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "100", + "dataName": "PAYMENTRECORD_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", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "100", + "dataName": "PAYMENTRECORD_DESCRIPTION", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "Description", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Description", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + }, + { + "auditType": "NONE", + "calculatedPropertyExpressionCreate": "Uuid.random()", + "dataLength": "36", + "dataName": "PAYMENTRECORD_UUID", + "dataNullable": false, + "dataType": "VARCHAR", + "dataUnique": true, + "description": "", + "isCalculatedProperty": true, + "name": "UUID", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "isRequiredProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "UUID", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "36", + "dataName": "PAYMENTRECORD_REFERENCE", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "Reference", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "36", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Reference", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 36, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "PAYMENTRECORD_DELETED", + "dataNullable": true, + "dataType": "BOOLEAN", + "description": "", + "name": "Deleted", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "CHECKBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Deleted", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "boolean", + "dataTypeTypescript": "boolean", + "dataTypeJavaClass": "Boolean", + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "PAYMENTRECORD_DELETEDAT", + "dataNullable": true, + "dataType": "TIMESTAMP", + "description": "", + "name": "DeletedAt", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "DeletedAt", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "timestamp", + "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.Instant", + "isDateType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "255", + "dataName": "PAYMENTRECORD_DELETEDREASON", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "DeletedReason", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "255", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "DeletedReason", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 255, + "inputRule": "" + }, + { + "auditType": "CREATED_AT", + "dataName": "PAYMENTRECORD_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": "PAYMENTRECORD_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": "PAYMENTRECORD_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": "PAYMENTRECORD_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": "" + } + ] + }, + "hasDates": true, + "hasFloats": true, + "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", + "dataTypeJavaClass": "Integer", + "isNumberType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "20", + "dataName": "PAYMENTTYPE_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 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", + "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", + "dataTypeJavaClass": "Integer", + "isNumberType": true, + "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", + "dataTypeJavaClass": "java.time.LocalDate", + "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", + "dataTypeJavaClass": "java.time.LocalDate", + "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", + "dataTypeJavaClass": "java.math.BigDecimal", + "isNumberType": true, + "isFloatType": true, + "formatPattern": "### ### ### ##0.00", + "inputRule": "" + }, + { + "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", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "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", + "isNumberType": true, + "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", + "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", + "isNumberType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "calculatedPropertyExpressionCreate": "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", + "dataTypeJavaClass": "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", + "dataTypeJavaClass": "java.time.Instant", + "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", + "dataTypeJavaClass": "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", + "dataTypeJavaClass": "java.time.Instant", + "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", + "dataTypeJavaClass": "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", + "importsCode": "import org.eclipse.dirigible.sdk.utils;", + "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", + "javaPerspectiveName": "paymentadjustment", + "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", + "dataTypeJavaClass": "java.time.LocalDate", + "isDateType": true, + "inputRule": "" + }, + "properties": [ + { + "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", + "dataTypeJavaClass": "java.time.LocalDate", + "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", + "dataTypeJavaClass": "java.math.BigDecimal", + "isNumberType": true, + "isFloatType": true, + "formatPattern": "### ### ### ##0.00", + "inputRule": "" + }, + { + "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", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "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", + "isNumberType": true, + "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", + "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", + "isNumberType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "calculatedPropertyExpressionCreate": "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", + "dataTypeJavaClass": "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", + "dataTypeJavaClass": "java.time.Instant", + "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", + "dataTypeJavaClass": "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", + "dataTypeJavaClass": "java.time.Instant", + "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", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + } + ] + }, + "hasDates": true, + "hasFloats": true, + "hasDropdowns": true + }, + { + "properties": [ + { + "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", + "isNumberType": true, + "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", + "isNumberType": true, + "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", + "isNumberType": true, + "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", + "isNumberType": true, + "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", + "isNumberType": true, + "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", + "isNumberType": true, + "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", + "isNumberType": true, + "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", + "isNumberType": true, + "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", + "isNumberType": true, + "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, + "dataType": "TIMESTAMP", + "description": "", + "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": "CreatedAt", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "timestamp", + "dataTypeTypescript": "Date", + "dataTypeJavaClass": "java.time.Instant", + "isDateType": true, + "inputRule": "" + }, + { + "auditType": "CREATED_BY", + "dataLength": "20", + "dataName": "SUPPLIER_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": "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 Supplier", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"CODBEX_SUPPLIER\"", + "dataName": "SUPPLIER", + "dataQuery": "", + "description": "Manage entity Supplier", + "generateDefaultRoles": "false", + "generateReport": "false", + "icon": "/services/web/resources/unicons/file.svg", + "layoutType": "MANAGE", + "menuIndex": "100", + "menuKey": "supplier", + "menuLabel": "Supplier", + "multilingual": "false", + "name": "Supplier", + "perspectiveHeader": "", + "perspectiveIcon": "/services/web/resources/unicons/user-minus.svg", + "perspectiveLabel": "Suppliers", + "perspectiveName": "Suppliers", + "perspectiveNavId": "", + "perspectiveOrder": "200", + "perspectiveRole": "", + "projectionReferencedEntity": "Supplier", + "projectionReferencedModel": "/workspace/codbex-partners/codbex-partners.model", + "title": "Supplier", + "tooltip": "Supplier", + "type": "PROJECTION", + "dataSource": "DefaultDB", + "javaPerspectiveName": "suppliers", + "referencedProjections": [], + "primaryKeys": [ + "Id" + ], + "primaryKeysString": "Id", + "hasDates": true + }, + { + "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", + "dataTypeJavaClass": "Integer", + "isNumberType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "20", + "dataName": "PAYMENTMETHOD_NAME", + "dataNullable": true, + "dataType": "VARCHAR", + "dataUnique": true, + "description": "", + "isRequiredProperty": true, + "name": "Name", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Name", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "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/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", + "dataAutoIncrement": true, + "dataName": "CURRENCY_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", + "isNumberType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "3", + "dataName": "CURRENCY_CODE", + "dataNullable": true, + "dataType": "VARCHAR", + "dataUnique": true, + "description": "", + "isRequiredProperty": true, + "name": "Code", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "3", + "widgetSize": "fd-col-md--2 fd-col--3", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Code", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 3, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "127", + "dataName": "CURRENCY_NAME", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": true, + "name": "Name", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "127", + "widgetSize": "fd-col-md--6 fd-col--9", + "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": 127, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "3", + "dataName": "CURRENCY_NUMERIC", + "dataNullable": true, + "dataType": "VARCHAR", + "dataUnique": true, + "description": "", + "isRequiredProperty": true, + "name": "Numeric", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "3", + "widgetSize": "fd-col-md--2 fd-col--3", + "widgetType": "TEXTBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Numeric", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 3, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "CURRENCY_ROUNDING", + "dataNullable": true, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "Rounding", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "fd-col-md--2 fd-col--3", + "widgetType": "NUMBER", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Rounding", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "dataTypeJavaClass": "Integer", + "isNumberType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "CURRENCY_BASE", + "dataNullable": true, + "dataType": "BOOLEAN", + "description": "", + "name": "Base", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "CHECKBOX", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Base", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "boolean", + "dataTypeTypescript": "boolean", + "dataTypeJavaClass": "Boolean", + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "CURRENCY_RATE", + "dataNullable": true, + "dataType": "DOUBLE", + "description": "", + "isRequiredProperty": true, + "name": "Rate", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "NUMBER", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Rate", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "double", + "dataTypeTypescript": "number", + "dataTypeJavaClass": "Double", + "isNumberType": true, + "isFloatType": true, + "formatPattern": "### ### ### ##0.00", + "inputRule": "" + }, + { + "auditType": "CREATED_AT", + "dataName": "CURRENCY_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": "CURRENCY_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": "CURRENCY_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": "CURRENCY_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 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/copy.svg", + "perspectiveLabel": "Settings", + "perspectiveName": "Settings", + "perspectiveNavId": "", + "perspectiveOrder": "100", + "perspectiveRole": "", + "projectionReferencedEntity": "Currency", + "projectionReferencedModel": "/workspace/codbex-currencies/codbex-currencies.model", + "title": "Currency", + "tooltip": "Currency", + "type": "PROJECTION", + "dataSource": "DefaultDB", + "javaPerspectiveName": "settings", + "referencedProjections": [], + "primaryKeys": [ + "Id" + ], + "primaryKeysString": "Id", + "hasFloats": true, + "hasDates": true + }, + { + "properties": [ + { + "auditType": "NONE", + "dataAutoIncrement": true, + "dataName": "COMPANY_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", + "isNumberType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "100", + "dataName": "COMPANY_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", + "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": 100, + "inputRule": "" + }, + { + "auditType": "NONE", + "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", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "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", + "isNumberType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "20", + "dataName": "COMPANY_PHONE", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "name": "Phone", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEL", + "dataNotNull": false, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isRequiredProperty": false, + "isCalculatedProperty": false, + "isReadOnlyProperty": false, + "widgetLabel": "Phone", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "200", + "dataName": "COMPANY_ADDRESS", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": true, + "name": "Address", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "200", + "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": 200, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "COMPANY_COUNTRY", + "dataNullable": true, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "Country", + "relationshipEntityPerspectiveLabel": "Settings", + "relationshipEntityPerspectiveName": "Settings", + "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/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", + "isNumberType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataName": "COMPANY_CITY", + "dataNullable": true, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "City", + "relationshipEntityPerspectiveLabel": "Settings", + "relationshipEntityPerspectiveName": "Settings", + "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/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", + "isNumberType": true, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "20", + "dataName": "COMPANY_POSTCODE", + "dataNullable": true, + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": true, + "name": "PostCode", + "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": "PostCode", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + }, + { + "auditType": "NONE", + "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", + "widgetDropdownUrl": "", + "widgetDropdownControllerUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "dataTypeJavaClass": "String", + "minLength": 0, + "maxLength": 20, + "inputRule": "" + }, + { + "auditType": "NONE", + "dataLength": "34", + "dataName": "COMPANY_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": "COMPANY_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": "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 Company", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"CODBEX_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/user.svg", + "perspectiveLabel": "Companies", + "perspectiveName": "Companies", + "perspectiveNavId": "", + "perspectiveOrder": "113", + "perspectiveRole": "", + "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 + } + ] +} \ No newline at end of file diff --git a/codbex-payments/bin/codbex-payments.model b/codbex-payments/bin/codbex-payments.model new file mode 100644 index 0000000..c806d61 --- /dev/null +++ b/codbex-payments/bin/codbex-payments.model @@ -0,0 +1,3186 @@ +{ + "model": { + "entities": [ + { + "properties": [ + { + "auditType": "NONE", + "dataAutoIncrement": "true", + "dataName": "CUSTOMERPAYMENT_ID", + "dataNullable": "true", + "dataPrimaryKey": "true", + "dataType": "INTEGER", + "description": "", + "name": "Id", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataName": "CUSTOMERPAYMENT_CUSTOMER", + "dataNullable": "false", + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": "true", + "name": "Customer", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "CustomerPayment_Customer", + "relationshipEntityName": "Customer", + "relationshipEntityPerspectiveName": "Customers", + "relationshipEntityPerspectiveLabel": "Customers" + }, + { + "auditType": "NONE", + "dataName": "CUSTOMERPAYMENT_DATE", + "dataNullable": "false", + "dataOrderBy": "DESC", + "dataType": "DATE", + "description": "", + "isRequiredProperty": "true", + "name": "Date", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DATE" + }, + { + "auditType": "NONE", + "dataName": "CUSTOMERPAYMENT_VALOR", + "dataNullable": "false", + "dataType": "DATE", + "description": "", + "isRequiredProperty": "true", + "name": "Valor", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DATE" + }, + { + "auditType": "NONE", + "dataLength": "34", + "dataName": "CUSTOMERPAYMENT_OURPARTYIBAN", + "dataNullable": "false", + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": "true", + "name": "OurPartyIBAN", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "34", + "dataName": "CUSTOMERPAYMENT_COUNTERPARTYIBAN", + "dataNullable": "false", + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": "true", + "name": "CounterpartyIBAN", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "100", + "dataName": "CUSTOMERPAYMENT_COUNTERPARTYNAME", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "name": "CounterpartyName", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "100", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "16", + "dataName": "CUSTOMERPAYMENT_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": "CUSTOMERPAYMENT_CURRENCY", + "dataNullable": "false", + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": "true", + "name": "Currency", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Code", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "CustomerPayment_Currency", + "relationshipEntityName": "Currency", + "relationshipEntityPerspectiveName": "Settings", + "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", + "dataLength": "100", + "dataName": "CUSTOMERPAYMENT_REASON", + "dataNullable": "false", + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": "true", + "name": "Reason", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "100", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "100", + "dataName": "CUSTOMERPAYMENT_DESCRIPTION", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "name": "Description", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "100", + "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": "Settings" + }, + { + "auditType": "NONE", + "calculatedPropertyExpressionCreate": "new Generator().generateByType(\"Customer Payment\")", + "dataLength": "20", + "dataName": "CUSTOMERPAYMENT_NAME", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "isCalculatedProperty": "true", + "name": "Name", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "calculatedPropertyExpressionCreate": "Uuid.random()", + "dataLength": "36", + "dataName": "CUSTOMERPAYMENT_UUID", + "dataNullable": "false", + "dataType": "VARCHAR", + "dataUnique": "true", + "description": "", + "isCalculatedProperty": "true", + "name": "UUID", + "tooltip": "", + "widgetIsMajor": "false", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "36", + "dataName": "CUSTOMERPAYMENT_REFERENCE", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "name": "Reference", + "tooltip": "", + "widgetIsMajor": "false", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "CREATED_AT", + "dataName": "CUSTOMERPAYMENT_CREATEDAT", + "dataNullable": "true", + "dataType": "TIMESTAMP", + "description": "", + "isReadOnlyProperty": "true", + "name": "CreatedAt", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "CREATED_BY", + "dataLength": "20", + "dataName": "CUSTOMERPAYMENT_CREATEDBY", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "isReadOnlyProperty": "true", + "name": "CreatedBy", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "UPDATED_AT", + "dataName": "CUSTOMERPAYMENT_UPDATEDAT", + "dataNullable": "true", + "dataType": "TIMESTAMP", + "description": "", + "isReadOnlyProperty": "true", + "name": "UpdatedAt", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "UPDATED_BY", + "dataLength": "20", + "dataName": "CUSTOMERPAYMENT_UPDATEDBY", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "isReadOnlyProperty": "true", + "name": "UpdatedBy", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + } + ], + "caption": "Manage entity CustomerPayment", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"${tablePrefix}CUSTOMERPAYMENT\"", + "dataName": "CUSTOMERPAYMENT", + "dataQuery": "", + "description": "Manage entity CustomerPayment", + "feedPassword": "YWRtaW4=", + "feedUsername": "YWRtaW4=", + "generateDefaultRoles": "true", + "generateReport": "false", + "icon": "/services/web/resources/unicons/file.svg", + "importsCode": "aW1wb3J0IGNvZGJleC1udW1iZXItZ2VuZXJhdG9yLnNlcnZpY2UuR2VuZXJhdG9yOwppbXBvcnQgb3JnLmVjbGlwc2UuZGlyaWdpYmxlLnNkay51dGlsczs=", + "layoutType": "MANAGE_MASTER", + "menuIndex": "100", + "menuKey": "customerpayment", + "menuLabel": "CustomerPayment", + "multilingual": "false", + "name": "CustomerPayment", + "perspectiveHeader": "", + "perspectiveIcon": "/services/web/resources/unicons/usd-square.svg", + "perspectiveLabel": "CustomerPayment", + "perspectiveName": "CustomerPayment", + "perspectiveNavId": "sales-navigation-group", + "perspectiveOrder": "300", + "perspectiveRole": "", + "roleRead": "codbex-payments.CustomerPayment.CustomerPaymentReadOnly", + "roleWrite": "codbex-payments.CustomerPayment.CustomerPaymentFullAccess", + "title": "CustomerPayment", + "tooltip": "CustomerPayment", + "type": "PRIMARY" + }, + { + "properties": [ + { + "auditType": "NONE", + "dataAutoIncrement": "true", + "dataName": "SUPPLIERPAYMENT_ID", + "dataNullable": "true", + "dataPrimaryKey": "true", + "dataType": "INTEGER", + "description": "", + "name": "Id", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataName": "SUPPLIERPAYMENT_SUPPLIER", + "dataNullable": "false", + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": "true", + "name": "Supplier", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "SupplierPayment_Supplier", + "relationshipEntityName": "Supplier", + "relationshipEntityPerspectiveName": "Suppliers", + "relationshipEntityPerspectiveLabel": "Suppliers" + }, + { + "auditType": "NONE", + "dataName": "SUPPLIERPAYMENT_DATE", + "dataNullable": "false", + "dataOrderBy": "DESC", + "dataType": "DATE", + "description": "", + "isRequiredProperty": "true", + "name": "Date", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DATE" + }, + { + "auditType": "NONE", + "dataName": "SUPPLIERPAYMENT_VALOR", + "dataNullable": "false", + "dataType": "DATE", + "description": "", + "isRequiredProperty": "true", + "name": "Valor", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DATE" + }, + { + "auditType": "NONE", + "dataLength": "34", + "dataName": "SUPPLIERPAYMENT_OURPARTYIBAN", + "dataNullable": "false", + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": "true", + "name": "OurPartyIBAN", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "34", + "dataName": "SUPPLIERPAYMENT_COUNTERPARTYIBAN", + "dataNullable": "false", + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": "true", + "name": "CounterpartyIBAN", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "100", + "dataName": "SUPPLIERPAYMENT_COUNTERPARTYNAME", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "name": "CounterpartyName", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "100", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "16", + "dataName": "SUPPLIERPAYMENT_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": "SUPPLIERPAYMENT_CURRENCY", + "dataNullable": "false", + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": "true", + "name": "Currency", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Code", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "SupplierPayment_Currency", + "relationshipEntityName": "Currency", + "relationshipEntityPerspectiveName": "Settings", + "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", + "dataLength": "100", + "dataName": "SUPPLIERPAYMENT_REASON", + "dataNullable": "false", + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": "true", + "name": "Reason", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "100", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "100", + "dataName": "SUPPLIERPAYMENT_DESCRIPTION", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "name": "Description", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "100", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataName": "SUPPLIERPAYMENT_PAYMENTMETHOD", + "dataNullable": "false", + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": "true", + "name": "PaymentMethod", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "SupplierPayment_PaymentMethod", + "relationshipEntityName": "PaymentMethod", + "relationshipEntityPerspectiveName": "Settings", + "relationshipEntityPerspectiveLabel": "Settings" + }, + { + "auditType": "NONE", + "calculatedPropertyExpressionCreate": "new Generator().generateByType(\"Employee Payment\")", + "dataLength": "20", + "dataName": "SUPPLIERPAYMENT_NAME", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "isCalculatedProperty": "true", + "name": "Name", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "calculatedPropertyExpressionCreate": "Uuid.random()", + "dataLength": "36", + "dataName": "SUPPLIERPAYMENT_UUID", + "dataNullable": "false", + "dataType": "VARCHAR", + "dataUnique": "true", + "description": "", + "isCalculatedProperty": "true", + "name": "UUID", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "36", + "dataName": "SUPPLIERPAYMENT_REFERENCE", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "name": "Reference", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "CREATED_AT", + "dataName": "SUPPLIERPAYMENT_CREATEDAT", + "dataNullable": "true", + "dataType": "TIMESTAMP", + "description": "", + "isReadOnlyProperty": "true", + "name": "CreatedAt", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "CREATED_BY", + "dataLength": "20", + "dataName": "SUPPLIERPAYMENT_CREATEDBY", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "isReadOnlyProperty": "true", + "name": "CreatedBy", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "UPDATED_AT", + "dataName": "SUPPLIERPAYMENT_UPDATEDAT", + "dataNullable": "true", + "dataType": "TIMESTAMP", + "description": "", + "isReadOnlyProperty": "true", + "name": "UpdatedAt", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "UPDATED_BY", + "dataLength": "20", + "dataName": "SUPPLIERPAYMENT_UPDATEDBY", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "isReadOnlyProperty": "true", + "name": "UpdatedBy", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + } + ], + "caption": "Manage entity SupplierPayment", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"${tablePrefix}SUPPLIERPAYMENT\"", + "dataName": "SUPPLIERPAYMENT", + "dataQuery": "", + "description": "Manage entity SupplierPayment", + "feedPassword": "YWRtaW4=", + "feedUsername": "YWRtaW4=", + "generateDefaultRoles": "true", + "generateReport": "false", + "icon": "/services/web/resources/unicons/file.svg", + "importsCode": "aW1wb3J0IGNvZGJleC1udW1iZXItZ2VuZXJhdG9yLnNlcnZpY2UuR2VuZXJhdG9yOwppbXBvcnQgb3JnLmVjbGlwc2UuZGlyaWdpYmxlLnNkay51dGlsczs=", + "layoutType": "MANAGE_MASTER", + "menuIndex": "100", + "menuKey": "supplierpayment", + "menuLabel": "SupplierPayment", + "multilingual": "false", + "name": "SupplierPayment", + "perspectiveHeader": "", + "perspectiveIcon": "/services/web/resources/unicons/box.svg", + "perspectiveLabel": "SupplierPayment", + "perspectiveName": "SupplierPayment", + "perspectiveNavId": "purchasing-navigation-group", + "perspectiveOrder": "300", + "perspectiveRole": "", + "roleRead": "codbex-payments.SupplierPayment.SupplierPaymentReadOnly", + "roleWrite": "codbex-payments.SupplierPayment.SupplierPaymentFullAccess", + "title": "SupplierPayment", + "tooltip": "SupplierPayment", + "type": "PRIMARY" + }, + { + "properties": [ + { + "auditType": "NONE", + "dataAutoIncrement": "true", + "dataName": "EMPLOYEEPAYMENT_ID", + "dataNullable": "true", + "dataPrimaryKey": "true", + "dataType": "INTEGER", + "description": "", + "name": "Id", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataName": "EMPLOYEEPAYMENT_EMPLOYEE", + "dataNullable": "false", + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": "true", + "name": "Employee", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "EmployeePayment_Employee", + "relationshipEntityName": "Employee", + "relationshipEntityPerspectiveName": "Employees", + "relationshipEntityPerspectiveLabel": "Employees" + }, + { + "auditType": "NONE", + "dataName": "EMPLOYEEPAYMENT_DATE", + "dataNullable": "false", + "dataOrderBy": "DESC", + "dataType": "DATE", + "description": "", + "isRequiredProperty": "true", + "name": "Date", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DATE" + }, + { + "auditType": "NONE", + "dataName": "EMPLOYEEPAYMENT_VALOR", + "dataNullable": "false", + "dataType": "DATE", + "description": "", + "isRequiredProperty": "true", + "name": "Valor", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DATE" + }, + { + "auditType": "NONE", + "dataLength": "34", + "dataName": "EMPLOYEEPAYMENT_OURPARTYIBAN", + "dataNullable": "false", + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": "true", + "name": "OurPartyIBAN", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "34", + "dataName": "EMPLOYEEPAYMENT_COUNTERPARTYIBAN", + "dataNullable": "false", + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": "true", + "name": "CounterpartyIBAN", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "100", + "dataName": "EMPLOYEEPAYMENT_COUNTERPARTYNAME", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "name": "CounterpartyName", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "100", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "16", + "dataName": "EMPLOYEEPAYMENT_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": "EMPLOYEEPAYMENT_CURRENCY", + "dataNullable": "false", + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": "true", + "name": "Currency", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Code", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "EmployeePayment_Currency", + "relationshipEntityName": "Currency", + "relationshipEntityPerspectiveName": "Settings", + "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", + "dataLength": "100", + "dataName": "EMPLOYEEPAYMENT_REASON", + "dataNullable": "false", + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": "true", + "name": "Reason", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "100", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "100", + "dataName": "EMPLOYEEPAYMENT_DESCRIPTION", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "name": "Description", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "100", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "calculatedPropertyExpressionCreate": "new Generator().generateByType(\"Employee Payment\")", + "dataLength": "20", + "dataName": "EMPLOYEEPAYMENT_NAME", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "isCalculatedProperty": "true", + "name": "Name", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "calculatedPropertyExpressionCreate": "Uuid.random()", + "dataLength": "36", + "dataName": "EMPLOYEEPAYMENT_UUID", + "dataNullable": "false", + "dataType": "VARCHAR", + "dataUnique": "true", + "description": "", + "isCalculatedProperty": "true", + "name": "UUID", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "36", + "dataName": "EMPLOYEEPAYMENT_REFERENCE", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "name": "Reference", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "36", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "CREATED_AT", + "dataName": "EMPLOYEEPAYMENT_CREATEDAT", + "dataNullable": "true", + "dataType": "TIMESTAMP", + "description": "", + "isReadOnlyProperty": "true", + "name": "CreatedAt", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "CREATED_BY", + "dataLength": "20", + "dataName": "EMPLOYEEPAYMENT_CREATEDBY", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "isReadOnlyProperty": "true", + "name": "CreatedBy", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "UPDATED_AT", + "dataName": "EMPLOYEEPAYMENT_UPDATEDAT", + "dataNullable": "true", + "dataType": "TIMESTAMP", + "description": "", + "isReadOnlyProperty": "true", + "name": "UpdatedAt", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "UPDATED_BY", + "dataLength": "20", + "dataName": "EMPLOYEEPAYMENT_UPDATEDBY", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "isReadOnlyProperty": "true", + "name": "UpdatedBy", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + } + ], + "caption": "Manage entity EmployeePayment", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"${tablePrefix}EMPLOYEEPAYMENT\"", + "dataName": "EMPLOYEEPAYMENT", + "dataQuery": "", + "description": "Manage entity EmployeePayment", + "feedPassword": "YWRtaW4=", + "feedUsername": "YWRtaW4=", + "generateDefaultRoles": "true", + "generateReport": "false", + "icon": "/services/web/resources/unicons/file.svg", + "importsCode": "aW1wb3J0IGNvZGJleC1udW1iZXItZ2VuZXJhdG9yLnNlcnZpY2UuR2VuZXJhdG9yOwppbXBvcnQgb3JnLmVjbGlwc2UuZGlyaWdpYmxlLnNkay51dGlsczs=", + "layoutType": "MANAGE_MASTER", + "menuIndex": "100", + "menuKey": "employeepayment", + "menuLabel": "EmployeePayment", + "multilingual": "false", + "name": "EmployeePayment", + "perspectiveHeader": "", + "perspectiveIcon": "/services/web/resources/unicons/folder-check.svg", + "perspectiveLabel": "EmployeePayment", + "perspectiveName": "EmployeePayment", + "perspectiveNavId": "salaries-navigation-group", + "perspectiveOrder": "300", + "perspectiveRole": "", + "roleRead": "codbex-payments.EmployeePayment.EmployeePaymentReadOnly", + "roleWrite": "codbex-payments.EmployeePayment.EmployeePaymentFullAccess", + "title": "EmployeePayment", + "tooltip": "EmployeePayment", + "type": "PRIMARY" + }, + { + "properties": [ + { + "auditType": "NONE", + "dataAutoIncrement": "true", + "dataName": "PAYMENTRECORD_ID", + "dataNullable": "true", + "dataPrimaryKey": "true", + "dataType": "INTEGER", + "description": "", + "name": "Id", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataName": "PAYMENTRECORD_DATE", + "dataNullable": "false", + "dataOrderBy": "DESC", + "dataType": "DATE", + "description": "", + "isRequiredProperty": "true", + "name": "Date", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DATE" + }, + { + "auditType": "NONE", + "dataName": "PAYMENTRECORD_VALOR", + "dataNullable": "false", + "dataType": "DATE", + "description": "", + "isRequiredProperty": "true", + "name": "Valor", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DATE" + }, + { + "auditType": "NONE", + "dataLength": "34", + "dataName": "PAYMENTRECORD_OURPARTYIBAN", + "dataNullable": "false", + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": "true", + "name": "OurPartyIBAN", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "34", + "dataName": "PAYMENTRECORD_COUNTERPARTYIBAN", + "dataNullable": "false", + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": "true", + "name": "CounterpartyIBAN", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "34", + "widgetPattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "100", + "dataName": "PAYMENTRECORD_COUNTERPARTYNAME", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "name": "CounterpartyName", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "16", + "dataName": "PAYMENTRECORD_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": "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", + "dataNullable": "false", + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": "true", + "name": "Currency", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Code", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "PaymentRecord_Currency", + "relationshipEntityName": "Currency", + "relationshipEntityPerspectiveName": "Settings", + "relationshipEntityPerspectiveLabel": "Settings" + }, + { + "auditType": "NONE", + "dataName": "PAYMENTRECORD_PAYMENTDIRECTION", + "dataNullable": "false", + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": "true", + "name": "PaymentDirection", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "PaymentRecord_PaymentDirection", + "relationshipEntityName": "PaymentDirection", + "relationshipEntityPerspectiveName": "Settings", + "relationshipEntityPerspectiveLabel": "Settings" + }, + { + "auditType": "NONE", + "dataName": "PAYMENTRECORD_PAYMENTTYPE", + "dataNullable": "false", + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": "true", + "name": "PaymentType", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "PaymentRecord_PaymentType", + "relationshipEntityName": "PaymentType", + "relationshipEntityPerspectiveName": "Settings", + "relationshipEntityPerspectiveLabel": "Settings" + }, + { + "auditType": "NONE", + "dataLength": "100", + "dataName": "PAYMENTRECORD_REASON", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "name": "Reason", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "100", + "dataName": "PAYMENTRECORD_DESCRIPTION", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "name": "Description", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "calculatedPropertyExpressionCreate": "Uuid.random()", + "dataLength": "36", + "dataName": "PAYMENTRECORD_UUID", + "dataNullable": "false", + "dataType": "VARCHAR", + "dataUnique": "true", + "description": "", + "isCalculatedProperty": "true", + "name": "UUID", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "36", + "dataName": "PAYMENTRECORD_REFERENCE", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "name": "Reference", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "36", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataName": "PAYMENTRECORD_DELETED", + "dataNullable": "true", + "dataType": "BOOLEAN", + "description": "", + "name": "Deleted", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "CHECKBOX" + }, + { + "auditType": "NONE", + "dataName": "PAYMENTRECORD_DELETEDAT", + "dataNullable": "true", + "dataType": "TIMESTAMP", + "description": "", + "name": "DeletedAt", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "255", + "dataName": "PAYMENTRECORD_DELETEDREASON", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "name": "DeletedReason", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "255", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "CREATED_AT", + "dataName": "PAYMENTRECORD_CREATEDAT", + "dataNullable": "true", + "dataType": "TIMESTAMP", + "description": "", + "isReadOnlyProperty": "true", + "name": "CreatedAt", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "CREATED_BY", + "dataLength": "20", + "dataName": "PAYMENTRECORD_CREATEDBY", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "isReadOnlyProperty": "true", + "name": "CreatedBy", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "UPDATED_AT", + "dataName": "PAYMENTRECORD_UPDATEDAT", + "dataNullable": "true", + "dataType": "TIMESTAMP", + "description": "", + "isReadOnlyProperty": "true", + "name": "UpdatedAt", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "UPDATED_BY", + "dataLength": "20", + "dataName": "PAYMENTRECORD_UPDATEDBY", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "isReadOnlyProperty": "true", + "name": "UpdatedBy", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + } + ], + "caption": "Manage entity PaymentRecord", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"${tablePrefix}PAYMENTRECORD\"", + "dataName": "PAYMENTRECORD", + "dataQuery": "", + "description": "Manage entity PaymentRecord", + "feedPassword": "YWRtaW4=", + "feedUsername": "YWRtaW4=", + "generateDefaultRoles": "true", + "generateReport": "true", + "icon": "/services/web/resources/unicons/file.svg", + "importsCode": "aW1wb3J0IG9yZy5lY2xpcHNlLmRpcmlnaWJsZS5zZGsudXRpbHM7", + "layoutType": "MANAGE_MASTER", + "menuIndex": "100", + "menuKey": "paymentrecord", + "menuLabel": "PaymentRecord", + "multilingual": "false", + "name": "PaymentRecord", + "perspectiveHeader": "", + "perspectiveIcon": "/services/web/resources/unicons/align-justify.svg", + "perspectiveLabel": "PaymentRecord", + "perspectiveName": "PaymentRecord", + "perspectiveNavId": "accounting-navigation-group", + "perspectiveOrder": "40", + "perspectiveRole": "", + "roleRead": "codbex-payments.PaymentRecord.PaymentRecordReadOnly", + "roleWrite": "codbex-payments.PaymentRecord.PaymentRecordFullAccess", + "title": "PaymentRecord", + "tooltip": "PaymentRecord", + "type": "PRIMARY" + }, + { + "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" + }, + { + "auditType": "NONE", + "dataLength": "20", + "dataName": "PAYMENTTYPE_NAME", + "dataNullable": "false", + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": "true", + "name": "Name", + "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": "PAYMENTADJUSTMENT_ID", + "dataNullable": "true", + "dataPrimaryKey": "true", + "dataType": "INTEGER", + "description": "", + "name": "Id", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataName": "PAYMENTADJUSTMENT_DATE", + "dataNullable": "false", + "dataType": "DATE", + "description": "", + "isRequiredProperty": "true", + "name": "Date", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DATE" + }, + { + "auditType": "NONE", + "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": "", + "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" + }, + { + "auditType": "NONE", + "calculatedPropertyExpressionCreate": "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" + }, + { + "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", + "importsCode": "aW1wb3J0IG9yZy5lY2xpcHNlLmRpcmlnaWJsZS5zZGsudXRpbHM7", + "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", + "dataAutoIncrement": "true", + "dataName": "PAYMENTDIRECTION_ID", + "dataNullable": "true", + "dataPrimaryKey": "true", + "dataType": "INTEGER", + "description": "", + "name": "Id", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "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 PaymentDirection", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"${tablePrefix}PAYMENTDIRECTION\"", + "dataName": "PAYMENTDIRECTION", + "dataQuery": "", + "description": "Manage entity PaymentDirection", + "generateDefaultRoles": "false", + "generateReport": "false", + "icon": "/services/web/resources/unicons/file.svg", + "layoutType": "MANAGE", + "menuIndex": "100", + "menuKey": "paymentdirection", + "menuLabel": "PaymentDirection", + "multilingual": "false", + "name": "PaymentDirection", + "perspectiveHeader": "", + "perspectiveIcon": "/services/web/resources/unicons/copy.svg", + "perspectiveLabel": "Settings", + "perspectiveName": "Settings", + "perspectiveNavId": "", + "perspectiveOrder": "100", + "perspectiveRole": "", + "title": "PaymentDirection", + "tooltip": "PaymentDirection", + "type": "SETTING" + }, + { + "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" + }, + { + "auditType": "NONE", + "dataLength": "50", + "dataName": "CUSTOMER_FIRSTNAME", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "name": "FirstName", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "50", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "50", + "dataName": "CUSTOMER_LASTNAME", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "name": "LastName", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "50", + "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", + "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" + }, + { + "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" + }, + { + "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" + }, + { + "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" + }, + { + "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" + }, + { + "auditType": "NONE", + "dataLength": "255", + "dataName": "CUSTOMER_ADDRESS", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": "true", + "name": "Address", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "255", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "10", + "dataName": "CUSTOMER_POSTALCODE", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": "true", + "name": "PostalCode", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "10", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "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" + }, + { + "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" + }, + { + "auditType": "NONE", + "dataLength": "150", + "dataName": "CUSTOMER_RESPONSIBLEPERSON", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "name": "ResponsiblePerson", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "150", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "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": "CUSTOMER_CREATEDBY", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "isReadOnlyProperty": "true", + "name": "CreatedBy", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "UPDATED_AT", + "dataName": "CUSTOMER_UPDATEDAT", + "dataNullable": "true", + "dataType": "TIMESTAMP", + "description": "", + "isReadOnlyProperty": "true", + "name": "UpdatedAt", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "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" + } + ], + "caption": "Manage entity Customer", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"${tablePrefix}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" + }, + { + "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" + }, + { + "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" + }, + { + "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": "70", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "TEXTBOX" + }, + { + "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" + }, + { + "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" + }, + { + "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" + }, + { + "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" + }, + { + "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" + }, + { + "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" + }, + { + "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" + }, + { + "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": "EMPLOYEE_CREATEDBY", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "isReadOnlyProperty": "true", + "name": "CreatedBy", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "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": "", + "isReadOnlyProperty": "true", + "name": "UpdatedBy", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + } + ], + "caption": "Manage entity Employee", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"${tablePrefix}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" + }, + { + "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" + }, + { + "auditType": "NONE", + "dataLength": "50", + "dataName": "SUPPLIER_FIRSTNAME", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "name": "FirstName", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "50", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "50", + "dataName": "SUPPLIER_LASTNAME", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "name": "LastName", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "50", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "255", + "dataName": "SUPPLIER_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": "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": "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": "", + "widgetIsMajor": "true", + "widgetLength": "15", + "widgetSize": "fd-col-md--2 fd-col--3", + "widgetType": "TEL" + }, + { + "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" + }, + { + "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" + }, + { + "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" + }, + { + "auditType": "CREATED_AT", + "dataName": "SUPPLIER_CREATEDAT", + "dataNullable": "true", + "dataType": "TIMESTAMP", + "description": "", + "name": "CreatedAt", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "CREATED_BY", + "dataLength": "20", + "dataName": "SUPPLIER_CREATEDBY", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "isReadOnlyProperty": "true", + "name": "CreatedBy", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "UPDATED_AT", + "dataName": "SUPPLIER_UPDATEDAT", + "dataNullable": "true", + "dataType": "TIMESTAMP", + "description": "", + "isReadOnlyProperty": "true", + "name": "UpdatedAt", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "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" + } + ], + "caption": "Manage entity Supplier", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"${tablePrefix}SUPPLIER\"", + "dataName": "SUPPLIER", + "dataQuery": "", + "description": "Manage entity Supplier", + "generateDefaultRoles": "false", + "generateReport": "false", + "icon": "/services/web/resources/unicons/file.svg", + "layoutType": "MANAGE", + "menuIndex": "100", + "menuKey": "supplier", + "menuLabel": "Supplier", + "multilingual": "false", + "name": "Supplier", + "perspectiveHeader": "", + "perspectiveIcon": "/services/web/resources/unicons/user-minus.svg", + "perspectiveLabel": "Suppliers", + "perspectiveName": "Suppliers", + "perspectiveNavId": "", + "perspectiveOrder": "200", + "perspectiveRole": "", + "projectionReferencedEntity": "Supplier", + "projectionReferencedModel": "/workspace/codbex-partners/codbex-partners.model", + "title": "Supplier", + "tooltip": "Supplier", + "type": "PROJECTION" + }, + { + "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" + }, + { + "auditType": "NONE", + "dataLength": "20", + "dataName": "PAYMENTMETHOD_NAME", + "dataNullable": "true", + "dataType": "VARCHAR", + "dataUnique": "true", + "description": "", + "isRequiredProperty": "true", + "name": "Name", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + } + ], + "caption": "Manage entity PaymentMethod", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"${tablePrefix}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" + }, + { + "properties": [ + { + "auditType": "NONE", + "dataAutoIncrement": "true", + "dataName": "CURRENCY_ID", + "dataNullable": "true", + "dataPrimaryKey": "true", + "dataType": "INTEGER", + "description": "", + "name": "Id", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "3", + "dataName": "CURRENCY_CODE", + "dataNullable": "true", + "dataType": "VARCHAR", + "dataUnique": "true", + "description": "", + "isRequiredProperty": "true", + "name": "Code", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "3", + "widgetSize": "fd-col-md--2 fd-col--3", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "127", + "dataName": "CURRENCY_NAME", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": "true", + "name": "Name", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "127", + "widgetSize": "fd-col-md--6 fd-col--9", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "3", + "dataName": "CURRENCY_NUMERIC", + "dataNullable": "true", + "dataType": "VARCHAR", + "dataUnique": "true", + "description": "", + "isRequiredProperty": "true", + "name": "Numeric", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "3", + "widgetSize": "fd-col-md--2 fd-col--3", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataName": "CURRENCY_ROUNDING", + "dataNullable": "true", + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": "true", + "name": "Rounding", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "fd-col-md--2 fd-col--3", + "widgetType": "NUMBER" + }, + { + "auditType": "NONE", + "dataName": "CURRENCY_BASE", + "dataNullable": "true", + "dataType": "BOOLEAN", + "description": "", + "name": "Base", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "CHECKBOX" + }, + { + "auditType": "NONE", + "dataName": "CURRENCY_RATE", + "dataNullable": "true", + "dataType": "DOUBLE", + "description": "", + "isRequiredProperty": "true", + "name": "Rate", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "fd-col-md--4 fd-col--6", + "widgetType": "NUMBER" + }, + { + "auditType": "CREATED_AT", + "dataName": "CURRENCY_CREATEDAT", + "dataNullable": "true", + "dataType": "TIMESTAMP", + "description": "", + "isReadOnlyProperty": "true", + "name": "CreatedAt", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "CREATED_BY", + "dataLength": "20", + "dataName": "CURRENCY_CREATEDBY", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "isReadOnlyProperty": "true", + "name": "CreatedBy", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "UPDATED_AT", + "dataName": "CURRENCY_UPDATEDAT", + "dataNullable": "true", + "dataType": "TIMESTAMP", + "description": "", + "isReadOnlyProperty": "true", + "name": "UpdatedAt", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "UPDATED_BY", + "dataLength": "20", + "dataName": "CURRENCY_UPDATEDBY", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "isReadOnlyProperty": "true", + "name": "UpdatedBy", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + } + ], + "caption": "Manage entity Currency", + "dataCount": "SELECT COUNT(*) AS COUNT FROM \"${tablePrefix}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/copy.svg", + "perspectiveLabel": "Settings", + "perspectiveName": "Settings", + "perspectiveNavId": "", + "perspectiveOrder": "100", + "perspectiveRole": "", + "projectionReferencedEntity": "Currency", + "projectionReferencedModel": "/workspace/codbex-currencies/codbex-currencies.model", + "title": "Currency", + "tooltip": "Currency", + "type": "PROJECTION" + }, + { + "properties": [ + { + "auditType": "NONE", + "dataAutoIncrement": "true", + "dataName": "COMPANY_ID", + "dataNullable": "true", + "dataPrimaryKey": "true", + "dataType": "INTEGER", + "description": "", + "name": "Id", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataLength": "100", + "dataName": "COMPANY_NAME", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": "true", + "name": "Name", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "100", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "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" + }, + { + "auditType": "NONE", + "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": "Phone", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "TEL" + }, + { + "auditType": "NONE", + "dataLength": "200", + "dataName": "COMPANY_ADDRESS", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": "true", + "name": "Address", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "200", + "widgetSize": "", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "dataName": "COMPANY_COUNTRY", + "dataNullable": "true", + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": "true", + "name": "Country", + "relationshipEntityPerspectiveLabel": "Settings", + "relationshipEntityPerspectiveName": "Settings", + "relationshipName": "Company_Country", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN" + }, + { + "auditType": "NONE", + "dataName": "COMPANY_CITY", + "dataNullable": "true", + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": "true", + "name": "City", + "relationshipEntityPerspectiveLabel": "Settings", + "relationshipEntityPerspectiveName": "Settings", + "relationshipName": "Company_City", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN" + }, + { + "auditType": "NONE", + "dataLength": "20", + "dataName": "COMPANY_POSTCODE", + "dataNullable": "true", + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": "true", + "name": "PostCode", + "tooltip": "", + "widgetIsMajor": "true", + "widgetLength": "20", + "widgetSize": "fd-col-md--2 fd-col--3", + "widgetType": "TEXTBOX" + }, + { + "auditType": "NONE", + "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" + }, + { + "auditType": "NONE", + "dataLength": "34", + "dataName": "COMPANY_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": "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 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/user.svg", + "perspectiveLabel": "Companies", + "perspectiveName": "Companies", + "perspectiveNavId": "", + "perspectiveOrder": "113", + "perspectiveRole": "", + "projectionReferencedEntity": "Company", + "projectionReferencedModel": "/workspace/codbex-companies/codbex-companies.model", + "title": "Company", + "tooltip": "Company", + "type": "PROJECTION" + } + ], + "perspectives": [ + { + "name": "CustomerPayment", + "label": "CustomerPayment", + "navId": "sales-navigation-group", + "icon": "/services/web/resources/unicons/usd-square.svg", + "order": "300" + }, + { + "name": "SupplierPayment", + "label": "SupplierPayment", + "navId": "purchasing-navigation-group", + "icon": "/services/web/resources/unicons/box.svg", + "order": "300" + }, + { + "name": "PaymentRecord", + "label": "PaymentRecord", + "navId": "accounting-navigation-group", + "icon": "/services/web/resources/unicons/align-justify.svg", + "order": "40" + }, + { + "name": "EmployeePayment", + "label": "EmployeePayment", + "navId": "salaries-navigation-group", + "icon": "/services/web/resources/unicons/folder-check.svg", + "order": "300" + }, + { + "name": "PaymentAdjustment", + "label": "PaymentAdjustment", + "navId": "sales-navigation-group", + "icon": "/services/web/resources/unicons/paypal.svg", + "order": "700" + } + ], + "navigations": [] + } +} \ No newline at end of file diff --git a/codbex-payments/bin/events/CustomerPayment/CustomerPaymentToRecord.extension b/codbex-payments/bin/events/CustomerPayment/CustomerPaymentToRecord.extension new file mode 100644 index 0000000..3b3adba --- /dev/null +++ b/codbex-payments/bin/events/CustomerPayment/CustomerPaymentToRecord.extension @@ -0,0 +1,5 @@ +{ + "extensionPoint": "codbex-payments-CustomerPayment-CustomerPayment", + "module": "codbex-payments/events/CustomerPayment/CustomerPaymentToRecordHandler.ts", + "description": "CustomerPayment Extension" +} \ No newline at end of file diff --git a/codbex-payments/bin/events/CustomerPayment/CustomerPaymentToRecordHandler.ts b/codbex-payments/bin/events/CustomerPayment/CustomerPaymentToRecordHandler.ts new file mode 100644 index 0000000..7881046 --- /dev/null +++ b/codbex-payments/bin/events/CustomerPayment/CustomerPaymentToRecordHandler.ts @@ -0,0 +1,36 @@ +import { PaymentRecordRepository } from "../../gen/codbex-payments/data/PaymentRecord/PaymentRecordRepository"; +import { PaymentRecordEntity } from "../../gen/codbex-payments/data/PaymentRecord/PaymentRecordEntity"; + +import { EntityEvent } from "@aerokit/sdk/db"; + +const validate = () => { } + +export const trigger = (event: EntityEvent): void => { + const PaymentRecordDao = new PaymentRecordRepository(); + const item = event.entity; + const operation = event.operation; + + if (operation === "create") { + const record = { + Date: item.Date!, + Valor: item.Valor!, + CompanyIBAN: item.OurPartyIBAN, + CounterpartyIBAN: item.CounterpartyIBAN, + CounterpartyName: item.CounterpartyName, + Amount: item.Amount, + Currency: item.Currency, + Reason: item.Reason, + Description: item.Description, + Reference: item.UUID, + Direction: 1, + Deleted: false, + } + PaymentRecordDao.create(record); + } else if (operation === "update") { + // TODO find by Item Id and update + } else if (operation === "delete") { + // TODO find by Item Id and mark as deleted + } else { + throw new Error("Unknown operation: " + operation); + } +} diff --git a/codbex-payments/bin/events/EmployeePayment/EmployeePaymentToRecord.extension b/codbex-payments/bin/events/EmployeePayment/EmployeePaymentToRecord.extension new file mode 100644 index 0000000..29d11cf --- /dev/null +++ b/codbex-payments/bin/events/EmployeePayment/EmployeePaymentToRecord.extension @@ -0,0 +1,5 @@ +{ + "extensionPoint": "codbex-payments-EmployeePayment-EmployeePayment", + "module": "codbex-payments/events/EmployeePayment/EmployeePaymentToRecordHandler.ts", + "description": "EmployeePayment extension" +} \ No newline at end of file diff --git a/codbex-payments/bin/events/EmployeePayment/EmployeePaymentToRecordHandler.ts b/codbex-payments/bin/events/EmployeePayment/EmployeePaymentToRecordHandler.ts new file mode 100644 index 0000000..4bdf20a --- /dev/null +++ b/codbex-payments/bin/events/EmployeePayment/EmployeePaymentToRecordHandler.ts @@ -0,0 +1,36 @@ +import { PaymentRecordRepository } from "../../gen/codbex-payments/data/PaymentRecord/PaymentRecordRepository"; +import { PaymentRecordEntity } from "../../gen/codbex-payments/data/PaymentRecord/PaymentRecordEntity"; + +import { EntityEvent } from "@aerokit/sdk/db"; + +const validate = () => { } + +export const trigger = (event: EntityEvent): void => { + const PaymentRecordDao = new PaymentRecordRepository(); + const item = event.entity; + const operation = event.operation; + + if (operation === "create") { + const record = { + Date: item.Date!, + Valor: item.Valor!, + CompanyIBAN: item.OurPartyIBAN, + CounterpartyIBAN: item.CounterpartyIBAN, + CounterpartyName: item.CounterpartyName, + Amount: item.Amount, + Currency: item.Currency, + Reason: item.Reason, + Description: item.Description, + Reference: item.UUID, + Direction: -1, + Deleted: false, + } + PaymentRecordDao.create(record); + } else if (operation === "update") { + // TODO find by Item Id and update + } else if (operation === "delete") { + // TODO find by Item Id and mark as deleted + } else { + throw new Error("Unknown operation: " + operation); + } +} diff --git a/codbex-payments/bin/events/PaymentAdjustment/PaymentAdjustmentToRecord.extension b/codbex-payments/bin/events/PaymentAdjustment/PaymentAdjustmentToRecord.extension new file mode 100644 index 0000000..72d7d97 --- /dev/null +++ b/codbex-payments/bin/events/PaymentAdjustment/PaymentAdjustmentToRecord.extension @@ -0,0 +1,5 @@ +{ + "extensionPoint": "codbex-payments-PaymentAdjustment-PaymentAdjustment", + "module": "codbex-payments/events/PaymentAdjustment/PaymentAdjustmentToRecordHandler.ts", + "description": "PaymentAdjustment Extension" +} \ No newline at end of file diff --git a/codbex-payments/bin/events/PaymentAdjustment/PaymentAdjustmentToRecordHandler.ts b/codbex-payments/bin/events/PaymentAdjustment/PaymentAdjustmentToRecordHandler.ts new file mode 100644 index 0000000..4c6ec29 --- /dev/null +++ b/codbex-payments/bin/events/PaymentAdjustment/PaymentAdjustmentToRecordHandler.ts @@ -0,0 +1,32 @@ +import { PaymentRecordRepository } from "../../gen/codbex-payments/data/PaymentRecord/PaymentRecordRepository"; +import { PaymentRecordEntity } from "../../gen/codbex-payments/data/PaymentRecord/PaymentRecordEntity"; + +import { EntityEvent } from "@aerokit/sdk/db"; + +const validate = () => { } + +export const trigger = (event: EntityEvent): void => { + const PaymentRecordDao = new PaymentRecordRepository(); + const item = event.entity; + const operation = event.operation; + + if (operation === "create") { + const record = { + Date: item.Date!, + Valor: item.Valor!, + Amount: item.Amount, + Currency: item.Currency, + Reason: item.Reason, + Reference: item.UUID, + Direction: 1, + Deleted: false, + } + PaymentRecordDao.create(record); + } else if (operation === "update") { + // TODO find by Item Id and update + } else if (operation === "delete") { + // TODO find by Item Id and mark as deleted + } else { + throw new Error("Unknown operation: " + operation); + } +} \ No newline at end of file diff --git a/codbex-payments/bin/events/SupplierPayment/SupplierPaymentToRecord.extension b/codbex-payments/bin/events/SupplierPayment/SupplierPaymentToRecord.extension new file mode 100644 index 0000000..653cee7 --- /dev/null +++ b/codbex-payments/bin/events/SupplierPayment/SupplierPaymentToRecord.extension @@ -0,0 +1,5 @@ +{ + "module": "codbex-payments/events/SupplierPayment/SupplierPaymentToRecordHandler.ts", + "extensionPoint": "codbex-payments-SupplierPayment-SupplierPayment", + "description": "SupplierPayment extension" +} \ No newline at end of file diff --git a/codbex-payments/bin/events/SupplierPayment/SupplierPaymentToRecordHandler.ts b/codbex-payments/bin/events/SupplierPayment/SupplierPaymentToRecordHandler.ts new file mode 100644 index 0000000..4bdf20a --- /dev/null +++ b/codbex-payments/bin/events/SupplierPayment/SupplierPaymentToRecordHandler.ts @@ -0,0 +1,36 @@ +import { PaymentRecordRepository } from "../../gen/codbex-payments/data/PaymentRecord/PaymentRecordRepository"; +import { PaymentRecordEntity } from "../../gen/codbex-payments/data/PaymentRecord/PaymentRecordEntity"; + +import { EntityEvent } from "@aerokit/sdk/db"; + +const validate = () => { } + +export const trigger = (event: EntityEvent): void => { + const PaymentRecordDao = new PaymentRecordRepository(); + const item = event.entity; + const operation = event.operation; + + if (operation === "create") { + const record = { + Date: item.Date!, + Valor: item.Valor!, + CompanyIBAN: item.OurPartyIBAN, + CounterpartyIBAN: item.CounterpartyIBAN, + CounterpartyName: item.CounterpartyName, + Amount: item.Amount, + Currency: item.Currency, + Reason: item.Reason, + Description: item.Description, + Reference: item.UUID, + Direction: -1, + Deleted: false, + } + PaymentRecordDao.create(record); + } else if (operation === "update") { + // TODO find by Item Id and update + } else if (operation === "delete") { + // TODO find by Item Id and mark as deleted + } else { + throw new Error("Unknown operation: " + operation); + } +} diff --git a/codbex-payments/bin/gen/codbex-payments/schema/codbex-payments.schema b/codbex-payments/bin/gen/codbex-payments/schema/codbex-payments.schema new file mode 100644 index 0000000..89bd9bb --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/schema/codbex-payments.schema @@ -0,0 +1,722 @@ +{ + "schema": { + "structures": [ + { + "name": "CODBEX_CUSTOMERPAYMENT", + "type": "TABLE", + "columns": [ + { + "type": "INTEGER", + "primaryKey": true, + "identity": true, + "nullable": true, + "name": "CUSTOMERPAYMENT_ID" + }, + { + "type": "INTEGER", + "name": "CUSTOMERPAYMENT_CUSTOMER" + }, + { + "type": "DATE", + "name": "CUSTOMERPAYMENT_DATE" + }, + { + "type": "DATE", + "name": "CUSTOMERPAYMENT_VALOR" + }, + { + "type": "VARCHAR", + "length": 34, + "name": "CUSTOMERPAYMENT_OURPARTYIBAN" + }, + { + "type": "VARCHAR", + "length": 34, + "name": "CUSTOMERPAYMENT_COUNTERPARTYIBAN" + }, + { + "type": "VARCHAR", + "length": 100, + "nullable": true, + "name": "CUSTOMERPAYMENT_COUNTERPARTYNAME" + }, + { + "type": "DECIMAL", + "length": 16, + "precision": "16", + "scale": "2", + "name": "CUSTOMERPAYMENT_AMOUNT" + }, + { + "type": "INTEGER", + "name": "CUSTOMERPAYMENT_CURRENCY" + }, + { + "type": "INTEGER", + "nullable": true, + "name": "CUSTOMERPAYMENT_COMPANY" + }, + { + "type": "VARCHAR", + "length": 100, + "name": "CUSTOMERPAYMENT_REASON" + }, + { + "type": "VARCHAR", + "length": 100, + "nullable": true, + "name": "CUSTOMERPAYMENT_DESCRIPTION" + }, + { + "type": "INTEGER", + "name": "CUSTOMERPAYMENT_PAYMENTMETHOD" + }, + { + "type": "VARCHAR", + "length": 20, + "nullable": true, + "name": "CUSTOMERPAYMENT_NAME" + }, + { + "type": "VARCHAR", + "length": 36, + "unique": true, + "name": "CUSTOMERPAYMENT_UUID" + }, + { + "type": "VARCHAR", + "length": 36, + "nullable": true, + "name": "CUSTOMERPAYMENT_REFERENCE" + }, + { + "type": "TIMESTAMP", + "nullable": true, + "name": "CUSTOMERPAYMENT_CREATEDAT" + }, + { + "type": "VARCHAR", + "length": 20, + "nullable": true, + "name": "CUSTOMERPAYMENT_CREATEDBY" + }, + { + "type": "TIMESTAMP", + "nullable": true, + "name": "CUSTOMERPAYMENT_UPDATEDAT" + }, + { + "type": "VARCHAR", + "length": 20, + "nullable": true, + "name": "CUSTOMERPAYMENT_UPDATEDBY" + } + ] + }, + { + "name": "CODBEX_SUPPLIERPAYMENT", + "type": "TABLE", + "columns": [ + { + "type": "INTEGER", + "primaryKey": true, + "identity": true, + "nullable": true, + "name": "SUPPLIERPAYMENT_ID" + }, + { + "type": "INTEGER", + "name": "SUPPLIERPAYMENT_SUPPLIER" + }, + { + "type": "DATE", + "name": "SUPPLIERPAYMENT_DATE" + }, + { + "type": "DATE", + "name": "SUPPLIERPAYMENT_VALOR" + }, + { + "type": "VARCHAR", + "length": 34, + "name": "SUPPLIERPAYMENT_OURPARTYIBAN" + }, + { + "type": "VARCHAR", + "length": 34, + "name": "SUPPLIERPAYMENT_COUNTERPARTYIBAN" + }, + { + "type": "VARCHAR", + "length": 100, + "nullable": true, + "name": "SUPPLIERPAYMENT_COUNTERPARTYNAME" + }, + { + "type": "DECIMAL", + "length": 16, + "precision": "16", + "scale": "2", + "name": "SUPPLIERPAYMENT_AMOUNT" + }, + { + "type": "INTEGER", + "name": "SUPPLIERPAYMENT_CURRENCY" + }, + { + "type": "INTEGER", + "nullable": true, + "name": "SUPPLIERPAYMENT_COMPANY" + }, + { + "type": "VARCHAR", + "length": 100, + "name": "SUPPLIERPAYMENT_REASON" + }, + { + "type": "VARCHAR", + "length": 100, + "nullable": true, + "name": "SUPPLIERPAYMENT_DESCRIPTION" + }, + { + "type": "INTEGER", + "name": "SUPPLIERPAYMENT_PAYMENTMETHOD" + }, + { + "type": "VARCHAR", + "length": 20, + "nullable": true, + "name": "SUPPLIERPAYMENT_NAME" + }, + { + "type": "VARCHAR", + "length": 36, + "unique": true, + "name": "SUPPLIERPAYMENT_UUID" + }, + { + "type": "VARCHAR", + "length": 36, + "nullable": true, + "name": "SUPPLIERPAYMENT_REFERENCE" + }, + { + "type": "TIMESTAMP", + "nullable": true, + "name": "SUPPLIERPAYMENT_CREATEDAT" + }, + { + "type": "VARCHAR", + "length": 20, + "nullable": true, + "name": "SUPPLIERPAYMENT_CREATEDBY" + }, + { + "type": "TIMESTAMP", + "nullable": true, + "name": "SUPPLIERPAYMENT_UPDATEDAT" + }, + { + "type": "VARCHAR", + "length": 20, + "nullable": true, + "name": "SUPPLIERPAYMENT_UPDATEDBY" + } + ] + }, + { + "name": "CODBEX_EMPLOYEEPAYMENT", + "type": "TABLE", + "columns": [ + { + "type": "INTEGER", + "primaryKey": true, + "identity": true, + "nullable": true, + "name": "EMPLOYEEPAYMENT_ID" + }, + { + "type": "INTEGER", + "name": "EMPLOYEEPAYMENT_EMPLOYEE" + }, + { + "type": "DATE", + "name": "EMPLOYEEPAYMENT_DATE" + }, + { + "type": "DATE", + "name": "EMPLOYEEPAYMENT_VALOR" + }, + { + "type": "VARCHAR", + "length": 34, + "name": "EMPLOYEEPAYMENT_OURPARTYIBAN" + }, + { + "type": "VARCHAR", + "length": 34, + "name": "EMPLOYEEPAYMENT_COUNTERPARTYIBAN" + }, + { + "type": "VARCHAR", + "length": 100, + "nullable": true, + "name": "EMPLOYEEPAYMENT_COUNTERPARTYNAME" + }, + { + "type": "DECIMAL", + "length": 16, + "precision": "16", + "scale": "2", + "name": "EMPLOYEEPAYMENT_AMOUNT" + }, + { + "type": "INTEGER", + "name": "EMPLOYEEPAYMENT_CURRENCY" + }, + { + "type": "INTEGER", + "nullable": true, + "name": "EMPLOYEEPAYMENT_COMPANY" + }, + { + "type": "VARCHAR", + "length": 100, + "name": "EMPLOYEEPAYMENT_REASON" + }, + { + "type": "VARCHAR", + "length": 100, + "nullable": true, + "name": "EMPLOYEEPAYMENT_DESCRIPTION" + }, + { + "type": "VARCHAR", + "length": 20, + "nullable": true, + "name": "EMPLOYEEPAYMENT_NAME" + }, + { + "type": "VARCHAR", + "length": 36, + "unique": true, + "name": "EMPLOYEEPAYMENT_UUID" + }, + { + "type": "VARCHAR", + "length": 36, + "nullable": true, + "name": "EMPLOYEEPAYMENT_REFERENCE" + }, + { + "type": "TIMESTAMP", + "nullable": true, + "name": "EMPLOYEEPAYMENT_CREATEDAT" + }, + { + "type": "VARCHAR", + "length": 20, + "nullable": true, + "name": "EMPLOYEEPAYMENT_CREATEDBY" + }, + { + "type": "TIMESTAMP", + "nullable": true, + "name": "EMPLOYEEPAYMENT_UPDATEDAT" + }, + { + "type": "VARCHAR", + "length": 20, + "nullable": true, + "name": "EMPLOYEEPAYMENT_UPDATEDBY" + } + ] + }, + { + "name": "CODBEX_PAYMENTRECORD", + "type": "TABLE", + "columns": [ + { + "type": "INTEGER", + "primaryKey": true, + "identity": true, + "nullable": true, + "name": "PAYMENTRECORD_ID" + }, + { + "type": "DATE", + "name": "PAYMENTRECORD_DATE" + }, + { + "type": "DATE", + "name": "PAYMENTRECORD_VALOR" + }, + { + "type": "VARCHAR", + "length": 34, + "name": "PAYMENTRECORD_OURPARTYIBAN" + }, + { + "type": "VARCHAR", + "length": 34, + "name": "PAYMENTRECORD_COUNTERPARTYIBAN" + }, + { + "type": "VARCHAR", + "length": 100, + "nullable": true, + "name": "PAYMENTRECORD_COUNTERPARTYNAME" + }, + { + "type": "DECIMAL", + "length": 16, + "precision": "16", + "scale": "2", + "name": "PAYMENTRECORD_AMOUNT" + }, + { + "type": "INTEGER", + "nullable": true, + "name": "PAYMENTRECORD_COMPANY" + }, + { + "type": "INTEGER", + "name": "PAYMENTRECORD_CURRENCY" + }, + { + "type": "INTEGER", + "name": "PAYMENTRECORD_PAYMENTDIRECTION" + }, + { + "type": "INTEGER", + "name": "PAYMENTRECORD_PAYMENTTYPE" + }, + { + "type": "VARCHAR", + "length": 100, + "nullable": true, + "name": "PAYMENTRECORD_REASON" + }, + { + "type": "VARCHAR", + "length": 100, + "nullable": true, + "name": "PAYMENTRECORD_DESCRIPTION" + }, + { + "type": "VARCHAR", + "length": 36, + "unique": true, + "name": "PAYMENTRECORD_UUID" + }, + { + "type": "VARCHAR", + "length": 36, + "nullable": true, + "name": "PAYMENTRECORD_REFERENCE" + }, + { + "type": "BOOLEAN", + "nullable": true, + "name": "PAYMENTRECORD_DELETED" + }, + { + "type": "TIMESTAMP", + "nullable": true, + "name": "PAYMENTRECORD_DELETEDAT" + }, + { + "type": "VARCHAR", + "length": 255, + "nullable": true, + "name": "PAYMENTRECORD_DELETEDREASON" + }, + { + "type": "TIMESTAMP", + "nullable": true, + "name": "PAYMENTRECORD_CREATEDAT" + }, + { + "type": "VARCHAR", + "length": 20, + "nullable": true, + "name": "PAYMENTRECORD_CREATEDBY" + }, + { + "type": "TIMESTAMP", + "nullable": true, + "name": "PAYMENTRECORD_UPDATEDAT" + }, + { + "type": "VARCHAR", + "length": 20, + "nullable": true, + "name": "PAYMENTRECORD_UPDATEDBY" + } + ] + }, + { + "name": "CODBEX_PAYMENTTYPE", + "type": "TABLE", + "columns": [ + { + "type": "INTEGER", + "primaryKey": true, + "identity": true, + "nullable": true, + "name": "PAYMENTTYPE_ID" + }, + { + "type": "VARCHAR", + "length": 20, + "name": "PAYMENTTYPE_NAME" + } + ] + }, + { + "name": "CODBEX_PAYMENTADJUSTMENT", + "type": "TABLE", + "columns": [ + { + "type": "INTEGER", + "primaryKey": true, + "identity": true, + "nullable": true, + "name": "PAYMENTADJUSTMENT_ID" + }, + { + "type": "DATE", + "name": "PAYMENTADJUSTMENT_DATE" + }, + { + "type": "DATE", + "name": "PAYMENTADJUSTMENT_VALOR" + }, + { + "type": "DECIMAL", + "length": 16, + "precision": "16", + "scale": "2", + "name": "PAYMENTADJUSTMENT_AMOUNT" + }, + { + "type": "INTEGER", + "name": "PAYMENTADJUSTMENT_CURRENCY" + }, + { + "type": "VARCHAR", + "length": 100, + "nullable": true, + "name": "PAYMENTADJUSTMENT_REASON" + }, + { + "type": "INTEGER", + "name": "PAYMENTADJUSTMENT_COMPANY" + }, + { + "type": "VARCHAR", + "length": 36, + "nullable": true, + "unique": true, + "name": "PAYMENTADJUSTMENT_UUID" + }, + { + "type": "TIMESTAMP", + "nullable": true, + "name": "PAYMENTADJUSTMENT_CREATEDAT" + }, + { + "type": "VARCHAR", + "length": 20, + "nullable": true, + "name": "PAYMENTADJUSTMENT_CREATEDBY" + }, + { + "type": "TIMESTAMP", + "nullable": true, + "name": "PAYMENTADJUSTMENT_UPDATEDAT" + }, + { + "type": "VARCHAR", + "length": 20, + "nullable": true, + "name": "PAYMENTADJUSTMENT_UPDATEDBY" + } + ] + }, + { + "name": "CODBEX_PAYMENTDIRECTION", + "type": "TABLE", + "columns": [ + { + "type": "INTEGER", + "primaryKey": true, + "identity": true, + "nullable": true, + "name": "PAYMENTDIRECTION_ID" + }, + { + "type": "VARCHAR", + "length": 20, + "name": "PAYMENTDIRECTION_NAME" + } + ] + }, + { + "name": "CustomerPayment_Customer", + "type": "foreignKey", + "table": "CODBEX_CUSTOMERPAYMENT", + "constraintName": "CustomerPayment_Customer", + "columns": "CUSTOMERPAYMENT_CUSTOMER", + "referencedTable": "CODBEX_CUSTOMER", + "referencedColumns": "CUSTOMER_ID" + }, + { + "name": "CustomerPayment_Currency", + "type": "foreignKey", + "table": "CODBEX_CUSTOMERPAYMENT", + "constraintName": "CustomerPayment_Currency", + "columns": "CUSTOMERPAYMENT_CURRENCY", + "referencedTable": "CODBEX_CURRENCY", + "referencedColumns": "CURRENCY_ID" + }, + { + "name": "CustomerPayment_Company", + "type": "foreignKey", + "table": "CODBEX_CUSTOMERPAYMENT", + "constraintName": "CustomerPayment_Company", + "columns": "CUSTOMERPAYMENT_COMPANY", + "referencedTable": "CODBEX_COMPANY", + "referencedColumns": "COMPANY_ID" + }, + { + "name": "CustomerPayment_PaymentMethod", + "type": "foreignKey", + "table": "CODBEX_CUSTOMERPAYMENT", + "constraintName": "CustomerPayment_PaymentMethod", + "columns": "CUSTOMERPAYMENT_PAYMENTMETHOD", + "referencedTable": "CODBEX_PAYMENTMETHOD", + "referencedColumns": "PAYMENTMETHOD_ID" + }, + { + "name": "SupplierPayment_Supplier", + "type": "foreignKey", + "table": "CODBEX_SUPPLIERPAYMENT", + "constraintName": "SupplierPayment_Supplier", + "columns": "SUPPLIERPAYMENT_SUPPLIER", + "referencedTable": "CODBEX_SUPPLIER", + "referencedColumns": "SUPPLIER_ID" + }, + { + "name": "SupplierPayment_Currency", + "type": "foreignKey", + "table": "CODBEX_SUPPLIERPAYMENT", + "constraintName": "SupplierPayment_Currency", + "columns": "SUPPLIERPAYMENT_CURRENCY", + "referencedTable": "CODBEX_CURRENCY", + "referencedColumns": "CURRENCY_ID" + }, + { + "name": "SupplierPayment_Company", + "type": "foreignKey", + "table": "CODBEX_SUPPLIERPAYMENT", + "constraintName": "SupplierPayment_Company", + "columns": "SUPPLIERPAYMENT_COMPANY", + "referencedTable": "CODBEX_COMPANY", + "referencedColumns": "COMPANY_ID" + }, + { + "name": "SupplierPayment_PaymentMethod", + "type": "foreignKey", + "table": "CODBEX_SUPPLIERPAYMENT", + "constraintName": "SupplierPayment_PaymentMethod", + "columns": "SUPPLIERPAYMENT_PAYMENTMETHOD", + "referencedTable": "CODBEX_PAYMENTMETHOD", + "referencedColumns": "PAYMENTMETHOD_ID" + }, + { + "name": "EmployeePayment_Employee", + "type": "foreignKey", + "table": "CODBEX_EMPLOYEEPAYMENT", + "constraintName": "EmployeePayment_Employee", + "columns": "EMPLOYEEPAYMENT_EMPLOYEE", + "referencedTable": "CODBEX_EMPLOYEE", + "referencedColumns": "EMPLOYEE_ID" + }, + { + "name": "EmployeePayment_Currency", + "type": "foreignKey", + "table": "CODBEX_EMPLOYEEPAYMENT", + "constraintName": "EmployeePayment_Currency", + "columns": "EMPLOYEEPAYMENT_CURRENCY", + "referencedTable": "CODBEX_CURRENCY", + "referencedColumns": "CURRENCY_ID" + }, + { + "name": "EmployeePayment_Company", + "type": "foreignKey", + "table": "CODBEX_EMPLOYEEPAYMENT", + "constraintName": "EmployeePayment_Company", + "columns": "EMPLOYEEPAYMENT_COMPANY", + "referencedTable": "CODBEX_COMPANY", + "referencedColumns": "COMPANY_ID" + }, + { + "name": "PaymentRecord_Company", + "type": "foreignKey", + "table": "CODBEX_PAYMENTRECORD", + "constraintName": "PaymentRecord_Company", + "columns": "PAYMENTRECORD_COMPANY", + "referencedTable": "CODBEX_COMPANY", + "referencedColumns": "COMPANY_ID" + }, + { + "name": "PaymentRecord_Currency", + "type": "foreignKey", + "table": "CODBEX_PAYMENTRECORD", + "constraintName": "PaymentRecord_Currency", + "columns": "PAYMENTRECORD_CURRENCY", + "referencedTable": "CODBEX_CURRENCY", + "referencedColumns": "CURRENCY_ID" + }, + { + "name": "PaymentRecord_PaymentDirection", + "type": "foreignKey", + "table": "CODBEX_PAYMENTRECORD", + "constraintName": "PaymentRecord_PaymentDirection", + "columns": "PAYMENTRECORD_PAYMENTDIRECTION", + "referencedTable": "CODBEX_PAYMENTDIRECTION", + "referencedColumns": "PAYMENTDIRECTION_ID" + }, + { + "name": "PaymentRecord_PaymentType", + "type": "foreignKey", + "table": "CODBEX_PAYMENTRECORD", + "constraintName": "PaymentRecord_PaymentType", + "columns": "PAYMENTRECORD_PAYMENTTYPE", + "referencedTable": "CODBEX_PAYMENTTYPE", + "referencedColumns": "PAYMENTTYPE_ID" + }, + { + "name": "PaymentAdjustment_Currency", + "type": "foreignKey", + "table": "CODBEX_PAYMENTADJUSTMENT", + "constraintName": "PaymentAdjustment_Currency", + "columns": "PAYMENTADJUSTMENT_CURRENCY", + "referencedTable": "CODBEX_CURRENCY", + "referencedColumns": "CURRENCY_ID" + }, + { + "name": "PaymentAdjustment_Company", + "type": "foreignKey", + "table": "CODBEX_PAYMENTADJUSTMENT", + "constraintName": "PaymentAdjustment_Company", + "columns": "PAYMENTADJUSTMENT_COMPANY", + "referencedTable": "CODBEX_COMPANY", + "referencedColumns": "COMPANY_ID" + } + ] + }, + "datasource": "DefaultDB" +} diff --git a/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/controller.js b/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/controller.js new file mode 100644 index 0000000..bb96f65 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/controller.js @@ -0,0 +1,469 @@ +angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) + .config(['EntityServiceProvider', (EntityServiceProvider) => { + EntityServiceProvider.baseUrl = '/services/java/codbex-payments/gen/codbex_payments/api/customerpayment/CustomerPaymentController'; + }]) + .controller('PageController', ($scope, $http, EntityService, Extensions, LocaleService, ButtonStates) => { + const Dialogs = new DialogHub(); + let translated = { + yes: 'Yes', + no: 'No', + deleteConfirm: 'Are you sure you want to delete CustomerPayment? This action cannot be undone.', + deleteTitle: 'Delete CustomerPayment?' + }; + + LocaleService.onInit(() => { + translated.yes = LocaleService.t('codbex-payments:codbex-payments-model.defaults.yes'); + translated.no = LocaleService.t('codbex-payments:codbex-payments-model.defaults.no'); + translated.deleteTitle = LocaleService.t('codbex-payments:codbex-payments-model.defaults.deleteTitle', { name: '$t(codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT)' }); + translated.deleteConfirm = LocaleService.t('codbex-payments:codbex-payments-model.messages.deleteConfirm', { name: '$t(codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT)' }); + }); + $scope.dataPage = 1; + $scope.dataCount = 0; + $scope.dataOffset = 0; + $scope.dataLimit = 10; + $scope.action = 'select'; + + //-----------------Custom Actions-------------------// + Extensions.getWindows(['codbex-payments-custom-action']).then((response) => { + $scope.pageActions = response.data.filter(e => e.perspective === 'CustomerPayment' && e.view === 'CustomerPayment' && (e.type === 'page' || e.type === undefined)); + }); + + $scope.triggerPageAction = (action) => { + Dialogs.showWindow({ + hasHeader: true, + title: LocaleService.t(action.translation.key, action.translation.options, action.label), + path: action.path, + maxWidth: action.maxWidth, + maxHeight: action.maxHeight, + closeButton: true + }); + }; + //-----------------Custom Actions-------------------// + + function refreshData() { + $scope.dataReset = true; + $scope.dataPage--; + } + + function resetPagination() { + $scope.dataReset = true; + $scope.dataPage = 1; + $scope.dataCount = 0; + $scope.dataLimit = 10; + } + + //-----------------Events-------------------// + Dialogs.addMessageListener({ topic: 'codbex-payments.CustomerPayment.CustomerPayment.clearDetails', handler: () => { + $scope.$evalAsync(() => { + $scope.selectedEntity = null; + $scope.action = 'select'; + }); + }}); + Dialogs.addMessageListener({ topic: 'codbex-payments.CustomerPayment.CustomerPayment.entityCreated', handler: () => { + refreshData(); + $scope.loadPage($scope.dataPage, $scope.filter); + }}); + Dialogs.addMessageListener({ topic: 'codbex-payments.CustomerPayment.CustomerPayment.entityUpdated', handler: () => { + refreshData(); + $scope.loadPage($scope.dataPage, $scope.filter); + }}); + Dialogs.addMessageListener({ topic: 'codbex-payments.CustomerPayment.CustomerPayment.entitySearch', handler: (data) => { + resetPagination(); + $scope.filter = data.filter; + $scope.filterEntity = data.entity; + $scope.loadPage($scope.dataPage, $scope.filter); + }}); + //-----------------Events-------------------// + + $scope.loadPage = (pageNumber, filter) => { + if (!filter && $scope.filter) { + filter = $scope.filter; + } + if (!filter) { + filter = { + $filter: {} + }; + } + $scope.selectedEntity = null; + EntityService.count(filter).then((resp) => { + if (resp.data) { + $scope.dataCount = resp.data.count; + } + $scope.dataPages = Math.ceil($scope.dataCount / $scope.dataLimit); + filter.$filter.offset = ($scope.dataPage - 1) * $scope.dataLimit; + filter.$filter.limit = $scope.dataLimit; + if ($scope.dataReset) { + filter.$filter.offset = 0; + filter.$filter.limit = $scope.dataPage * $scope.dataLimit; + } + + EntityService.search(filter).then((response) => { + if ($scope.data == null || $scope.dataReset) { + $scope.data = []; + $scope.dataReset = false; + } + if (optionsCustomerHasMore) { + const optionsCustomerSearchValues = Array.from(new Set(response.data.map(e => e.Customer))); + if (optionsCustomerSearchValues.length > 0) { + $http.post('/services/java/codbex-partners/gen/codbex_partners/api/customers/CustomerController/search', { + conditions: [ + { propertyName: 'Id', operator: 'IN', value: optionsCustomerSearchValues } + ] + }).then((response) => { + $scope.optionsCustomer.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: 'Customer', + 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/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.Code + }))); + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Currency', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + } + } + 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 (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); + } + if (e.Valor) { + e.Valor = new Date(e.Valor); + } + if (e.CreatedAt) { + e.CreatedAt = new Date(e.CreatedAt); + } + if (e.UpdatedAt) { + e.UpdatedAt = new Date(e.UpdatedAt); + } + }); + + $scope.data = $scope.data.concat(response.data); + $scope.dataPage++; + }, (error) => { + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT'), + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLF', { name: '$t(codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT)', message: message }), + type: AlertTypes.Error + }); + console.error('EntityService:', error); + }); + }, (error) => { + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT'), + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToCount', { name: '$t(codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT)', message: message }), + type: AlertTypes.Error + }); + console.error('EntityService:', error); + }); + }; + $scope.loadPage($scope.dataPage, $scope.filter); + + $scope.selectEntity = (entity) => { + $scope.selectedEntity = entity; + Dialogs.postMessage({ topic: 'codbex-payments.CustomerPayment.CustomerPayment.entitySelected', data: { + entity: entity, + selectedMainEntityId: entity.Id, + optionsCustomer: $scope.optionsCustomer, + optionsCurrency: $scope.optionsCurrency, + optionsCompany: $scope.optionsCompany, + optionsPaymentMethod: $scope.optionsPaymentMethod, + }}); + }; + + $scope.createEntity = () => { + $scope.selectedEntity = null; + $scope.action = 'create'; + + Dialogs.postMessage({ topic: 'codbex-payments.CustomerPayment.CustomerPayment.createEntity', data: { + entity: {}, + optionsCustomer: $scope.optionsCustomer, + optionsCurrency: $scope.optionsCurrency, + optionsCompany: $scope.optionsCompany, + optionsPaymentMethod: $scope.optionsPaymentMethod, + }}); + }; + + $scope.updateEntity = () => { + $scope.action = 'update'; + Dialogs.postMessage({ topic: 'codbex-payments.CustomerPayment.CustomerPayment.updateEntity', data: { + entity: $scope.selectedEntity, + optionsCustomer: $scope.optionsCustomer, + optionsCurrency: $scope.optionsCurrency, + optionsCompany: $scope.optionsCompany, + optionsPaymentMethod: $scope.optionsPaymentMethod, + }}); + }; + + $scope.deleteEntity = () => { + let id = $scope.selectedEntity.Id; + Dialogs.showDialog({ + title: translated.deleteTitle, + message: translated.deleteConfirm, + buttons: [{ + id: 'delete-btn-yes', + state: ButtonStates.Emphasized, + label: translated.yes, + }, { + id: 'delete-btn-no', + label: translated.no, + }], + closeButton: false + }).then((buttonId) => { + if (buttonId === 'delete-btn-yes') { + EntityService.delete(id).then(() => { + refreshData(); + $scope.loadPage($scope.dataPage, $scope.filter); + Dialogs.triggerEvent('codbex-payments.CustomerPayment.CustomerPayment.clearDetails'); + }, (error) => { + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT'), + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToDelete', { name: '$t(codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT)', message: message }), + type: AlertTypes.Error + }); + console.error('EntityService:', error); + }); + } + }); + }; + + $scope.openFilter = () => { + Dialogs.showWindow({ + id: 'CustomerPayment-filter', + params: { + entity: $scope.filterEntity, + optionsCustomer: $scope.optionsCustomer, + optionsCurrency: $scope.optionsCurrency, + optionsCompany: $scope.optionsCompany, + optionsPaymentMethod: $scope.optionsPaymentMethod, + }, + }); + }; + + //----------------Dropdowns-----------------// + $scope.optionsCustomer = []; + $scope.optionsCurrency = []; + $scope.optionsCompany = []; + $scope.optionsPaymentMethod = []; + + let optionsCustomerHasMore = true; + + $http.get('/services/java/codbex-partners/gen/codbex_partners/api/customers/CustomerController/count').then((response) => { + const optionsCustomerCount = response.data.count; + $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 + })); + optionsCustomerHasMore = optionsCustomerCount > $scope.optionsCustomer.length; + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Customer', + 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: 'Customer', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + let optionsCurrencyHasMore = true; + + $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.Code + })); + optionsCurrencyHasMore = optionsCurrencyCount > $scope.optionsCurrency.length; + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Currency', + 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: 'Currency', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + let optionsCompanyHasMore = true; + + $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.Name + })); + optionsCompanyHasMore = optionsCompanyCount > $scope.optionsCompany.length; + }, (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 + }); + }); + }, (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 + }); + }); + 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.optionsCustomerValue = (optionKey) => { + for (let i = 0; i < $scope.optionsCustomer.length; i++) { + if ($scope.optionsCustomer[i].value === optionKey) { + return $scope.optionsCustomer[i].text; + } + } + return null; + }; + $scope.optionsCurrencyValue = (optionKey) => { + for (let i = 0; i < $scope.optionsCurrency.length; i++) { + if ($scope.optionsCurrency[i].value === optionKey) { + return $scope.optionsCurrency[i].text; + } + } + 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; + }; + $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/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-filter/controller.js b/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-filter/controller.js new file mode 100644 index 0000000..ade78d4 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-filter/controller.js @@ -0,0 +1,547 @@ +angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controller('PageController', ($scope, $http, ViewParameters) => { + const Dialogs = new DialogHub(); + $scope.entity = {}; + $scope.forms = { + details: {}, + }; + + let params = ViewParameters.get(); + if (Object.keys(params).length) { + if (params?.entity?.DateFrom) { + params.entity.DateFrom = new Date(params.entity.DateFrom); + } + if (params?.entity?.DateTo) { + params.entity.DateTo = new Date(params.entity.DateTo); + } + if (params?.entity?.ValorFrom) { + params.entity.ValorFrom = new Date(params.entity.ValorFrom); + } + if (params?.entity?.ValorTo) { + params.entity.ValorTo = new Date(params.entity.ValorTo); + } + if (params?.entity?.CreatedAtFrom) { + params.entity.CreatedAtFrom = new Date(params.entity.CreatedAtFrom); + } + if (params?.entity?.CreatedAtTo) { + params.entity.CreatedAtTo = new Date(params.entity.CreatedAtTo); + } + if (params?.entity?.UpdatedAtFrom) { + params.entity.UpdatedAtFrom = new Date(params.entity.UpdatedAtFrom); + } + if (params?.entity?.UpdatedAtTo) { + params.entity.UpdatedAtTo = new Date(params.entity.UpdatedAtTo); + } + $scope.entity = params.entity ?? {}; + $scope.selectedMainEntityKey = params.selectedMainEntityKey; + $scope.selectedMainEntityId = params.selectedMainEntityId; + const optionsCustomerMap = new Map(); + params.optionsCustomer.forEach(e => optionsCustomerMap.set(e.value, e)); + $scope.optionsCustomer = Array.from(optionsCustomerMap.values()); + const optionsCurrencyMap = new Map(); + params.optionsCurrency.forEach(e => optionsCurrencyMap.set(e.value, e)); + $scope.optionsCurrency = Array.from(optionsCurrencyMap.values()); + 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 = () => { + let entity = $scope.entity; + const filter = { + $filter: { + conditions: [], + sorts: [], + limit: 20, + offset: 0 + } + }; + if (entity.Id !== undefined) { + const condition = { propertyName: 'Id', operator: 'EQ', value: entity.Id }; + filter.$filter.conditions.push(condition); + } + if (entity.Customer !== undefined) { + const condition = { propertyName: 'Customer', operator: 'EQ', value: entity.Customer }; + filter.$filter.conditions.push(condition); + } + if (entity.DateFrom) { + const condition = { propertyName: 'Date', operator: 'GE', value: entity.DateFrom }; + filter.$filter.conditions.push(condition); + } + if (entity.DateTo) { + const condition = { propertyName: 'Date', operator: 'LE', value: entity.DateTo }; + filter.$filter.conditions.push(condition); + } + if (entity.ValorFrom) { + const condition = { propertyName: 'Valor', operator: 'GE', value: entity.ValorFrom }; + filter.$filter.conditions.push(condition); + } + if (entity.ValorTo) { + const condition = { propertyName: 'Valor', operator: 'LE', value: entity.ValorTo }; + filter.$filter.conditions.push(condition); + } + if (entity.OurPartyIBAN) { + const condition = { propertyName: 'OurPartyIBAN', operator: 'LIKE', value: `%${entity.OurPartyIBAN}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.CounterpartyIBAN) { + const condition = { propertyName: 'CounterpartyIBAN', operator: 'LIKE', value: `%${entity.CounterpartyIBAN}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.CounterpartyName) { + const condition = { propertyName: 'CounterpartyName', operator: 'LIKE', value: `%${entity.CounterpartyName}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.Amount !== undefined) { + const condition = { propertyName: 'Amount', operator: 'EQ', value: entity.Amount }; + filter.$filter.conditions.push(condition); + } + if (entity.Currency !== undefined) { + 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.Description) { + const condition = { propertyName: 'Description', operator: 'LIKE', value: `%${entity.Description}%` }; + 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.Name) { + const condition = { propertyName: 'Name', operator: 'LIKE', value: `%${entity.Name}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.UUID) { + const condition = { propertyName: 'UUID', operator: 'LIKE', value: `%${entity.UUID}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.Reference) { + const condition = { propertyName: 'Reference', operator: 'LIKE', value: `%${entity.Reference}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.CreatedAtFrom) { + const condition = { propertyName: 'CreatedAt', operator: 'GE', value: entity.CreatedAtFrom }; + filter.$filter.conditions.push(condition); + } + if (entity.CreatedAtTo) { + const condition = { propertyName: 'CreatedAt', operator: 'LE', value: entity.CreatedAtTo }; + filter.$filter.conditions.push(condition); + } + if (entity.CreatedBy) { + const condition = { propertyName: 'CreatedBy', operator: 'LIKE', value: `%${entity.CreatedBy}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.UpdatedAtFrom) { + const condition = { propertyName: 'UpdatedAt', operator: 'GE', value: entity.UpdatedAtFrom }; + filter.$filter.conditions.push(condition); + } + if (entity.UpdatedAtTo) { + const condition = { propertyName: 'UpdatedAt', operator: 'LE', value: entity.UpdatedAtTo }; + filter.$filter.conditions.push(condition); + } + if (entity.UpdatedBy) { + const condition = { propertyName: 'UpdatedBy', operator: 'LIKE', value: `%${entity.UpdatedBy}%` }; + filter.$filter.conditions.push(condition); + } + Dialogs.postMessage({ topic: 'codbex-payments.CustomerPayment.CustomerPayment.entitySearch', data: { + entity: entity, + filter: filter + }}); + Dialogs.triggerEvent('codbex-payments.CustomerPayment.CustomerPayment.clearDetails'); + $scope.cancel(); + }; + + $scope.resetFilter = () => { + $scope.entity = {}; + $scope.filter(); + lastSearchValuesCustomer.clear(); + allValuesCustomer.length = 0; + lastSearchValuesCurrency.clear(); + allValuesCurrency.length = 0; + lastSearchValuesCompany.clear(); + allValuesCompany.length = 0; + lastSearchValuesPaymentMethod.clear(); + allValuesPaymentMethod.length = 0; + }; + + $scope.cancel = () => { + Dialogs.closeWindow({ id: 'CustomerPayment-filter' }); + }; + + $scope.clearErrorMessage = () => { + $scope.errorMessage = null; + }; + + const lastSearchValuesCustomer = new Set(); + const allValuesCustomer = []; + let loadMoreOptionsCustomerCounter = 0; + $scope.optionsCustomerLoading = false; + $scope.optionsCustomerHasMore = true; + + $scope.loadMoreOptionsCustomer = () => { + const limit = 20; + $scope.optionsCustomerLoading = true; + $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 => ({ + value: e.Id, + text: e.Name + })); + const newValues = []; + resultValues.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesCustomer.push(e); + newValues.push(e); + } + }); + newValues.forEach(e => { + if (!$scope.optionsCustomer.find(o => o.value === e.value)) { + $scope.optionsCustomer.push(e); + } + }) + $scope.optionsCustomerHasMore = resultValues.length > 0; + $scope.optionsCustomerLoading = false; + }, (error) => { + $scope.optionsCustomerLoading = false; + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Customer', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }; + + $scope.onOptionsCustomerChange = (event) => { + if (allValuesCustomer.length === 0) { + allValuesCustomer.push(...$scope.optionsCustomer); + } + if (event.originalEvent.target.value === '') { + allValuesCustomer.sort((a, b) => a.text.localeCompare(b.text)); + $scope.optionsCustomer = allValuesCustomer; + $scope.optionsCustomerHasMore = true; + } else if (isText(event.which)) { + $scope.optionsCustomerHasMore = false; + let cacheHit = false; + Array.from(lastSearchValuesCustomer).forEach(e => { + if (event.originalEvent.target.value.startsWith(e)) { + cacheHit = true; + } + }) + if (!cacheHit) { + $http.post('/services/java/codbex-partners/gen/codbex_partners/api/customers/CustomerController/search', { + conditions: [ + { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } + ] + }).then((response) => { + const optionValues = allValuesCustomer.map(e => e.value); + const searchResult = response.data.map(e => ({ + value: e.Id, + text: e.Name + })); + searchResult.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesCustomer.push(e); + } + }); + $scope.optionsCustomer = allValuesCustomer.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: 'Customer', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + lastSearchValuesCustomer.add(event.originalEvent.target.value); + } + } + }; + + const lastSearchValuesCurrency = new Set(); + const allValuesCurrency = []; + let loadMoreOptionsCurrencyCounter = 0; + $scope.optionsCurrencyLoading = false; + $scope.optionsCurrencyHasMore = true; + + $scope.loadMoreOptionsCurrency = () => { + const limit = 20; + $scope.optionsCurrencyLoading = true; + $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.Code + })); + const newValues = []; + resultValues.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesCurrency.push(e); + newValues.push(e); + } + }); + newValues.forEach(e => { + if (!$scope.optionsCurrency.find(o => o.value === e.value)) { + $scope.optionsCurrency.push(e); + } + }) + $scope.optionsCurrencyHasMore = resultValues.length > 0; + $scope.optionsCurrencyLoading = false; + }, (error) => { + $scope.optionsCurrencyLoading = false; + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Currency', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }; + + $scope.onOptionsCurrencyChange = (event) => { + if (allValuesCurrency.length === 0) { + allValuesCurrency.push(...$scope.optionsCurrency); + } + if (event.originalEvent.target.value === '') { + allValuesCurrency.sort((a, b) => a.text.localeCompare(b.text)); + $scope.optionsCurrency = allValuesCurrency; + $scope.optionsCurrencyHasMore = true; + } else if (isText(event.which)) { + $scope.optionsCurrencyHasMore = false; + let cacheHit = false; + Array.from(lastSearchValuesCurrency).forEach(e => { + if (event.originalEvent.target.value.startsWith(e)) { + cacheHit = true; + } + }) + if (!cacheHit) { + $http.post('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController/search', { + conditions: [ + { 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.Code + })); + searchResult.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesCurrency.push(e); + } + }); + $scope.optionsCurrency = allValuesCurrency.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: 'Currency', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + lastSearchValuesCurrency.add(event.originalEvent.target.value); + } + } + }; + + 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 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; + } + +}); \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-filter/index.html b/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-filter/index.html new file mode 100644 index 0000000..255c5f8 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-filter/index.html @@ -0,0 +1,395 @@ + + + + + + + + + + + + + + + + {{ errorMessage }} + + + + +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_CUSTOMER' | t }} +
+
+ + + + + More Options + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.defaults.from' | t:{'text':'$t(codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_DATE)'} }} +
+
+ + + + +
+
+ {{ 'codbex-payments:codbex-payments-model.defaults.to' | t:{'text':'$t(codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_DATE)'} }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.defaults.from' | t:{'text':'$t(codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_VALOR)'} }} +
+
+ + + + +
+
+ {{ 'codbex-payments:codbex-payments-model.defaults.to' | t:{'text':'$t(codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_VALOR)'} }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_OURPARTYIBAN' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_COUNTERPARTYIBAN' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_COUNTERPARTYNAME' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_AMOUNT' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_CURRENCY' | t }} +
+
+ + + + + More Options + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_COMPANY' | t }} +
+
+ + + + + More Options + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_REASON' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_DESCRIPTION' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_PAYMENTMETHOD' | t }} +
+
+ + + + + More Options + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_NAME' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_UUID' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_REFERENCE' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_CREATEDAT' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_CREATEDBY' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_UPDATEDAT' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_UPDATEDBY' | t }} +
+
+ + + + +
+
+
+
+
+ + + + + + + + + + + + + + + + + + diff --git a/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-filter/view.extension b/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-filter/view.extension new file mode 100644 index 0000000..a54239a --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-filter/view.extension @@ -0,0 +1,6 @@ +{ + "module": "codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-filter/view.js", + "extensionPoint": "application-windows", + "description": "codbex-payments - Application Dialog Window", + "role": "codbex-payments.CustomerPayment.CustomerPaymentReadOnly,codbex-payments.CustomerPayment.CustomerPaymentFullAccess" +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-filter/view.js b/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-filter/view.js new file mode 100644 index 0000000..796eec6 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-filter/view.js @@ -0,0 +1,20 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const viewData = { + id: 'CustomerPayment-filter', + label: 'CustomerPayment Filter', + translation: { + key: 'codbex-payments:codbex-payments-model.extName', + options: { + content: '$t(codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT) $t(codbex-payments:codbex-payments-model.defaults.filter)', + } + }, + path: '/services/web/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-filter/index.html', + perspectiveName: 'CustomerPayment' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/controller.js b/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/controller.js new file mode 100644 index 0000000..c3c8e5f --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/controller.js @@ -0,0 +1,556 @@ +angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) + .config(['EntityServiceProvider', (EntityServiceProvider) => { + EntityServiceProvider.baseUrl = '/services/java/codbex-payments/gen/codbex_payments/api/customerpayment/CustomerPaymentController'; + }]) + .controller('PageController', ($scope, $http, ViewParameters, LocaleService, EntityService) => { + const Dialogs = new DialogHub(); + const Notifications = new NotificationHub(); + let description = 'Description'; + let propertySuccessfullyCreated = 'CustomerPayment successfully created'; + let propertySuccessfullyUpdated = 'CustomerPayment successfully updated'; + $scope.entity = {}; + $scope.forms = { + details: {}, + }; + $scope.formHeaders = { + select: 'CustomerPayment Details', + create: 'Create CustomerPayment', + update: 'Update CustomerPayment' + }; + $scope.action = 'select'; + + LocaleService.onInit(() => { + description = LocaleService.t('codbex-payments:codbex-payments-model.defaults.description'); + $scope.formHeaders.select = LocaleService.t('codbex-payments:codbex-payments-model.defaults.formHeadSelect', { name: '$t(codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT)' }); + $scope.formHeaders.create = LocaleService.t('codbex-payments:codbex-payments-model.defaults.formHeadCreate', { name: '$t(codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT)' }); + $scope.formHeaders.update = LocaleService.t('codbex-payments:codbex-payments-model.defaults.formHeadUpdate', { name: '$t(codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT)' }); + propertySuccessfullyCreated = LocaleService.t('codbex-payments:codbex-payments-model.messages.propertySuccessfullyCreated', { name: '$t(codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT)' }); + propertySuccessfullyUpdated = LocaleService.t('codbex-payments:codbex-payments-model.messages.propertySuccessfullyUpdated', { name: '$t(codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT)' }); + }); + + let params = ViewParameters.get(); + if (Object.keys(params).length) { + $scope.action = params.action; + if (params.entity.Date) { + params.entity.Date = new Date(params.entity.Date); + } + if (params.entity.Valor) { + params.entity.Valor = new Date(params.entity.Valor); + } + if (params.entity.CreatedAt) { + params.entity.CreatedAt = new Date(params.entity.CreatedAt); + } + if (params.entity.UpdatedAt) { + params.entity.UpdatedAt = new Date(params.entity.UpdatedAt); + } + $scope.entity = params.entity; + $scope.selectedMainEntityKey = params.selectedMainEntityKey; + $scope.selectedMainEntityId = params.selectedMainEntityId; + const optionsCustomerMap = new Map(); + params.optionsCustomer?.forEach(e => optionsCustomerMap.set(e.value, e)); + $scope.optionsCustomer = Array.from(optionsCustomerMap.values()); + const optionsCurrencyMap = new Map(); + params.optionsCurrency?.forEach(e => optionsCurrencyMap.set(e.value, e)); + $scope.optionsCurrency = Array.from(optionsCurrencyMap.values()); + 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 = () => { + let entity = $scope.entity; + entity[$scope.selectedMainEntityKey] = $scope.selectedMainEntityId; + EntityService.create(entity).then((response) => { + Dialogs.postMessage({ topic: 'codbex-payments.CustomerPayment.CustomerPayment.entityCreated', data: response.data }); + Notifications.show({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT'), + description: propertySuccessfullyCreated, + type: 'positive' + }); + $scope.cancel(); + }, (error) => { + const message = error.data ? error.data.message : ''; + $scope.$evalAsync(() => { + $scope.errorMessage = LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToCreate', { name: '$t(codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT)', message: message }); + }); + console.error('EntityService:', error); + }); + }; + + $scope.update = () => { + let id = $scope.entity.Id; + let entity = $scope.entity; + entity[$scope.selectedMainEntityKey] = $scope.selectedMainEntityId; + EntityService.update(id, entity).then((response) => { + Dialogs.postMessage({ topic: 'codbex-payments.CustomerPayment.CustomerPayment.entityUpdated', data: response.data }); + $scope.cancel(); + Notifications.show({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT'), + description: propertySuccessfullyUpdated, + type: 'positive' + }); + }, (error) => { + const message = error.data ? error.data.message : ''; + $scope.$evalAsync(() => { + $scope.errorMessage = LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToUpdate', { name: '$t(codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT)', message: message }); + }); + console.error('EntityService:', error); + }); + }; + + $scope.serviceCustomer = '/services/java/codbex-partners/gen/codbex_partners/api/customers/CustomerController'; + + $scope.optionsCustomer = []; + + $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 + })); + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Customer', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + + const lastSearchValuesCustomer = new Set(); + const allValuesCustomer = []; + let loadMoreOptionsCustomerCounter = 0; + $scope.optionsCustomerLoading = false; + $scope.optionsCustomerHasMore = true; + + $scope.loadMoreOptionsCustomer = () => { + const limit = 20; + $scope.optionsCustomerLoading = true; + $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 => ({ + value: e.Id, + text: e.Name + })); + const newValues = []; + resultValues.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesCustomer.push(e); + newValues.push(e); + } + }); + newValues.forEach(e => { + if (!$scope.optionsCustomer.find(o => o.value === e.value)) { + $scope.optionsCustomer.push(e); + } + }) + $scope.optionsCustomerHasMore = resultValues.length > 0; + $scope.optionsCustomerLoading = false; + }, (error) => { + $scope.optionsCustomerLoading = false; + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Customer', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }; + + $scope.onOptionsCustomerChange = (event) => { + if (allValuesCustomer.length === 0) { + allValuesCustomer.push(...$scope.optionsCustomer); + } + if (event.originalEvent.target.value === '') { + allValuesCustomer.sort((a, b) => a.text.localeCompare(b.text)); + $scope.optionsCustomer = allValuesCustomer; + $scope.optionsCustomerHasMore = true; + } else if (isText(event.which)) { + $scope.optionsCustomerHasMore = false; + let cacheHit = false; + Array.from(lastSearchValuesCustomer).forEach(e => { + if (event.originalEvent.target.value.startsWith(e)) { + cacheHit = true; + } + }) + if (!cacheHit) { + $http.post('/services/java/codbex-partners/gen/codbex_partners/api/customers/CustomerController/search', { + conditions: [ + { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } + ] + }).then((response) => { + const optionValues = allValuesCustomer.map(e => e.value); + const searchResult = response.data.map(e => ({ + value: e.Id, + text: e.Name + })); + searchResult.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesCustomer.push(e); + } + }); + $scope.optionsCustomer = allValuesCustomer.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: 'Customer', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + lastSearchValuesCustomer.add(event.originalEvent.target.value); + } + } + }; + $scope.serviceCurrency = '/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController'; + + $scope.optionsCurrency = []; + + $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 + })); + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Currency', + 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; + $scope.optionsCurrencyLoading = false; + $scope.optionsCurrencyHasMore = true; + + $scope.loadMoreOptionsCurrency = () => { + const limit = 20; + $scope.optionsCurrencyLoading = true; + $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.Code + })); + const newValues = []; + resultValues.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesCurrency.push(e); + newValues.push(e); + } + }); + newValues.forEach(e => { + if (!$scope.optionsCurrency.find(o => o.value === e.value)) { + $scope.optionsCurrency.push(e); + } + }) + $scope.optionsCurrencyHasMore = resultValues.length > 0; + $scope.optionsCurrencyLoading = false; + }, (error) => { + $scope.optionsCurrencyLoading = false; + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Currency', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }; + + $scope.onOptionsCurrencyChange = (event) => { + if (allValuesCurrency.length === 0) { + allValuesCurrency.push(...$scope.optionsCurrency); + } + if (event.originalEvent.target.value === '') { + allValuesCurrency.sort((a, b) => a.text.localeCompare(b.text)); + $scope.optionsCurrency = allValuesCurrency; + $scope.optionsCurrencyHasMore = true; + } else if (isText(event.which)) { + $scope.optionsCurrencyHasMore = false; + let cacheHit = false; + Array.from(lastSearchValuesCurrency).forEach(e => { + if (event.originalEvent.target.value.startsWith(e)) { + cacheHit = true; + } + }) + if (!cacheHit) { + $http.post('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController/search', { + conditions: [ + { 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.Code + })); + searchResult.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesCurrency.push(e); + } + }); + $scope.optionsCurrency = allValuesCurrency.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: 'Currency', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + lastSearchValuesCurrency.add(event.originalEvent.target.value); + } + } + }; + $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.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; + } + + + $scope.alert = (message) => { + if (message) Dialogs.showAlert({ + title: description, + message: message, + type: AlertTypes.Information, + preformatted: true, + }); + }; + + $scope.cancel = () => { + $scope.entity = {}; + $scope.action = 'select'; + Dialogs.closeWindow({ id: 'CustomerPayment-details' }); + }; + + $scope.clearErrorMessage = () => { + $scope.errorMessage = null; + }; + }); \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/index.html b/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/index.html new file mode 100644 index 0000000..6711b0b --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/index.html @@ -0,0 +1,418 @@ + + + + + + + + + + + + + + + + + {{ errorMessage }} + + + + +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_CUSTOMER' | t }} +
+
+ + + + + More Options + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_DATE' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_VALOR' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_OURPARTYIBAN' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_COUNTERPARTYIBAN' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_COUNTERPARTYNAME' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_AMOUNT' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_CURRENCY' | t }} +
+
+ + + + + More Options + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_COMPANY' | t }} +
+
+ + + + + More Options + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_REASON' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_DESCRIPTION' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_PAYMENTMETHOD' | t }} +
+
+ + + + + More Options + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_NAME' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_UUID' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_REFERENCE' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_CREATEDAT' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_CREATEDBY' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_UPDATEDAT' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_UPDATEDBY' | t }} +
+
+ + + + +
+
+
+
+
+ + + + + + + + + + + + + + + + diff --git a/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/view.extension b/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/view.extension new file mode 100644 index 0000000..6997625 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/view.extension @@ -0,0 +1,6 @@ +{ + "module": "codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/view.js", + "extensionPoint": "application-windows", + "description": "codbex-payments - Application Dialog Window", + "role": "codbex-payments.CustomerPayment.CustomerPaymentReadOnly,codbex-payments.CustomerPayment.CustomerPaymentFullAccess" +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/view.js b/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/view.js new file mode 100644 index 0000000..cc54fd1 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/view.js @@ -0,0 +1,20 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const viewData = { + id: "CustomerPayment-details", + label: "CustomerPayment", + translation: { + key: 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT', + }, + path: "/services/web/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/index.html", + perspectiveName: "CustomerPayment", + roles: [ + "codbex-payments.CustomerPayment.CustomerPaymentReadOnly", + ] +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/index.html b/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/index.html new file mode 100644 index 0000000..a0b5b6a --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/index.html @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + {{'codbex-payments:codbex-payments-model.defaults.items' | t}} + + + + + + + + + + + + + + + + + + + + + + + {{next.Date | date: "dd/MMM/yyyy"}} | + {{next.Valor | date: "dd/MMM/yyyy"}} | + {{next.OurPartyIBAN}} | + {{next.CounterpartyIBAN}} | + {{next.CounterpartyName}} | + {{next.Amount}} | + {{optionsCurrencyValue(next.Currency)}} | + {{optionsCompanyValue(next.Company)}} | + {{next.Reason}} | + {{next.Description}} | + {{optionsPaymentMethodValue(next.PaymentMethod)}} | + {{next.Name}} | + {{next.CreatedAt}} | + {{next.CreatedBy}} | + {{next.UpdatedAt}} | + {{next.UpdatedBy}} + + + + + + + {{ 'codbex-payments:codbex-payments-model.defaults.loadMore' | t }} + + + + + + diff --git a/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/main-details/controller.js b/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/main-details/controller.js new file mode 100644 index 0000000..6fafc7b --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/main-details/controller.js @@ -0,0 +1,658 @@ +angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) + .config(["EntityServiceProvider", (EntityServiceProvider) => { + EntityServiceProvider.baseUrl = '/services/java/codbex-payments/gen/codbex_payments/api/customerpayment/CustomerPaymentController'; + }]) + .controller('PageController', ($scope, $http, Extensions, LocaleService, EntityService) => { + const Dialogs = new DialogHub(); + const Notifications = new NotificationHub(); + let description = 'Description'; + let propertySuccessfullyCreated = 'CustomerPayment successfully created'; + let propertySuccessfullyUpdated = 'CustomerPayment successfully updated'; + $scope.entity = {}; + $scope.forms = { + details: {}, + }; + $scope.formHeaders = { + select: 'CustomerPayment Details', + create: 'Create CustomerPayment', + update: 'Update CustomerPayment' + }; + $scope.action = 'select'; + + LocaleService.onInit(() => { + description = LocaleService.t('codbex-payments:codbex-payments-model.defaults.description'); + $scope.formHeaders.select = LocaleService.t('codbex-payments:codbex-payments-model.defaults.formHeadSelect', { name: '$t(codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT)' }); + $scope.formHeaders.create = LocaleService.t('codbex-payments:codbex-payments-model.defaults.formHeadCreate', { name: '$t(codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT)' }); + $scope.formHeaders.update = LocaleService.t('codbex-payments:codbex-payments-model.defaults.formHeadUpdate', { name: '$t(codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT)' }); + propertySuccessfullyCreated = LocaleService.t('codbex-payments:codbex-payments-model.messages.propertySuccessfullyCreated', { name: '$t(codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT)' }); + propertySuccessfullyUpdated = LocaleService.t('codbex-payments:codbex-payments-model.messages.propertySuccessfullyUpdated', { name: '$t(codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT)' }); + }); + + //-----------------Custom Actions-------------------// + Extensions.getWindows(['codbex-payments-custom-action']).then((response) => { + $scope.entityActions = response.data.filter(e => e.perspective === 'CustomerPayment' && e.view === 'CustomerPayment' && e.type === 'entity'); + }); + + $scope.triggerEntityAction = (action) => { + Dialogs.showWindow({ + hasHeader: true, + title: LocaleService.t(action.translation.key, action.translation.options, action.label), + path: action.path, + params: { + id: $scope.entity.Id + }, + closeButton: true + }); + }; + //-----------------Custom Actions-------------------// + + //-----------------Events-------------------// + Dialogs.addMessageListener({ topic: 'codbex-payments.CustomerPayment.CustomerPayment.clearDetails', handler: () => { + $scope.$evalAsync(() => { + $scope.entity = {}; + $scope.optionsCustomer = []; + $scope.optionsCurrency = []; + $scope.optionsCompany = []; + $scope.optionsPaymentMethod = []; + $scope.action = 'select'; + }); + }}); + Dialogs.addMessageListener({ topic: 'codbex-payments.CustomerPayment.CustomerPayment.entitySelected', handler: (data) => { + $scope.$evalAsync(() => { + if (data.entity.Date) { + data.entity.Date = new Date(data.entity.Date); + } + if (data.entity.Valor) { + data.entity.Valor = new Date(data.entity.Valor); + } + if (data.entity.CreatedAt) { + data.entity.CreatedAt = new Date(data.entity.CreatedAt); + } + if (data.entity.UpdatedAt) { + data.entity.UpdatedAt = new Date(data.entity.UpdatedAt); + } + $scope.entity = data.entity; + $scope.optionsCustomer = data.optionsCustomer; + $scope.optionsCurrency = data.optionsCurrency; + $scope.optionsCompany = data.optionsCompany; + $scope.optionsPaymentMethod = data.optionsPaymentMethod; + $scope.action = 'select'; + }); + }}); + Dialogs.addMessageListener({ topic: 'codbex-payments.CustomerPayment.CustomerPayment.createEntity', handler: (data) => { + $scope.$evalAsync(() => { + $scope.entity = {}; + $scope.optionsCustomer = data.optionsCustomer; + $scope.optionsCurrency = data.optionsCurrency; + $scope.optionsCompany = data.optionsCompany; + $scope.optionsPaymentMethod = data.optionsPaymentMethod; + $scope.action = 'create'; + }); + }}); + Dialogs.addMessageListener({ topic: 'codbex-payments.CustomerPayment.CustomerPayment.updateEntity', handler: (data) => { + $scope.$evalAsync(() => { + if (data.entity.Date) { + data.entity.Date = new Date(data.entity.Date); + } + if (data.entity.Valor) { + data.entity.Valor = new Date(data.entity.Valor); + } + if (data.entity.CreatedAt) { + data.entity.CreatedAt = new Date(data.entity.CreatedAt); + } + if (data.entity.UpdatedAt) { + data.entity.UpdatedAt = new Date(data.entity.UpdatedAt); + } + $scope.entity = data.entity; + $scope.optionsCustomer = data.optionsCustomer; + $scope.optionsCurrency = data.optionsCurrency; + $scope.optionsCompany = data.optionsCompany; + $scope.optionsPaymentMethod = data.optionsPaymentMethod; + $scope.action = 'update'; + }); + }}); + + $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-------------------// + + $scope.create = () => { + EntityService.create($scope.entity).then((response) => { + Dialogs.postMessage({ topic: 'codbex-payments.CustomerPayment.CustomerPayment.entityCreated', data: response.data }); + Dialogs.postMessage({ topic: 'codbex-payments.CustomerPayment.CustomerPayment.clearDetails' , data: response.data }); + Notifications.show({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT'), + description: propertySuccessfullyCreated, + type: 'positive' + }); + }, (error) => { + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT'), + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToCreate', { name: '$t(codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT)', message: message }), + type: AlertTypes.Error + }); + console.error('EntityService:', error); + }); + }; + + $scope.update = () => { + EntityService.update($scope.entity.Id, $scope.entity).then((response) => { + Dialogs.postMessage({ topic: 'codbex-payments.CustomerPayment.CustomerPayment.entityUpdated', data: response.data }); + Dialogs.postMessage({ topic: 'codbex-payments.CustomerPayment.CustomerPayment.clearDetails', data: response.data }); + Notifications.show({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT'), + description: propertySuccessfullyUpdated, + type: 'positive' + }); + }, (error) => { + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT'), + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToCreate', { name: '$t(codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT)', message: message }), + type: AlertTypes.Error + }); + console.error('EntityService:', error); + }); + }; + + $scope.cancel = () => { + Dialogs.triggerEvent('codbex-payments.CustomerPayment.CustomerPayment.clearDetails'); + }; + + //-----------------Dialogs-------------------// + $scope.alert = (message) => { + if (message) Dialogs.showAlert({ + title: description, + message: message, + type: AlertTypes.Information, + preformatted: true, + }); + }; + + $scope.createCustomer = () => { + Dialogs.showWindow({ + id: 'Customer-details', + params: { + action: 'create', + entity: {}, + }, + closeButton: false + }); + }; + $scope.createCurrency = () => { + Dialogs.showWindow({ + id: 'Currency-details', + params: { + action: 'create', + entity: {}, + }, + closeButton: false + }); + }; + $scope.createCompany = () => { + Dialogs.showWindow({ + id: 'Company-details', + params: { + action: 'create', + entity: {}, + }, + closeButton: false + }); + }; + $scope.createPaymentMethod = () => { + Dialogs.showWindow({ + id: 'PaymentMethod-details', + params: { + action: 'create', + entity: {}, + }, + closeButton: false + }); + }; + + //-----------------Dialogs-------------------// + + + + //----------------Dropdowns-----------------// + + const lastSearchValuesCustomer = new Set(); + const allValuesCustomer = []; + let loadMoreOptionsCustomerCounter = 0; + $scope.optionsCustomerLoading = false; + $scope.optionsCustomerHasMore = true; + + $scope.loadMoreOptionsCustomer = () => { + const limit = 20; + $scope.optionsCustomerLoading = true; + $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 => ({ + value: e.Id, + text: e.Name + })); + const newValues = []; + resultValues.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesCustomer.push(e); + newValues.push(e); + } + }); + newValues.forEach(e => { + if (!$scope.optionsCustomer.find(o => o.value === e.value)) { + $scope.optionsCustomer.push(e); + } + }) + $scope.optionsCustomerHasMore = resultValues.length > 0; + $scope.optionsCustomerLoading = false; + }, (error) => { + $scope.optionsCustomerLoading = false; + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Customer', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }; + + $scope.onOptionsCustomerChange = (event) => { + if (allValuesCustomer.length === 0) { + allValuesCustomer.push(...$scope.optionsCustomer); + } + if (event.originalEvent.target.value === '') { + allValuesCustomer.sort((a, b) => a.text.localeCompare(b.text)); + $scope.optionsCustomer = allValuesCustomer; + $scope.optionsCustomerHasMore = true; + } else if (isText(event.which)) { + $scope.optionsCustomerHasMore = false; + let cacheHit = false; + Array.from(lastSearchValuesCustomer).forEach(e => { + if (event.originalEvent.target.value.startsWith(e)) { + cacheHit = true; + } + }) + if (!cacheHit) { + $http.post('/services/java/codbex-partners/gen/codbex_partners/api/customers/CustomerController/search', { + conditions: [ + { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } + ] + }).then((response) => { + const optionValues = allValuesCustomer.map(e => e.value); + const searchResult = response.data.map(e => ({ + value: e.Id, + text: e.Name + })); + searchResult.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesCustomer.push(e); + } + }); + $scope.optionsCustomer = allValuesCustomer.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: 'Customer', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + lastSearchValuesCustomer.add(event.originalEvent.target.value); + } + } + }; + + $scope.refreshCustomer = () => { + $scope.optionsCustomer = []; + $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 + })); + allValuesCustomer.length === 0; + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Customer', + 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; + $scope.optionsCurrencyLoading = false; + $scope.optionsCurrencyHasMore = true; + + $scope.loadMoreOptionsCurrency = () => { + const limit = 20; + $scope.optionsCurrencyLoading = true; + $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.Code + })); + const newValues = []; + resultValues.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesCurrency.push(e); + newValues.push(e); + } + }); + newValues.forEach(e => { + if (!$scope.optionsCurrency.find(o => o.value === e.value)) { + $scope.optionsCurrency.push(e); + } + }) + $scope.optionsCurrencyHasMore = resultValues.length > 0; + $scope.optionsCurrencyLoading = false; + }, (error) => { + $scope.optionsCurrencyLoading = false; + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Currency', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }; + + $scope.onOptionsCurrencyChange = (event) => { + if (allValuesCurrency.length === 0) { + allValuesCurrency.push(...$scope.optionsCurrency); + } + if (event.originalEvent.target.value === '') { + allValuesCurrency.sort((a, b) => a.text.localeCompare(b.text)); + $scope.optionsCurrency = allValuesCurrency; + $scope.optionsCurrencyHasMore = true; + } else if (isText(event.which)) { + $scope.optionsCurrencyHasMore = false; + let cacheHit = false; + Array.from(lastSearchValuesCurrency).forEach(e => { + if (event.originalEvent.target.value.startsWith(e)) { + cacheHit = true; + } + }) + if (!cacheHit) { + $http.post('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController/search', { + conditions: [ + { 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.Code + })); + searchResult.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesCurrency.push(e); + } + }); + $scope.optionsCurrency = allValuesCurrency.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: 'Currency', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + lastSearchValuesCurrency.add(event.originalEvent.target.value); + } + } + }; + + $scope.refreshCurrency = () => { + $scope.optionsCurrency = []; + $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 + })); + allValuesCurrency.length === 0; + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Currency', + 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.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 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; + return false; + } + + //----------------Dropdowns-----------------// + }); \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/main-details/index.html b/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/main-details/index.html new file mode 100644 index 0000000..ac951bc --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/main-details/index.html @@ -0,0 +1,439 @@ + + + + + + + + + + + + + + + + + + + +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_CUSTOMER' | t }} +
+
+ + + + + More Options + + +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_DATE' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_VALOR' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_OURPARTYIBAN' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_COUNTERPARTYIBAN' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_COUNTERPARTYNAME' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_AMOUNT' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_CURRENCY' | t }} +
+
+ + + + + More Options + + +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_COMPANY' | t }} +
+
+ + + + + More Options + + +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_REASON' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_DESCRIPTION' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_PAYMENTMETHOD' | t }} +
+
+ + + + + More Options + + +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_NAME' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_UUID' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_REFERENCE' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_CREATEDAT' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_CREATEDBY' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_UPDATEDAT' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT_UPDATEDBY' | t }} +
+
+ + + + +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + diff --git a/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/main-details/view.extension b/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/main-details/view.extension new file mode 100644 index 0000000..be152b9 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/main-details/view.extension @@ -0,0 +1,6 @@ +{ + "module": "codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/main-details/view.js", + "extensionPoint": "application-views", + "description": "codbex-payments - Application View - Main Details", + "role": "codbex-payments.CustomerPayment.CustomerPaymentReadOnly,codbex-payments.CustomerPayment.CustomerPaymentFullAccess" +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/main-details/view.js b/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/main-details/view.js new file mode 100644 index 0000000..df0e429 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/main-details/view.js @@ -0,0 +1,20 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const viewData = { + id: 'CustomerPayment-details', + label: 'CustomerPayment', + translation: { + key: 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT', + }, + region: 'center', + lazyLoad: false, + autoFocusTab: true, + path: '/services/web/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/main-details/index.html', + perspectiveName: 'CustomerPayment' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/view.extension b/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/view.extension new file mode 100644 index 0000000..dff977f --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/view.extension @@ -0,0 +1,6 @@ +{ + "module": "codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/view.js", + "extensionPoint": "application-views", + "description": "codbex-payments - Application View", + "role": "codbex-payments.CustomerPayment.CustomerPaymentReadOnly,codbex-payments.CustomerPayment.CustomerPaymentFullAccess" +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/view.js b/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/view.js new file mode 100644 index 0000000..1a8b44c --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/view.js @@ -0,0 +1,20 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const viewData = { + id: 'CustomerPayment', + label: 'CustomerPayment', + translation: { + key: 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT', + }, + region: 'left', + lazyLoad: false, + autoFocusTab: false, + path: '/services/web/codbex-payments/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/index.html', + perspectiveName: 'CustomerPayment' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/index.html b/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/index.html new file mode 100644 index 0000000..382eb26 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/index.html @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + {{'codbex-payments:codbex-payments-model.state.busy' | t}} + + + {{'codbex-payments:codbex-payments-model.messages.error.loading' | t}} + + + + + + diff --git a/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/perspective.extension b/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/perspective.extension new file mode 100644 index 0000000..2519c45 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/perspective.extension @@ -0,0 +1,6 @@ +{ + "module": "codbex-payments/gen/codbex-payments/ui/CustomerPayment/perspective.js", + "extensionPoint": "application-perspectives", + "description": "codbex-payments - Perspective - CustomerPayment", + "role": "codbex-payments.CustomerPayment.CustomerPaymentReadOnly,codbex-payments.CustomerPayment.CustomerPaymentFullAccess" +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/perspective.js b/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/perspective.js new file mode 100644 index 0000000..1383307 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/perspective.js @@ -0,0 +1,19 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const perspectiveData = { + id: 'CustomerPayment', + label: 'CustomerPayment', + translation: { + key: 'codbex-payments:codbex-payments-model.t.CUSTOMERPAYMENT', + }, + path: '/services/web/codbex-payments/gen/codbex-payments/ui/CustomerPayment/index.html', + groupId: 'sales-navigation-group', + order: 300, + icon: '/services/web/resources/unicons/usd-square.svg' +}; +if (typeof exports !== 'undefined') { + exports.getPerspective = () => perspectiveData; +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/controller.js b/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/controller.js new file mode 100644 index 0000000..6bddb84 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/controller.js @@ -0,0 +1,405 @@ +angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) + .config(['EntityServiceProvider', (EntityServiceProvider) => { + EntityServiceProvider.baseUrl = '/services/java/codbex-payments/gen/codbex_payments/api/employeepayment/EmployeePaymentController'; + }]) + .controller('PageController', ($scope, $http, EntityService, Extensions, LocaleService, ButtonStates) => { + const Dialogs = new DialogHub(); + let translated = { + yes: 'Yes', + no: 'No', + deleteConfirm: 'Are you sure you want to delete EmployeePayment? This action cannot be undone.', + deleteTitle: 'Delete EmployeePayment?' + }; + + LocaleService.onInit(() => { + translated.yes = LocaleService.t('codbex-payments:codbex-payments-model.defaults.yes'); + translated.no = LocaleService.t('codbex-payments:codbex-payments-model.defaults.no'); + translated.deleteTitle = LocaleService.t('codbex-payments:codbex-payments-model.defaults.deleteTitle', { name: '$t(codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT)' }); + translated.deleteConfirm = LocaleService.t('codbex-payments:codbex-payments-model.messages.deleteConfirm', { name: '$t(codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT)' }); + }); + $scope.dataPage = 1; + $scope.dataCount = 0; + $scope.dataOffset = 0; + $scope.dataLimit = 10; + $scope.action = 'select'; + + //-----------------Custom Actions-------------------// + Extensions.getWindows(['codbex-payments-custom-action']).then((response) => { + $scope.pageActions = response.data.filter(e => e.perspective === 'EmployeePayment' && e.view === 'EmployeePayment' && (e.type === 'page' || e.type === undefined)); + }); + + $scope.triggerPageAction = (action) => { + Dialogs.showWindow({ + hasHeader: true, + title: LocaleService.t(action.translation.key, action.translation.options, action.label), + path: action.path, + maxWidth: action.maxWidth, + maxHeight: action.maxHeight, + closeButton: true + }); + }; + //-----------------Custom Actions-------------------// + + function refreshData() { + $scope.dataReset = true; + $scope.dataPage--; + } + + function resetPagination() { + $scope.dataReset = true; + $scope.dataPage = 1; + $scope.dataCount = 0; + $scope.dataLimit = 10; + } + + //-----------------Events-------------------// + Dialogs.addMessageListener({ topic: 'codbex-payments.EmployeePayment.EmployeePayment.clearDetails', handler: () => { + $scope.$evalAsync(() => { + $scope.selectedEntity = null; + $scope.action = 'select'; + }); + }}); + Dialogs.addMessageListener({ topic: 'codbex-payments.EmployeePayment.EmployeePayment.entityCreated', handler: () => { + refreshData(); + $scope.loadPage($scope.dataPage, $scope.filter); + }}); + Dialogs.addMessageListener({ topic: 'codbex-payments.EmployeePayment.EmployeePayment.entityUpdated', handler: () => { + refreshData(); + $scope.loadPage($scope.dataPage, $scope.filter); + }}); + Dialogs.addMessageListener({ topic: 'codbex-payments.EmployeePayment.EmployeePayment.entitySearch', handler: (data) => { + resetPagination(); + $scope.filter = data.filter; + $scope.filterEntity = data.entity; + $scope.loadPage($scope.dataPage, $scope.filter); + }}); + //-----------------Events-------------------// + + $scope.loadPage = (pageNumber, filter) => { + if (!filter && $scope.filter) { + filter = $scope.filter; + } + if (!filter) { + filter = { + $filter: {} + }; + } + $scope.selectedEntity = null; + EntityService.count(filter).then((resp) => { + if (resp.data) { + $scope.dataCount = resp.data.count; + } + $scope.dataPages = Math.ceil($scope.dataCount / $scope.dataLimit); + filter.$filter.offset = ($scope.dataPage - 1) * $scope.dataLimit; + filter.$filter.limit = $scope.dataLimit; + if ($scope.dataReset) { + filter.$filter.offset = 0; + filter.$filter.limit = $scope.dataPage * $scope.dataLimit; + } + + EntityService.search(filter).then((response) => { + if ($scope.data == null || $scope.dataReset) { + $scope.data = []; + $scope.dataReset = false; + } + if (optionsEmployeeHasMore) { + const optionsEmployeeSearchValues = Array.from(new Set(response.data.map(e => e.Employee))); + if (optionsEmployeeSearchValues.length > 0) { + $http.post('/services/java/codbex-employees/gen/codbex_employees/api/employees/EmployeeController/search', { + conditions: [ + { propertyName: 'Id', operator: 'IN', value: optionsEmployeeSearchValues } + ] + }).then((response) => { + $scope.optionsEmployee.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: 'Employee', + 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/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.Code + }))); + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Currency', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + } + } + 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 + }); + }); + } + } + response.data.forEach(e => { + if (e.Date) { + e.Date = new Date(e.Date); + } + if (e.Valor) { + e.Valor = new Date(e.Valor); + } + if (e.CreatedAt) { + e.CreatedAt = new Date(e.CreatedAt); + } + if (e.UpdatedAt) { + e.UpdatedAt = new Date(e.UpdatedAt); + } + }); + + $scope.data = $scope.data.concat(response.data); + $scope.dataPage++; + }, (error) => { + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT'), + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLF', { name: '$t(codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT)', message: message }), + type: AlertTypes.Error + }); + console.error('EntityService:', error); + }); + }, (error) => { + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT'), + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToCount', { name: '$t(codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT)', message: message }), + type: AlertTypes.Error + }); + console.error('EntityService:', error); + }); + }; + $scope.loadPage($scope.dataPage, $scope.filter); + + $scope.selectEntity = (entity) => { + $scope.selectedEntity = entity; + Dialogs.postMessage({ topic: 'codbex-payments.EmployeePayment.EmployeePayment.entitySelected', data: { + entity: entity, + selectedMainEntityId: entity.Id, + optionsEmployee: $scope.optionsEmployee, + optionsCurrency: $scope.optionsCurrency, + optionsCompany: $scope.optionsCompany, + }}); + }; + + $scope.createEntity = () => { + $scope.selectedEntity = null; + $scope.action = 'create'; + + Dialogs.postMessage({ topic: 'codbex-payments.EmployeePayment.EmployeePayment.createEntity', data: { + entity: {}, + optionsEmployee: $scope.optionsEmployee, + optionsCurrency: $scope.optionsCurrency, + optionsCompany: $scope.optionsCompany, + }}); + }; + + $scope.updateEntity = () => { + $scope.action = 'update'; + Dialogs.postMessage({ topic: 'codbex-payments.EmployeePayment.EmployeePayment.updateEntity', data: { + entity: $scope.selectedEntity, + optionsEmployee: $scope.optionsEmployee, + optionsCurrency: $scope.optionsCurrency, + optionsCompany: $scope.optionsCompany, + }}); + }; + + $scope.deleteEntity = () => { + let id = $scope.selectedEntity.Id; + Dialogs.showDialog({ + title: translated.deleteTitle, + message: translated.deleteConfirm, + buttons: [{ + id: 'delete-btn-yes', + state: ButtonStates.Emphasized, + label: translated.yes, + }, { + id: 'delete-btn-no', + label: translated.no, + }], + closeButton: false + }).then((buttonId) => { + if (buttonId === 'delete-btn-yes') { + EntityService.delete(id).then(() => { + refreshData(); + $scope.loadPage($scope.dataPage, $scope.filter); + Dialogs.triggerEvent('codbex-payments.EmployeePayment.EmployeePayment.clearDetails'); + }, (error) => { + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT'), + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToDelete', { name: '$t(codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT)', message: message }), + type: AlertTypes.Error + }); + console.error('EntityService:', error); + }); + } + }); + }; + + $scope.openFilter = () => { + Dialogs.showWindow({ + id: 'EmployeePayment-filter', + params: { + entity: $scope.filterEntity, + optionsEmployee: $scope.optionsEmployee, + optionsCurrency: $scope.optionsCurrency, + optionsCompany: $scope.optionsCompany, + }, + }); + }; + + //----------------Dropdowns-----------------// + $scope.optionsEmployee = []; + $scope.optionsCurrency = []; + $scope.optionsCompany = []; + + let optionsEmployeeHasMore = true; + + $http.get('/services/java/codbex-employees/gen/codbex_employees/api/employees/EmployeeController/count').then((response) => { + const optionsEmployeeCount = response.data.count; + $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 + })); + optionsEmployeeHasMore = optionsEmployeeCount > $scope.optionsEmployee.length; + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Employee', + 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: 'Employee', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + let optionsCurrencyHasMore = true; + + $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.Code + })); + optionsCurrencyHasMore = optionsCurrencyCount > $scope.optionsCurrency.length; + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Currency', + 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: 'Currency', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + let optionsCompanyHasMore = true; + + $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.Name + })); + optionsCompanyHasMore = optionsCompanyCount > $scope.optionsCompany.length; + }, (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 + }); + }); + }, (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 + }); + }); + + $scope.optionsEmployeeValue = (optionKey) => { + for (let i = 0; i < $scope.optionsEmployee.length; i++) { + if ($scope.optionsEmployee[i].value === optionKey) { + return $scope.optionsEmployee[i].text; + } + } + return null; + }; + $scope.optionsCurrencyValue = (optionKey) => { + for (let i = 0; i < $scope.optionsCurrency.length; i++) { + if ($scope.optionsCurrency[i].value === optionKey) { + return $scope.optionsCurrency[i].text; + } + } + 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/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-filter/controller.js b/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-filter/controller.js new file mode 100644 index 0000000..321d34c --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-filter/controller.js @@ -0,0 +1,449 @@ +angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controller('PageController', ($scope, $http, ViewParameters) => { + const Dialogs = new DialogHub(); + $scope.entity = {}; + $scope.forms = { + details: {}, + }; + + let params = ViewParameters.get(); + if (Object.keys(params).length) { + if (params?.entity?.DateFrom) { + params.entity.DateFrom = new Date(params.entity.DateFrom); + } + if (params?.entity?.DateTo) { + params.entity.DateTo = new Date(params.entity.DateTo); + } + if (params?.entity?.ValorFrom) { + params.entity.ValorFrom = new Date(params.entity.ValorFrom); + } + if (params?.entity?.ValorTo) { + params.entity.ValorTo = new Date(params.entity.ValorTo); + } + if (params?.entity?.CreatedAtFrom) { + params.entity.CreatedAtFrom = new Date(params.entity.CreatedAtFrom); + } + if (params?.entity?.CreatedAtTo) { + params.entity.CreatedAtTo = new Date(params.entity.CreatedAtTo); + } + if (params?.entity?.UpdatedAtFrom) { + params.entity.UpdatedAtFrom = new Date(params.entity.UpdatedAtFrom); + } + if (params?.entity?.UpdatedAtTo) { + params.entity.UpdatedAtTo = new Date(params.entity.UpdatedAtTo); + } + $scope.entity = params.entity ?? {}; + $scope.selectedMainEntityKey = params.selectedMainEntityKey; + $scope.selectedMainEntityId = params.selectedMainEntityId; + const optionsEmployeeMap = new Map(); + params.optionsEmployee.forEach(e => optionsEmployeeMap.set(e.value, e)); + $scope.optionsEmployee = Array.from(optionsEmployeeMap.values()); + const optionsCurrencyMap = new Map(); + params.optionsCurrency.forEach(e => optionsCurrencyMap.set(e.value, e)); + $scope.optionsCurrency = Array.from(optionsCurrencyMap.values()); + const optionsCompanyMap = new Map(); + params.optionsCompany.forEach(e => optionsCompanyMap.set(e.value, e)); + $scope.optionsCompany = Array.from(optionsCompanyMap.values()); + } + + $scope.filter = () => { + let entity = $scope.entity; + const filter = { + $filter: { + conditions: [], + sorts: [], + limit: 20, + offset: 0 + } + }; + if (entity.Id !== undefined) { + const condition = { propertyName: 'Id', operator: 'EQ', value: entity.Id }; + filter.$filter.conditions.push(condition); + } + if (entity.Employee !== undefined) { + const condition = { propertyName: 'Employee', operator: 'EQ', value: entity.Employee }; + filter.$filter.conditions.push(condition); + } + if (entity.DateFrom) { + const condition = { propertyName: 'Date', operator: 'GE', value: entity.DateFrom }; + filter.$filter.conditions.push(condition); + } + if (entity.DateTo) { + const condition = { propertyName: 'Date', operator: 'LE', value: entity.DateTo }; + filter.$filter.conditions.push(condition); + } + if (entity.ValorFrom) { + const condition = { propertyName: 'Valor', operator: 'GE', value: entity.ValorFrom }; + filter.$filter.conditions.push(condition); + } + if (entity.ValorTo) { + const condition = { propertyName: 'Valor', operator: 'LE', value: entity.ValorTo }; + filter.$filter.conditions.push(condition); + } + if (entity.OurPartyIBAN) { + const condition = { propertyName: 'OurPartyIBAN', operator: 'LIKE', value: `%${entity.OurPartyIBAN}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.CounterpartyIBAN) { + const condition = { propertyName: 'CounterpartyIBAN', operator: 'LIKE', value: `%${entity.CounterpartyIBAN}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.CounterpartyName) { + const condition = { propertyName: 'CounterpartyName', operator: 'LIKE', value: `%${entity.CounterpartyName}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.Amount !== undefined) { + const condition = { propertyName: 'Amount', operator: 'EQ', value: entity.Amount }; + filter.$filter.conditions.push(condition); + } + if (entity.Currency !== undefined) { + 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.Description) { + const condition = { propertyName: 'Description', operator: 'LIKE', value: `%${entity.Description}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.Name) { + const condition = { propertyName: 'Name', operator: 'LIKE', value: `%${entity.Name}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.UUID) { + const condition = { propertyName: 'UUID', operator: 'LIKE', value: `%${entity.UUID}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.Reference) { + const condition = { propertyName: 'Reference', operator: 'LIKE', value: `%${entity.Reference}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.CreatedAtFrom) { + const condition = { propertyName: 'CreatedAt', operator: 'GE', value: entity.CreatedAtFrom }; + filter.$filter.conditions.push(condition); + } + if (entity.CreatedAtTo) { + const condition = { propertyName: 'CreatedAt', operator: 'LE', value: entity.CreatedAtTo }; + filter.$filter.conditions.push(condition); + } + if (entity.CreatedBy) { + const condition = { propertyName: 'CreatedBy', operator: 'LIKE', value: `%${entity.CreatedBy}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.UpdatedAtFrom) { + const condition = { propertyName: 'UpdatedAt', operator: 'GE', value: entity.UpdatedAtFrom }; + filter.$filter.conditions.push(condition); + } + if (entity.UpdatedAtTo) { + const condition = { propertyName: 'UpdatedAt', operator: 'LE', value: entity.UpdatedAtTo }; + filter.$filter.conditions.push(condition); + } + if (entity.UpdatedBy) { + const condition = { propertyName: 'UpdatedBy', operator: 'LIKE', value: `%${entity.UpdatedBy}%` }; + filter.$filter.conditions.push(condition); + } + Dialogs.postMessage({ topic: 'codbex-payments.EmployeePayment.EmployeePayment.entitySearch', data: { + entity: entity, + filter: filter + }}); + Dialogs.triggerEvent('codbex-payments.EmployeePayment.EmployeePayment.clearDetails'); + $scope.cancel(); + }; + + $scope.resetFilter = () => { + $scope.entity = {}; + $scope.filter(); + lastSearchValuesEmployee.clear(); + allValuesEmployee.length = 0; + lastSearchValuesCurrency.clear(); + allValuesCurrency.length = 0; + lastSearchValuesCompany.clear(); + allValuesCompany.length = 0; + }; + + $scope.cancel = () => { + Dialogs.closeWindow({ id: 'EmployeePayment-filter' }); + }; + + $scope.clearErrorMessage = () => { + $scope.errorMessage = null; + }; + + const lastSearchValuesEmployee = new Set(); + const allValuesEmployee = []; + let loadMoreOptionsEmployeeCounter = 0; + $scope.optionsEmployeeLoading = false; + $scope.optionsEmployeeHasMore = true; + + $scope.loadMoreOptionsEmployee = () => { + const limit = 20; + $scope.optionsEmployeeLoading = true; + $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 => ({ + value: e.Id, + text: e.Name + })); + const newValues = []; + resultValues.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesEmployee.push(e); + newValues.push(e); + } + }); + newValues.forEach(e => { + if (!$scope.optionsEmployee.find(o => o.value === e.value)) { + $scope.optionsEmployee.push(e); + } + }) + $scope.optionsEmployeeHasMore = resultValues.length > 0; + $scope.optionsEmployeeLoading = false; + }, (error) => { + $scope.optionsEmployeeLoading = false; + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Employee', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }; + + $scope.onOptionsEmployeeChange = (event) => { + if (allValuesEmployee.length === 0) { + allValuesEmployee.push(...$scope.optionsEmployee); + } + if (event.originalEvent.target.value === '') { + allValuesEmployee.sort((a, b) => a.text.localeCompare(b.text)); + $scope.optionsEmployee = allValuesEmployee; + $scope.optionsEmployeeHasMore = true; + } else if (isText(event.which)) { + $scope.optionsEmployeeHasMore = false; + let cacheHit = false; + Array.from(lastSearchValuesEmployee).forEach(e => { + if (event.originalEvent.target.value.startsWith(e)) { + cacheHit = true; + } + }) + if (!cacheHit) { + $http.post('/services/java/codbex-employees/gen/codbex_employees/api/employees/EmployeeController/search', { + conditions: [ + { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } + ] + }).then((response) => { + const optionValues = allValuesEmployee.map(e => e.value); + const searchResult = response.data.map(e => ({ + value: e.Id, + text: e.Name + })); + searchResult.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesEmployee.push(e); + } + }); + $scope.optionsEmployee = allValuesEmployee.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: 'Employee', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + lastSearchValuesEmployee.add(event.originalEvent.target.value); + } + } + }; + + const lastSearchValuesCurrency = new Set(); + const allValuesCurrency = []; + let loadMoreOptionsCurrencyCounter = 0; + $scope.optionsCurrencyLoading = false; + $scope.optionsCurrencyHasMore = true; + + $scope.loadMoreOptionsCurrency = () => { + const limit = 20; + $scope.optionsCurrencyLoading = true; + $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.Code + })); + const newValues = []; + resultValues.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesCurrency.push(e); + newValues.push(e); + } + }); + newValues.forEach(e => { + if (!$scope.optionsCurrency.find(o => o.value === e.value)) { + $scope.optionsCurrency.push(e); + } + }) + $scope.optionsCurrencyHasMore = resultValues.length > 0; + $scope.optionsCurrencyLoading = false; + }, (error) => { + $scope.optionsCurrencyLoading = false; + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Currency', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }; + + $scope.onOptionsCurrencyChange = (event) => { + if (allValuesCurrency.length === 0) { + allValuesCurrency.push(...$scope.optionsCurrency); + } + if (event.originalEvent.target.value === '') { + allValuesCurrency.sort((a, b) => a.text.localeCompare(b.text)); + $scope.optionsCurrency = allValuesCurrency; + $scope.optionsCurrencyHasMore = true; + } else if (isText(event.which)) { + $scope.optionsCurrencyHasMore = false; + let cacheHit = false; + Array.from(lastSearchValuesCurrency).forEach(e => { + if (event.originalEvent.target.value.startsWith(e)) { + cacheHit = true; + } + }) + if (!cacheHit) { + $http.post('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController/search', { + conditions: [ + { 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.Code + })); + searchResult.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesCurrency.push(e); + } + }); + $scope.optionsCurrency = allValuesCurrency.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: 'Currency', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + lastSearchValuesCurrency.add(event.originalEvent.target.value); + } + } + }; + + 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); + } + } + }; + + 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; + } + +}); \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-filter/index.html b/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-filter/index.html new file mode 100644 index 0000000..9f312d2 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-filter/index.html @@ -0,0 +1,374 @@ + + + + + + + + + + + + + + + + {{ errorMessage }} + + + + +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_EMPLOYEE' | t }} +
+
+ + + + + More Options + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.defaults.from' | t:{'text':'$t(codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_DATE)'} }} +
+
+ + + + +
+
+ {{ 'codbex-payments:codbex-payments-model.defaults.to' | t:{'text':'$t(codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_DATE)'} }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.defaults.from' | t:{'text':'$t(codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_VALOR)'} }} +
+
+ + + + +
+
+ {{ 'codbex-payments:codbex-payments-model.defaults.to' | t:{'text':'$t(codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_VALOR)'} }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_OURPARTYIBAN' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_COUNTERPARTYIBAN' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_COUNTERPARTYNAME' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_AMOUNT' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_CURRENCY' | t }} +
+
+ + + + + More Options + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_COMPANY' | t }} +
+
+ + + + + More Options + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_REASON' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_DESCRIPTION' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_NAME' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_UUID' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_REFERENCE' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_CREATEDAT' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_CREATEDBY' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_UPDATEDAT' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_UPDATEDBY' | t }} +
+
+ + + + +
+
+
+
+
+ + + + + + + + + + + + + + + + + + diff --git a/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-filter/view.extension b/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-filter/view.extension new file mode 100644 index 0000000..c83f047 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-filter/view.extension @@ -0,0 +1,6 @@ +{ + "module": "codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-filter/view.js", + "extensionPoint": "application-windows", + "description": "codbex-payments - Application Dialog Window", + "role": "codbex-payments.EmployeePayment.EmployeePaymentReadOnly,codbex-payments.EmployeePayment.EmployeePaymentFullAccess" +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-filter/view.js b/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-filter/view.js new file mode 100644 index 0000000..f6a6673 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-filter/view.js @@ -0,0 +1,20 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const viewData = { + id: 'EmployeePayment-filter', + label: 'EmployeePayment Filter', + translation: { + key: 'codbex-payments:codbex-payments-model.extName', + options: { + content: '$t(codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT) $t(codbex-payments:codbex-payments-model.defaults.filter)', + } + }, + path: '/services/web/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-filter/index.html', + perspectiveName: 'EmployeePayment' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/controller.js b/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/controller.js new file mode 100644 index 0000000..e50d922 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/controller.js @@ -0,0 +1,446 @@ +angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) + .config(['EntityServiceProvider', (EntityServiceProvider) => { + EntityServiceProvider.baseUrl = '/services/java/codbex-payments/gen/codbex_payments/api/employeepayment/EmployeePaymentController'; + }]) + .controller('PageController', ($scope, $http, ViewParameters, LocaleService, EntityService) => { + const Dialogs = new DialogHub(); + const Notifications = new NotificationHub(); + let description = 'Description'; + let propertySuccessfullyCreated = 'EmployeePayment successfully created'; + let propertySuccessfullyUpdated = 'EmployeePayment successfully updated'; + $scope.entity = {}; + $scope.forms = { + details: {}, + }; + $scope.formHeaders = { + select: 'EmployeePayment Details', + create: 'Create EmployeePayment', + update: 'Update EmployeePayment' + }; + $scope.action = 'select'; + + LocaleService.onInit(() => { + description = LocaleService.t('codbex-payments:codbex-payments-model.defaults.description'); + $scope.formHeaders.select = LocaleService.t('codbex-payments:codbex-payments-model.defaults.formHeadSelect', { name: '$t(codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT)' }); + $scope.formHeaders.create = LocaleService.t('codbex-payments:codbex-payments-model.defaults.formHeadCreate', { name: '$t(codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT)' }); + $scope.formHeaders.update = LocaleService.t('codbex-payments:codbex-payments-model.defaults.formHeadUpdate', { name: '$t(codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT)' }); + propertySuccessfullyCreated = LocaleService.t('codbex-payments:codbex-payments-model.messages.propertySuccessfullyCreated', { name: '$t(codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT)' }); + propertySuccessfullyUpdated = LocaleService.t('codbex-payments:codbex-payments-model.messages.propertySuccessfullyUpdated', { name: '$t(codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT)' }); + }); + + let params = ViewParameters.get(); + if (Object.keys(params).length) { + $scope.action = params.action; + if (params.entity.Date) { + params.entity.Date = new Date(params.entity.Date); + } + if (params.entity.Valor) { + params.entity.Valor = new Date(params.entity.Valor); + } + if (params.entity.CreatedAt) { + params.entity.CreatedAt = new Date(params.entity.CreatedAt); + } + if (params.entity.UpdatedAt) { + params.entity.UpdatedAt = new Date(params.entity.UpdatedAt); + } + $scope.entity = params.entity; + $scope.selectedMainEntityKey = params.selectedMainEntityKey; + $scope.selectedMainEntityId = params.selectedMainEntityId; + const optionsEmployeeMap = new Map(); + params.optionsEmployee?.forEach(e => optionsEmployeeMap.set(e.value, e)); + $scope.optionsEmployee = Array.from(optionsEmployeeMap.values()); + const optionsCurrencyMap = new Map(); + params.optionsCurrency?.forEach(e => optionsCurrencyMap.set(e.value, e)); + $scope.optionsCurrency = Array.from(optionsCurrencyMap.values()); + const optionsCompanyMap = new Map(); + params.optionsCompany?.forEach(e => optionsCompanyMap.set(e.value, e)); + $scope.optionsCompany = Array.from(optionsCompanyMap.values()); + } + + $scope.create = () => { + let entity = $scope.entity; + entity[$scope.selectedMainEntityKey] = $scope.selectedMainEntityId; + EntityService.create(entity).then((response) => { + Dialogs.postMessage({ topic: 'codbex-payments.EmployeePayment.EmployeePayment.entityCreated', data: response.data }); + Notifications.show({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT'), + description: propertySuccessfullyCreated, + type: 'positive' + }); + $scope.cancel(); + }, (error) => { + const message = error.data ? error.data.message : ''; + $scope.$evalAsync(() => { + $scope.errorMessage = LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToCreate', { name: '$t(codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT)', message: message }); + }); + console.error('EntityService:', error); + }); + }; + + $scope.update = () => { + let id = $scope.entity.Id; + let entity = $scope.entity; + entity[$scope.selectedMainEntityKey] = $scope.selectedMainEntityId; + EntityService.update(id, entity).then((response) => { + Dialogs.postMessage({ topic: 'codbex-payments.EmployeePayment.EmployeePayment.entityUpdated', data: response.data }); + $scope.cancel(); + Notifications.show({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT'), + description: propertySuccessfullyUpdated, + type: 'positive' + }); + }, (error) => { + const message = error.data ? error.data.message : ''; + $scope.$evalAsync(() => { + $scope.errorMessage = LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToUpdate', { name: '$t(codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT)', message: message }); + }); + console.error('EntityService:', error); + }); + }; + + $scope.serviceEmployee = '/services/java/codbex-employees/gen/codbex_employees/api/employees/EmployeeController'; + + $scope.optionsEmployee = []; + + $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 + })); + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Employee', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + + const lastSearchValuesEmployee = new Set(); + const allValuesEmployee = []; + let loadMoreOptionsEmployeeCounter = 0; + $scope.optionsEmployeeLoading = false; + $scope.optionsEmployeeHasMore = true; + + $scope.loadMoreOptionsEmployee = () => { + const limit = 20; + $scope.optionsEmployeeLoading = true; + $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 => ({ + value: e.Id, + text: e.Name + })); + const newValues = []; + resultValues.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesEmployee.push(e); + newValues.push(e); + } + }); + newValues.forEach(e => { + if (!$scope.optionsEmployee.find(o => o.value === e.value)) { + $scope.optionsEmployee.push(e); + } + }) + $scope.optionsEmployeeHasMore = resultValues.length > 0; + $scope.optionsEmployeeLoading = false; + }, (error) => { + $scope.optionsEmployeeLoading = false; + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Employee', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }; + + $scope.onOptionsEmployeeChange = (event) => { + if (allValuesEmployee.length === 0) { + allValuesEmployee.push(...$scope.optionsEmployee); + } + if (event.originalEvent.target.value === '') { + allValuesEmployee.sort((a, b) => a.text.localeCompare(b.text)); + $scope.optionsEmployee = allValuesEmployee; + $scope.optionsEmployeeHasMore = true; + } else if (isText(event.which)) { + $scope.optionsEmployeeHasMore = false; + let cacheHit = false; + Array.from(lastSearchValuesEmployee).forEach(e => { + if (event.originalEvent.target.value.startsWith(e)) { + cacheHit = true; + } + }) + if (!cacheHit) { + $http.post('/services/java/codbex-employees/gen/codbex_employees/api/employees/EmployeeController/search', { + conditions: [ + { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } + ] + }).then((response) => { + const optionValues = allValuesEmployee.map(e => e.value); + const searchResult = response.data.map(e => ({ + value: e.Id, + text: e.Name + })); + searchResult.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesEmployee.push(e); + } + }); + $scope.optionsEmployee = allValuesEmployee.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: 'Employee', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + lastSearchValuesEmployee.add(event.originalEvent.target.value); + } + } + }; + $scope.serviceCurrency = '/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController'; + + $scope.optionsCurrency = []; + + $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 + })); + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Currency', + 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; + $scope.optionsCurrencyLoading = false; + $scope.optionsCurrencyHasMore = true; + + $scope.loadMoreOptionsCurrency = () => { + const limit = 20; + $scope.optionsCurrencyLoading = true; + $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.Code + })); + const newValues = []; + resultValues.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesCurrency.push(e); + newValues.push(e); + } + }); + newValues.forEach(e => { + if (!$scope.optionsCurrency.find(o => o.value === e.value)) { + $scope.optionsCurrency.push(e); + } + }) + $scope.optionsCurrencyHasMore = resultValues.length > 0; + $scope.optionsCurrencyLoading = false; + }, (error) => { + $scope.optionsCurrencyLoading = false; + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Currency', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }; + + $scope.onOptionsCurrencyChange = (event) => { + if (allValuesCurrency.length === 0) { + allValuesCurrency.push(...$scope.optionsCurrency); + } + if (event.originalEvent.target.value === '') { + allValuesCurrency.sort((a, b) => a.text.localeCompare(b.text)); + $scope.optionsCurrency = allValuesCurrency; + $scope.optionsCurrencyHasMore = true; + } else if (isText(event.which)) { + $scope.optionsCurrencyHasMore = false; + let cacheHit = false; + Array.from(lastSearchValuesCurrency).forEach(e => { + if (event.originalEvent.target.value.startsWith(e)) { + cacheHit = true; + } + }) + if (!cacheHit) { + $http.post('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController/search', { + conditions: [ + { 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.Code + })); + searchResult.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesCurrency.push(e); + } + }); + $scope.optionsCurrency = allValuesCurrency.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: 'Currency', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + lastSearchValuesCurrency.add(event.originalEvent.target.value); + } + } + }; + $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); + } + } + }; + 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; + } + + + $scope.alert = (message) => { + if (message) Dialogs.showAlert({ + title: description, + message: message, + type: AlertTypes.Information, + preformatted: true, + }); + }; + + $scope.cancel = () => { + $scope.entity = {}; + $scope.action = 'select'; + Dialogs.closeWindow({ id: 'EmployeePayment-details' }); + }; + + $scope.clearErrorMessage = () => { + $scope.errorMessage = null; + }; + }); \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/index.html b/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/index.html new file mode 100644 index 0000000..f6468cd --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/index.html @@ -0,0 +1,395 @@ + + + + + + + + + + + + + + + + + {{ errorMessage }} + + + + +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_EMPLOYEE' | t }} +
+
+ + + + + More Options + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_DATE' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_VALOR' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_OURPARTYIBAN' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_COUNTERPARTYIBAN' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_COUNTERPARTYNAME' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_AMOUNT' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_CURRENCY' | t }} +
+
+ + + + + More Options + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_COMPANY' | t }} +
+
+ + + + + More Options + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_REASON' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_DESCRIPTION' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_NAME' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_UUID' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_REFERENCE' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_CREATEDAT' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_CREATEDBY' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_UPDATEDAT' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_UPDATEDBY' | t }} +
+
+ + + + +
+
+
+
+
+ + + + + + + + + + + + + + + + diff --git a/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/view.extension b/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/view.extension new file mode 100644 index 0000000..61bf3bb --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/view.extension @@ -0,0 +1,6 @@ +{ + "module": "codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/view.js", + "extensionPoint": "application-windows", + "description": "codbex-payments - Application Dialog Window", + "role": "codbex-payments.EmployeePayment.EmployeePaymentReadOnly,codbex-payments.EmployeePayment.EmployeePaymentFullAccess" +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/view.js b/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/view.js new file mode 100644 index 0000000..896d2eb --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/view.js @@ -0,0 +1,20 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const viewData = { + id: "EmployeePayment-details", + label: "EmployeePayment", + translation: { + key: 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT', + }, + path: "/services/web/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/index.html", + perspectiveName: "EmployeePayment", + roles: [ + "codbex-payments.EmployeePayment.EmployeePaymentReadOnly", + ] +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/index.html b/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/index.html new file mode 100644 index 0000000..e5d8af0 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/index.html @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + {{'codbex-payments:codbex-payments-model.defaults.items' | t}} + + + + + + + + + + + + + + + + + + + + + + + {{next.Date | date: "dd/MMM/yyyy"}} | + {{next.Valor | date: "dd/MMM/yyyy"}} | + {{next.OurPartyIBAN}} | + {{next.CounterpartyIBAN}} | + {{next.CounterpartyName}} | + {{next.Amount}} | + {{optionsCurrencyValue(next.Currency)}} | + {{optionsCompanyValue(next.Company)}} | + {{next.Reason}} | + {{next.Description}} | + {{next.Name}} | + {{next.UUID}} | + {{next.Reference}} | + {{next.CreatedAt}} | + {{next.CreatedBy}} | + {{next.UpdatedAt}} | + {{next.UpdatedBy}} + + + + + + + {{ 'codbex-payments:codbex-payments-model.defaults.loadMore' | t }} + + + + + + diff --git a/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/main-details/controller.js b/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/main-details/controller.js new file mode 100644 index 0000000..3542415 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/main-details/controller.js @@ -0,0 +1,536 @@ +angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) + .config(["EntityServiceProvider", (EntityServiceProvider) => { + EntityServiceProvider.baseUrl = '/services/java/codbex-payments/gen/codbex_payments/api/employeepayment/EmployeePaymentController'; + }]) + .controller('PageController', ($scope, $http, Extensions, LocaleService, EntityService) => { + const Dialogs = new DialogHub(); + const Notifications = new NotificationHub(); + let description = 'Description'; + let propertySuccessfullyCreated = 'EmployeePayment successfully created'; + let propertySuccessfullyUpdated = 'EmployeePayment successfully updated'; + $scope.entity = {}; + $scope.forms = { + details: {}, + }; + $scope.formHeaders = { + select: 'EmployeePayment Details', + create: 'Create EmployeePayment', + update: 'Update EmployeePayment' + }; + $scope.action = 'select'; + + LocaleService.onInit(() => { + description = LocaleService.t('codbex-payments:codbex-payments-model.defaults.description'); + $scope.formHeaders.select = LocaleService.t('codbex-payments:codbex-payments-model.defaults.formHeadSelect', { name: '$t(codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT)' }); + $scope.formHeaders.create = LocaleService.t('codbex-payments:codbex-payments-model.defaults.formHeadCreate', { name: '$t(codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT)' }); + $scope.formHeaders.update = LocaleService.t('codbex-payments:codbex-payments-model.defaults.formHeadUpdate', { name: '$t(codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT)' }); + propertySuccessfullyCreated = LocaleService.t('codbex-payments:codbex-payments-model.messages.propertySuccessfullyCreated', { name: '$t(codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT)' }); + propertySuccessfullyUpdated = LocaleService.t('codbex-payments:codbex-payments-model.messages.propertySuccessfullyUpdated', { name: '$t(codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT)' }); + }); + + //-----------------Custom Actions-------------------// + Extensions.getWindows(['codbex-payments-custom-action']).then((response) => { + $scope.entityActions = response.data.filter(e => e.perspective === 'EmployeePayment' && e.view === 'EmployeePayment' && e.type === 'entity'); + }); + + $scope.triggerEntityAction = (action) => { + Dialogs.showWindow({ + hasHeader: true, + title: LocaleService.t(action.translation.key, action.translation.options, action.label), + path: action.path, + params: { + id: $scope.entity.Id + }, + closeButton: true + }); + }; + //-----------------Custom Actions-------------------// + + //-----------------Events-------------------// + Dialogs.addMessageListener({ topic: 'codbex-payments.EmployeePayment.EmployeePayment.clearDetails', handler: () => { + $scope.$evalAsync(() => { + $scope.entity = {}; + $scope.optionsEmployee = []; + $scope.optionsCurrency = []; + $scope.optionsCompany = []; + $scope.action = 'select'; + }); + }}); + Dialogs.addMessageListener({ topic: 'codbex-payments.EmployeePayment.EmployeePayment.entitySelected', handler: (data) => { + $scope.$evalAsync(() => { + if (data.entity.Date) { + data.entity.Date = new Date(data.entity.Date); + } + if (data.entity.Valor) { + data.entity.Valor = new Date(data.entity.Valor); + } + if (data.entity.CreatedAt) { + data.entity.CreatedAt = new Date(data.entity.CreatedAt); + } + if (data.entity.UpdatedAt) { + data.entity.UpdatedAt = new Date(data.entity.UpdatedAt); + } + $scope.entity = data.entity; + $scope.optionsEmployee = data.optionsEmployee; + $scope.optionsCurrency = data.optionsCurrency; + $scope.optionsCompany = data.optionsCompany; + $scope.action = 'select'; + }); + }}); + Dialogs.addMessageListener({ topic: 'codbex-payments.EmployeePayment.EmployeePayment.createEntity', handler: (data) => { + $scope.$evalAsync(() => { + $scope.entity = {}; + $scope.optionsEmployee = data.optionsEmployee; + $scope.optionsCurrency = data.optionsCurrency; + $scope.optionsCompany = data.optionsCompany; + $scope.action = 'create'; + }); + }}); + Dialogs.addMessageListener({ topic: 'codbex-payments.EmployeePayment.EmployeePayment.updateEntity', handler: (data) => { + $scope.$evalAsync(() => { + if (data.entity.Date) { + data.entity.Date = new Date(data.entity.Date); + } + if (data.entity.Valor) { + data.entity.Valor = new Date(data.entity.Valor); + } + if (data.entity.CreatedAt) { + data.entity.CreatedAt = new Date(data.entity.CreatedAt); + } + if (data.entity.UpdatedAt) { + data.entity.UpdatedAt = new Date(data.entity.UpdatedAt); + } + $scope.entity = data.entity; + $scope.optionsEmployee = data.optionsEmployee; + $scope.optionsCurrency = data.optionsCurrency; + $scope.optionsCompany = data.optionsCompany; + $scope.action = 'update'; + }); + }}); + + $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-------------------// + + $scope.create = () => { + EntityService.create($scope.entity).then((response) => { + Dialogs.postMessage({ topic: 'codbex-payments.EmployeePayment.EmployeePayment.entityCreated', data: response.data }); + Dialogs.postMessage({ topic: 'codbex-payments.EmployeePayment.EmployeePayment.clearDetails' , data: response.data }); + Notifications.show({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT'), + description: propertySuccessfullyCreated, + type: 'positive' + }); + }, (error) => { + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT'), + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToCreate', { name: '$t(codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT)', message: message }), + type: AlertTypes.Error + }); + console.error('EntityService:', error); + }); + }; + + $scope.update = () => { + EntityService.update($scope.entity.Id, $scope.entity).then((response) => { + Dialogs.postMessage({ topic: 'codbex-payments.EmployeePayment.EmployeePayment.entityUpdated', data: response.data }); + Dialogs.postMessage({ topic: 'codbex-payments.EmployeePayment.EmployeePayment.clearDetails', data: response.data }); + Notifications.show({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT'), + description: propertySuccessfullyUpdated, + type: 'positive' + }); + }, (error) => { + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT'), + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToCreate', { name: '$t(codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT)', message: message }), + type: AlertTypes.Error + }); + console.error('EntityService:', error); + }); + }; + + $scope.cancel = () => { + Dialogs.triggerEvent('codbex-payments.EmployeePayment.EmployeePayment.clearDetails'); + }; + + //-----------------Dialogs-------------------// + $scope.alert = (message) => { + if (message) Dialogs.showAlert({ + title: description, + message: message, + type: AlertTypes.Information, + preformatted: true, + }); + }; + + $scope.createEmployee = () => { + Dialogs.showWindow({ + id: 'Employee-details', + params: { + action: 'create', + entity: {}, + }, + closeButton: false + }); + }; + $scope.createCurrency = () => { + Dialogs.showWindow({ + id: 'Currency-details', + params: { + action: 'create', + entity: {}, + }, + closeButton: false + }); + }; + $scope.createCompany = () => { + Dialogs.showWindow({ + id: 'Company-details', + params: { + action: 'create', + entity: {}, + }, + closeButton: false + }); + }; + + //-----------------Dialogs-------------------// + + + + //----------------Dropdowns-----------------// + + const lastSearchValuesEmployee = new Set(); + const allValuesEmployee = []; + let loadMoreOptionsEmployeeCounter = 0; + $scope.optionsEmployeeLoading = false; + $scope.optionsEmployeeHasMore = true; + + $scope.loadMoreOptionsEmployee = () => { + const limit = 20; + $scope.optionsEmployeeLoading = true; + $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 => ({ + value: e.Id, + text: e.Name + })); + const newValues = []; + resultValues.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesEmployee.push(e); + newValues.push(e); + } + }); + newValues.forEach(e => { + if (!$scope.optionsEmployee.find(o => o.value === e.value)) { + $scope.optionsEmployee.push(e); + } + }) + $scope.optionsEmployeeHasMore = resultValues.length > 0; + $scope.optionsEmployeeLoading = false; + }, (error) => { + $scope.optionsEmployeeLoading = false; + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Employee', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }; + + $scope.onOptionsEmployeeChange = (event) => { + if (allValuesEmployee.length === 0) { + allValuesEmployee.push(...$scope.optionsEmployee); + } + if (event.originalEvent.target.value === '') { + allValuesEmployee.sort((a, b) => a.text.localeCompare(b.text)); + $scope.optionsEmployee = allValuesEmployee; + $scope.optionsEmployeeHasMore = true; + } else if (isText(event.which)) { + $scope.optionsEmployeeHasMore = false; + let cacheHit = false; + Array.from(lastSearchValuesEmployee).forEach(e => { + if (event.originalEvent.target.value.startsWith(e)) { + cacheHit = true; + } + }) + if (!cacheHit) { + $http.post('/services/java/codbex-employees/gen/codbex_employees/api/employees/EmployeeController/search', { + conditions: [ + { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } + ] + }).then((response) => { + const optionValues = allValuesEmployee.map(e => e.value); + const searchResult = response.data.map(e => ({ + value: e.Id, + text: e.Name + })); + searchResult.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesEmployee.push(e); + } + }); + $scope.optionsEmployee = allValuesEmployee.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: 'Employee', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + lastSearchValuesEmployee.add(event.originalEvent.target.value); + } + } + }; + + $scope.refreshEmployee = () => { + $scope.optionsEmployee = []; + $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 + })); + allValuesEmployee.length === 0; + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Employee', + 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; + $scope.optionsCurrencyLoading = false; + $scope.optionsCurrencyHasMore = true; + + $scope.loadMoreOptionsCurrency = () => { + const limit = 20; + $scope.optionsCurrencyLoading = true; + $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.Code + })); + const newValues = []; + resultValues.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesCurrency.push(e); + newValues.push(e); + } + }); + newValues.forEach(e => { + if (!$scope.optionsCurrency.find(o => o.value === e.value)) { + $scope.optionsCurrency.push(e); + } + }) + $scope.optionsCurrencyHasMore = resultValues.length > 0; + $scope.optionsCurrencyLoading = false; + }, (error) => { + $scope.optionsCurrencyLoading = false; + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Currency', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }; + + $scope.onOptionsCurrencyChange = (event) => { + if (allValuesCurrency.length === 0) { + allValuesCurrency.push(...$scope.optionsCurrency); + } + if (event.originalEvent.target.value === '') { + allValuesCurrency.sort((a, b) => a.text.localeCompare(b.text)); + $scope.optionsCurrency = allValuesCurrency; + $scope.optionsCurrencyHasMore = true; + } else if (isText(event.which)) { + $scope.optionsCurrencyHasMore = false; + let cacheHit = false; + Array.from(lastSearchValuesCurrency).forEach(e => { + if (event.originalEvent.target.value.startsWith(e)) { + cacheHit = true; + } + }) + if (!cacheHit) { + $http.post('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController/search', { + conditions: [ + { 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.Code + })); + searchResult.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesCurrency.push(e); + } + }); + $scope.optionsCurrency = allValuesCurrency.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: 'Currency', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + lastSearchValuesCurrency.add(event.originalEvent.target.value); + } + } + }; + + $scope.refreshCurrency = () => { + $scope.optionsCurrency = []; + $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 + })); + allValuesCurrency.length === 0; + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Currency', + 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.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 + }); + }); + }; + + 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; + } + + //----------------Dropdowns-----------------// + }); \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/main-details/index.html b/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/main-details/index.html new file mode 100644 index 0000000..1b151da --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/main-details/index.html @@ -0,0 +1,412 @@ + + + + + + + + + + + + + + + + + + + +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_EMPLOYEE' | t }} +
+
+ + + + + More Options + + +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_DATE' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_VALOR' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_OURPARTYIBAN' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_COUNTERPARTYIBAN' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_COUNTERPARTYNAME' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_AMOUNT' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_CURRENCY' | t }} +
+
+ + + + + More Options + + +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_COMPANY' | t }} +
+
+ + + + + More Options + + +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_REASON' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_DESCRIPTION' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_NAME' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_UUID' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_REFERENCE' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_CREATEDAT' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_CREATEDBY' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_UPDATEDAT' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT_UPDATEDBY' | t }} +
+
+ + + + +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + diff --git a/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/main-details/view.extension b/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/main-details/view.extension new file mode 100644 index 0000000..c1a6ad9 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/main-details/view.extension @@ -0,0 +1,6 @@ +{ + "module": "codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/main-details/view.js", + "extensionPoint": "application-views", + "description": "codbex-payments - Application View - Main Details", + "role": "codbex-payments.EmployeePayment.EmployeePaymentReadOnly,codbex-payments.EmployeePayment.EmployeePaymentFullAccess" +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/main-details/view.js b/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/main-details/view.js new file mode 100644 index 0000000..63f1262 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/main-details/view.js @@ -0,0 +1,20 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const viewData = { + id: 'EmployeePayment-details', + label: 'EmployeePayment', + translation: { + key: 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT', + }, + region: 'center', + lazyLoad: false, + autoFocusTab: true, + path: '/services/web/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/main-details/index.html', + perspectiveName: 'EmployeePayment' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/view.extension b/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/view.extension new file mode 100644 index 0000000..d0196db --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/view.extension @@ -0,0 +1,6 @@ +{ + "module": "codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/view.js", + "extensionPoint": "application-views", + "description": "codbex-payments - Application View", + "role": "codbex-payments.EmployeePayment.EmployeePaymentReadOnly,codbex-payments.EmployeePayment.EmployeePaymentFullAccess" +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/view.js b/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/view.js new file mode 100644 index 0000000..affda03 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/view.js @@ -0,0 +1,20 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const viewData = { + id: 'EmployeePayment', + label: 'EmployeePayment', + translation: { + key: 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT', + }, + region: 'left', + lazyLoad: false, + autoFocusTab: false, + path: '/services/web/codbex-payments/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/index.html', + perspectiveName: 'EmployeePayment' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/index.html b/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/index.html new file mode 100644 index 0000000..382eb26 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/index.html @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + {{'codbex-payments:codbex-payments-model.state.busy' | t}} + + + {{'codbex-payments:codbex-payments-model.messages.error.loading' | t}} + + + + + + diff --git a/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/perspective.extension b/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/perspective.extension new file mode 100644 index 0000000..848f44d --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/perspective.extension @@ -0,0 +1,6 @@ +{ + "module": "codbex-payments/gen/codbex-payments/ui/EmployeePayment/perspective.js", + "extensionPoint": "application-perspectives", + "description": "codbex-payments - Perspective - EmployeePayment", + "role": "codbex-payments.EmployeePayment.EmployeePaymentReadOnly,codbex-payments.EmployeePayment.EmployeePaymentFullAccess" +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/perspective.js b/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/perspective.js new file mode 100644 index 0000000..7ca751c --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/perspective.js @@ -0,0 +1,19 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const perspectiveData = { + id: 'EmployeePayment', + label: 'EmployeePayment', + translation: { + key: 'codbex-payments:codbex-payments-model.t.EMPLOYEEPAYMENT', + }, + path: '/services/web/codbex-payments/gen/codbex-payments/ui/EmployeePayment/index.html', + groupId: 'salaries-navigation-group', + order: 300, + icon: '/services/web/resources/unicons/folder-check.svg' +}; +if (typeof exports !== 'undefined') { + exports.getPerspective = () => perspectiveData; +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/controller.js b/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/controller.js new file mode 100644 index 0000000..b1bb805 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/controller.js @@ -0,0 +1,341 @@ +angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) + .config(['EntityServiceProvider', (EntityServiceProvider) => { + EntityServiceProvider.baseUrl = '/services/java/codbex-payments/gen/codbex_payments/api/paymentadjustment/PaymentAdjustmentController'; + }]) + .controller('PageController', ($scope, $http, EntityService, Extensions, LocaleService, ButtonStates) => { + const Dialogs = new DialogHub(); + let translated = { + yes: 'Yes', + no: 'No', + deleteConfirm: 'Are you sure you want to delete PaymentAdjustment? This action cannot be undone.', + deleteTitle: 'Delete PaymentAdjustment?' + }; + + LocaleService.onInit(() => { + translated.yes = LocaleService.t('codbex-payments:codbex-payments-model.defaults.yes'); + translated.no = LocaleService.t('codbex-payments:codbex-payments-model.defaults.no'); + translated.deleteTitle = LocaleService.t('codbex-payments:codbex-payments-model.defaults.deleteTitle', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT)' }); + translated.deleteConfirm = LocaleService.t('codbex-payments:codbex-payments-model.messages.deleteConfirm', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT)' }); + }); + $scope.dataPage = 1; + $scope.dataCount = 0; + $scope.dataOffset = 0; + $scope.dataLimit = 10; + $scope.action = 'select'; + + //-----------------Custom Actions-------------------// + Extensions.getWindows(['codbex-payments-custom-action']).then((response) => { + $scope.pageActions = response.data.filter(e => e.perspective === 'PaymentAdjustment' && e.view === 'PaymentAdjustment' && (e.type === 'page' || e.type === undefined)); + }); + + $scope.triggerPageAction = (action) => { + Dialogs.showWindow({ + hasHeader: true, + title: LocaleService.t(action.translation.key, action.translation.options, action.label), + path: action.path, + maxWidth: action.maxWidth, + maxHeight: action.maxHeight, + closeButton: true + }); + }; + //-----------------Custom Actions-------------------// + + function refreshData() { + $scope.dataReset = true; + $scope.dataPage--; + } + + function resetPagination() { + $scope.dataReset = true; + $scope.dataPage = 1; + $scope.dataCount = 0; + $scope.dataLimit = 10; + } + + //-----------------Events-------------------// + Dialogs.addMessageListener({ topic: 'codbex-payments.PaymentAdjustment.PaymentAdjustment.clearDetails', handler: () => { + $scope.$evalAsync(() => { + $scope.selectedEntity = null; + $scope.action = 'select'; + }); + }}); + Dialogs.addMessageListener({ topic: 'codbex-payments.PaymentAdjustment.PaymentAdjustment.entityCreated', handler: () => { + refreshData(); + $scope.loadPage($scope.dataPage, $scope.filter); + }}); + Dialogs.addMessageListener({ topic: 'codbex-payments.PaymentAdjustment.PaymentAdjustment.entityUpdated', handler: () => { + refreshData(); + $scope.loadPage($scope.dataPage, $scope.filter); + }}); + Dialogs.addMessageListener({ topic: 'codbex-payments.PaymentAdjustment.PaymentAdjustment.entitySearch', handler: (data) => { + resetPagination(); + $scope.filter = data.filter; + $scope.filterEntity = data.entity; + $scope.loadPage($scope.dataPage, $scope.filter); + }}); + //-----------------Events-------------------// + + $scope.loadPage = (pageNumber, filter) => { + if (!filter && $scope.filter) { + filter = $scope.filter; + } + if (!filter) { + filter = { + $filter: {} + }; + } + $scope.selectedEntity = null; + EntityService.count(filter).then((resp) => { + if (resp.data) { + $scope.dataCount = resp.data.count; + } + $scope.dataPages = Math.ceil($scope.dataCount / $scope.dataLimit); + filter.$filter.offset = ($scope.dataPage - 1) * $scope.dataLimit; + filter.$filter.limit = $scope.dataLimit; + if ($scope.dataReset) { + filter.$filter.offset = 0; + filter.$filter.limit = $scope.dataPage * $scope.dataLimit; + } + + EntityService.search(filter).then((response) => { + if ($scope.data == null || $scope.dataReset) { + $scope.data = []; + $scope.dataReset = false; + } + if (optionsCurrencyHasMore) { + const optionsCurrencySearchValues = Array.from(new Set(response.data.map(e => e.Currency))); + if (optionsCurrencySearchValues.length > 0) { + $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.Code + }))); + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Currency', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + } + } + 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 + }); + }); + } + } + response.data.forEach(e => { + if (e.Date) { + e.Date = new Date(e.Date); + } + if (e.Valor) { + e.Valor = new Date(e.Valor); + } + if (e.CreatedAt) { + e.CreatedAt = new Date(e.CreatedAt); + } + if (e.UpdatedAt) { + e.UpdatedAt = new Date(e.UpdatedAt); + } + }); + + $scope.data = $scope.data.concat(response.data); + $scope.dataPage++; + }, (error) => { + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT'), + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLF', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT)', message: message }), + type: AlertTypes.Error + }); + console.error('EntityService:', error); + }); + }, (error) => { + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT'), + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToCount', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT)', message: message }), + type: AlertTypes.Error + }); + console.error('EntityService:', error); + }); + }; + $scope.loadPage($scope.dataPage, $scope.filter); + + $scope.selectEntity = (entity) => { + $scope.selectedEntity = entity; + Dialogs.postMessage({ topic: 'codbex-payments.PaymentAdjustment.PaymentAdjustment.entitySelected', data: { + entity: entity, + selectedMainEntityId: entity.Id, + optionsCurrency: $scope.optionsCurrency, + optionsCompany: $scope.optionsCompany, + }}); + }; + + $scope.createEntity = () => { + $scope.selectedEntity = null; + $scope.action = 'create'; + + Dialogs.postMessage({ topic: 'codbex-payments.PaymentAdjustment.PaymentAdjustment.createEntity', data: { + entity: {}, + optionsCurrency: $scope.optionsCurrency, + optionsCompany: $scope.optionsCompany, + }}); + }; + + $scope.updateEntity = () => { + $scope.action = 'update'; + Dialogs.postMessage({ topic: 'codbex-payments.PaymentAdjustment.PaymentAdjustment.updateEntity', data: { + entity: $scope.selectedEntity, + optionsCurrency: $scope.optionsCurrency, + optionsCompany: $scope.optionsCompany, + }}); + }; + + $scope.deleteEntity = () => { + let id = $scope.selectedEntity.Id; + Dialogs.showDialog({ + title: translated.deleteTitle, + message: translated.deleteConfirm, + buttons: [{ + id: 'delete-btn-yes', + state: ButtonStates.Emphasized, + label: translated.yes, + }, { + id: 'delete-btn-no', + label: translated.no, + }], + closeButton: false + }).then((buttonId) => { + if (buttonId === 'delete-btn-yes') { + EntityService.delete(id).then(() => { + refreshData(); + $scope.loadPage($scope.dataPage, $scope.filter); + Dialogs.triggerEvent('codbex-payments.PaymentAdjustment.PaymentAdjustment.clearDetails'); + }, (error) => { + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT'), + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToDelete', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT)', message: message }), + type: AlertTypes.Error + }); + console.error('EntityService:', error); + }); + } + }); + }; + + $scope.openFilter = () => { + Dialogs.showWindow({ + id: 'PaymentAdjustment-filter', + params: { + entity: $scope.filterEntity, + optionsCurrency: $scope.optionsCurrency, + optionsCompany: $scope.optionsCompany, + }, + }); + }; + + //----------------Dropdowns-----------------// + $scope.optionsCurrency = []; + $scope.optionsCompany = []; + + let optionsCurrencyHasMore = true; + + $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.Code + })); + optionsCurrencyHasMore = optionsCurrencyCount > $scope.optionsCurrency.length; + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Currency', + 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: 'Currency', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + let optionsCompanyHasMore = true; + + $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.Name + })); + optionsCompanyHasMore = optionsCompanyCount > $scope.optionsCompany.length; + }, (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 + }); + }); + }, (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 + }); + }); + + $scope.optionsCurrencyValue = (optionKey) => { + for (let i = 0; i < $scope.optionsCurrency.length; i++) { + if ($scope.optionsCurrency[i].value === optionKey) { + return $scope.optionsCurrency[i].text; + } + } + 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/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-filter/controller.js b/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-filter/controller.js new file mode 100644 index 0000000..f33c697 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-filter/controller.js @@ -0,0 +1,327 @@ +angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controller('PageController', ($scope, $http, ViewParameters) => { + const Dialogs = new DialogHub(); + $scope.entity = {}; + $scope.forms = { + details: {}, + }; + + let params = ViewParameters.get(); + if (Object.keys(params).length) { + if (params?.entity?.DateFrom) { + params.entity.DateFrom = new Date(params.entity.DateFrom); + } + if (params?.entity?.DateTo) { + params.entity.DateTo = new Date(params.entity.DateTo); + } + if (params?.entity?.ValorFrom) { + params.entity.ValorFrom = new Date(params.entity.ValorFrom); + } + if (params?.entity?.ValorTo) { + params.entity.ValorTo = new Date(params.entity.ValorTo); + } + if (params?.entity?.CreatedAtFrom) { + params.entity.CreatedAtFrom = new Date(params.entity.CreatedAtFrom); + } + if (params?.entity?.CreatedAtTo) { + params.entity.CreatedAtTo = new Date(params.entity.CreatedAtTo); + } + if (params?.entity?.UpdatedAtFrom) { + params.entity.UpdatedAtFrom = new Date(params.entity.UpdatedAtFrom); + } + if (params?.entity?.UpdatedAtTo) { + params.entity.UpdatedAtTo = new Date(params.entity.UpdatedAtTo); + } + $scope.entity = params.entity ?? {}; + $scope.selectedMainEntityKey = params.selectedMainEntityKey; + $scope.selectedMainEntityId = params.selectedMainEntityId; + const optionsCurrencyMap = new Map(); + params.optionsCurrency.forEach(e => optionsCurrencyMap.set(e.value, e)); + $scope.optionsCurrency = Array.from(optionsCurrencyMap.values()); + const optionsCompanyMap = new Map(); + params.optionsCompany.forEach(e => optionsCompanyMap.set(e.value, e)); + $scope.optionsCompany = Array.from(optionsCompanyMap.values()); + } + + $scope.filter = () => { + let entity = $scope.entity; + const filter = { + $filter: { + conditions: [], + sorts: [], + limit: 20, + offset: 0 + } + }; + if (entity.Id !== undefined) { + const condition = { propertyName: 'Id', operator: 'EQ', value: entity.Id }; + filter.$filter.conditions.push(condition); + } + if (entity.DateFrom) { + const condition = { propertyName: 'Date', operator: 'GE', value: entity.DateFrom }; + filter.$filter.conditions.push(condition); + } + if (entity.DateTo) { + const condition = { propertyName: 'Date', operator: 'LE', value: entity.DateTo }; + filter.$filter.conditions.push(condition); + } + if (entity.ValorFrom) { + const condition = { propertyName: 'Valor', operator: 'GE', value: entity.ValorFrom }; + filter.$filter.conditions.push(condition); + } + if (entity.ValorTo) { + const condition = { propertyName: 'Valor', operator: 'LE', value: entity.ValorTo }; + filter.$filter.conditions.push(condition); + } + if (entity.Amount !== undefined) { + const condition = { propertyName: 'Amount', operator: 'EQ', value: entity.Amount }; + filter.$filter.conditions.push(condition); + } + if (entity.Currency !== undefined) { + const condition = { propertyName: 'Currency', operator: 'EQ', value: entity.Currency }; + 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); + } + if (entity.CreatedAtFrom) { + const condition = { propertyName: 'CreatedAt', operator: 'GE', value: entity.CreatedAtFrom }; + filter.$filter.conditions.push(condition); + } + if (entity.CreatedAtTo) { + const condition = { propertyName: 'CreatedAt', operator: 'LE', value: entity.CreatedAtTo }; + filter.$filter.conditions.push(condition); + } + if (entity.CreatedBy) { + const condition = { propertyName: 'CreatedBy', operator: 'LIKE', value: `%${entity.CreatedBy}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.UpdatedAtFrom) { + const condition = { propertyName: 'UpdatedAt', operator: 'GE', value: entity.UpdatedAtFrom }; + filter.$filter.conditions.push(condition); + } + if (entity.UpdatedAtTo) { + const condition = { propertyName: 'UpdatedAt', operator: 'LE', value: entity.UpdatedAtTo }; + filter.$filter.conditions.push(condition); + } + if (entity.UpdatedBy) { + const condition = { propertyName: 'UpdatedBy', operator: 'LIKE', value: `%${entity.UpdatedBy}%` }; + filter.$filter.conditions.push(condition); + } + Dialogs.postMessage({ topic: 'codbex-payments.PaymentAdjustment.PaymentAdjustment.entitySearch', data: { + entity: entity, + filter: filter + }}); + Dialogs.triggerEvent('codbex-payments.PaymentAdjustment.PaymentAdjustment.clearDetails'); + $scope.cancel(); + }; + + $scope.resetFilter = () => { + $scope.entity = {}; + $scope.filter(); + lastSearchValuesCurrency.clear(); + allValuesCurrency.length = 0; + lastSearchValuesCompany.clear(); + allValuesCompany.length = 0; + }; + + $scope.cancel = () => { + Dialogs.closeWindow({ id: 'PaymentAdjustment-filter' }); + }; + + $scope.clearErrorMessage = () => { + $scope.errorMessage = null; + }; + + const lastSearchValuesCurrency = new Set(); + const allValuesCurrency = []; + let loadMoreOptionsCurrencyCounter = 0; + $scope.optionsCurrencyLoading = false; + $scope.optionsCurrencyHasMore = true; + + $scope.loadMoreOptionsCurrency = () => { + const limit = 20; + $scope.optionsCurrencyLoading = true; + $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.Code + })); + const newValues = []; + resultValues.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesCurrency.push(e); + newValues.push(e); + } + }); + newValues.forEach(e => { + if (!$scope.optionsCurrency.find(o => o.value === e.value)) { + $scope.optionsCurrency.push(e); + } + }) + $scope.optionsCurrencyHasMore = resultValues.length > 0; + $scope.optionsCurrencyLoading = false; + }, (error) => { + $scope.optionsCurrencyLoading = false; + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Currency', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }; + + $scope.onOptionsCurrencyChange = (event) => { + if (allValuesCurrency.length === 0) { + allValuesCurrency.push(...$scope.optionsCurrency); + } + if (event.originalEvent.target.value === '') { + allValuesCurrency.sort((a, b) => a.text.localeCompare(b.text)); + $scope.optionsCurrency = allValuesCurrency; + $scope.optionsCurrencyHasMore = true; + } else if (isText(event.which)) { + $scope.optionsCurrencyHasMore = false; + let cacheHit = false; + Array.from(lastSearchValuesCurrency).forEach(e => { + if (event.originalEvent.target.value.startsWith(e)) { + cacheHit = true; + } + }) + if (!cacheHit) { + $http.post('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController/search', { + conditions: [ + { 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.Code + })); + searchResult.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesCurrency.push(e); + } + }); + $scope.optionsCurrency = allValuesCurrency.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: 'Currency', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + lastSearchValuesCurrency.add(event.originalEvent.target.value); + } + } + }; + + 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); + } + } + }; + + 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; + } + +}); \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-filter/index.html b/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-filter/index.html new file mode 100644 index 0000000..0d6216c --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-filter/index.html @@ -0,0 +1,251 @@ + + + + + + + + + + + + + + + + {{ errorMessage }} + + + + +
+ {{ 'codbex-payments:codbex-payments-model.defaults.from' | t:{'text':'$t(codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_DATE)'} }} +
+
+ + + + +
+
+ {{ 'codbex-payments:codbex-payments-model.defaults.to' | t:{'text':'$t(codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_DATE)'} }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.defaults.from' | t:{'text':'$t(codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_VALOR)'} }} +
+
+ + + + +
+
+ {{ 'codbex-payments:codbex-payments-model.defaults.to' | t:{'text':'$t(codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_VALOR)'} }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_AMOUNT' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_CURRENCY' | t }} +
+
+ + + + + More Options + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_REASON' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_COMPANY' | t }} +
+
+ + + + + More Options + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_UUID' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_CREATEDAT' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_CREATEDBY' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_UPDATEDAT' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_UPDATEDBY' | t }} +
+
+ + + + +
+
+
+
+
+ + + + + + + + + + + + + + + + + + diff --git a/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-filter/view.extension b/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-filter/view.extension new file mode 100644 index 0000000..e60b524 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-filter/view.extension @@ -0,0 +1,6 @@ +{ + "module": "codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-filter/view.js", + "extensionPoint": "application-windows", + "description": "codbex-payments - Application Dialog Window", + "role": "codbex-payments.PaymentAdjustment.PaymentAdjustmentReadOnly,codbex-payments.PaymentAdjustment.PaymentAdjustmentFullAccess" +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-filter/view.js b/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-filter/view.js new file mode 100644 index 0000000..b3672a5 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-filter/view.js @@ -0,0 +1,20 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const viewData = { + id: 'PaymentAdjustment-filter', + label: 'PaymentAdjustment Filter', + translation: { + key: 'codbex-payments:codbex-payments-model.extName', + options: { + content: '$t(codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT) $t(codbex-payments:codbex-payments-model.defaults.filter)', + } + }, + path: '/services/web/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-filter/index.html', + perspectiveName: 'PaymentAdjustment' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-window/controller.js b/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-window/controller.js new file mode 100644 index 0000000..276c78b --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-window/controller.js @@ -0,0 +1,336 @@ +angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) + .config(['EntityServiceProvider', (EntityServiceProvider) => { + EntityServiceProvider.baseUrl = '/services/java/codbex-payments/gen/codbex_payments/api/paymentadjustment/PaymentAdjustmentController'; + }]) + .controller('PageController', ($scope, $http, ViewParameters, LocaleService, EntityService) => { + const Dialogs = new DialogHub(); + const Notifications = new NotificationHub(); + let description = 'Description'; + let propertySuccessfullyCreated = 'PaymentAdjustment successfully created'; + let propertySuccessfullyUpdated = 'PaymentAdjustment successfully updated'; + $scope.entity = {}; + $scope.forms = { + details: {}, + }; + $scope.formHeaders = { + select: 'PaymentAdjustment Details', + create: 'Create PaymentAdjustment', + update: 'Update PaymentAdjustment' + }; + $scope.action = 'select'; + + LocaleService.onInit(() => { + description = LocaleService.t('codbex-payments:codbex-payments-model.defaults.description'); + $scope.formHeaders.select = LocaleService.t('codbex-payments:codbex-payments-model.defaults.formHeadSelect', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT)' }); + $scope.formHeaders.create = LocaleService.t('codbex-payments:codbex-payments-model.defaults.formHeadCreate', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT)' }); + $scope.formHeaders.update = LocaleService.t('codbex-payments:codbex-payments-model.defaults.formHeadUpdate', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT)' }); + propertySuccessfullyCreated = LocaleService.t('codbex-payments:codbex-payments-model.messages.propertySuccessfullyCreated', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT)' }); + propertySuccessfullyUpdated = LocaleService.t('codbex-payments:codbex-payments-model.messages.propertySuccessfullyUpdated', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT)' }); + }); + + let params = ViewParameters.get(); + if (Object.keys(params).length) { + $scope.action = params.action; + if (params.entity.Date) { + params.entity.Date = new Date(params.entity.Date); + } + if (params.entity.Valor) { + params.entity.Valor = new Date(params.entity.Valor); + } + if (params.entity.CreatedAt) { + params.entity.CreatedAt = new Date(params.entity.CreatedAt); + } + if (params.entity.UpdatedAt) { + params.entity.UpdatedAt = new Date(params.entity.UpdatedAt); + } + $scope.entity = params.entity; + $scope.selectedMainEntityKey = params.selectedMainEntityKey; + $scope.selectedMainEntityId = params.selectedMainEntityId; + const optionsCurrencyMap = new Map(); + params.optionsCurrency?.forEach(e => optionsCurrencyMap.set(e.value, e)); + $scope.optionsCurrency = Array.from(optionsCurrencyMap.values()); + const optionsCompanyMap = new Map(); + params.optionsCompany?.forEach(e => optionsCompanyMap.set(e.value, e)); + $scope.optionsCompany = Array.from(optionsCompanyMap.values()); + } + + $scope.create = () => { + let entity = $scope.entity; + entity[$scope.selectedMainEntityKey] = $scope.selectedMainEntityId; + EntityService.create(entity).then((response) => { + Dialogs.postMessage({ topic: 'codbex-payments.PaymentAdjustment.PaymentAdjustment.entityCreated', data: response.data }); + Notifications.show({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT'), + description: propertySuccessfullyCreated, + type: 'positive' + }); + $scope.cancel(); + }, (error) => { + const message = error.data ? error.data.message : ''; + $scope.$evalAsync(() => { + $scope.errorMessage = LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToCreate', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT)', message: message }); + }); + console.error('EntityService:', error); + }); + }; + + $scope.update = () => { + let id = $scope.entity.Id; + let entity = $scope.entity; + entity[$scope.selectedMainEntityKey] = $scope.selectedMainEntityId; + EntityService.update(id, entity).then((response) => { + Dialogs.postMessage({ topic: 'codbex-payments.PaymentAdjustment.PaymentAdjustment.entityUpdated', data: response.data }); + $scope.cancel(); + Notifications.show({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT'), + description: propertySuccessfullyUpdated, + type: 'positive' + }); + }, (error) => { + const message = error.data ? error.data.message : ''; + $scope.$evalAsync(() => { + $scope.errorMessage = LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToUpdate', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT)', message: message }); + }); + console.error('EntityService:', error); + }); + }; + + $scope.serviceCurrency = '/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController'; + + $scope.optionsCurrency = []; + + $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 + })); + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Currency', + 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; + $scope.optionsCurrencyLoading = false; + $scope.optionsCurrencyHasMore = true; + + $scope.loadMoreOptionsCurrency = () => { + const limit = 20; + $scope.optionsCurrencyLoading = true; + $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.Code + })); + const newValues = []; + resultValues.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesCurrency.push(e); + newValues.push(e); + } + }); + newValues.forEach(e => { + if (!$scope.optionsCurrency.find(o => o.value === e.value)) { + $scope.optionsCurrency.push(e); + } + }) + $scope.optionsCurrencyHasMore = resultValues.length > 0; + $scope.optionsCurrencyLoading = false; + }, (error) => { + $scope.optionsCurrencyLoading = false; + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Currency', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }; + + $scope.onOptionsCurrencyChange = (event) => { + if (allValuesCurrency.length === 0) { + allValuesCurrency.push(...$scope.optionsCurrency); + } + if (event.originalEvent.target.value === '') { + allValuesCurrency.sort((a, b) => a.text.localeCompare(b.text)); + $scope.optionsCurrency = allValuesCurrency; + $scope.optionsCurrencyHasMore = true; + } else if (isText(event.which)) { + $scope.optionsCurrencyHasMore = false; + let cacheHit = false; + Array.from(lastSearchValuesCurrency).forEach(e => { + if (event.originalEvent.target.value.startsWith(e)) { + cacheHit = true; + } + }) + if (!cacheHit) { + $http.post('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController/search', { + conditions: [ + { 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.Code + })); + searchResult.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesCurrency.push(e); + } + }); + $scope.optionsCurrency = allValuesCurrency.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: 'Currency', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + lastSearchValuesCurrency.add(event.originalEvent.target.value); + } + } + }; + $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); + } + } + }; + 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; + } + + + $scope.alert = (message) => { + if (message) Dialogs.showAlert({ + title: description, + message: message, + type: AlertTypes.Information, + preformatted: true, + }); + }; + + $scope.cancel = () => { + $scope.entity = {}; + $scope.action = 'select'; + Dialogs.closeWindow({ id: 'PaymentAdjustment-details' }); + }; + + $scope.clearErrorMessage = () => { + $scope.errorMessage = null; + }; + }); \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-window/index.html b/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-window/index.html new file mode 100644 index 0000000..f523853 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-window/index.html @@ -0,0 +1,251 @@ + + + + + + + + + + + + + + + + + {{ errorMessage }} + + + + +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_DATE' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_VALOR' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_AMOUNT' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_CURRENCY' | t }} +
+
+ + + + + More Options + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_REASON' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_COMPANY' | t }} +
+
+ + + + + More Options + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_UUID' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_CREATEDAT' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_CREATEDBY' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_UPDATEDAT' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_UPDATEDBY' | t }} +
+
+ + + + +
+
+
+
+
+ + + + + + + + + + + + + + + + diff --git a/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-window/view.extension b/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-window/view.extension new file mode 100644 index 0000000..ca55459 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-window/view.extension @@ -0,0 +1,6 @@ +{ + "module": "codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-window/view.js", + "extensionPoint": "application-windows", + "description": "codbex-payments - Application Dialog Window", + "role": "codbex-payments.PaymentAdjustment.PaymentAdjustmentReadOnly,codbex-payments.PaymentAdjustment.PaymentAdjustmentFullAccess" +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-window/view.js b/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-window/view.js new file mode 100644 index 0000000..3e02862 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-window/view.js @@ -0,0 +1,20 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const viewData = { + id: "PaymentAdjustment-details", + label: "PaymentAdjustment", + translation: { + key: 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT', + }, + path: "/services/web/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-window/index.html", + perspectiveName: "PaymentAdjustment", + roles: [ + "codbex-payments.PaymentAdjustment.PaymentAdjustmentReadOnly", + ] +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/index.html b/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/index.html new file mode 100644 index 0000000..00b2ed8 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/index.html @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + {{'codbex-payments:codbex-payments-model.defaults.items' | t}} + + + + + + + + + + + + + + + + + + + + + + + {{next.Valor | date: "dd/MMM/yyyy"}} | + {{next.Amount}} | + {{optionsCurrencyValue(next.Currency)}} | + {{next.Reason}} | + {{optionsCompanyValue(next.Company)}} | + {{next.UUID}} | + {{next.CreatedAt}} | + {{next.CreatedBy}} | + {{next.UpdatedAt}} | + {{next.UpdatedBy}} + + + + + + + {{ 'codbex-payments:codbex-payments-model.defaults.loadMore' | t }} + + + + + + diff --git a/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/main-details/controller.js b/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/main-details/controller.js new file mode 100644 index 0000000..a45011d --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/main-details/controller.js @@ -0,0 +1,414 @@ +angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) + .config(["EntityServiceProvider", (EntityServiceProvider) => { + EntityServiceProvider.baseUrl = '/services/java/codbex-payments/gen/codbex_payments/api/paymentadjustment/PaymentAdjustmentController'; + }]) + .controller('PageController', ($scope, $http, Extensions, LocaleService, EntityService) => { + const Dialogs = new DialogHub(); + const Notifications = new NotificationHub(); + let description = 'Description'; + let propertySuccessfullyCreated = 'PaymentAdjustment successfully created'; + let propertySuccessfullyUpdated = 'PaymentAdjustment successfully updated'; + $scope.entity = {}; + $scope.forms = { + details: {}, + }; + $scope.formHeaders = { + select: 'PaymentAdjustment Details', + create: 'Create PaymentAdjustment', + update: 'Update PaymentAdjustment' + }; + $scope.action = 'select'; + + LocaleService.onInit(() => { + description = LocaleService.t('codbex-payments:codbex-payments-model.defaults.description'); + $scope.formHeaders.select = LocaleService.t('codbex-payments:codbex-payments-model.defaults.formHeadSelect', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT)' }); + $scope.formHeaders.create = LocaleService.t('codbex-payments:codbex-payments-model.defaults.formHeadCreate', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT)' }); + $scope.formHeaders.update = LocaleService.t('codbex-payments:codbex-payments-model.defaults.formHeadUpdate', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT)' }); + propertySuccessfullyCreated = LocaleService.t('codbex-payments:codbex-payments-model.messages.propertySuccessfullyCreated', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT)' }); + propertySuccessfullyUpdated = LocaleService.t('codbex-payments:codbex-payments-model.messages.propertySuccessfullyUpdated', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT)' }); + }); + + //-----------------Custom Actions-------------------// + Extensions.getWindows(['codbex-payments-custom-action']).then((response) => { + $scope.entityActions = response.data.filter(e => e.perspective === 'PaymentAdjustment' && e.view === 'PaymentAdjustment' && e.type === 'entity'); + }); + + $scope.triggerEntityAction = (action) => { + Dialogs.showWindow({ + hasHeader: true, + title: LocaleService.t(action.translation.key, action.translation.options, action.label), + path: action.path, + params: { + id: $scope.entity.Id + }, + closeButton: true + }); + }; + //-----------------Custom Actions-------------------// + + //-----------------Events-------------------// + Dialogs.addMessageListener({ topic: 'codbex-payments.PaymentAdjustment.PaymentAdjustment.clearDetails', handler: () => { + $scope.$evalAsync(() => { + $scope.entity = {}; + $scope.optionsCurrency = []; + $scope.optionsCompany = []; + $scope.action = 'select'; + }); + }}); + Dialogs.addMessageListener({ topic: 'codbex-payments.PaymentAdjustment.PaymentAdjustment.entitySelected', handler: (data) => { + $scope.$evalAsync(() => { + if (data.entity.Date) { + data.entity.Date = new Date(data.entity.Date); + } + if (data.entity.Valor) { + data.entity.Valor = new Date(data.entity.Valor); + } + if (data.entity.CreatedAt) { + data.entity.CreatedAt = new Date(data.entity.CreatedAt); + } + if (data.entity.UpdatedAt) { + data.entity.UpdatedAt = new Date(data.entity.UpdatedAt); + } + $scope.entity = data.entity; + $scope.optionsCurrency = data.optionsCurrency; + $scope.optionsCompany = data.optionsCompany; + $scope.action = 'select'; + }); + }}); + Dialogs.addMessageListener({ topic: 'codbex-payments.PaymentAdjustment.PaymentAdjustment.createEntity', handler: (data) => { + $scope.$evalAsync(() => { + $scope.entity = {}; + $scope.optionsCurrency = data.optionsCurrency; + $scope.optionsCompany = data.optionsCompany; + $scope.action = 'create'; + }); + }}); + Dialogs.addMessageListener({ topic: 'codbex-payments.PaymentAdjustment.PaymentAdjustment.updateEntity', handler: (data) => { + $scope.$evalAsync(() => { + if (data.entity.Date) { + data.entity.Date = new Date(data.entity.Date); + } + if (data.entity.Valor) { + data.entity.Valor = new Date(data.entity.Valor); + } + if (data.entity.CreatedAt) { + data.entity.CreatedAt = new Date(data.entity.CreatedAt); + } + if (data.entity.UpdatedAt) { + data.entity.UpdatedAt = new Date(data.entity.UpdatedAt); + } + $scope.entity = data.entity; + $scope.optionsCurrency = data.optionsCurrency; + $scope.optionsCompany = data.optionsCompany; + $scope.action = 'update'; + }); + }}); + + $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-------------------// + + $scope.create = () => { + EntityService.create($scope.entity).then((response) => { + Dialogs.postMessage({ topic: 'codbex-payments.PaymentAdjustment.PaymentAdjustment.entityCreated', data: response.data }); + Dialogs.postMessage({ topic: 'codbex-payments.PaymentAdjustment.PaymentAdjustment.clearDetails' , data: response.data }); + Notifications.show({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT'), + description: propertySuccessfullyCreated, + type: 'positive' + }); + }, (error) => { + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT'), + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToCreate', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT)', message: message }), + type: AlertTypes.Error + }); + console.error('EntityService:', error); + }); + }; + + $scope.update = () => { + EntityService.update($scope.entity.Id, $scope.entity).then((response) => { + Dialogs.postMessage({ topic: 'codbex-payments.PaymentAdjustment.PaymentAdjustment.entityUpdated', data: response.data }); + Dialogs.postMessage({ topic: 'codbex-payments.PaymentAdjustment.PaymentAdjustment.clearDetails', data: response.data }); + Notifications.show({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT'), + description: propertySuccessfullyUpdated, + type: 'positive' + }); + }, (error) => { + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT'), + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToCreate', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT)', message: message }), + type: AlertTypes.Error + }); + console.error('EntityService:', error); + }); + }; + + $scope.cancel = () => { + Dialogs.triggerEvent('codbex-payments.PaymentAdjustment.PaymentAdjustment.clearDetails'); + }; + + //-----------------Dialogs-------------------// + $scope.alert = (message) => { + if (message) Dialogs.showAlert({ + title: description, + message: message, + type: AlertTypes.Information, + preformatted: true, + }); + }; + + $scope.createCurrency = () => { + Dialogs.showWindow({ + id: 'Currency-details', + params: { + action: 'create', + entity: {}, + }, + closeButton: false + }); + }; + $scope.createCompany = () => { + Dialogs.showWindow({ + id: 'Company-details', + params: { + action: 'create', + entity: {}, + }, + closeButton: false + }); + }; + + //-----------------Dialogs-------------------// + + + + //----------------Dropdowns-----------------// + + const lastSearchValuesCurrency = new Set(); + const allValuesCurrency = []; + let loadMoreOptionsCurrencyCounter = 0; + $scope.optionsCurrencyLoading = false; + $scope.optionsCurrencyHasMore = true; + + $scope.loadMoreOptionsCurrency = () => { + const limit = 20; + $scope.optionsCurrencyLoading = true; + $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.Code + })); + const newValues = []; + resultValues.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesCurrency.push(e); + newValues.push(e); + } + }); + newValues.forEach(e => { + if (!$scope.optionsCurrency.find(o => o.value === e.value)) { + $scope.optionsCurrency.push(e); + } + }) + $scope.optionsCurrencyHasMore = resultValues.length > 0; + $scope.optionsCurrencyLoading = false; + }, (error) => { + $scope.optionsCurrencyLoading = false; + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Currency', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }; + + $scope.onOptionsCurrencyChange = (event) => { + if (allValuesCurrency.length === 0) { + allValuesCurrency.push(...$scope.optionsCurrency); + } + if (event.originalEvent.target.value === '') { + allValuesCurrency.sort((a, b) => a.text.localeCompare(b.text)); + $scope.optionsCurrency = allValuesCurrency; + $scope.optionsCurrencyHasMore = true; + } else if (isText(event.which)) { + $scope.optionsCurrencyHasMore = false; + let cacheHit = false; + Array.from(lastSearchValuesCurrency).forEach(e => { + if (event.originalEvent.target.value.startsWith(e)) { + cacheHit = true; + } + }) + if (!cacheHit) { + $http.post('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController/search', { + conditions: [ + { 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.Code + })); + searchResult.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesCurrency.push(e); + } + }); + $scope.optionsCurrency = allValuesCurrency.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: 'Currency', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + lastSearchValuesCurrency.add(event.originalEvent.target.value); + } + } + }; + + $scope.refreshCurrency = () => { + $scope.optionsCurrency = []; + $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 + })); + allValuesCurrency.length === 0; + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Currency', + 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.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 + }); + }); + }; + + 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; + } + + //----------------Dropdowns-----------------// + }); \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/main-details/index.html b/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/main-details/index.html new file mode 100644 index 0000000..12d70f2 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/main-details/index.html @@ -0,0 +1,264 @@ + + + + + + + + + + + + + + + + + + + +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_DATE' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_VALOR' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_AMOUNT' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_CURRENCY' | t }} +
+
+ + + + + More Options + + +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_REASON' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_COMPANY' | t }} +
+
+ + + + + More Options + + +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_UUID' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_CREATEDAT' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_CREATEDBY' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_UPDATEDAT' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT_UPDATEDBY' | t }} +
+
+ + + + +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + diff --git a/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/main-details/view.extension b/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/main-details/view.extension new file mode 100644 index 0000000..43f66da --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/main-details/view.extension @@ -0,0 +1,6 @@ +{ + "module": "codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/main-details/view.js", + "extensionPoint": "application-views", + "description": "codbex-payments - Application View - Main Details", + "role": "codbex-payments.PaymentAdjustment.PaymentAdjustmentReadOnly,codbex-payments.PaymentAdjustment.PaymentAdjustmentFullAccess" +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/main-details/view.js b/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/main-details/view.js new file mode 100644 index 0000000..22cd46f --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/main-details/view.js @@ -0,0 +1,20 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const viewData = { + id: 'PaymentAdjustment-details', + label: 'PaymentAdjustment', + translation: { + key: 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT', + }, + region: 'center', + lazyLoad: false, + autoFocusTab: true, + path: '/services/web/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/main-details/index.html', + perspectiveName: 'PaymentAdjustment' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/view.extension b/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/view.extension new file mode 100644 index 0000000..6fb04ab --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/view.extension @@ -0,0 +1,6 @@ +{ + "module": "codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/view.js", + "extensionPoint": "application-views", + "description": "codbex-payments - Application View", + "role": "codbex-payments.PaymentAdjustment.PaymentAdjustmentReadOnly,codbex-payments.PaymentAdjustment.PaymentAdjustmentFullAccess" +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/view.js b/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/view.js new file mode 100644 index 0000000..842aebc --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/view.js @@ -0,0 +1,20 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const viewData = { + id: 'PaymentAdjustment', + label: 'PaymentAdjustment', + translation: { + key: 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT', + }, + region: 'left', + lazyLoad: false, + autoFocusTab: false, + path: '/services/web/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/index.html', + perspectiveName: 'PaymentAdjustment' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/index.html b/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/index.html new file mode 100644 index 0000000..382eb26 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/index.html @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + {{'codbex-payments:codbex-payments-model.state.busy' | t}} + + + {{'codbex-payments:codbex-payments-model.messages.error.loading' | t}} + + + + + + diff --git a/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/perspective.extension b/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/perspective.extension new file mode 100644 index 0000000..807e626 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/perspective.extension @@ -0,0 +1,6 @@ +{ + "module": "codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/perspective.js", + "extensionPoint": "application-perspectives", + "description": "codbex-payments - Perspective - PaymentAdjustment", + "role": "codbex-payments.PaymentAdjustment.PaymentAdjustmentReadOnly,codbex-payments.PaymentAdjustment.PaymentAdjustmentFullAccess" +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/perspective.js b/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/perspective.js new file mode 100644 index 0000000..6c2cff1 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/perspective.js @@ -0,0 +1,19 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const perspectiveData = { + id: 'PaymentAdjustment', + label: 'PaymentAdjustment', + translation: { + key: 'codbex-payments:codbex-payments-model.t.PAYMENTADJUSTMENT', + }, + path: '/services/web/codbex-payments/gen/codbex-payments/ui/PaymentAdjustment/index.html', + groupId: 'sales-navigation-group', + order: 700, + icon: '/services/web/resources/unicons/paypal.svg' +}; +if (typeof exports !== 'undefined') { + exports.getPerspective = () => perspectiveData; +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/controller.js b/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/controller.js new file mode 100644 index 0000000..8450af7 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/controller.js @@ -0,0 +1,472 @@ +angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) + .config(['EntityServiceProvider', (EntityServiceProvider) => { + EntityServiceProvider.baseUrl = '/services/java/codbex-payments/gen/codbex_payments/api/paymentrecord/PaymentRecordController'; + }]) + .controller('PageController', ($scope, $http, EntityService, Extensions, LocaleService, ButtonStates) => { + const Dialogs = new DialogHub(); + let translated = { + yes: 'Yes', + no: 'No', + deleteConfirm: 'Are you sure you want to delete PaymentRecord? This action cannot be undone.', + deleteTitle: 'Delete PaymentRecord?' + }; + + LocaleService.onInit(() => { + translated.yes = LocaleService.t('codbex-payments:codbex-payments-model.defaults.yes'); + translated.no = LocaleService.t('codbex-payments:codbex-payments-model.defaults.no'); + translated.deleteTitle = LocaleService.t('codbex-payments:codbex-payments-model.defaults.deleteTitle', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTRECORD)' }); + translated.deleteConfirm = LocaleService.t('codbex-payments:codbex-payments-model.messages.deleteConfirm', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTRECORD)' }); + }); + $scope.dataPage = 1; + $scope.dataCount = 0; + $scope.dataOffset = 0; + $scope.dataLimit = 10; + $scope.action = 'select'; + + //-----------------Custom Actions-------------------// + Extensions.getWindows(['codbex-payments-custom-action']).then((response) => { + $scope.pageActions = response.data.filter(e => e.perspective === 'PaymentRecord' && e.view === 'PaymentRecord' && (e.type === 'page' || e.type === undefined)); + }); + + $scope.triggerPageAction = (action) => { + Dialogs.showWindow({ + hasHeader: true, + title: LocaleService.t(action.translation.key, action.translation.options, action.label), + path: action.path, + maxWidth: action.maxWidth, + maxHeight: action.maxHeight, + closeButton: true + }); + }; + //-----------------Custom Actions-------------------// + + function refreshData() { + $scope.dataReset = true; + $scope.dataPage--; + } + + function resetPagination() { + $scope.dataReset = true; + $scope.dataPage = 1; + $scope.dataCount = 0; + $scope.dataLimit = 10; + } + + //-----------------Events-------------------// + Dialogs.addMessageListener({ topic: 'codbex-payments.PaymentRecord.PaymentRecord.clearDetails', handler: () => { + $scope.$evalAsync(() => { + $scope.selectedEntity = null; + $scope.action = 'select'; + }); + }}); + Dialogs.addMessageListener({ topic: 'codbex-payments.PaymentRecord.PaymentRecord.entityCreated', handler: () => { + refreshData(); + $scope.loadPage($scope.dataPage, $scope.filter); + }}); + Dialogs.addMessageListener({ topic: 'codbex-payments.PaymentRecord.PaymentRecord.entityUpdated', handler: () => { + refreshData(); + $scope.loadPage($scope.dataPage, $scope.filter); + }}); + Dialogs.addMessageListener({ topic: 'codbex-payments.PaymentRecord.PaymentRecord.entitySearch', handler: (data) => { + resetPagination(); + $scope.filter = data.filter; + $scope.filterEntity = data.entity; + $scope.loadPage($scope.dataPage, $scope.filter); + }}); + //-----------------Events-------------------// + + $scope.loadPage = (pageNumber, filter) => { + if (!filter && $scope.filter) { + filter = $scope.filter; + } + if (!filter) { + filter = { + $filter: {} + }; + } + $scope.selectedEntity = null; + EntityService.count(filter).then((resp) => { + if (resp.data) { + $scope.dataCount = resp.data.count; + } + $scope.dataPages = Math.ceil($scope.dataCount / $scope.dataLimit); + filter.$filter.offset = ($scope.dataPage - 1) * $scope.dataLimit; + filter.$filter.limit = $scope.dataLimit; + if ($scope.dataReset) { + filter.$filter.offset = 0; + filter.$filter.limit = $scope.dataPage * $scope.dataLimit; + } + + EntityService.search(filter).then((response) => { + if ($scope.data == null || $scope.dataReset) { + $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/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.Code + }))); + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Currency', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + } + } + if (optionsPaymentDirectionHasMore) { + const optionsPaymentDirectionSearchValues = Array.from(new Set(response.data.map(e => e.PaymentDirection))); + if (optionsPaymentDirectionSearchValues.length > 0) { + $http.post('/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentDirectionController/search', { + conditions: [ + { propertyName: 'Id', operator: 'IN', value: optionsPaymentDirectionSearchValues } + ] + }).then((response) => { + $scope.optionsPaymentDirection.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: 'PaymentDirection', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + } + } + if (optionsPaymentTypeHasMore) { + const optionsPaymentTypeSearchValues = Array.from(new Set(response.data.map(e => e.PaymentType))); + if (optionsPaymentTypeSearchValues.length > 0) { + $http.post('/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentTypeController/search', { + conditions: [ + { propertyName: 'Id', operator: 'IN', value: optionsPaymentTypeSearchValues } + ] + }).then((response) => { + $scope.optionsPaymentType.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: 'PaymentType', + 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); + } + if (e.Valor) { + e.Valor = new Date(e.Valor); + } + if (e.DeletedAt) { + e.DeletedAt = new Date(e.DeletedAt); + } + if (e.CreatedAt) { + e.CreatedAt = new Date(e.CreatedAt); + } + if (e.UpdatedAt) { + e.UpdatedAt = new Date(e.UpdatedAt); + } + }); + + $scope.data = $scope.data.concat(response.data); + $scope.dataPage++; + }, (error) => { + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.PAYMENTRECORD'), + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLF', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTRECORD)', message: message }), + type: AlertTypes.Error + }); + console.error('EntityService:', error); + }); + }, (error) => { + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.PAYMENTRECORD'), + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToCount', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTRECORD)', message: message }), + type: AlertTypes.Error + }); + console.error('EntityService:', error); + }); + }; + $scope.loadPage($scope.dataPage, $scope.filter); + + $scope.selectEntity = (entity) => { + $scope.selectedEntity = entity; + 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, + }}); + }; + + $scope.createEntity = () => { + $scope.selectedEntity = null; + $scope.action = 'create'; + + Dialogs.postMessage({ topic: 'codbex-payments.PaymentRecord.PaymentRecord.createEntity', data: { + entity: {}, + optionsCompany: $scope.optionsCompany, + optionsCurrency: $scope.optionsCurrency, + optionsPaymentDirection: $scope.optionsPaymentDirection, + optionsPaymentType: $scope.optionsPaymentType, + }}); + }; + + $scope.updateEntity = () => { + $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, + }}); + }; + + $scope.deleteEntity = () => { + let id = $scope.selectedEntity.Id; + Dialogs.showDialog({ + title: translated.deleteTitle, + message: translated.deleteConfirm, + buttons: [{ + id: 'delete-btn-yes', + state: ButtonStates.Emphasized, + label: translated.yes, + }, { + id: 'delete-btn-no', + label: translated.no, + }], + closeButton: false + }).then((buttonId) => { + if (buttonId === 'delete-btn-yes') { + EntityService.delete(id).then(() => { + refreshData(); + $scope.loadPage($scope.dataPage, $scope.filter); + Dialogs.triggerEvent('codbex-payments.PaymentRecord.PaymentRecord.clearDetails'); + }, (error) => { + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.PAYMENTRECORD'), + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToDelete', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTRECORD)', message: message }), + type: AlertTypes.Error + }); + console.error('EntityService:', error); + }); + } + }); + }; + + $scope.openFilter = () => { + Dialogs.showWindow({ + id: 'PaymentRecord-filter', + params: { + entity: $scope.filterEntity, + optionsCompany: $scope.optionsCompany, + optionsCurrency: $scope.optionsCurrency, + optionsPaymentDirection: $scope.optionsPaymentDirection, + optionsPaymentType: $scope.optionsPaymentType, + }, + }); + }; + + //----------------Dropdowns-----------------// + $scope.optionsCompany = []; + $scope.optionsCurrency = []; + $scope.optionsPaymentDirection = []; + $scope.optionsPaymentType = []; + + let optionsCompanyHasMore = true; + + $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.Name + })); + optionsCompanyHasMore = optionsCompanyCount > $scope.optionsCompany.length; + }, (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 + }); + }); + }, (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 + }); + }); + let optionsCurrencyHasMore = true; + + $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.Code + })); + optionsCurrencyHasMore = optionsCurrencyCount > $scope.optionsCurrency.length; + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Currency', + 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: 'Currency', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + let optionsPaymentDirectionHasMore = true; + + $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 + })); + optionsPaymentDirectionHasMore = optionsPaymentDirectionCount > $scope.optionsPaymentDirection.length; + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'PaymentDirection', + 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: 'PaymentDirection', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + let optionsPaymentTypeHasMore = true; + + $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 + })); + optionsPaymentTypeHasMore = optionsPaymentTypeCount > $scope.optionsPaymentType.length; + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'PaymentType', + 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: '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) { + return $scope.optionsCurrency[i].text; + } + } + return null; + }; + $scope.optionsPaymentDirectionValue = (optionKey) => { + for (let i = 0; i < $scope.optionsPaymentDirection.length; i++) { + if ($scope.optionsPaymentDirection[i].value === optionKey) { + return $scope.optionsPaymentDirection[i].text; + } + } + return null; + }; + $scope.optionsPaymentTypeValue = (optionKey) => { + for (let i = 0; i < $scope.optionsPaymentType.length; i++) { + if ($scope.optionsPaymentType[i].value === optionKey) { + return $scope.optionsPaymentType[i].text; + } + } + return null; + }; + //----------------Dropdowns-----------------// + }); diff --git a/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/controller.js b/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/controller.js new file mode 100644 index 0000000..140f122 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/controller.js @@ -0,0 +1,565 @@ +angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controller('PageController', ($scope, $http, ViewParameters) => { + const Dialogs = new DialogHub(); + $scope.entity = {}; + $scope.forms = { + details: {}, + }; + + let params = ViewParameters.get(); + if (Object.keys(params).length) { + if (params?.entity?.DateFrom) { + params.entity.DateFrom = new Date(params.entity.DateFrom); + } + if (params?.entity?.DateTo) { + params.entity.DateTo = new Date(params.entity.DateTo); + } + if (params?.entity?.ValorFrom) { + params.entity.ValorFrom = new Date(params.entity.ValorFrom); + } + if (params?.entity?.ValorTo) { + params.entity.ValorTo = new Date(params.entity.ValorTo); + } + if (params?.entity?.DeletedAtFrom) { + params.entity.DeletedAtFrom = new Date(params.entity.DeletedAtFrom); + } + if (params?.entity?.DeletedAtTo) { + params.entity.DeletedAtTo = new Date(params.entity.DeletedAtTo); + } + if (params?.entity?.CreatedAtFrom) { + params.entity.CreatedAtFrom = new Date(params.entity.CreatedAtFrom); + } + if (params?.entity?.CreatedAtTo) { + params.entity.CreatedAtTo = new Date(params.entity.CreatedAtTo); + } + if (params?.entity?.UpdatedAtFrom) { + params.entity.UpdatedAtFrom = new Date(params.entity.UpdatedAtFrom); + } + if (params?.entity?.UpdatedAtTo) { + params.entity.UpdatedAtTo = new Date(params.entity.UpdatedAtTo); + } + $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()); + const optionsPaymentDirectionMap = new Map(); + params.optionsPaymentDirection.forEach(e => optionsPaymentDirectionMap.set(e.value, e)); + $scope.optionsPaymentDirection = Array.from(optionsPaymentDirectionMap.values()); + const optionsPaymentTypeMap = new Map(); + params.optionsPaymentType.forEach(e => optionsPaymentTypeMap.set(e.value, e)); + $scope.optionsPaymentType = Array.from(optionsPaymentTypeMap.values()); + } + + $scope.filter = () => { + let entity = $scope.entity; + const filter = { + $filter: { + conditions: [], + sorts: [], + limit: 20, + offset: 0 + } + }; + if (entity.Id !== undefined) { + const condition = { propertyName: 'Id', operator: 'EQ', value: entity.Id }; + filter.$filter.conditions.push(condition); + } + if (entity.DateFrom) { + const condition = { propertyName: 'Date', operator: 'GE', value: entity.DateFrom }; + filter.$filter.conditions.push(condition); + } + if (entity.DateTo) { + const condition = { propertyName: 'Date', operator: 'LE', value: entity.DateTo }; + filter.$filter.conditions.push(condition); + } + if (entity.ValorFrom) { + const condition = { propertyName: 'Valor', operator: 'GE', value: entity.ValorFrom }; + filter.$filter.conditions.push(condition); + } + if (entity.ValorTo) { + const condition = { propertyName: 'Valor', operator: 'LE', value: entity.ValorTo }; + filter.$filter.conditions.push(condition); + } + if (entity.OurPartyIBAN) { + const condition = { propertyName: 'OurPartyIBAN', operator: 'LIKE', value: `%${entity.OurPartyIBAN}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.CounterpartyIBAN) { + const condition = { propertyName: 'CounterpartyIBAN', operator: 'LIKE', value: `%${entity.CounterpartyIBAN}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.CounterpartyName) { + const condition = { propertyName: 'CounterpartyName', operator: 'LIKE', value: `%${entity.CounterpartyName}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.Amount !== undefined) { + 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); + } + if (entity.PaymentDirection !== undefined) { + const condition = { propertyName: 'PaymentDirection', operator: 'EQ', value: entity.PaymentDirection }; + filter.$filter.conditions.push(condition); + } + if (entity.PaymentType !== undefined) { + const condition = { propertyName: 'PaymentType', operator: 'EQ', value: entity.PaymentType }; + filter.$filter.conditions.push(condition); + } + if (entity.Reason) { + const condition = { propertyName: 'Reason', operator: 'LIKE', value: `%${entity.Reason}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.Description) { + const condition = { propertyName: 'Description', operator: 'LIKE', value: `%${entity.Description}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.UUID) { + const condition = { propertyName: 'UUID', operator: 'LIKE', value: `%${entity.UUID}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.Reference) { + const condition = { propertyName: 'Reference', operator: 'LIKE', value: `%${entity.Reference}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.Deleted !== undefined && entity.isDeletedIndeterminate === false) { + const condition = { propertyName: 'Deleted', operator: 'EQ', value: entity.Deleted }; + filter.$filter.conditions.push(condition); + } + if (entity.DeletedAtFrom) { + const condition = { propertyName: 'DeletedAt', operator: 'GE', value: entity.DeletedAtFrom }; + filter.$filter.conditions.push(condition); + } + if (entity.DeletedAtTo) { + const condition = { propertyName: 'DeletedAt', operator: 'LE', value: entity.DeletedAtTo }; + filter.$filter.conditions.push(condition); + } + if (entity.DeletedReason) { + const condition = { propertyName: 'DeletedReason', operator: 'LIKE', value: `%${entity.DeletedReason}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.CreatedAtFrom) { + const condition = { propertyName: 'CreatedAt', operator: 'GE', value: entity.CreatedAtFrom }; + filter.$filter.conditions.push(condition); + } + if (entity.CreatedAtTo) { + const condition = { propertyName: 'CreatedAt', operator: 'LE', value: entity.CreatedAtTo }; + filter.$filter.conditions.push(condition); + } + if (entity.CreatedBy) { + const condition = { propertyName: 'CreatedBy', operator: 'LIKE', value: `%${entity.CreatedBy}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.UpdatedAtFrom) { + const condition = { propertyName: 'UpdatedAt', operator: 'GE', value: entity.UpdatedAtFrom }; + filter.$filter.conditions.push(condition); + } + if (entity.UpdatedAtTo) { + const condition = { propertyName: 'UpdatedAt', operator: 'LE', value: entity.UpdatedAtTo }; + filter.$filter.conditions.push(condition); + } + if (entity.UpdatedBy) { + const condition = { propertyName: 'UpdatedBy', operator: 'LIKE', value: `%${entity.UpdatedBy}%` }; + filter.$filter.conditions.push(condition); + } + Dialogs.postMessage({ topic: 'codbex-payments.PaymentRecord.PaymentRecord.entitySearch', data: { + entity: entity, + filter: filter + }}); + Dialogs.triggerEvent('codbex-payments.PaymentRecord.PaymentRecord.clearDetails'); + $scope.cancel(); + }; + + $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; + }; + + $scope.cancel = () => { + Dialogs.closeWindow({ id: 'PaymentRecord-filter' }); + }; + + $scope.clearErrorMessage = () => { + $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; + $scope.optionsCurrencyLoading = false; + $scope.optionsCurrencyHasMore = true; + + $scope.loadMoreOptionsCurrency = () => { + const limit = 20; + $scope.optionsCurrencyLoading = true; + $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.Code + })); + const newValues = []; + resultValues.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesCurrency.push(e); + newValues.push(e); + } + }); + newValues.forEach(e => { + if (!$scope.optionsCurrency.find(o => o.value === e.value)) { + $scope.optionsCurrency.push(e); + } + }) + $scope.optionsCurrencyHasMore = resultValues.length > 0; + $scope.optionsCurrencyLoading = false; + }, (error) => { + $scope.optionsCurrencyLoading = false; + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Currency', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }; + + $scope.onOptionsCurrencyChange = (event) => { + if (allValuesCurrency.length === 0) { + allValuesCurrency.push(...$scope.optionsCurrency); + } + if (event.originalEvent.target.value === '') { + allValuesCurrency.sort((a, b) => a.text.localeCompare(b.text)); + $scope.optionsCurrency = allValuesCurrency; + $scope.optionsCurrencyHasMore = true; + } else if (isText(event.which)) { + $scope.optionsCurrencyHasMore = false; + let cacheHit = false; + Array.from(lastSearchValuesCurrency).forEach(e => { + if (event.originalEvent.target.value.startsWith(e)) { + cacheHit = true; + } + }) + if (!cacheHit) { + $http.post('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController/search', { + conditions: [ + { 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.Code + })); + searchResult.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesCurrency.push(e); + } + }); + $scope.optionsCurrency = allValuesCurrency.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: 'Currency', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + lastSearchValuesCurrency.add(event.originalEvent.target.value); + } + } + }; + + const lastSearchValuesPaymentDirection = new Set(); + const allValuesPaymentDirection = []; + let loadMoreOptionsPaymentDirectionCounter = 0; + $scope.optionsPaymentDirectionLoading = false; + $scope.optionsPaymentDirectionHasMore = true; + + $scope.loadMoreOptionsPaymentDirection = () => { + const limit = 20; + $scope.optionsPaymentDirectionLoading = true; + $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 => ({ + value: e.Id, + text: e.Name + })); + const newValues = []; + resultValues.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesPaymentDirection.push(e); + newValues.push(e); + } + }); + newValues.forEach(e => { + if (!$scope.optionsPaymentDirection.find(o => o.value === e.value)) { + $scope.optionsPaymentDirection.push(e); + } + }) + $scope.optionsPaymentDirectionHasMore = resultValues.length > 0; + $scope.optionsPaymentDirectionLoading = false; + }, (error) => { + $scope.optionsPaymentDirectionLoading = false; + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'PaymentDirection', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }; + + $scope.onOptionsPaymentDirectionChange = (event) => { + if (allValuesPaymentDirection.length === 0) { + allValuesPaymentDirection.push(...$scope.optionsPaymentDirection); + } + if (event.originalEvent.target.value === '') { + allValuesPaymentDirection.sort((a, b) => a.text.localeCompare(b.text)); + $scope.optionsPaymentDirection = allValuesPaymentDirection; + $scope.optionsPaymentDirectionHasMore = true; + } else if (isText(event.which)) { + $scope.optionsPaymentDirectionHasMore = false; + let cacheHit = false; + Array.from(lastSearchValuesPaymentDirection).forEach(e => { + if (event.originalEvent.target.value.startsWith(e)) { + cacheHit = true; + } + }) + if (!cacheHit) { + $http.post('/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentDirectionController/search', { + conditions: [ + { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } + ] + }).then((response) => { + const optionValues = allValuesPaymentDirection.map(e => e.value); + const searchResult = response.data.map(e => ({ + value: e.Id, + text: e.Name + })); + searchResult.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesPaymentDirection.push(e); + } + }); + $scope.optionsPaymentDirection = allValuesPaymentDirection.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: 'PaymentDirection', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + lastSearchValuesPaymentDirection.add(event.originalEvent.target.value); + } + } + }; + + const lastSearchValuesPaymentType = new Set(); + const allValuesPaymentType = []; + let loadMoreOptionsPaymentTypeCounter = 0; + $scope.optionsPaymentTypeLoading = false; + $scope.optionsPaymentTypeHasMore = true; + + $scope.loadMoreOptionsPaymentType = () => { + const limit = 20; + $scope.optionsPaymentTypeLoading = true; + $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 => ({ + value: e.Id, + text: e.Name + })); + const newValues = []; + resultValues.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesPaymentType.push(e); + newValues.push(e); + } + }); + newValues.forEach(e => { + if (!$scope.optionsPaymentType.find(o => o.value === e.value)) { + $scope.optionsPaymentType.push(e); + } + }) + $scope.optionsPaymentTypeHasMore = resultValues.length > 0; + $scope.optionsPaymentTypeLoading = false; + }, (error) => { + $scope.optionsPaymentTypeLoading = false; + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'PaymentType', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }; + + $scope.onOptionsPaymentTypeChange = (event) => { + if (allValuesPaymentType.length === 0) { + allValuesPaymentType.push(...$scope.optionsPaymentType); + } + if (event.originalEvent.target.value === '') { + allValuesPaymentType.sort((a, b) => a.text.localeCompare(b.text)); + $scope.optionsPaymentType = allValuesPaymentType; + $scope.optionsPaymentTypeHasMore = true; + } else if (isText(event.which)) { + $scope.optionsPaymentTypeHasMore = false; + let cacheHit = false; + Array.from(lastSearchValuesPaymentType).forEach(e => { + if (event.originalEvent.target.value.startsWith(e)) { + cacheHit = true; + } + }) + if (!cacheHit) { + $http.post('/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentTypeController/search', { + conditions: [ + { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } + ] + }).then((response) => { + const optionValues = allValuesPaymentType.map(e => e.value); + const searchResult = response.data.map(e => ({ + value: e.Id, + text: e.Name + })); + searchResult.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesPaymentType.push(e); + } + }); + $scope.optionsPaymentType = allValuesPaymentType.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: 'PaymentType', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + lastSearchValuesPaymentType.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; + } + +}); \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/index.html b/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/index.html new file mode 100644 index 0000000..6dbd0f8 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/index.html @@ -0,0 +1,424 @@ + + + + + + + + + + + + + + + + {{ errorMessage }} + + + + +
+ {{ 'codbex-payments:codbex-payments-model.defaults.from' | t:{'text':'$t(codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DATE)'} }} +
+
+ + + + +
+
+ {{ 'codbex-payments:codbex-payments-model.defaults.to' | t:{'text':'$t(codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DATE)'} }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.defaults.from' | t:{'text':'$t(codbex-payments:codbex-payments-model.t.PAYMENTRECORD_VALOR)'} }} +
+
+ + + + +
+
+ {{ 'codbex-payments:codbex-payments-model.defaults.to' | t:{'text':'$t(codbex-payments:codbex-payments-model.t.PAYMENTRECORD_VALOR)'} }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_OURPARTYIBAN' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COUNTERPARTYIBAN' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COUNTERPARTYNAME' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_AMOUNT' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COMPANY' | t }} +
+
+ + + + + More Options + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_CURRENCY' | t }} +
+
+ + + + + More Options + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_PAYMENTDIRECTION' | t }} +
+
+ + + + + More Options + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_PAYMENTTYPE' | t }} +
+
+ + + + + More Options + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_REASON' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DESCRIPTION' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_UUID' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_REFERENCE' | t }} +
+
+ + + + +
+
+ +
+
+ + + {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETED' | t }} +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETEDAT' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETEDREASON' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_CREATEDAT' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_CREATEDBY' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_UPDATEDAT' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_UPDATEDBY' | t }} +
+
+ + + + +
+
+
+
+
+ + + + + + + + + + + + + + + + + + diff --git a/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/view.extension b/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/view.extension new file mode 100644 index 0000000..eaa2e2e --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/view.extension @@ -0,0 +1,6 @@ +{ + "module": "codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/view.js", + "extensionPoint": "application-windows", + "description": "codbex-payments - Application Dialog Window", + "role": "codbex-payments.PaymentRecord.PaymentRecordReadOnly,codbex-payments.PaymentRecord.PaymentRecordFullAccess" +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/view.js b/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/view.js new file mode 100644 index 0000000..3e83404 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/view.js @@ -0,0 +1,20 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const viewData = { + id: 'PaymentRecord-filter', + label: 'PaymentRecord Filter', + translation: { + key: 'codbex-payments:codbex-payments-model.extName', + options: { + content: '$t(codbex-payments:codbex-payments-model.t.PAYMENTRECORD) $t(codbex-payments:codbex-payments-model.defaults.filter)', + } + }, + path: '/services/web/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/index.html', + perspectiveName: 'PaymentRecord' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/controller.js b/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/controller.js new file mode 100644 index 0000000..594ffe6 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/controller.js @@ -0,0 +1,559 @@ +angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) + .config(['EntityServiceProvider', (EntityServiceProvider) => { + EntityServiceProvider.baseUrl = '/services/java/codbex-payments/gen/codbex_payments/api/paymentrecord/PaymentRecordController'; + }]) + .controller('PageController', ($scope, $http, ViewParameters, LocaleService, EntityService) => { + const Dialogs = new DialogHub(); + const Notifications = new NotificationHub(); + let description = 'Description'; + let propertySuccessfullyCreated = 'PaymentRecord successfully created'; + let propertySuccessfullyUpdated = 'PaymentRecord successfully updated'; + $scope.entity = {}; + $scope.forms = { + details: {}, + }; + $scope.formHeaders = { + select: 'PaymentRecord Details', + create: 'Create PaymentRecord', + update: 'Update PaymentRecord' + }; + $scope.action = 'select'; + + LocaleService.onInit(() => { + description = LocaleService.t('codbex-payments:codbex-payments-model.defaults.description'); + $scope.formHeaders.select = LocaleService.t('codbex-payments:codbex-payments-model.defaults.formHeadSelect', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTRECORD)' }); + $scope.formHeaders.create = LocaleService.t('codbex-payments:codbex-payments-model.defaults.formHeadCreate', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTRECORD)' }); + $scope.formHeaders.update = LocaleService.t('codbex-payments:codbex-payments-model.defaults.formHeadUpdate', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTRECORD)' }); + propertySuccessfullyCreated = LocaleService.t('codbex-payments:codbex-payments-model.messages.propertySuccessfullyCreated', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTRECORD)' }); + propertySuccessfullyUpdated = LocaleService.t('codbex-payments:codbex-payments-model.messages.propertySuccessfullyUpdated', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTRECORD)' }); + }); + + let params = ViewParameters.get(); + if (Object.keys(params).length) { + $scope.action = params.action; + if (params.entity.Date) { + params.entity.Date = new Date(params.entity.Date); + } + if (params.entity.Valor) { + params.entity.Valor = new Date(params.entity.Valor); + } + if (params.entity.DeletedAt) { + params.entity.DeletedAt = new Date(params.entity.DeletedAt); + } + if (params.entity.CreatedAt) { + params.entity.CreatedAt = new Date(params.entity.CreatedAt); + } + if (params.entity.UpdatedAt) { + params.entity.UpdatedAt = new Date(params.entity.UpdatedAt); + } + $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()); + const optionsPaymentDirectionMap = new Map(); + params.optionsPaymentDirection?.forEach(e => optionsPaymentDirectionMap.set(e.value, e)); + $scope.optionsPaymentDirection = Array.from(optionsPaymentDirectionMap.values()); + const optionsPaymentTypeMap = new Map(); + params.optionsPaymentType?.forEach(e => optionsPaymentTypeMap.set(e.value, e)); + $scope.optionsPaymentType = Array.from(optionsPaymentTypeMap.values()); + } + + $scope.create = () => { + let entity = $scope.entity; + entity[$scope.selectedMainEntityKey] = $scope.selectedMainEntityId; + EntityService.create(entity).then((response) => { + Dialogs.postMessage({ topic: 'codbex-payments.PaymentRecord.PaymentRecord.entityCreated', data: response.data }); + Notifications.show({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.PAYMENTRECORD'), + description: propertySuccessfullyCreated, + type: 'positive' + }); + $scope.cancel(); + }, (error) => { + const message = error.data ? error.data.message : ''; + $scope.$evalAsync(() => { + $scope.errorMessage = LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToCreate', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTRECORD)', message: message }); + }); + console.error('EntityService:', error); + }); + }; + + $scope.update = () => { + let id = $scope.entity.Id; + let entity = $scope.entity; + entity[$scope.selectedMainEntityKey] = $scope.selectedMainEntityId; + EntityService.update(id, entity).then((response) => { + Dialogs.postMessage({ topic: 'codbex-payments.PaymentRecord.PaymentRecord.entityUpdated', data: response.data }); + $scope.cancel(); + Notifications.show({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.PAYMENTRECORD'), + description: propertySuccessfullyUpdated, + type: 'positive' + }); + }, (error) => { + const message = error.data ? error.data.message : ''; + $scope.$evalAsync(() => { + $scope.errorMessage = LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToUpdate', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTRECORD)', message: message }); + }); + console.error('EntityService:', error); + }); + }; + + $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/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController').then((response) => { + $scope.optionsCurrency = response.data.map(e => ({ + value: e.Id, + text: e.Code + })); + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Currency', + 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; + $scope.optionsCurrencyLoading = false; + $scope.optionsCurrencyHasMore = true; + + $scope.loadMoreOptionsCurrency = () => { + const limit = 20; + $scope.optionsCurrencyLoading = true; + $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.Code + })); + const newValues = []; + resultValues.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesCurrency.push(e); + newValues.push(e); + } + }); + newValues.forEach(e => { + if (!$scope.optionsCurrency.find(o => o.value === e.value)) { + $scope.optionsCurrency.push(e); + } + }) + $scope.optionsCurrencyHasMore = resultValues.length > 0; + $scope.optionsCurrencyLoading = false; + }, (error) => { + $scope.optionsCurrencyLoading = false; + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Currency', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }; + + $scope.onOptionsCurrencyChange = (event) => { + if (allValuesCurrency.length === 0) { + allValuesCurrency.push(...$scope.optionsCurrency); + } + if (event.originalEvent.target.value === '') { + allValuesCurrency.sort((a, b) => a.text.localeCompare(b.text)); + $scope.optionsCurrency = allValuesCurrency; + $scope.optionsCurrencyHasMore = true; + } else if (isText(event.which)) { + $scope.optionsCurrencyHasMore = false; + let cacheHit = false; + Array.from(lastSearchValuesCurrency).forEach(e => { + if (event.originalEvent.target.value.startsWith(e)) { + cacheHit = true; + } + }) + if (!cacheHit) { + $http.post('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController/search', { + conditions: [ + { 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.Code + })); + searchResult.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesCurrency.push(e); + } + }); + $scope.optionsCurrency = allValuesCurrency.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: 'Currency', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + lastSearchValuesCurrency.add(event.originalEvent.target.value); + } + } + }; + $scope.servicePaymentDirection = '/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentDirectionController'; + + $scope.optionsPaymentDirection = []; + + $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 + })); + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'PaymentDirection', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + + const lastSearchValuesPaymentDirection = new Set(); + const allValuesPaymentDirection = []; + let loadMoreOptionsPaymentDirectionCounter = 0; + $scope.optionsPaymentDirectionLoading = false; + $scope.optionsPaymentDirectionHasMore = true; + + $scope.loadMoreOptionsPaymentDirection = () => { + const limit = 20; + $scope.optionsPaymentDirectionLoading = true; + $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 => ({ + value: e.Id, + text: e.Name + })); + const newValues = []; + resultValues.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesPaymentDirection.push(e); + newValues.push(e); + } + }); + newValues.forEach(e => { + if (!$scope.optionsPaymentDirection.find(o => o.value === e.value)) { + $scope.optionsPaymentDirection.push(e); + } + }) + $scope.optionsPaymentDirectionHasMore = resultValues.length > 0; + $scope.optionsPaymentDirectionLoading = false; + }, (error) => { + $scope.optionsPaymentDirectionLoading = false; + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'PaymentDirection', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }; + + $scope.onOptionsPaymentDirectionChange = (event) => { + if (allValuesPaymentDirection.length === 0) { + allValuesPaymentDirection.push(...$scope.optionsPaymentDirection); + } + if (event.originalEvent.target.value === '') { + allValuesPaymentDirection.sort((a, b) => a.text.localeCompare(b.text)); + $scope.optionsPaymentDirection = allValuesPaymentDirection; + $scope.optionsPaymentDirectionHasMore = true; + } else if (isText(event.which)) { + $scope.optionsPaymentDirectionHasMore = false; + let cacheHit = false; + Array.from(lastSearchValuesPaymentDirection).forEach(e => { + if (event.originalEvent.target.value.startsWith(e)) { + cacheHit = true; + } + }) + if (!cacheHit) { + $http.post('/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentDirectionController/search', { + conditions: [ + { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } + ] + }).then((response) => { + const optionValues = allValuesPaymentDirection.map(e => e.value); + const searchResult = response.data.map(e => ({ + value: e.Id, + text: e.Name + })); + searchResult.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesPaymentDirection.push(e); + } + }); + $scope.optionsPaymentDirection = allValuesPaymentDirection.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: 'PaymentDirection', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + lastSearchValuesPaymentDirection.add(event.originalEvent.target.value); + } + } + }; + $scope.servicePaymentType = '/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentTypeController'; + + $scope.optionsPaymentType = []; + + $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 + })); + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'PaymentType', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + + const lastSearchValuesPaymentType = new Set(); + const allValuesPaymentType = []; + let loadMoreOptionsPaymentTypeCounter = 0; + $scope.optionsPaymentTypeLoading = false; + $scope.optionsPaymentTypeHasMore = true; + + $scope.loadMoreOptionsPaymentType = () => { + const limit = 20; + $scope.optionsPaymentTypeLoading = true; + $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 => ({ + value: e.Id, + text: e.Name + })); + const newValues = []; + resultValues.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesPaymentType.push(e); + newValues.push(e); + } + }); + newValues.forEach(e => { + if (!$scope.optionsPaymentType.find(o => o.value === e.value)) { + $scope.optionsPaymentType.push(e); + } + }) + $scope.optionsPaymentTypeHasMore = resultValues.length > 0; + $scope.optionsPaymentTypeLoading = false; + }, (error) => { + $scope.optionsPaymentTypeLoading = false; + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'PaymentType', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }; + + $scope.onOptionsPaymentTypeChange = (event) => { + if (allValuesPaymentType.length === 0) { + allValuesPaymentType.push(...$scope.optionsPaymentType); + } + if (event.originalEvent.target.value === '') { + allValuesPaymentType.sort((a, b) => a.text.localeCompare(b.text)); + $scope.optionsPaymentType = allValuesPaymentType; + $scope.optionsPaymentTypeHasMore = true; + } else if (isText(event.which)) { + $scope.optionsPaymentTypeHasMore = false; + let cacheHit = false; + Array.from(lastSearchValuesPaymentType).forEach(e => { + if (event.originalEvent.target.value.startsWith(e)) { + cacheHit = true; + } + }) + if (!cacheHit) { + $http.post('/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentTypeController/search', { + conditions: [ + { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } + ] + }).then((response) => { + const optionValues = allValuesPaymentType.map(e => e.value); + const searchResult = response.data.map(e => ({ + value: e.Id, + text: e.Name + })); + searchResult.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesPaymentType.push(e); + } + }); + $scope.optionsPaymentType = allValuesPaymentType.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: 'PaymentType', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + lastSearchValuesPaymentType.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; + } + + + $scope.alert = (message) => { + if (message) Dialogs.showAlert({ + title: description, + message: message, + type: AlertTypes.Information, + preformatted: true, + }); + }; + + $scope.cancel = () => { + $scope.entity = {}; + $scope.action = 'select'; + Dialogs.closeWindow({ id: 'PaymentRecord-details' }); + }; + + $scope.clearErrorMessage = () => { + $scope.errorMessage = null; + }; + }); \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/index.html b/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/index.html new file mode 100644 index 0000000..0943693 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/index.html @@ -0,0 +1,457 @@ + + + + + + + + + + + + + + + + + {{ errorMessage }} + + + + +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DATE' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_VALOR' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_OURPARTYIBAN' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COUNTERPARTYIBAN' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COUNTERPARTYNAME' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_AMOUNT' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COMPANY' | t }} +
+
+ + + + + More Options + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_CURRENCY' | t }} +
+
+ + + + + More Options + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_PAYMENTDIRECTION' | t }} +
+
+ + + + + More Options + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_PAYMENTTYPE' | t }} +
+
+ + + + + More Options + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_REASON' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DESCRIPTION' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_UUID' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_REFERENCE' | t }} +
+
+ + + + +
+
+ +
+
+ + + {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETED' | t }} +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETEDAT' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETEDREASON' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_CREATEDAT' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_CREATEDBY' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_UPDATEDAT' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_UPDATEDBY' | t }} +
+
+ + + + +
+
+
+
+
+ + + + + + + + + + + + + + + + diff --git a/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/view.extension b/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/view.extension new file mode 100644 index 0000000..dafbef3 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/view.extension @@ -0,0 +1,6 @@ +{ + "module": "codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/view.js", + "extensionPoint": "application-windows", + "description": "codbex-payments - Application Dialog Window", + "role": "codbex-payments.PaymentRecord.PaymentRecordReadOnly,codbex-payments.PaymentRecord.PaymentRecordFullAccess" +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/view.js b/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/view.js new file mode 100644 index 0000000..3b97796 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/view.js @@ -0,0 +1,20 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const viewData = { + id: "PaymentRecord-details", + label: "PaymentRecord", + translation: { + key: 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD', + }, + path: "/services/web/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/index.html", + perspectiveName: "PaymentRecord", + roles: [ + "codbex-payments.PaymentRecord.PaymentRecordReadOnly", + ] +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/index.html b/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/index.html new file mode 100644 index 0000000..1867f80 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/index.html @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + {{'codbex-payments:codbex-payments-model.defaults.items' | t}} + + + + + + + + + + + + + + + + + + + + + + + {{next.Valor | date: "dd/MMM/yyyy"}} | + {{next.OurPartyIBAN}} | + {{next.CounterpartyIBAN}} | + {{next.CounterpartyName}} | + {{next.Amount}} | + {{optionsCompanyValue(next.Company)}} | + {{optionsCurrencyValue(next.Currency)}} | + {{optionsPaymentDirectionValue(next.PaymentDirection)}} | + {{optionsPaymentTypeValue(next.PaymentType)}} | + {{next.Reason}} | + {{next.Description}} | + {{next.UUID}} | + {{next.Reference}} | + {{next.Deleted}} | + {{next.DeletedAt}} | + {{next.DeletedReason}} | + {{next.CreatedAt}} | + {{next.CreatedBy}} | + {{next.UpdatedAt}} | + {{next.UpdatedBy}} + + + + + + + {{ 'codbex-payments:codbex-payments-model.defaults.loadMore' | t }} + + + + + + diff --git a/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/controller.js b/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/controller.js new file mode 100644 index 0000000..74f97f1 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/controller.js @@ -0,0 +1,664 @@ +angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) + .config(["EntityServiceProvider", (EntityServiceProvider) => { + EntityServiceProvider.baseUrl = '/services/java/codbex-payments/gen/codbex_payments/api/paymentrecord/PaymentRecordController'; + }]) + .controller('PageController', ($scope, $http, Extensions, LocaleService, EntityService) => { + const Dialogs = new DialogHub(); + const Notifications = new NotificationHub(); + let description = 'Description'; + let propertySuccessfullyCreated = 'PaymentRecord successfully created'; + let propertySuccessfullyUpdated = 'PaymentRecord successfully updated'; + $scope.entity = {}; + $scope.forms = { + details: {}, + }; + $scope.formHeaders = { + select: 'PaymentRecord Details', + create: 'Create PaymentRecord', + update: 'Update PaymentRecord' + }; + $scope.action = 'select'; + + LocaleService.onInit(() => { + description = LocaleService.t('codbex-payments:codbex-payments-model.defaults.description'); + $scope.formHeaders.select = LocaleService.t('codbex-payments:codbex-payments-model.defaults.formHeadSelect', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTRECORD)' }); + $scope.formHeaders.create = LocaleService.t('codbex-payments:codbex-payments-model.defaults.formHeadCreate', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTRECORD)' }); + $scope.formHeaders.update = LocaleService.t('codbex-payments:codbex-payments-model.defaults.formHeadUpdate', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTRECORD)' }); + propertySuccessfullyCreated = LocaleService.t('codbex-payments:codbex-payments-model.messages.propertySuccessfullyCreated', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTRECORD)' }); + propertySuccessfullyUpdated = LocaleService.t('codbex-payments:codbex-payments-model.messages.propertySuccessfullyUpdated', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTRECORD)' }); + }); + + //-----------------Custom Actions-------------------// + Extensions.getWindows(['codbex-payments-custom-action']).then((response) => { + $scope.entityActions = response.data.filter(e => e.perspective === 'PaymentRecord' && e.view === 'PaymentRecord' && e.type === 'entity'); + }); + + $scope.triggerEntityAction = (action) => { + Dialogs.showWindow({ + hasHeader: true, + title: LocaleService.t(action.translation.key, action.translation.options, action.label), + path: action.path, + params: { + id: $scope.entity.Id + }, + closeButton: true + }); + }; + //-----------------Custom Actions-------------------// + + //-----------------Events-------------------// + Dialogs.addMessageListener({ topic: 'codbex-payments.PaymentRecord.PaymentRecord.clearDetails', handler: () => { + $scope.$evalAsync(() => { + $scope.entity = {}; + $scope.optionsCompany = []; + $scope.optionsCurrency = []; + $scope.optionsPaymentDirection = []; + $scope.optionsPaymentType = []; + $scope.action = 'select'; + }); + }}); + Dialogs.addMessageListener({ topic: 'codbex-payments.PaymentRecord.PaymentRecord.entitySelected', handler: (data) => { + $scope.$evalAsync(() => { + if (data.entity.Date) { + data.entity.Date = new Date(data.entity.Date); + } + if (data.entity.Valor) { + data.entity.Valor = new Date(data.entity.Valor); + } + if (data.entity.DeletedAt) { + data.entity.DeletedAt = new Date(data.entity.DeletedAt); + } + if (data.entity.CreatedAt) { + data.entity.CreatedAt = new Date(data.entity.CreatedAt); + } + if (data.entity.UpdatedAt) { + 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.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.action = 'create'; + }); + }}); + Dialogs.addMessageListener({ topic: 'codbex-payments.PaymentRecord.PaymentRecord.updateEntity', handler: (data) => { + $scope.$evalAsync(() => { + if (data.entity.Date) { + data.entity.Date = new Date(data.entity.Date); + } + if (data.entity.Valor) { + data.entity.Valor = new Date(data.entity.Valor); + } + if (data.entity.DeletedAt) { + data.entity.DeletedAt = new Date(data.entity.DeletedAt); + } + if (data.entity.CreatedAt) { + data.entity.CreatedAt = new Date(data.entity.CreatedAt); + } + if (data.entity.UpdatedAt) { + 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.action = 'update'; + }); + }}); + + $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-------------------// + + $scope.create = () => { + EntityService.create($scope.entity).then((response) => { + Dialogs.postMessage({ topic: 'codbex-payments.PaymentRecord.PaymentRecord.entityCreated', data: response.data }); + Dialogs.postMessage({ topic: 'codbex-payments.PaymentRecord.PaymentRecord.clearDetails' , data: response.data }); + Notifications.show({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.PAYMENTRECORD'), + description: propertySuccessfullyCreated, + type: 'positive' + }); + }, (error) => { + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.PAYMENTRECORD'), + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToCreate', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTRECORD)', message: message }), + type: AlertTypes.Error + }); + console.error('EntityService:', error); + }); + }; + + $scope.update = () => { + EntityService.update($scope.entity.Id, $scope.entity).then((response) => { + Dialogs.postMessage({ topic: 'codbex-payments.PaymentRecord.PaymentRecord.entityUpdated', data: response.data }); + Dialogs.postMessage({ topic: 'codbex-payments.PaymentRecord.PaymentRecord.clearDetails', data: response.data }); + Notifications.show({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.PAYMENTRECORD'), + description: propertySuccessfullyUpdated, + type: 'positive' + }); + }, (error) => { + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.PAYMENTRECORD'), + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToCreate', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTRECORD)', message: message }), + type: AlertTypes.Error + }); + console.error('EntityService:', error); + }); + }; + + $scope.cancel = () => { + Dialogs.triggerEvent('codbex-payments.PaymentRecord.PaymentRecord.clearDetails'); + }; + + //-----------------Dialogs-------------------// + $scope.alert = (message) => { + if (message) Dialogs.showAlert({ + title: description, + message: message, + type: AlertTypes.Information, + preformatted: true, + }); + }; + + $scope.createCompany = () => { + Dialogs.showWindow({ + id: 'Company-details', + params: { + action: 'create', + entity: {}, + }, + closeButton: false + }); + }; + $scope.createCurrency = () => { + Dialogs.showWindow({ + id: 'Currency-details', + params: { + action: 'create', + entity: {}, + }, + closeButton: false + }); + }; + $scope.createPaymentDirection = () => { + Dialogs.showWindow({ + id: 'PaymentDirection-details', + params: { + action: 'create', + entity: {}, + }, + closeButton: false + }); + }; + $scope.createPaymentType = () => { + Dialogs.showWindow({ + id: 'PaymentType-details', + params: { + action: 'create', + entity: {}, + }, + closeButton: false + }); + }; + + //-----------------Dialogs-------------------// + + + + //----------------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; + $scope.optionsCurrencyLoading = false; + $scope.optionsCurrencyHasMore = true; + + $scope.loadMoreOptionsCurrency = () => { + const limit = 20; + $scope.optionsCurrencyLoading = true; + $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.Code + })); + const newValues = []; + resultValues.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesCurrency.push(e); + newValues.push(e); + } + }); + newValues.forEach(e => { + if (!$scope.optionsCurrency.find(o => o.value === e.value)) { + $scope.optionsCurrency.push(e); + } + }) + $scope.optionsCurrencyHasMore = resultValues.length > 0; + $scope.optionsCurrencyLoading = false; + }, (error) => { + $scope.optionsCurrencyLoading = false; + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Currency', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }; + + $scope.onOptionsCurrencyChange = (event) => { + if (allValuesCurrency.length === 0) { + allValuesCurrency.push(...$scope.optionsCurrency); + } + if (event.originalEvent.target.value === '') { + allValuesCurrency.sort((a, b) => a.text.localeCompare(b.text)); + $scope.optionsCurrency = allValuesCurrency; + $scope.optionsCurrencyHasMore = true; + } else if (isText(event.which)) { + $scope.optionsCurrencyHasMore = false; + let cacheHit = false; + Array.from(lastSearchValuesCurrency).forEach(e => { + if (event.originalEvent.target.value.startsWith(e)) { + cacheHit = true; + } + }) + if (!cacheHit) { + $http.post('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController/search', { + conditions: [ + { 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.Code + })); + searchResult.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesCurrency.push(e); + } + }); + $scope.optionsCurrency = allValuesCurrency.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: 'Currency', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + lastSearchValuesCurrency.add(event.originalEvent.target.value); + } + } + }; + + $scope.refreshCurrency = () => { + $scope.optionsCurrency = []; + $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 + })); + allValuesCurrency.length === 0; + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Currency', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }; + const lastSearchValuesPaymentDirection = new Set(); + const allValuesPaymentDirection = []; + let loadMoreOptionsPaymentDirectionCounter = 0; + $scope.optionsPaymentDirectionLoading = false; + $scope.optionsPaymentDirectionHasMore = true; + + $scope.loadMoreOptionsPaymentDirection = () => { + const limit = 20; + $scope.optionsPaymentDirectionLoading = true; + $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 => ({ + value: e.Id, + text: e.Name + })); + const newValues = []; + resultValues.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesPaymentDirection.push(e); + newValues.push(e); + } + }); + newValues.forEach(e => { + if (!$scope.optionsPaymentDirection.find(o => o.value === e.value)) { + $scope.optionsPaymentDirection.push(e); + } + }) + $scope.optionsPaymentDirectionHasMore = resultValues.length > 0; + $scope.optionsPaymentDirectionLoading = false; + }, (error) => { + $scope.optionsPaymentDirectionLoading = false; + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'PaymentDirection', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }; + + $scope.onOptionsPaymentDirectionChange = (event) => { + if (allValuesPaymentDirection.length === 0) { + allValuesPaymentDirection.push(...$scope.optionsPaymentDirection); + } + if (event.originalEvent.target.value === '') { + allValuesPaymentDirection.sort((a, b) => a.text.localeCompare(b.text)); + $scope.optionsPaymentDirection = allValuesPaymentDirection; + $scope.optionsPaymentDirectionHasMore = true; + } else if (isText(event.which)) { + $scope.optionsPaymentDirectionHasMore = false; + let cacheHit = false; + Array.from(lastSearchValuesPaymentDirection).forEach(e => { + if (event.originalEvent.target.value.startsWith(e)) { + cacheHit = true; + } + }) + if (!cacheHit) { + $http.post('/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentDirectionController/search', { + conditions: [ + { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } + ] + }).then((response) => { + const optionValues = allValuesPaymentDirection.map(e => e.value); + const searchResult = response.data.map(e => ({ + value: e.Id, + text: e.Name + })); + searchResult.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesPaymentDirection.push(e); + } + }); + $scope.optionsPaymentDirection = allValuesPaymentDirection.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: 'PaymentDirection', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + lastSearchValuesPaymentDirection.add(event.originalEvent.target.value); + } + } + }; + + $scope.refreshPaymentDirection = () => { + $scope.optionsPaymentDirection = []; + $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 + })); + allValuesPaymentDirection.length === 0; + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'PaymentDirection', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }; + const lastSearchValuesPaymentType = new Set(); + const allValuesPaymentType = []; + let loadMoreOptionsPaymentTypeCounter = 0; + $scope.optionsPaymentTypeLoading = false; + $scope.optionsPaymentTypeHasMore = true; + + $scope.loadMoreOptionsPaymentType = () => { + const limit = 20; + $scope.optionsPaymentTypeLoading = true; + $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 => ({ + value: e.Id, + text: e.Name + })); + const newValues = []; + resultValues.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesPaymentType.push(e); + newValues.push(e); + } + }); + newValues.forEach(e => { + if (!$scope.optionsPaymentType.find(o => o.value === e.value)) { + $scope.optionsPaymentType.push(e); + } + }) + $scope.optionsPaymentTypeHasMore = resultValues.length > 0; + $scope.optionsPaymentTypeLoading = false; + }, (error) => { + $scope.optionsPaymentTypeLoading = false; + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'PaymentType', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }; + + $scope.onOptionsPaymentTypeChange = (event) => { + if (allValuesPaymentType.length === 0) { + allValuesPaymentType.push(...$scope.optionsPaymentType); + } + if (event.originalEvent.target.value === '') { + allValuesPaymentType.sort((a, b) => a.text.localeCompare(b.text)); + $scope.optionsPaymentType = allValuesPaymentType; + $scope.optionsPaymentTypeHasMore = true; + } else if (isText(event.which)) { + $scope.optionsPaymentTypeHasMore = false; + let cacheHit = false; + Array.from(lastSearchValuesPaymentType).forEach(e => { + if (event.originalEvent.target.value.startsWith(e)) { + cacheHit = true; + } + }) + if (!cacheHit) { + $http.post('/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentTypeController/search', { + conditions: [ + { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } + ] + }).then((response) => { + const optionValues = allValuesPaymentType.map(e => e.value); + const searchResult = response.data.map(e => ({ + value: e.Id, + text: e.Name + })); + searchResult.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesPaymentType.push(e); + } + }); + $scope.optionsPaymentType = allValuesPaymentType.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: 'PaymentType', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + lastSearchValuesPaymentType.add(event.originalEvent.target.value); + } + } + }; + + $scope.refreshPaymentType = () => { + $scope.optionsPaymentType = []; + $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 + })); + allValuesPaymentType.length === 0; + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'PaymentType', + 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; + return false; + } + + //----------------Dropdowns-----------------// + }); \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/index.html b/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/index.html new file mode 100644 index 0000000..12f0117 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/index.html @@ -0,0 +1,478 @@ + + + + + + + + + + + + + + + + + + + +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DATE' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_VALOR' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_OURPARTYIBAN' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COUNTERPARTYIBAN' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COUNTERPARTYNAME' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_AMOUNT' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COMPANY' | t }} +
+
+ + + + + More Options + + +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_CURRENCY' | t }} +
+
+ + + + + More Options + + +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_PAYMENTDIRECTION' | t }} +
+
+ + + + + More Options + + +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_PAYMENTTYPE' | t }} +
+
+ + + + + More Options + + +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_REASON' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DESCRIPTION' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_UUID' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_REFERENCE' | t }} +
+
+ + + + +
+
+ +
+
+ + + {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETED' | t }} +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETEDAT' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETEDREASON' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_CREATEDAT' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_CREATEDBY' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_UPDATEDAT' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_UPDATEDBY' | t }} +
+
+ + + + +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + diff --git a/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/view.extension b/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/view.extension new file mode 100644 index 0000000..02934c2 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/view.extension @@ -0,0 +1,6 @@ +{ + "module": "codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/view.js", + "extensionPoint": "application-views", + "description": "codbex-payments - Application View - Main Details", + "role": "codbex-payments.PaymentRecord.PaymentRecordReadOnly,codbex-payments.PaymentRecord.PaymentRecordFullAccess" +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/view.js b/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/view.js new file mode 100644 index 0000000..d4ca44b --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/view.js @@ -0,0 +1,20 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const viewData = { + id: 'PaymentRecord-details', + label: 'PaymentRecord', + translation: { + key: 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD', + }, + region: 'center', + lazyLoad: false, + autoFocusTab: true, + path: '/services/web/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/index.html', + perspectiveName: 'PaymentRecord' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/view.extension b/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/view.extension new file mode 100644 index 0000000..ad203c6 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/view.extension @@ -0,0 +1,6 @@ +{ + "module": "codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/view.js", + "extensionPoint": "application-views", + "description": "codbex-payments - Application View", + "role": "codbex-payments.PaymentRecord.PaymentRecordReadOnly,codbex-payments.PaymentRecord.PaymentRecordFullAccess" +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/view.js b/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/view.js new file mode 100644 index 0000000..db46a78 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/view.js @@ -0,0 +1,20 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const viewData = { + id: 'PaymentRecord', + label: 'PaymentRecord', + translation: { + key: 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD', + }, + region: 'left', + lazyLoad: false, + autoFocusTab: false, + path: '/services/web/codbex-payments/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/index.html', + perspectiveName: 'PaymentRecord' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/index.html b/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/index.html new file mode 100644 index 0000000..382eb26 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/index.html @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + {{'codbex-payments:codbex-payments-model.state.busy' | t}} + + + {{'codbex-payments:codbex-payments-model.messages.error.loading' | t}} + + + + + + diff --git a/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/perspective.extension b/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/perspective.extension new file mode 100644 index 0000000..0e4a65b --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/perspective.extension @@ -0,0 +1,6 @@ +{ + "module": "codbex-payments/gen/codbex-payments/ui/PaymentRecord/perspective.js", + "extensionPoint": "application-perspectives", + "description": "codbex-payments - Perspective - PaymentRecord", + "role": "codbex-payments.PaymentRecord.PaymentRecordReadOnly,codbex-payments.PaymentRecord.PaymentRecordFullAccess" +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/perspective.js b/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/perspective.js new file mode 100644 index 0000000..48c7f5c --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/perspective.js @@ -0,0 +1,19 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const perspectiveData = { + id: 'PaymentRecord', + label: 'PaymentRecord', + translation: { + key: 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD', + }, + path: '/services/web/codbex-payments/gen/codbex-payments/ui/PaymentRecord/index.html', + groupId: 'accounting-navigation-group', + order: 40, + icon: '/services/web/resources/unicons/align-justify.svg' +}; +if (typeof exports !== 'undefined') { + exports.getPerspective = () => perspectiveData; +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/controller.js b/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/controller.js new file mode 100644 index 0000000..d1bc2c8 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/controller.js @@ -0,0 +1,257 @@ +angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) + .config(['EntityServiceProvider', (EntityServiceProvider) => { + EntityServiceProvider.baseUrl = '/services/java/codbex-payments/gen/codbex_payments/api/paymentrecord/PaymentRecordController'; + }]) + .controller('PageController', ($scope, $http, EntityService, LocaleService, Extensions) => { + const Dialogs = new DialogHub(); + $scope.dataPage = 1; + $scope.dataCount = 0; + $scope.dataLimit = 20; + + //-----------------Custom Actions-------------------// + Extensions.getWindows(['codbex-payments-custom-action']).then((response) => { + $scope.pageActions = response.data.filter(e => e.perspective === 'PaymentRecord' && e.view === 'PaymentRecord' && (e.type === 'page' || e.type === undefined)); + $scope.entityActions = response.data.filter(e => e.perspective === 'PaymentRecord' && e.view === 'PaymentRecord' && e.type === 'entity'); + }); + + $scope.triggerPageAction = (action) => { + Dialogs.showWindow({ + hasHeader: true, + title: LocaleService.t(action.translation.key, action.translation.options, action.label), + path: action.path, + params: { + filterEntity: $scope.filterEntity, + optionsCompany: $scope.optionsCompany, + optionsCurrency: $scope.optionsCurrency, + optionsPaymentDirection: $scope.optionsPaymentDirection, + optionsPaymentType: $scope.optionsPaymentType, + }, + maxWidth: action.maxWidth, + maxHeight: action.maxHeight, + closeButton: true, + }); + }; + + $scope.triggerEntityAction = (action) => { + Dialogs.showWindow({ + hasHeader: true, + title: LocaleService.t(action.translation.key, action.translation.options, action.label), + path: action.path, + params: { + id: $scope.entity.Id + }, + closeButton: true, + }); + }; + //-----------------Custom Actions-------------------// + + function resetPagination() { + $scope.dataPage = 1; + $scope.dataCount = 0; + $scope.dataLimit = 20; + } + resetPagination(); + + //-----------------Events-------------------// + Dialogs.addMessageListener({ topic: 'codbex-payments.PaymentRecord.PaymentRecord.entitySearch', handler: (data) => { + resetPagination(); + $scope.filter = data.filter; + $scope.filterEntity = data.entity; + $scope.loadPage($scope.dataPage, $scope.filter); + }}); + //-----------------Events-------------------// + + $scope.loadPage = (pageNumber, filter) => { + if (!filter && $scope.filter) { + filter = $scope.filter; + } + $scope.dataPage = pageNumber; + EntityService.count(filter).then((resp) => { + if (resp.data) { + $scope.dataCount = resp.data.count; + } + let offset = (pageNumber - 1) * $scope.dataLimit; + let limit = $scope.dataLimit; + let request; + if (filter) { + if (!filter.$filter) { + filter.$filter = {}; + } + filter.$filter.offset = offset; + filter.$filter.limit = limit; + request = EntityService.search(filter); + } else { + request = EntityService.list(offset, limit); + } + request.then((response) => { + response.data.forEach(e => { + if (e.Date) { + e.Date = new Date(e.Date); + } + if (e.Valor) { + e.Valor = new Date(e.Valor); + } + if (e.DeletedAt) { + e.DeletedAt = new Date(e.DeletedAt); + } + if (e.CreatedAt) { + e.CreatedAt = new Date(e.CreatedAt); + } + if (e.UpdatedAt) { + e.UpdatedAt = new Date(e.UpdatedAt); + } + }); + + $scope.data = response.data; + }, (error) => { + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.PAYMENTRECORD'), + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLF', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTRECORD)', message: message }), + type: AlertTypes.Error + }); + console.error('EntityService:', error); + }); + }, (error) => { + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.PAYMENTRECORD'), + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToCount', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTRECORD)', message: message }), + type: AlertTypes.Error + }); + console.error('EntityService:', error); + }); + }; + $scope.loadPage($scope.dataPage, $scope.filter); + + $scope.selectEntity = (entity) => { + $scope.selectedEntity = entity; + }; + + $scope.openDetails = (entity) => { + $scope.selectedEntity = entity; + Dialogs.showWindow({ + id: 'PaymentRecord-Report-details', + params: { + action: "select", + entity: entity, + optionsCompany: $scope.optionsCompany, + optionsCurrency: $scope.optionsCurrency, + optionsPaymentDirection: $scope.optionsPaymentDirection, + optionsPaymentType: $scope.optionsPaymentType, + }, + }); + }; + + $scope.openFilter = () => { + Dialogs.showWindow({ + id: 'PaymentRecord-Report-filter', + params: { + entity: $scope.filterEntity, + optionsCompany: $scope.optionsCompany, + optionsCurrency: $scope.optionsCurrency, + optionsPaymentDirection: $scope.optionsPaymentDirection, + optionsPaymentType: $scope.optionsPaymentType, + }, + }); + }; + + //----------------Dropdowns-----------------// + $scope.optionsCompany = []; + $scope.optionsCurrency = []; + $scope.optionsPaymentDirection = []; + $scope.optionsPaymentType = []; + + $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 + }); + }); + + $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 + })); + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Currency', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + + $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 + })); + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'PaymentDirection', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + + $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 + })); + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + 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) { + return $scope.optionsCurrency[i].text; + } + } + return null; + }; + $scope.optionsPaymentDirectionValue = (optionKey) => { + for (let i = 0; i < $scope.optionsPaymentDirection.length; i++) { + if ($scope.optionsPaymentDirection[i].value === optionKey) { + return $scope.optionsPaymentDirection[i].text; + } + } + return null; + }; + $scope.optionsPaymentTypeValue = (optionKey) => { + for (let i = 0; i < $scope.optionsPaymentType.length; i++) { + if ($scope.optionsPaymentType[i].value === optionKey) { + return $scope.optionsPaymentType[i].text; + } + } + return null; + }; + //----------------Dropdowns-----------------// + }); \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-filter/controller.js b/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-filter/controller.js new file mode 100644 index 0000000..9a1a78c --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-filter/controller.js @@ -0,0 +1,186 @@ +angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controller('PageController', ($scope, ViewParameters) => { + const Dialogs = new DialogHub(); + $scope.entity = {}; + $scope.forms = { + details: {}, + }; + + let params = ViewParameters.get(); + if (Object.keys(params).length) { + if (params?.entity?.DateFrom) { + params.entity.DateFrom = new Date(params.entity.DateFrom); + } + if (params?.entity?.DateTo) { + params.entity.DateTo = new Date(params.entity.DateTo); + } + if (params?.entity?.ValorFrom) { + params.entity.ValorFrom = new Date(params.entity.ValorFrom); + } + if (params?.entity?.ValorTo) { + params.entity.ValorTo = new Date(params.entity.ValorTo); + } + if (params?.entity?.DeletedAtFrom) { + params.entity.DeletedAtFrom = new Date(params.entity.DeletedAtFrom); + } + if (params?.entity?.DeletedAtTo) { + params.entity.DeletedAtTo = new Date(params.entity.DeletedAtTo); + } + if (params?.entity?.CreatedAtFrom) { + params.entity.CreatedAtFrom = new Date(params.entity.CreatedAtFrom); + } + if (params?.entity?.CreatedAtTo) { + params.entity.CreatedAtTo = new Date(params.entity.CreatedAtTo); + } + if (params?.entity?.UpdatedAtFrom) { + params.entity.UpdatedAtFrom = new Date(params.entity.UpdatedAtFrom); + } + if (params?.entity?.UpdatedAtTo) { + params.entity.UpdatedAtTo = new Date(params.entity.UpdatedAtTo); + } + $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.filter = () => { + let entity = $scope.entity; + const filter = { + $filter: { + conditions: [], + sorts: [], + limit: 20, + offset: 0 + } + }; + if (entity.Id !== undefined) { + const condition = { propertyName: 'Id', operator: 'EQ', value: entity.Id }; + filter.$filter.conditions.push(condition); + } + if (entity.DateFrom) { + const condition = { propertyName: 'Date', operator: 'GE', value: entity.DateFrom }; + filter.$filter.conditions.push(condition); + } + if (entity.DateTo) { + const condition = { propertyName: 'Date', operator: 'LE', value: entity.DateTo }; + filter.$filter.conditions.push(condition); + } + if (entity.ValorFrom) { + const condition = { propertyName: 'Valor', operator: 'GE', value: entity.ValorFrom }; + filter.$filter.conditions.push(condition); + } + if (entity.ValorTo) { + const condition = { propertyName: 'Valor', operator: 'LE', value: entity.ValorTo }; + filter.$filter.conditions.push(condition); + } + if (entity.OurPartyIBAN) { + const condition = { propertyName: 'OurPartyIBAN', operator: 'LIKE', value: `%${entity.OurPartyIBAN}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.CounterpartyIBAN) { + const condition = { propertyName: 'CounterpartyIBAN', operator: 'LIKE', value: `%${entity.CounterpartyIBAN}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.CounterpartyName) { + const condition = { propertyName: 'CounterpartyName', operator: 'LIKE', value: `%${entity.CounterpartyName}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.Amount !== undefined) { + 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); + } + if (entity.PaymentDirection !== undefined) { + const condition = { propertyName: 'PaymentDirection', operator: 'EQ', value: entity.PaymentDirection }; + filter.$filter.conditions.push(condition); + } + if (entity.PaymentType !== undefined) { + const condition = { propertyName: 'PaymentType', operator: 'EQ', value: entity.PaymentType }; + filter.$filter.conditions.push(condition); + } + if (entity.Reason) { + const condition = { propertyName: 'Reason', operator: 'LIKE', value: `%${entity.Reason}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.Description) { + const condition = { propertyName: 'Description', operator: 'LIKE', value: `%${entity.Description}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.UUID) { + const condition = { propertyName: 'UUID', operator: 'LIKE', value: `%${entity.UUID}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.Reference) { + const condition = { propertyName: 'Reference', operator: 'LIKE', value: `%${entity.Reference}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.Deleted !== undefined && entity.isDeletedIndeterminate === false) { + const condition = { propertyName: 'Deleted', operator: 'EQ', value: entity.Deleted }; + filter.$filter.conditions.push(condition); + } + if (entity.DeletedAtFrom) { + const condition = { propertyName: 'DeletedAt', operator: 'GE', value: entity.DeletedAtFrom }; + filter.$filter.conditions.push(condition); + } + if (entity.DeletedAtTo) { + const condition = { propertyName: 'DeletedAt', operator: 'LE', value: entity.DeletedAtTo }; + filter.$filter.conditions.push(condition); + } + if (entity.DeletedReason) { + const condition = { propertyName: 'DeletedReason', operator: 'LIKE', value: `%${entity.DeletedReason}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.CreatedAtFrom) { + const condition = { propertyName: 'CreatedAt', operator: 'GE', value: entity.CreatedAtFrom }; + filter.$filter.conditions.push(condition); + } + if (entity.CreatedAtTo) { + const condition = { propertyName: 'CreatedAt', operator: 'LE', value: entity.CreatedAtTo }; + filter.$filter.conditions.push(condition); + } + if (entity.CreatedBy) { + const condition = { propertyName: 'CreatedBy', operator: 'LIKE', value: `%${entity.CreatedBy}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.UpdatedAtFrom) { + const condition = { propertyName: 'UpdatedAt', operator: 'GE', value: entity.UpdatedAtFrom }; + filter.$filter.conditions.push(condition); + } + if (entity.UpdatedAtTo) { + const condition = { propertyName: 'UpdatedAt', operator: 'LE', value: entity.UpdatedAtTo }; + filter.$filter.conditions.push(condition); + } + if (entity.UpdatedBy) { + const condition = { propertyName: 'UpdatedBy', operator: 'LIKE', value: `%${entity.UpdatedBy}%` }; + filter.$filter.conditions.push(condition); + } + Dialogs.postMessage({ topic: 'codbex-payments.PaymentRecord.PaymentRecord.entitySearch', data: { + entity: entity, + filter: filter + } }); + $scope.cancel(); + }; + + $scope.resetFilter = () => { + $scope.entity = {}; + $scope.filter(); + }; + + $scope.cancel = () => { + Dialogs.closeWindow({ id: 'PaymentRecord-Report-filter' }); + }; + + $scope.clearErrorMessage = () => { + $scope.errorMessage = null; + }; +}); \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-filter/index.html b/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-filter/index.html new file mode 100644 index 0000000..84a660f --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-filter/index.html @@ -0,0 +1,395 @@ + + + + + + + + + + + + + + + + + {{ errorMessage }} + + + + +
+ {{ 'codbex-payments:codbex-payments-model.defaults.from' | t:{'text':'$t(codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DATE)'} }} +
+
+ + + + +
+
+ {{ 'codbex-payments:codbex-payments-model.defaults.to' | t:{'text':'$t(codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DATE)'} }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.defaults.from' | t:{'text':'$t(codbex-payments:codbex-payments-model.t.PAYMENTRECORD_VALOR)'} }} +
+
+ + + + +
+
+ {{ 'codbex-payments:codbex-payments-model.defaults.to' | t:{'text':'$t(codbex-payments:codbex-payments-model.t.PAYMENTRECORD_VALOR)'} }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_OURPARTYIBAN' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COUNTERPARTYIBAN' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COUNTERPARTYNAME' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_AMOUNT' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COMPANY' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_CURRENCY' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_PAYMENTDIRECTION' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_PAYMENTTYPE' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_REASON' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DESCRIPTION' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_UUID' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_REFERENCE' | t }} +
+
+ + + + +
+
+ +
+
+ + {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETED' | t }} +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETEDAT' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETEDREASON' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_CREATEDAT' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_CREATEDBY' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_UPDATEDAT' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_UPDATEDBY' | t }} +
+
+ + + + +
+
+
+
+
+ + + + + + + + + + + + + + + + + + diff --git a/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-filter/view.extension b/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-filter/view.extension new file mode 100644 index 0000000..acde21e --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-filter/view.extension @@ -0,0 +1,6 @@ +{ + "module": "codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-filter/view.js", + "extensionPoint": "application-windows", + "description": "codbex-payments - Application Dialog Window", + "role": "codbex-payments.PaymentRecord.PaymentRecordReadOnly" +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-filter/view.js b/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-filter/view.js new file mode 100644 index 0000000..6afe6c9 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-filter/view.js @@ -0,0 +1,20 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const viewData = { + id: 'PaymentRecord-Report-filter', + label: 'PaymentRecord Report Filter', + translation: { + key: 'codbex-payments:codbex-payments-model.extName', + options: { + content: '$t(codbex-payments:codbex-payments-model.t.PAYMENTRECORD) $t(codbex-payments:codbex-payments-model.defaults.reportFilter)', + } + }, + path: '/services/web/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-filter/index.html', + perspectiveName: 'Reports' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-print/controller.js b/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-print/controller.js new file mode 100644 index 0000000..91f1a9d --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-print/controller.js @@ -0,0 +1,216 @@ +angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) + .config(['EntityServiceProvider', (EntityServiceProvider) => { + EntityServiceProvider.baseUrl = '/services/java/codbex-payments/gen/codbex_payments/api/paymentrecord/PaymentRecordController'; + }]) + .controller('PageController', ($scope, EntityService, LocaleService, ViewParameters) => { + const Dialogs = new DialogHub(); + let params = ViewParameters.get(); + if (Object.keys(params).length) { + const filterEntity = params.filterEntity ?? {}; + + const filter = { + $filter: { + conditions: [], + sorts: [], + limit: 20, + offset: 0 + } + }; + if (entity.Id !== undefined) { + const condition = { propertyName: 'Id', operator: 'EQ', value: entity.Id }; + filter.$filter.conditions.push(condition); + } + if (entity.DateFrom) { + const condition = { propertyName: 'Date', operator: 'GE', value: entity.DateFrom }; + filter.$filter.conditions.push(condition); + } + if (entity.DateTo) { + const condition = { propertyName: 'Date', operator: 'LE', value: entity.DateTo }; + filter.$filter.conditions.push(condition); + } + if (entity.ValorFrom) { + const condition = { propertyName: 'Valor', operator: 'GE', value: entity.ValorFrom }; + filter.$filter.conditions.push(condition); + } + if (entity.ValorTo) { + const condition = { propertyName: 'Valor', operator: 'LE', value: entity.ValorTo }; + filter.$filter.conditions.push(condition); + } + if (entity.OurPartyIBAN) { + const condition = { propertyName: 'OurPartyIBAN', operator: 'LIKE', value: `%${entity.OurPartyIBAN}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.CounterpartyIBAN) { + const condition = { propertyName: 'CounterpartyIBAN', operator: 'LIKE', value: `%${entity.CounterpartyIBAN}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.CounterpartyName) { + const condition = { propertyName: 'CounterpartyName', operator: 'LIKE', value: `%${entity.CounterpartyName}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.Amount !== undefined) { + 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); + } + if (entity.PaymentDirection !== undefined) { + const condition = { propertyName: 'PaymentDirection', operator: 'EQ', value: entity.PaymentDirection }; + filter.$filter.conditions.push(condition); + } + if (entity.PaymentType !== undefined) { + const condition = { propertyName: 'PaymentType', operator: 'EQ', value: entity.PaymentType }; + filter.$filter.conditions.push(condition); + } + if (entity.Reason) { + const condition = { propertyName: 'Reason', operator: 'LIKE', value: `%${entity.Reason}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.Description) { + const condition = { propertyName: 'Description', operator: 'LIKE', value: `%${entity.Description}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.UUID) { + const condition = { propertyName: 'UUID', operator: 'LIKE', value: `%${entity.UUID}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.Reference) { + const condition = { propertyName: 'Reference', operator: 'LIKE', value: `%${entity.Reference}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.Deleted !== undefined && entity.isDeletedIndeterminate === false) { + const condition = { propertyName: 'Deleted', operator: 'EQ', value: entity.Deleted }; + filter.$filter.conditions.push(condition); + } + if (entity.DeletedAtFrom) { + const condition = { propertyName: 'DeletedAt', operator: 'GE', value: entity.DeletedAtFrom }; + filter.$filter.conditions.push(condition); + } + if (entity.DeletedAtTo) { + const condition = { propertyName: 'DeletedAt', operator: 'LE', value: entity.DeletedAtTo }; + filter.$filter.conditions.push(condition); + } + if (entity.DeletedReason) { + const condition = { propertyName: 'DeletedReason', operator: 'LIKE', value: `%${entity.DeletedReason}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.CreatedAtFrom) { + const condition = { propertyName: 'CreatedAt', operator: 'GE', value: entity.CreatedAtFrom }; + filter.$filter.conditions.push(condition); + } + if (entity.CreatedAtTo) { + const condition = { propertyName: 'CreatedAt', operator: 'LE', value: entity.CreatedAtTo }; + filter.$filter.conditions.push(condition); + } + if (entity.CreatedBy) { + const condition = { propertyName: 'CreatedBy', operator: 'LIKE', value: `%${entity.CreatedBy}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.UpdatedAtFrom) { + const condition = { propertyName: 'UpdatedAt', operator: 'GE', value: entity.UpdatedAtFrom }; + filter.$filter.conditions.push(condition); + } + if (entity.UpdatedAtTo) { + const condition = { propertyName: 'UpdatedAt', operator: 'LE', value: entity.UpdatedAtTo }; + filter.$filter.conditions.push(condition); + } + if (entity.UpdatedBy) { + const condition = { propertyName: 'UpdatedBy', operator: 'LIKE', value: `%${entity.UpdatedBy}%` }; + filter.$filter.conditions.push(condition); + } + + $scope.filter = filter; + + $scope.optionsCompany = params.optionsCompany; + $scope.optionsCurrency = params.optionsCurrency; + $scope.optionsPaymentDirection = params.optionsPaymentDirection; + $scope.optionsPaymentType = params.optionsPaymentType; + } + + $scope.loadPage = (filter) => { + if (!filter && $scope.filter) { + filter = $scope.filter; + } + let request; + if (filter) { + request = EntityService.search(filter); + } else { + request = EntityService.list(); + } + request.then((response) => { + response.data.forEach(e => { + if (e.Date) { + e.Date = new Date(e.Date); + } + if (e.Valor) { + e.Valor = new Date(e.Valor); + } + if (e.DeletedAt) { + e.DeletedAt = new Date(e.DeletedAt); + } + if (e.CreatedAt) { + e.CreatedAt = new Date(e.CreatedAt); + } + if (e.UpdatedAt) { + e.UpdatedAt = new Date(e.UpdatedAt); + } + }); + + $scope.data = response.data; + setTimeout(() => { + window.print(); + }, 250); + }, (error) => { + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.PAYMENTRECORD'), + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLF', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTRECORD)', message: message }), + type: AlertTypes.Error + }); + console.error('EntityService:', error); + }); + }; + $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) { + return $scope.optionsCurrency[i].text; + } + } + return null; + }; + $scope.optionsPaymentDirectionValue = (optionKey) => { + for (let i = 0; i < $scope.optionsPaymentDirection.length; i++) { + if ($scope.optionsPaymentDirection[i].value === optionKey) { + return $scope.optionsPaymentDirection[i].text; + } + } + return null; + }; + $scope.optionsPaymentTypeValue = (optionKey) => { + for (let i = 0; i < $scope.optionsPaymentType.length; i++) { + if ($scope.optionsPaymentType[i].value === optionKey) { + return $scope.optionsPaymentType[i].text; + } + } + return null; + }; + window.onafterprint = () => { + Dialogs.closeWindow({ path: viewData.path }); + } + }); \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-print/index.html b/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-print/index.html new file mode 100644 index 0000000..a01d3f8 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-print/index.html @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + {{ 'codbex-payments:codbex-payments-model.defaults.reportTitle' | t:{'name':'PaymentRecord'} }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DATE' | t:'Date' }}{{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_VALOR' | t:'Valor' }}{{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_OURPARTYIBAN' | t:'OurPartyIBAN' }}{{ '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_UUID' | t:'UUID' }}{{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_REFERENCE' | t:'Reference' }}{{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETED' | t:'Deleted' }}{{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETEDAT' | t:'DeletedAt' }}{{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETEDREASON' | t:'DeletedReason' }}{{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_CREATEDAT' | t:'CreatedAt' }}{{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_CREATEDBY' | t:'CreatedBy' }}{{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_UPDATEDAT' | t:'UpdatedAt' }}{{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_UPDATEDBY' | t:'UpdatedBy' }}
{{'codbex-payments:codbex-payments-model.messages.noData' | t}}
+ + + + {{next.OurPartyIBAN}}{{next.CounterpartyIBAN}}{{next.CounterpartyName}}{{next.Amount}}{{optionsCompanyValue(next.Company)}}{{optionsCurrencyValue(next.Currency)}}{{optionsPaymentDirectionValue(next.PaymentDirection)}}{{optionsPaymentTypeValue(next.PaymentType)}}{{next.Reason}}{{next.Description}}{{next.UUID}}{{next.Reference}} + + + {{next.DeletedAt}}{{next.DeletedReason}}{{next.CreatedAt}}{{next.CreatedBy}}{{next.UpdatedAt}}{{next.UpdatedBy}}
+
+ + + + diff --git a/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-print/print.extension b/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-print/print.extension new file mode 100644 index 0000000..849eb26 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-print/print.extension @@ -0,0 +1,6 @@ +{ + "extensionPoint": "codbex-payments-custom-action", + "module": "codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-print/print.js", + "description": "Print PaymentRecord Report", + "role": "codbex-payments.PaymentRecord.PaymentRecordReadOnly" +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-print/print.js b/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-print/print.js new file mode 100644 index 0000000..9252dc7 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-print/print.js @@ -0,0 +1,15 @@ +const viewData = { + id: 'codbex-payments-Reports-PaymentRecord-print', + label: 'Print', + translation: { + key: '$projectName:${tprefix}.defaults.print', + }, + path: '/services/web/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-print/index.html', + perspective: 'Reports', + view: 'PaymentRecord', + type: 'page', + order: 10 +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/controller.js b/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/controller.js new file mode 100644 index 0000000..9568936 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/controller.js @@ -0,0 +1,29 @@ +angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controller('PageController', ($scope, ViewParameters) => { + $scope.entity = {}; + + let params = ViewParameters.get(); + if (Object.keys(params).length) { + $scope.action = 'select'; + + if (params.entity.Date) { + params.entity.Date = new Date(params.entity.Date); + } + if (params.entity.Valor) { + params.entity.Valor = new Date(params.entity.Valor); + } + if (params.entity.DeletedAt) { + params.entity.DeletedAt = new Date(params.entity.DeletedAt); + } + if (params.entity.CreatedAt) { + params.entity.CreatedAt = new Date(params.entity.CreatedAt); + } + if (params.entity.UpdatedAt) { + 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; + } +}); \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/index.html b/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/index.html new file mode 100644 index 0000000..986b187 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/index.html @@ -0,0 +1,333 @@ + + + + + + + + + + + + + + + + + + +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DATE' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_VALOR' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_OURPARTYIBAN' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COUNTERPARTYIBAN' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COUNTERPARTYNAME' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_AMOUNT' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_COMPANY' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_CURRENCY' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_PAYMENTDIRECTION' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_PAYMENTTYPE' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_REASON' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DESCRIPTION' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_UUID' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_REFERENCE' | t }} +
+
+ + +
+
+ +
+
+ + {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETED' | t }} +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETEDAT' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETEDREASON' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_CREATEDAT' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_CREATEDBY' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_UPDATEDAT' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_UPDATEDBY' | t }} +
+
+ + +
+
+
+
+
+ + + + diff --git a/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/view.extension b/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/view.extension new file mode 100644 index 0000000..f2a28ad --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/view.extension @@ -0,0 +1,6 @@ +{ + "module": "codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/view.js", + "extensionPoint": "application-windows", + "description": "codbex-payments - Application Dialog Window", + "role": "codbex-payments.PaymentRecord.PaymentRecordReadOnly" +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/view.js b/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/view.js new file mode 100644 index 0000000..3b02a39 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/view.js @@ -0,0 +1,20 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const viewData = { + id: 'PaymentRecord-Report-details', + label: 'PaymentRecord Report', + translation: { + key: 'codbex-payments:codbex-payments-model.defaults.reportTitle', + options: { + name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTRECORD)', + } + }, + path: '/services/web/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/index.html', + perspectiveName: 'Reports' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/index.html b/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/index.html new file mode 100644 index 0000000..7de046b --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/index.html @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + {{'codbex-payments:codbex-payments-model.defaults.items' | t}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DATE' | t:'Date' }}{{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_VALOR' | t:'Valor' }}{{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_OURPARTYIBAN' | t:'OurPartyIBAN' }}{{ '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_UUID' | t:'UUID' }}{{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_REFERENCE' | t:'Reference' }}{{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETED' | t:'Deleted' }}{{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETEDAT' | t:'DeletedAt' }}{{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_DELETEDREASON' | t:'DeletedReason' }}{{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_CREATEDAT' | t:'CreatedAt' }}{{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_CREATEDBY' | t:'CreatedBy' }}{{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_UPDATEDAT' | t:'UpdatedAt' }}{{ 'codbex-payments:codbex-payments-model.t.PAYMENTRECORD_UPDATEDBY' | t:'UpdatedBy' }}
{{'codbex-payments:codbex-payments-model.messages.noData' | t}}
+ + + + {{next.OurPartyIBAN}}{{next.CounterpartyIBAN}}{{next.CounterpartyName}}{{next.Amount}} + {{optionsCompanyValue(next.Company)}} + + {{optionsCurrencyValue(next.Currency)}} + + {{optionsPaymentDirectionValue(next.PaymentDirection)}} + + {{optionsPaymentTypeValue(next.PaymentType)}} + {{next.Reason}}{{next.Description}}{{next.UUID}}{{next.Reference}} + + + {{next.DeletedAt}}{{next.DeletedReason}}{{next.CreatedAt}}{{next.CreatedBy}}{{next.UpdatedAt}}{{next.UpdatedBy}} + + + + + + + + + + + +
+
+ + + + + + + diff --git a/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/view.extension b/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/view.extension new file mode 100644 index 0000000..0375a5c --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/view.extension @@ -0,0 +1,6 @@ +{ + "module": "codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/view.js", + "extensionPoint": "application-reports", + "description": "codbex-payments - Application View", + "role": "codbex-payments.PaymentRecord.PaymentRecordReadOnly" +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/view.js b/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/view.js new file mode 100644 index 0000000..3158b28 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/view.js @@ -0,0 +1,23 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const viewData = { + id: 'PaymentRecordReport', + label: 'PaymentRecord Report', + translation: { + key: 'codbex-payments:codbex-payments-model.defaults.reportTitle', + options: { + name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTRECORD)', + } + }, + region: 'center', + lazyLoad: true, + autoFocusTab: false, + path: '/services/web/codbex-payments/gen/codbex-payments/ui/Reports/PaymentRecord/index.html', + perspectiveName: 'Reports' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/controller.js b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/controller.js new file mode 100644 index 0000000..e05dfdb --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/controller.js @@ -0,0 +1,202 @@ +angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) + .config(['EntityServiceProvider', (EntityServiceProvider) => { + EntityServiceProvider.baseUrl = '/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentDirectionController'; + }]) + .controller('PageController', ($scope, EntityService, Extensions, LocaleService, ButtonStates) => { + const Dialogs = new DialogHub(); + let translated = { + yes: 'Yes', + no: 'No', + deleteConfirm: 'Are you sure you want to delete PaymentDirection? This action cannot be undone.', + deleteTitle: 'Delete PaymentDirection?' + }; + + LocaleService.onInit(() => { + translated.yes = LocaleService.t('codbex-payments:codbex-payments-model.defaults.yes'); + translated.no = LocaleService.t('codbex-payments:codbex-payments-model.defaults.no'); + translated.deleteTitle = LocaleService.t('codbex-payments:codbex-payments-model.defaults.deleteTitle', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTDIRECTION)' }); + translated.deleteConfirm = LocaleService.t('codbex-payments:codbex-payments-model.messages.deleteConfirm', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTDIRECTION)' }); + }); + + $scope.dataPage = 1; + $scope.dataCount = 0; + $scope.dataLimit = 20; + + //-----------------Custom Actions-------------------// + Extensions.getWindows(['codbex-payments-custom-action']).then((response) => { + $scope.pageActions = response.data.filter(e => e.perspective === 'Settings' && e.view === 'PaymentDirection' && (e.type === 'page' || e.type === undefined)); + $scope.entityActions = response.data.filter(e => e.perspective === 'Settings' && e.view === 'PaymentDirection' && e.type === 'entity'); + }); + + $scope.triggerPageAction = (action) => { + Dialogs.showWindow({ + hasHeader: true, + title: LocaleService.t(action.translation.key, action.translation.options, action.label), + path: action.path, + maxWidth: action.maxWidth, + maxHeight: action.maxHeight, + closeButton: true + }); + }; + + $scope.triggerEntityAction = (action) => { + Dialogs.showWindow({ + hasHeader: true, + title: LocaleService.t(action.translation.key, action.translation.options, action.label), + path: action.path, + params: { + id: $scope.entity.Id + }, + closeButton: true + }); + }; + //-----------------Custom Actions-------------------// + + function resetPagination() { + $scope.dataPage = 1; + $scope.dataCount = 0; + $scope.dataLimit = 20; + } + resetPagination(); + + //-----------------Events-------------------// + Dialogs.addMessageListener({ topic: 'codbex-payments.Settings.PaymentDirection.entityCreated', handler: () => { + $scope.loadPage($scope.dataPage, $scope.filter); + }}); + Dialogs.addMessageListener({ topic: 'codbex-payments.Settings.PaymentDirection.entityUpdated', handler: () => { + $scope.loadPage($scope.dataPage, $scope.filter); + }}); + Dialogs.addMessageListener({ topic: 'codbex-payments.Settings.PaymentDirection.entitySearch', handler: (data) => { + resetPagination(); + $scope.filter = data.filter; + $scope.filterEntity = data.entity; + $scope.loadPage($scope.dataPage, $scope.filter); + }}); + //-----------------Events-------------------// + + $scope.loadPage = (pageNumber, filter) => { + if (!filter && $scope.filter) { + filter = $scope.filter; + } + $scope.dataPage = pageNumber; + EntityService.count(filter).then((resp) => { + if (resp.data) { + $scope.dataCount = resp.data.count; + } + let offset = (pageNumber - 1) * $scope.dataLimit; + let limit = $scope.dataLimit; + let request; + if (filter) { + if (!filter.$filter) { + filter.$filter = {}; + } + filter.$filter.offset = offset; + filter.$filter.limit = limit; + request = EntityService.search(filter); + } else { + request = EntityService.list(offset, limit); + } + request.then((response) => { + $scope.data = response.data; + }, (error) => { + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.PAYMENTDIRECTION'), + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLF', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTDIRECTION)', message: message }), + type: AlertTypes.Error + }); + console.error('EntityService:', error); + }); + }, (error) => { + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.PAYMENTDIRECTION'), + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToCount', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTDIRECTION)', message: message }), + type: AlertTypes.Error + }); + console.error('EntityService:', error); + }); + }; + $scope.loadPage($scope.dataPage, $scope.filter); + + $scope.selectEntity = (entity) => { + $scope.selectedEntity = entity; + }; + + $scope.openDetails = (entity) => { + $scope.selectedEntity = entity; + Dialogs.showWindow({ + id: 'PaymentDirection-details', + params: { + action: 'select', + entity: entity, + }, + closeButton: true, + }); + }; + + $scope.openFilter = () => { + Dialogs.showWindow({ + id: 'PaymentDirection-filter', + params: { + entity: $scope.filterEntity, + }, + closeButton: true, + }); + }; + + $scope.createEntity = () => { + $scope.selectedEntity = null; + Dialogs.showWindow({ + id: 'PaymentDirection-details', + params: { + action: 'create', + entity: {}, + }, + closeButton: false, + }); + }; + + $scope.updateEntity = (entity) => { + Dialogs.showWindow({ + id: 'PaymentDirection-details', + params: { + action: 'update', + entity: entity, + }, + closeButton: false, + }); + }; + + $scope.deleteEntity = (entity) => { + let id = entity.Id; + Dialogs.showDialog({ + title: translated.deleteTitle, + message: translated.deleteConfirm, + buttons: [{ + id: 'delete-btn-yes', + state: ButtonStates.Emphasized, + label: translated.yes, + }, { + id: 'delete-btn-no', + label: translated.no, + }] + }).then((buttonId) => { + if (buttonId === 'delete-btn-yes') { + EntityService.delete(id).then((response) => { + $scope.loadPage($scope.dataPage, $scope.filter); + Dialogs.triggerEvent('codbex-payments.Settings.PaymentDirection.clearDetails'); + }, (error) => { + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.PAYMENTDIRECTION'), + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToDelete', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTDIRECTION)', message: message }), + type: AlertTypes.Error + }); + console.error('EntityService:', error); + }); + } + }); + }; + + }); \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-filter/controller.js b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-filter/controller.js new file mode 100644 index 0000000..1449068 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-filter/controller.js @@ -0,0 +1,67 @@ +angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controller('PageController', ($scope, ViewParameters, LocaleService) => { + const Dialogs = new DialogHub(); + let description = 'Description'; + $scope.entity = {}; + $scope.forms = { + details: {}, + }; + + LocaleService.onInit(() => { + description = LocaleService.t('codbex-payments:codbex-payments-model.defaults.description'); + }); + + let params = ViewParameters.get(); + if (Object.keys(params).length) { + $scope.entity = params.entity ?? {}; + $scope.selectedMainEntityKey = params.selectedMainEntityKey; + $scope.selectedMainEntityId = params.selectedMainEntityId; + } + + $scope.filter = () => { + let entity = $scope.entity; + const filter = { + $filter: { + conditions: [], + sorts: [], + limit: 20, + offset: 0 + } + }; + if (entity.Id !== undefined) { + const condition = { propertyName: 'Id', operator: 'EQ', value: entity.Id }; + filter.$filter.conditions.push(condition); + } + if (entity.Name) { + const condition = { propertyName: 'Name', operator: 'LIKE', value: `%${entity.Name}%` }; + filter.$filter.conditions.push(condition); + } + Dialogs.postMessage({ topic: 'codbex-payments.Settings.PaymentDirection.entitySearch', data: { + entity: entity, + filter: filter + }}); + $scope.cancel(); + }; + + $scope.resetFilter = () => { + $scope.entity = {}; + $scope.filter(); + }; + + $scope.alert = (message) => { + if (message) Dialogs.showAlert({ + title: description, + message: message, + type: AlertTypes.Information, + preformatted: true, + }); + }; + + $scope.cancel = () => { + Dialogs.closeWindow({ id: 'PaymentDirection-filter' }); + }; + + $scope.clearErrorMessage = () => { + $scope.errorMessage = null; + }; + +}); \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-filter/index.html b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-filter/index.html new file mode 100644 index 0000000..84bfc9c --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-filter/index.html @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + {{ errorMessage }} + + + + +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTDIRECTION_NAME' | t }} +
+
+ + + + +
+
+
+
+
+ + + + + + + + + + + + + + + + + + diff --git a/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-filter/view.extension b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-filter/view.extension new file mode 100644 index 0000000..4d2ea8f --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-filter/view.extension @@ -0,0 +1,5 @@ +{ + "module": "codbex-payments/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-filter/view.js", + "extensionPoint": "application-windows", + "description": "codbex-payments - Application Dialog Window" +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-filter/view.js b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-filter/view.js new file mode 100644 index 0000000..b7cb4be --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-filter/view.js @@ -0,0 +1,20 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const viewData = { + id: 'PaymentDirection-filter', + label: 'PaymentDirection Filter', + translation: { + key: 'codbex-payments:codbex-payments-model.extName', + options: { + content: '$t(codbex-payments:codbex-payments-model.t.PAYMENTDIRECTION) $t(codbex-payments:codbex-payments-model.defaults.filter)', + } + }, + path: '/services/web/codbex-payments/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-filter/index.html', + perspectiveName: 'Settings' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-window/controller.js b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-window/controller.js new file mode 100644 index 0000000..606276f --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-window/controller.js @@ -0,0 +1,100 @@ +angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) + .config(['EntityServiceProvider', (EntityServiceProvider) => { + EntityServiceProvider.baseUrl = '/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentDirectionController'; + }]) + .controller('PageController', ($scope, $http, ViewParameters, LocaleService, EntityService) => { + const Dialogs = new DialogHub(); + const Notifications = new NotificationHub(); + let description = 'Description'; + let propertySuccessfullyCreated = 'PaymentDirection successfully created'; + let propertySuccessfullyUpdated = 'PaymentDirection successfully updated'; + + $scope.entity = {}; + $scope.forms = { + details: {}, + }; + $scope.formHeaders = { + select: 'PaymentDirection Details', + create: 'Create PaymentDirection', + update: 'Update PaymentDirection' + }; + $scope.action = 'select'; + + LocaleService.onInit(() => { + description = LocaleService.t('codbex-payments:codbex-payments-model.defaults.description'); + $scope.formHeaders.select = LocaleService.t('codbex-payments:codbex-payments-model.defaults.formHeadSelect', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTDIRECTION)' }); + $scope.formHeaders.create = LocaleService.t('codbex-payments:codbex-payments-model.defaults.formHeadCreate', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTDIRECTION)' }); + $scope.formHeaders.update = LocaleService.t('codbex-payments:codbex-payments-model.defaults.formHeadUpdate', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTDIRECTION)' }); + propertySuccessfullyCreated = LocaleService.t('codbex-payments:codbex-payments-model.messages.propertySuccessfullyCreated', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTDIRECTION)' }); + propertySuccessfullyUpdated = LocaleService.t('codbex-payments:codbex-payments-model.messages.propertySuccessfullyUpdated', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTDIRECTION)' }); + }); + + let params = ViewParameters.get(); + if (Object.keys(params).length) { + $scope.action = params.action; + $scope.entity = params.entity; + $scope.selectedMainEntityKey = params.selectedMainEntityKey; + $scope.selectedMainEntityId = params.selectedMainEntityId; + } + + $scope.create = () => { + let entity = $scope.entity; + entity[$scope.selectedMainEntityKey] = $scope.selectedMainEntityId; + EntityService.create(entity).then((response) => { + Dialogs.postMessage({ topic: 'codbex-payments.Settings.PaymentDirection.entityCreated', data: response.data }); + Notifications.show({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.PAYMENTDIRECTION'), + description: propertySuccessfullyCreated, + type: 'positive' + }); + $scope.cancel(); + }, (error) => { + const message = error.data ? error.data.message : ''; + $scope.$evalAsync(() => { + $scope.errorMessage = LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToCreate', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTDIRECTION)', message: message }); + }); + console.error('EntityService:', error); + }); + }; + + $scope.update = () => { + let id = $scope.entity.Id; + let entity = $scope.entity; + entity[$scope.selectedMainEntityKey] = $scope.selectedMainEntityId; + EntityService.update(id, entity).then((response) => { + Dialogs.postMessage({ topic: 'codbex-payments.Settings.PaymentDirection.entityUpdated', data: response.data }); + Notifications.show({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.PAYMENTDIRECTION'), + description: propertySuccessfullyUpdated, + type: 'positive' + }); + $scope.cancel(); + }, (error) => { + const message = error.data ? error.data.message : ''; + $scope.$evalAsync(() => { + $scope.errorMessage = LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToUpdate', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTDIRECTION)', message: message }); + }); + console.error('EntityService:', error); + }); + }; + + + $scope.alert = (message) => { + if (message) Dialogs.showAlert({ + title: description, + message: message, + type: AlertTypes.Information, + preformatted: true, + }); + }; + + $scope.cancel = () => { + $scope.entity = {}; + $scope.action = 'select'; + Dialogs.closeWindow({ id: 'PaymentDirection-details' }); + }; + + $scope.clearErrorMessage = () => { + $scope.errorMessage = null; + }; + }); \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-window/index.html b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-window/index.html new file mode 100644 index 0000000..e5fa2c8 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-window/index.html @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + {{ errorMessage }} + + + + +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTDIRECTION_NAME' | t }} +
+
+ + + + +
+
+
+
+
+ + + + + + + + + + + + + + + + diff --git a/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-window/view.extension b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-window/view.extension new file mode 100644 index 0000000..59ed78f --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-window/view.extension @@ -0,0 +1,5 @@ +{ + "module": "codbex-payments/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-window/view.js", + "extensionPoint": "application-windows", + "description": "codbex-payments - Application Dialog Window" +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-window/view.js b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-window/view.js new file mode 100644 index 0000000..8a47327 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-window/view.js @@ -0,0 +1,17 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const viewData = { + id: 'PaymentDirection-details', + label: 'PaymentDirection', + translation: { + key: 'codbex-payments:codbex-payments-model.t.PAYMENTDIRECTION', + }, + path: '/services/web/codbex-payments/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-window/index.html', + perspectiveName: 'Settings' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/index.html b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/index.html new file mode 100644 index 0000000..f0ef63f --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/index.html @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + {{'codbex-payments:codbex-payments-model.defaults.items' | t}} + + + + + + + + + + + + + + + + + + + + + + + +
{{ 'codbex-payments:codbex-payments-model.t.PAYMENTDIRECTION_NAME' | t:'Name' }}
{{'codbex-payments:codbex-payments-model.messages.noData' | t}}
{{next.Name}} + + + + + + + + + + + + + +
+
+ + + + + + + diff --git a/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/view.extension b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/view.extension new file mode 100644 index 0000000..0106979 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/view.extension @@ -0,0 +1,5 @@ +{ + "module": "codbex-payments/gen/codbex-payments/ui/Settings/PaymentDirection/view.js", + "extensionPoint": "application-settings", + "description": "codbex-payments - Application View" +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/view.js b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/view.js new file mode 100644 index 0000000..8929684 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/view.js @@ -0,0 +1,20 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const viewData = { + id: 'PaymentDirection', + label: 'PaymentDirection', + translation: { + key: 'codbex-payments:codbex-payments-model.t.PAYMENTDIRECTION', + }, + region: 'center', + lazyLoad: true, + autoFocusTab: false, + path: '/services/web/codbex-payments/gen/codbex-payments/ui/Settings/PaymentDirection/index.html', + perspectiveName: 'Settings' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/controller.js b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/controller.js new file mode 100644 index 0000000..0f5e2cc --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/controller.js @@ -0,0 +1,202 @@ +angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) + .config(['EntityServiceProvider', (EntityServiceProvider) => { + EntityServiceProvider.baseUrl = '/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentTypeController'; + }]) + .controller('PageController', ($scope, EntityService, Extensions, LocaleService, ButtonStates) => { + const Dialogs = new DialogHub(); + let translated = { + yes: 'Yes', + no: 'No', + deleteConfirm: 'Are you sure you want to delete PaymentType? This action cannot be undone.', + deleteTitle: 'Delete PaymentType?' + }; + + LocaleService.onInit(() => { + translated.yes = LocaleService.t('codbex-payments:codbex-payments-model.defaults.yes'); + translated.no = LocaleService.t('codbex-payments:codbex-payments-model.defaults.no'); + translated.deleteTitle = LocaleService.t('codbex-payments:codbex-payments-model.defaults.deleteTitle', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTTYPE)' }); + translated.deleteConfirm = LocaleService.t('codbex-payments:codbex-payments-model.messages.deleteConfirm', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTTYPE)' }); + }); + + $scope.dataPage = 1; + $scope.dataCount = 0; + $scope.dataLimit = 20; + + //-----------------Custom Actions-------------------// + Extensions.getWindows(['codbex-payments-custom-action']).then((response) => { + $scope.pageActions = response.data.filter(e => e.perspective === 'Settings' && e.view === 'PaymentType' && (e.type === 'page' || e.type === undefined)); + $scope.entityActions = response.data.filter(e => e.perspective === 'Settings' && e.view === 'PaymentType' && e.type === 'entity'); + }); + + $scope.triggerPageAction = (action) => { + Dialogs.showWindow({ + hasHeader: true, + title: LocaleService.t(action.translation.key, action.translation.options, action.label), + path: action.path, + maxWidth: action.maxWidth, + maxHeight: action.maxHeight, + closeButton: true + }); + }; + + $scope.triggerEntityAction = (action) => { + Dialogs.showWindow({ + hasHeader: true, + title: LocaleService.t(action.translation.key, action.translation.options, action.label), + path: action.path, + params: { + id: $scope.entity.Id + }, + closeButton: true + }); + }; + //-----------------Custom Actions-------------------// + + function resetPagination() { + $scope.dataPage = 1; + $scope.dataCount = 0; + $scope.dataLimit = 20; + } + resetPagination(); + + //-----------------Events-------------------// + Dialogs.addMessageListener({ topic: 'codbex-payments.Settings.PaymentType.entityCreated', handler: () => { + $scope.loadPage($scope.dataPage, $scope.filter); + }}); + Dialogs.addMessageListener({ topic: 'codbex-payments.Settings.PaymentType.entityUpdated', handler: () => { + $scope.loadPage($scope.dataPage, $scope.filter); + }}); + Dialogs.addMessageListener({ topic: 'codbex-payments.Settings.PaymentType.entitySearch', handler: (data) => { + resetPagination(); + $scope.filter = data.filter; + $scope.filterEntity = data.entity; + $scope.loadPage($scope.dataPage, $scope.filter); + }}); + //-----------------Events-------------------// + + $scope.loadPage = (pageNumber, filter) => { + if (!filter && $scope.filter) { + filter = $scope.filter; + } + $scope.dataPage = pageNumber; + EntityService.count(filter).then((resp) => { + if (resp.data) { + $scope.dataCount = resp.data.count; + } + let offset = (pageNumber - 1) * $scope.dataLimit; + let limit = $scope.dataLimit; + let request; + if (filter) { + if (!filter.$filter) { + filter.$filter = {}; + } + filter.$filter.offset = offset; + filter.$filter.limit = limit; + request = EntityService.search(filter); + } else { + request = EntityService.list(offset, limit); + } + request.then((response) => { + $scope.data = response.data; + }, (error) => { + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.PAYMENTTYPE'), + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLF', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTTYPE)', message: message }), + type: AlertTypes.Error + }); + console.error('EntityService:', error); + }); + }, (error) => { + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.PAYMENTTYPE'), + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToCount', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTTYPE)', message: message }), + type: AlertTypes.Error + }); + console.error('EntityService:', error); + }); + }; + $scope.loadPage($scope.dataPage, $scope.filter); + + $scope.selectEntity = (entity) => { + $scope.selectedEntity = entity; + }; + + $scope.openDetails = (entity) => { + $scope.selectedEntity = entity; + Dialogs.showWindow({ + id: 'PaymentType-details', + params: { + action: 'select', + entity: entity, + }, + closeButton: true, + }); + }; + + $scope.openFilter = () => { + Dialogs.showWindow({ + id: 'PaymentType-filter', + params: { + entity: $scope.filterEntity, + }, + closeButton: true, + }); + }; + + $scope.createEntity = () => { + $scope.selectedEntity = null; + Dialogs.showWindow({ + id: 'PaymentType-details', + params: { + action: 'create', + entity: {}, + }, + closeButton: false, + }); + }; + + $scope.updateEntity = (entity) => { + Dialogs.showWindow({ + id: 'PaymentType-details', + params: { + action: 'update', + entity: entity, + }, + closeButton: false, + }); + }; + + $scope.deleteEntity = (entity) => { + let id = entity.Id; + Dialogs.showDialog({ + title: translated.deleteTitle, + message: translated.deleteConfirm, + buttons: [{ + id: 'delete-btn-yes', + state: ButtonStates.Emphasized, + label: translated.yes, + }, { + id: 'delete-btn-no', + label: translated.no, + }] + }).then((buttonId) => { + if (buttonId === 'delete-btn-yes') { + EntityService.delete(id).then((response) => { + $scope.loadPage($scope.dataPage, $scope.filter); + Dialogs.triggerEvent('codbex-payments.Settings.PaymentType.clearDetails'); + }, (error) => { + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.PAYMENTTYPE'), + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToDelete', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTTYPE)', message: message }), + type: AlertTypes.Error + }); + console.error('EntityService:', error); + }); + } + }); + }; + + }); \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/dialog-filter/controller.js b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/dialog-filter/controller.js new file mode 100644 index 0000000..efe3409 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/dialog-filter/controller.js @@ -0,0 +1,67 @@ +angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controller('PageController', ($scope, ViewParameters, LocaleService) => { + const Dialogs = new DialogHub(); + let description = 'Description'; + $scope.entity = {}; + $scope.forms = { + details: {}, + }; + + LocaleService.onInit(() => { + description = LocaleService.t('codbex-payments:codbex-payments-model.defaults.description'); + }); + + let params = ViewParameters.get(); + if (Object.keys(params).length) { + $scope.entity = params.entity ?? {}; + $scope.selectedMainEntityKey = params.selectedMainEntityKey; + $scope.selectedMainEntityId = params.selectedMainEntityId; + } + + $scope.filter = () => { + let entity = $scope.entity; + const filter = { + $filter: { + conditions: [], + sorts: [], + limit: 20, + offset: 0 + } + }; + if (entity.Id !== undefined) { + const condition = { propertyName: 'Id', operator: 'EQ', value: entity.Id }; + filter.$filter.conditions.push(condition); + } + if (entity.Name) { + const condition = { propertyName: 'Name', operator: 'LIKE', value: `%${entity.Name}%` }; + filter.$filter.conditions.push(condition); + } + Dialogs.postMessage({ topic: 'codbex-payments.Settings.PaymentType.entitySearch', data: { + entity: entity, + filter: filter + }}); + $scope.cancel(); + }; + + $scope.resetFilter = () => { + $scope.entity = {}; + $scope.filter(); + }; + + $scope.alert = (message) => { + if (message) Dialogs.showAlert({ + title: description, + message: message, + type: AlertTypes.Information, + preformatted: true, + }); + }; + + $scope.cancel = () => { + Dialogs.closeWindow({ id: 'PaymentType-filter' }); + }; + + $scope.clearErrorMessage = () => { + $scope.errorMessage = null; + }; + +}); \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/dialog-filter/index.html b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/dialog-filter/index.html new file mode 100644 index 0000000..63e59f7 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/dialog-filter/index.html @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + {{ errorMessage }} + + + + +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTTYPE_NAME' | t }} +
+
+ + + + +
+
+
+
+
+ + + + + + + + + + + + + + + + + + diff --git a/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/dialog-filter/view.extension b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/dialog-filter/view.extension new file mode 100644 index 0000000..5f99390 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/dialog-filter/view.extension @@ -0,0 +1,6 @@ +{ + "module": "codbex-payments/gen/codbex-payments/ui/Settings/PaymentType/dialog-filter/view.js", + "extensionPoint": "application-windows", + "description": "codbex-payments - Application Dialog Window", + "role": "codbex-payments.Settings.PaymentTypeReadOnly,codbex-payments.Settings.PaymentTypeFullAccess" +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/dialog-filter/view.js b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/dialog-filter/view.js new file mode 100644 index 0000000..3c4d4db --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/dialog-filter/view.js @@ -0,0 +1,20 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const viewData = { + id: 'PaymentType-filter', + label: 'PaymentType Filter', + translation: { + key: 'codbex-payments:codbex-payments-model.extName', + options: { + content: '$t(codbex-payments:codbex-payments-model.t.PAYMENTTYPE) $t(codbex-payments:codbex-payments-model.defaults.filter)', + } + }, + path: '/services/web/codbex-payments/gen/codbex-payments/ui/Settings/PaymentType/dialog-filter/index.html', + perspectiveName: 'Settings' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/dialog-window/controller.js b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/dialog-window/controller.js new file mode 100644 index 0000000..d4b1ba4 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/dialog-window/controller.js @@ -0,0 +1,100 @@ +angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) + .config(['EntityServiceProvider', (EntityServiceProvider) => { + EntityServiceProvider.baseUrl = '/services/java/codbex-payments/gen/codbex_payments/api/settings/PaymentTypeController'; + }]) + .controller('PageController', ($scope, $http, ViewParameters, LocaleService, EntityService) => { + const Dialogs = new DialogHub(); + const Notifications = new NotificationHub(); + let description = 'Description'; + let propertySuccessfullyCreated = 'PaymentType successfully created'; + let propertySuccessfullyUpdated = 'PaymentType successfully updated'; + + $scope.entity = {}; + $scope.forms = { + details: {}, + }; + $scope.formHeaders = { + select: 'PaymentType Details', + create: 'Create PaymentType', + update: 'Update PaymentType' + }; + $scope.action = 'select'; + + LocaleService.onInit(() => { + description = LocaleService.t('codbex-payments:codbex-payments-model.defaults.description'); + $scope.formHeaders.select = LocaleService.t('codbex-payments:codbex-payments-model.defaults.formHeadSelect', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTTYPE)' }); + $scope.formHeaders.create = LocaleService.t('codbex-payments:codbex-payments-model.defaults.formHeadCreate', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTTYPE)' }); + $scope.formHeaders.update = LocaleService.t('codbex-payments:codbex-payments-model.defaults.formHeadUpdate', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTTYPE)' }); + propertySuccessfullyCreated = LocaleService.t('codbex-payments:codbex-payments-model.messages.propertySuccessfullyCreated', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTTYPE)' }); + propertySuccessfullyUpdated = LocaleService.t('codbex-payments:codbex-payments-model.messages.propertySuccessfullyUpdated', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTTYPE)' }); + }); + + let params = ViewParameters.get(); + if (Object.keys(params).length) { + $scope.action = params.action; + $scope.entity = params.entity; + $scope.selectedMainEntityKey = params.selectedMainEntityKey; + $scope.selectedMainEntityId = params.selectedMainEntityId; + } + + $scope.create = () => { + let entity = $scope.entity; + entity[$scope.selectedMainEntityKey] = $scope.selectedMainEntityId; + EntityService.create(entity).then((response) => { + Dialogs.postMessage({ topic: 'codbex-payments.Settings.PaymentType.entityCreated', data: response.data }); + Notifications.show({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.PAYMENTTYPE'), + description: propertySuccessfullyCreated, + type: 'positive' + }); + $scope.cancel(); + }, (error) => { + const message = error.data ? error.data.message : ''; + $scope.$evalAsync(() => { + $scope.errorMessage = LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToCreate', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTTYPE)', message: message }); + }); + console.error('EntityService:', error); + }); + }; + + $scope.update = () => { + let id = $scope.entity.Id; + let entity = $scope.entity; + entity[$scope.selectedMainEntityKey] = $scope.selectedMainEntityId; + EntityService.update(id, entity).then((response) => { + Dialogs.postMessage({ topic: 'codbex-payments.Settings.PaymentType.entityUpdated', data: response.data }); + Notifications.show({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.PAYMENTTYPE'), + description: propertySuccessfullyUpdated, + type: 'positive' + }); + $scope.cancel(); + }, (error) => { + const message = error.data ? error.data.message : ''; + $scope.$evalAsync(() => { + $scope.errorMessage = LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToUpdate', { name: '$t(codbex-payments:codbex-payments-model.t.PAYMENTTYPE)', message: message }); + }); + console.error('EntityService:', error); + }); + }; + + + $scope.alert = (message) => { + if (message) Dialogs.showAlert({ + title: description, + message: message, + type: AlertTypes.Information, + preformatted: true, + }); + }; + + $scope.cancel = () => { + $scope.entity = {}; + $scope.action = 'select'; + Dialogs.closeWindow({ id: 'PaymentType-details' }); + }; + + $scope.clearErrorMessage = () => { + $scope.errorMessage = null; + }; + }); \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/dialog-window/index.html b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/dialog-window/index.html new file mode 100644 index 0000000..afeb1a6 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/dialog-window/index.html @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + {{ errorMessage }} + + + + +
+ {{ 'codbex-payments:codbex-payments-model.t.PAYMENTTYPE_NAME' | t }} +
+
+ + + + +
+
+
+
+
+ + + + + + + + + + + + + + + + diff --git a/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/dialog-window/view.extension b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/dialog-window/view.extension new file mode 100644 index 0000000..1672f4d --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/dialog-window/view.extension @@ -0,0 +1,6 @@ +{ + "module": "codbex-payments/gen/codbex-payments/ui/Settings/PaymentType/dialog-window/view.js", + "extensionPoint": "application-windows", + "description": "codbex-payments - Application Dialog Window", + "role": "codbex-payments.Settings.PaymentTypeReadOnly,codbex-payments.Settings.PaymentTypeFullAccess" +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/dialog-window/view.js b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/dialog-window/view.js new file mode 100644 index 0000000..b458539 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/dialog-window/view.js @@ -0,0 +1,17 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const viewData = { + id: 'PaymentType-details', + label: 'PaymentType', + translation: { + key: 'codbex-payments:codbex-payments-model.t.PAYMENTTYPE', + }, + path: '/services/web/codbex-payments/gen/codbex-payments/ui/Settings/PaymentType/dialog-window/index.html', + perspectiveName: 'Settings' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/index.html b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/index.html new file mode 100644 index 0000000..32644da --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/index.html @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + {{'codbex-payments:codbex-payments-model.defaults.items' | t}} + + + + + + + + + + + + + + + + + + + + + + + +
{{ 'codbex-payments:codbex-payments-model.t.PAYMENTTYPE_NAME' | t:'Name' }}
{{'codbex-payments:codbex-payments-model.messages.noData' | t}}
{{next.Name}} + + + + + + + + + + + + + +
+
+ + + + + + + diff --git a/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/view.extension b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/view.extension new file mode 100644 index 0000000..46e6d11 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/view.extension @@ -0,0 +1,6 @@ +{ + "module": "codbex-payments/gen/codbex-payments/ui/Settings/PaymentType/view.js", + "extensionPoint": "application-settings", + "description": "codbex-payments - Application View", + "role": "codbex-payments.Settings.PaymentTypeReadOnly,codbex-payments.Settings.PaymentTypeFullAccess" +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/view.js b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/view.js new file mode 100644 index 0000000..21af015 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/view.js @@ -0,0 +1,20 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const viewData = { + id: 'PaymentType', + label: 'PaymentType', + translation: { + key: 'codbex-payments:codbex-payments-model.t.PAYMENTTYPE', + }, + region: 'center', + lazyLoad: true, + autoFocusTab: false, + path: '/services/web/codbex-payments/gen/codbex-payments/ui/Settings/PaymentType/index.html', + perspectiveName: 'Settings' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/controller.js b/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/controller.js new file mode 100644 index 0000000..72cf60d --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/controller.js @@ -0,0 +1,469 @@ +angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) + .config(['EntityServiceProvider', (EntityServiceProvider) => { + EntityServiceProvider.baseUrl = '/services/java/codbex-payments/gen/codbex_payments/api/supplierpayment/SupplierPaymentController'; + }]) + .controller('PageController', ($scope, $http, EntityService, Extensions, LocaleService, ButtonStates) => { + const Dialogs = new DialogHub(); + let translated = { + yes: 'Yes', + no: 'No', + deleteConfirm: 'Are you sure you want to delete SupplierPayment? This action cannot be undone.', + deleteTitle: 'Delete SupplierPayment?' + }; + + LocaleService.onInit(() => { + translated.yes = LocaleService.t('codbex-payments:codbex-payments-model.defaults.yes'); + translated.no = LocaleService.t('codbex-payments:codbex-payments-model.defaults.no'); + translated.deleteTitle = LocaleService.t('codbex-payments:codbex-payments-model.defaults.deleteTitle', { name: '$t(codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT)' }); + translated.deleteConfirm = LocaleService.t('codbex-payments:codbex-payments-model.messages.deleteConfirm', { name: '$t(codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT)' }); + }); + $scope.dataPage = 1; + $scope.dataCount = 0; + $scope.dataOffset = 0; + $scope.dataLimit = 10; + $scope.action = 'select'; + + //-----------------Custom Actions-------------------// + Extensions.getWindows(['codbex-payments-custom-action']).then((response) => { + $scope.pageActions = response.data.filter(e => e.perspective === 'SupplierPayment' && e.view === 'SupplierPayment' && (e.type === 'page' || e.type === undefined)); + }); + + $scope.triggerPageAction = (action) => { + Dialogs.showWindow({ + hasHeader: true, + title: LocaleService.t(action.translation.key, action.translation.options, action.label), + path: action.path, + maxWidth: action.maxWidth, + maxHeight: action.maxHeight, + closeButton: true + }); + }; + //-----------------Custom Actions-------------------// + + function refreshData() { + $scope.dataReset = true; + $scope.dataPage--; + } + + function resetPagination() { + $scope.dataReset = true; + $scope.dataPage = 1; + $scope.dataCount = 0; + $scope.dataLimit = 10; + } + + //-----------------Events-------------------// + Dialogs.addMessageListener({ topic: 'codbex-payments.SupplierPayment.SupplierPayment.clearDetails', handler: () => { + $scope.$evalAsync(() => { + $scope.selectedEntity = null; + $scope.action = 'select'; + }); + }}); + Dialogs.addMessageListener({ topic: 'codbex-payments.SupplierPayment.SupplierPayment.entityCreated', handler: () => { + refreshData(); + $scope.loadPage($scope.dataPage, $scope.filter); + }}); + Dialogs.addMessageListener({ topic: 'codbex-payments.SupplierPayment.SupplierPayment.entityUpdated', handler: () => { + refreshData(); + $scope.loadPage($scope.dataPage, $scope.filter); + }}); + Dialogs.addMessageListener({ topic: 'codbex-payments.SupplierPayment.SupplierPayment.entitySearch', handler: (data) => { + resetPagination(); + $scope.filter = data.filter; + $scope.filterEntity = data.entity; + $scope.loadPage($scope.dataPage, $scope.filter); + }}); + //-----------------Events-------------------// + + $scope.loadPage = (pageNumber, filter) => { + if (!filter && $scope.filter) { + filter = $scope.filter; + } + if (!filter) { + filter = { + $filter: {} + }; + } + $scope.selectedEntity = null; + EntityService.count(filter).then((resp) => { + if (resp.data) { + $scope.dataCount = resp.data.count; + } + $scope.dataPages = Math.ceil($scope.dataCount / $scope.dataLimit); + filter.$filter.offset = ($scope.dataPage - 1) * $scope.dataLimit; + filter.$filter.limit = $scope.dataLimit; + if ($scope.dataReset) { + filter.$filter.offset = 0; + filter.$filter.limit = $scope.dataPage * $scope.dataLimit; + } + + EntityService.search(filter).then((response) => { + if ($scope.data == null || $scope.dataReset) { + $scope.data = []; + $scope.dataReset = false; + } + if (optionsSupplierHasMore) { + const optionsSupplierSearchValues = Array.from(new Set(response.data.map(e => e.Supplier))); + if (optionsSupplierSearchValues.length > 0) { + $http.post('/services/java/codbex-partners/gen/codbex_partners/api/suppliers/SupplierController/search', { + conditions: [ + { propertyName: 'Id', operator: 'IN', value: optionsSupplierSearchValues } + ] + }).then((response) => { + $scope.optionsSupplier.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: 'Supplier', + 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/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.Code + }))); + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Currency', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + } + } + 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 (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); + } + if (e.Valor) { + e.Valor = new Date(e.Valor); + } + if (e.CreatedAt) { + e.CreatedAt = new Date(e.CreatedAt); + } + if (e.UpdatedAt) { + e.UpdatedAt = new Date(e.UpdatedAt); + } + }); + + $scope.data = $scope.data.concat(response.data); + $scope.dataPage++; + }, (error) => { + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT'), + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLF', { name: '$t(codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT)', message: message }), + type: AlertTypes.Error + }); + console.error('EntityService:', error); + }); + }, (error) => { + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT'), + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToCount', { name: '$t(codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT)', message: message }), + type: AlertTypes.Error + }); + console.error('EntityService:', error); + }); + }; + $scope.loadPage($scope.dataPage, $scope.filter); + + $scope.selectEntity = (entity) => { + $scope.selectedEntity = entity; + Dialogs.postMessage({ topic: 'codbex-payments.SupplierPayment.SupplierPayment.entitySelected', data: { + entity: entity, + selectedMainEntityId: entity.Id, + optionsSupplier: $scope.optionsSupplier, + optionsCurrency: $scope.optionsCurrency, + optionsCompany: $scope.optionsCompany, + optionsPaymentMethod: $scope.optionsPaymentMethod, + }}); + }; + + $scope.createEntity = () => { + $scope.selectedEntity = null; + $scope.action = 'create'; + + Dialogs.postMessage({ topic: 'codbex-payments.SupplierPayment.SupplierPayment.createEntity', data: { + entity: {}, + optionsSupplier: $scope.optionsSupplier, + optionsCurrency: $scope.optionsCurrency, + optionsCompany: $scope.optionsCompany, + optionsPaymentMethod: $scope.optionsPaymentMethod, + }}); + }; + + $scope.updateEntity = () => { + $scope.action = 'update'; + Dialogs.postMessage({ topic: 'codbex-payments.SupplierPayment.SupplierPayment.updateEntity', data: { + entity: $scope.selectedEntity, + optionsSupplier: $scope.optionsSupplier, + optionsCurrency: $scope.optionsCurrency, + optionsCompany: $scope.optionsCompany, + optionsPaymentMethod: $scope.optionsPaymentMethod, + }}); + }; + + $scope.deleteEntity = () => { + let id = $scope.selectedEntity.Id; + Dialogs.showDialog({ + title: translated.deleteTitle, + message: translated.deleteConfirm, + buttons: [{ + id: 'delete-btn-yes', + state: ButtonStates.Emphasized, + label: translated.yes, + }, { + id: 'delete-btn-no', + label: translated.no, + }], + closeButton: false + }).then((buttonId) => { + if (buttonId === 'delete-btn-yes') { + EntityService.delete(id).then(() => { + refreshData(); + $scope.loadPage($scope.dataPage, $scope.filter); + Dialogs.triggerEvent('codbex-payments.SupplierPayment.SupplierPayment.clearDetails'); + }, (error) => { + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT'), + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToDelete', { name: '$t(codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT)', message: message }), + type: AlertTypes.Error + }); + console.error('EntityService:', error); + }); + } + }); + }; + + $scope.openFilter = () => { + Dialogs.showWindow({ + id: 'SupplierPayment-filter', + params: { + entity: $scope.filterEntity, + optionsSupplier: $scope.optionsSupplier, + optionsCurrency: $scope.optionsCurrency, + optionsCompany: $scope.optionsCompany, + optionsPaymentMethod: $scope.optionsPaymentMethod, + }, + }); + }; + + //----------------Dropdowns-----------------// + $scope.optionsSupplier = []; + $scope.optionsCurrency = []; + $scope.optionsCompany = []; + $scope.optionsPaymentMethod = []; + + let optionsSupplierHasMore = true; + + $http.get('/services/java/codbex-partners/gen/codbex_partners/api/suppliers/SupplierController/count').then((response) => { + const optionsSupplierCount = response.data.count; + $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 + })); + optionsSupplierHasMore = optionsSupplierCount > $scope.optionsSupplier.length; + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Supplier', + 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: 'Supplier', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + let optionsCurrencyHasMore = true; + + $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.Code + })); + optionsCurrencyHasMore = optionsCurrencyCount > $scope.optionsCurrency.length; + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Currency', + 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: 'Currency', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + let optionsCompanyHasMore = true; + + $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.Name + })); + optionsCompanyHasMore = optionsCompanyCount > $scope.optionsCompany.length; + }, (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 + }); + }); + }, (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 + }); + }); + 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++) { + if ($scope.optionsSupplier[i].value === optionKey) { + return $scope.optionsSupplier[i].text; + } + } + return null; + }; + $scope.optionsCurrencyValue = (optionKey) => { + for (let i = 0; i < $scope.optionsCurrency.length; i++) { + if ($scope.optionsCurrency[i].value === optionKey) { + return $scope.optionsCurrency[i].text; + } + } + 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; + }; + $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/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-filter/controller.js b/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-filter/controller.js new file mode 100644 index 0000000..626b1aa --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-filter/controller.js @@ -0,0 +1,547 @@ +angular.module('page', ['blimpKit', 'platformView', 'platformLocale']).controller('PageController', ($scope, $http, ViewParameters) => { + const Dialogs = new DialogHub(); + $scope.entity = {}; + $scope.forms = { + details: {}, + }; + + let params = ViewParameters.get(); + if (Object.keys(params).length) { + if (params?.entity?.DateFrom) { + params.entity.DateFrom = new Date(params.entity.DateFrom); + } + if (params?.entity?.DateTo) { + params.entity.DateTo = new Date(params.entity.DateTo); + } + if (params?.entity?.ValorFrom) { + params.entity.ValorFrom = new Date(params.entity.ValorFrom); + } + if (params?.entity?.ValorTo) { + params.entity.ValorTo = new Date(params.entity.ValorTo); + } + if (params?.entity?.CreatedAtFrom) { + params.entity.CreatedAtFrom = new Date(params.entity.CreatedAtFrom); + } + if (params?.entity?.CreatedAtTo) { + params.entity.CreatedAtTo = new Date(params.entity.CreatedAtTo); + } + if (params?.entity?.UpdatedAtFrom) { + params.entity.UpdatedAtFrom = new Date(params.entity.UpdatedAtFrom); + } + if (params?.entity?.UpdatedAtTo) { + params.entity.UpdatedAtTo = new Date(params.entity.UpdatedAtTo); + } + $scope.entity = params.entity ?? {}; + $scope.selectedMainEntityKey = params.selectedMainEntityKey; + $scope.selectedMainEntityId = params.selectedMainEntityId; + const optionsSupplierMap = new Map(); + params.optionsSupplier.forEach(e => optionsSupplierMap.set(e.value, e)); + $scope.optionsSupplier = Array.from(optionsSupplierMap.values()); + const optionsCurrencyMap = new Map(); + params.optionsCurrency.forEach(e => optionsCurrencyMap.set(e.value, e)); + $scope.optionsCurrency = Array.from(optionsCurrencyMap.values()); + 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 = () => { + let entity = $scope.entity; + const filter = { + $filter: { + conditions: [], + sorts: [], + limit: 20, + offset: 0 + } + }; + if (entity.Id !== undefined) { + const condition = { propertyName: 'Id', operator: 'EQ', value: entity.Id }; + filter.$filter.conditions.push(condition); + } + if (entity.Supplier !== undefined) { + const condition = { propertyName: 'Supplier', operator: 'EQ', value: entity.Supplier }; + filter.$filter.conditions.push(condition); + } + if (entity.DateFrom) { + const condition = { propertyName: 'Date', operator: 'GE', value: entity.DateFrom }; + filter.$filter.conditions.push(condition); + } + if (entity.DateTo) { + const condition = { propertyName: 'Date', operator: 'LE', value: entity.DateTo }; + filter.$filter.conditions.push(condition); + } + if (entity.ValorFrom) { + const condition = { propertyName: 'Valor', operator: 'GE', value: entity.ValorFrom }; + filter.$filter.conditions.push(condition); + } + if (entity.ValorTo) { + const condition = { propertyName: 'Valor', operator: 'LE', value: entity.ValorTo }; + filter.$filter.conditions.push(condition); + } + if (entity.OurPartyIBAN) { + const condition = { propertyName: 'OurPartyIBAN', operator: 'LIKE', value: `%${entity.OurPartyIBAN}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.CounterpartyIBAN) { + const condition = { propertyName: 'CounterpartyIBAN', operator: 'LIKE', value: `%${entity.CounterpartyIBAN}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.CounterpartyName) { + const condition = { propertyName: 'CounterpartyName', operator: 'LIKE', value: `%${entity.CounterpartyName}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.Amount !== undefined) { + const condition = { propertyName: 'Amount', operator: 'EQ', value: entity.Amount }; + filter.$filter.conditions.push(condition); + } + if (entity.Currency !== undefined) { + 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.Description) { + const condition = { propertyName: 'Description', operator: 'LIKE', value: `%${entity.Description}%` }; + 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.Name) { + const condition = { propertyName: 'Name', operator: 'LIKE', value: `%${entity.Name}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.UUID) { + const condition = { propertyName: 'UUID', operator: 'LIKE', value: `%${entity.UUID}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.Reference) { + const condition = { propertyName: 'Reference', operator: 'LIKE', value: `%${entity.Reference}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.CreatedAtFrom) { + const condition = { propertyName: 'CreatedAt', operator: 'GE', value: entity.CreatedAtFrom }; + filter.$filter.conditions.push(condition); + } + if (entity.CreatedAtTo) { + const condition = { propertyName: 'CreatedAt', operator: 'LE', value: entity.CreatedAtTo }; + filter.$filter.conditions.push(condition); + } + if (entity.CreatedBy) { + const condition = { propertyName: 'CreatedBy', operator: 'LIKE', value: `%${entity.CreatedBy}%` }; + filter.$filter.conditions.push(condition); + } + if (entity.UpdatedAtFrom) { + const condition = { propertyName: 'UpdatedAt', operator: 'GE', value: entity.UpdatedAtFrom }; + filter.$filter.conditions.push(condition); + } + if (entity.UpdatedAtTo) { + const condition = { propertyName: 'UpdatedAt', operator: 'LE', value: entity.UpdatedAtTo }; + filter.$filter.conditions.push(condition); + } + if (entity.UpdatedBy) { + const condition = { propertyName: 'UpdatedBy', operator: 'LIKE', value: `%${entity.UpdatedBy}%` }; + filter.$filter.conditions.push(condition); + } + Dialogs.postMessage({ topic: 'codbex-payments.SupplierPayment.SupplierPayment.entitySearch', data: { + entity: entity, + filter: filter + }}); + Dialogs.triggerEvent('codbex-payments.SupplierPayment.SupplierPayment.clearDetails'); + $scope.cancel(); + }; + + $scope.resetFilter = () => { + $scope.entity = {}; + $scope.filter(); + lastSearchValuesSupplier.clear(); + allValuesSupplier.length = 0; + lastSearchValuesCurrency.clear(); + allValuesCurrency.length = 0; + lastSearchValuesCompany.clear(); + allValuesCompany.length = 0; + lastSearchValuesPaymentMethod.clear(); + allValuesPaymentMethod.length = 0; + }; + + $scope.cancel = () => { + Dialogs.closeWindow({ id: 'SupplierPayment-filter' }); + }; + + $scope.clearErrorMessage = () => { + $scope.errorMessage = null; + }; + + const lastSearchValuesSupplier = new Set(); + const allValuesSupplier = []; + let loadMoreOptionsSupplierCounter = 0; + $scope.optionsSupplierLoading = false; + $scope.optionsSupplierHasMore = true; + + $scope.loadMoreOptionsSupplier = () => { + const limit = 20; + $scope.optionsSupplierLoading = true; + $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 => ({ + value: e.Id, + text: e.Name + })); + const newValues = []; + resultValues.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesSupplier.push(e); + newValues.push(e); + } + }); + newValues.forEach(e => { + if (!$scope.optionsSupplier.find(o => o.value === e.value)) { + $scope.optionsSupplier.push(e); + } + }) + $scope.optionsSupplierHasMore = resultValues.length > 0; + $scope.optionsSupplierLoading = false; + }, (error) => { + $scope.optionsSupplierLoading = false; + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Supplier', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }; + + $scope.onOptionsSupplierChange = (event) => { + if (allValuesSupplier.length === 0) { + allValuesSupplier.push(...$scope.optionsSupplier); + } + if (event.originalEvent.target.value === '') { + allValuesSupplier.sort((a, b) => a.text.localeCompare(b.text)); + $scope.optionsSupplier = allValuesSupplier; + $scope.optionsSupplierHasMore = true; + } else if (isText(event.which)) { + $scope.optionsSupplierHasMore = false; + let cacheHit = false; + Array.from(lastSearchValuesSupplier).forEach(e => { + if (event.originalEvent.target.value.startsWith(e)) { + cacheHit = true; + } + }) + if (!cacheHit) { + $http.post('/services/java/codbex-partners/gen/codbex_partners/api/suppliers/SupplierController/search', { + conditions: [ + { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } + ] + }).then((response) => { + const optionValues = allValuesSupplier.map(e => e.value); + const searchResult = response.data.map(e => ({ + value: e.Id, + text: e.Name + })); + searchResult.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesSupplier.push(e); + } + }); + $scope.optionsSupplier = allValuesSupplier.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: 'Supplier', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + lastSearchValuesSupplier.add(event.originalEvent.target.value); + } + } + }; + + const lastSearchValuesCurrency = new Set(); + const allValuesCurrency = []; + let loadMoreOptionsCurrencyCounter = 0; + $scope.optionsCurrencyLoading = false; + $scope.optionsCurrencyHasMore = true; + + $scope.loadMoreOptionsCurrency = () => { + const limit = 20; + $scope.optionsCurrencyLoading = true; + $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.Code + })); + const newValues = []; + resultValues.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesCurrency.push(e); + newValues.push(e); + } + }); + newValues.forEach(e => { + if (!$scope.optionsCurrency.find(o => o.value === e.value)) { + $scope.optionsCurrency.push(e); + } + }) + $scope.optionsCurrencyHasMore = resultValues.length > 0; + $scope.optionsCurrencyLoading = false; + }, (error) => { + $scope.optionsCurrencyLoading = false; + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Currency', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }; + + $scope.onOptionsCurrencyChange = (event) => { + if (allValuesCurrency.length === 0) { + allValuesCurrency.push(...$scope.optionsCurrency); + } + if (event.originalEvent.target.value === '') { + allValuesCurrency.sort((a, b) => a.text.localeCompare(b.text)); + $scope.optionsCurrency = allValuesCurrency; + $scope.optionsCurrencyHasMore = true; + } else if (isText(event.which)) { + $scope.optionsCurrencyHasMore = false; + let cacheHit = false; + Array.from(lastSearchValuesCurrency).forEach(e => { + if (event.originalEvent.target.value.startsWith(e)) { + cacheHit = true; + } + }) + if (!cacheHit) { + $http.post('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController/search', { + conditions: [ + { 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.Code + })); + searchResult.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesCurrency.push(e); + } + }); + $scope.optionsCurrency = allValuesCurrency.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: 'Currency', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + lastSearchValuesCurrency.add(event.originalEvent.target.value); + } + } + }; + + 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 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; + } + +}); \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-filter/index.html b/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-filter/index.html new file mode 100644 index 0000000..7a81cef --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-filter/index.html @@ -0,0 +1,395 @@ + + + + + + + + + + + + + + + + {{ errorMessage }} + + + + +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_SUPPLIER' | t }} +
+
+ + + + + More Options + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.defaults.from' | t:{'text':'$t(codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_DATE)'} }} +
+
+ + + + +
+
+ {{ 'codbex-payments:codbex-payments-model.defaults.to' | t:{'text':'$t(codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_DATE)'} }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.defaults.from' | t:{'text':'$t(codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_VALOR)'} }} +
+
+ + + + +
+
+ {{ 'codbex-payments:codbex-payments-model.defaults.to' | t:{'text':'$t(codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_VALOR)'} }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_OURPARTYIBAN' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_COUNTERPARTYIBAN' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_COUNTERPARTYNAME' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_AMOUNT' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_CURRENCY' | t }} +
+
+ + + + + More Options + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_COMPANY' | t }} +
+
+ + + + + More Options + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_REASON' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_DESCRIPTION' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_PAYMENTMETHOD' | t }} +
+
+ + + + + More Options + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_NAME' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_UUID' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_REFERENCE' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_CREATEDAT' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_CREATEDBY' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_UPDATEDAT' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_UPDATEDBY' | t }} +
+
+ + + + +
+
+
+
+
+ + + + + + + + + + + + + + + + + + diff --git a/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-filter/view.extension b/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-filter/view.extension new file mode 100644 index 0000000..fafd291 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-filter/view.extension @@ -0,0 +1,6 @@ +{ + "module": "codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-filter/view.js", + "extensionPoint": "application-windows", + "description": "codbex-payments - Application Dialog Window", + "role": "codbex-payments.SupplierPayment.SupplierPaymentReadOnly,codbex-payments.SupplierPayment.SupplierPaymentFullAccess" +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-filter/view.js b/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-filter/view.js new file mode 100644 index 0000000..7e5e1f6 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-filter/view.js @@ -0,0 +1,20 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const viewData = { + id: 'SupplierPayment-filter', + label: 'SupplierPayment Filter', + translation: { + key: 'codbex-payments:codbex-payments-model.extName', + options: { + content: '$t(codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT) $t(codbex-payments:codbex-payments-model.defaults.filter)', + } + }, + path: '/services/web/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-filter/index.html', + perspectiveName: 'SupplierPayment' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/controller.js b/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/controller.js new file mode 100644 index 0000000..be41065 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/controller.js @@ -0,0 +1,556 @@ +angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) + .config(['EntityServiceProvider', (EntityServiceProvider) => { + EntityServiceProvider.baseUrl = '/services/java/codbex-payments/gen/codbex_payments/api/supplierpayment/SupplierPaymentController'; + }]) + .controller('PageController', ($scope, $http, ViewParameters, LocaleService, EntityService) => { + const Dialogs = new DialogHub(); + const Notifications = new NotificationHub(); + let description = 'Description'; + let propertySuccessfullyCreated = 'SupplierPayment successfully created'; + let propertySuccessfullyUpdated = 'SupplierPayment successfully updated'; + $scope.entity = {}; + $scope.forms = { + details: {}, + }; + $scope.formHeaders = { + select: 'SupplierPayment Details', + create: 'Create SupplierPayment', + update: 'Update SupplierPayment' + }; + $scope.action = 'select'; + + LocaleService.onInit(() => { + description = LocaleService.t('codbex-payments:codbex-payments-model.defaults.description'); + $scope.formHeaders.select = LocaleService.t('codbex-payments:codbex-payments-model.defaults.formHeadSelect', { name: '$t(codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT)' }); + $scope.formHeaders.create = LocaleService.t('codbex-payments:codbex-payments-model.defaults.formHeadCreate', { name: '$t(codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT)' }); + $scope.formHeaders.update = LocaleService.t('codbex-payments:codbex-payments-model.defaults.formHeadUpdate', { name: '$t(codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT)' }); + propertySuccessfullyCreated = LocaleService.t('codbex-payments:codbex-payments-model.messages.propertySuccessfullyCreated', { name: '$t(codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT)' }); + propertySuccessfullyUpdated = LocaleService.t('codbex-payments:codbex-payments-model.messages.propertySuccessfullyUpdated', { name: '$t(codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT)' }); + }); + + let params = ViewParameters.get(); + if (Object.keys(params).length) { + $scope.action = params.action; + if (params.entity.Date) { + params.entity.Date = new Date(params.entity.Date); + } + if (params.entity.Valor) { + params.entity.Valor = new Date(params.entity.Valor); + } + if (params.entity.CreatedAt) { + params.entity.CreatedAt = new Date(params.entity.CreatedAt); + } + if (params.entity.UpdatedAt) { + params.entity.UpdatedAt = new Date(params.entity.UpdatedAt); + } + $scope.entity = params.entity; + $scope.selectedMainEntityKey = params.selectedMainEntityKey; + $scope.selectedMainEntityId = params.selectedMainEntityId; + const optionsSupplierMap = new Map(); + params.optionsSupplier?.forEach(e => optionsSupplierMap.set(e.value, e)); + $scope.optionsSupplier = Array.from(optionsSupplierMap.values()); + const optionsCurrencyMap = new Map(); + params.optionsCurrency?.forEach(e => optionsCurrencyMap.set(e.value, e)); + $scope.optionsCurrency = Array.from(optionsCurrencyMap.values()); + 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 = () => { + let entity = $scope.entity; + entity[$scope.selectedMainEntityKey] = $scope.selectedMainEntityId; + EntityService.create(entity).then((response) => { + Dialogs.postMessage({ topic: 'codbex-payments.SupplierPayment.SupplierPayment.entityCreated', data: response.data }); + Notifications.show({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT'), + description: propertySuccessfullyCreated, + type: 'positive' + }); + $scope.cancel(); + }, (error) => { + const message = error.data ? error.data.message : ''; + $scope.$evalAsync(() => { + $scope.errorMessage = LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToCreate', { name: '$t(codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT)', message: message }); + }); + console.error('EntityService:', error); + }); + }; + + $scope.update = () => { + let id = $scope.entity.Id; + let entity = $scope.entity; + entity[$scope.selectedMainEntityKey] = $scope.selectedMainEntityId; + EntityService.update(id, entity).then((response) => { + Dialogs.postMessage({ topic: 'codbex-payments.SupplierPayment.SupplierPayment.entityUpdated', data: response.data }); + $scope.cancel(); + Notifications.show({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT'), + description: propertySuccessfullyUpdated, + type: 'positive' + }); + }, (error) => { + const message = error.data ? error.data.message : ''; + $scope.$evalAsync(() => { + $scope.errorMessage = LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToUpdate', { name: '$t(codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT)', message: message }); + }); + console.error('EntityService:', error); + }); + }; + + $scope.serviceSupplier = '/services/java/codbex-partners/gen/codbex_partners/api/suppliers/SupplierController'; + + $scope.optionsSupplier = []; + + $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 + })); + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Supplier', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + + const lastSearchValuesSupplier = new Set(); + const allValuesSupplier = []; + let loadMoreOptionsSupplierCounter = 0; + $scope.optionsSupplierLoading = false; + $scope.optionsSupplierHasMore = true; + + $scope.loadMoreOptionsSupplier = () => { + const limit = 20; + $scope.optionsSupplierLoading = true; + $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 => ({ + value: e.Id, + text: e.Name + })); + const newValues = []; + resultValues.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesSupplier.push(e); + newValues.push(e); + } + }); + newValues.forEach(e => { + if (!$scope.optionsSupplier.find(o => o.value === e.value)) { + $scope.optionsSupplier.push(e); + } + }) + $scope.optionsSupplierHasMore = resultValues.length > 0; + $scope.optionsSupplierLoading = false; + }, (error) => { + $scope.optionsSupplierLoading = false; + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Supplier', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }; + + $scope.onOptionsSupplierChange = (event) => { + if (allValuesSupplier.length === 0) { + allValuesSupplier.push(...$scope.optionsSupplier); + } + if (event.originalEvent.target.value === '') { + allValuesSupplier.sort((a, b) => a.text.localeCompare(b.text)); + $scope.optionsSupplier = allValuesSupplier; + $scope.optionsSupplierHasMore = true; + } else if (isText(event.which)) { + $scope.optionsSupplierHasMore = false; + let cacheHit = false; + Array.from(lastSearchValuesSupplier).forEach(e => { + if (event.originalEvent.target.value.startsWith(e)) { + cacheHit = true; + } + }) + if (!cacheHit) { + $http.post('/services/java/codbex-partners/gen/codbex_partners/api/suppliers/SupplierController/search', { + conditions: [ + { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } + ] + }).then((response) => { + const optionValues = allValuesSupplier.map(e => e.value); + const searchResult = response.data.map(e => ({ + value: e.Id, + text: e.Name + })); + searchResult.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesSupplier.push(e); + } + }); + $scope.optionsSupplier = allValuesSupplier.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: 'Supplier', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + lastSearchValuesSupplier.add(event.originalEvent.target.value); + } + } + }; + $scope.serviceCurrency = '/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController'; + + $scope.optionsCurrency = []; + + $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 + })); + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Currency', + 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; + $scope.optionsCurrencyLoading = false; + $scope.optionsCurrencyHasMore = true; + + $scope.loadMoreOptionsCurrency = () => { + const limit = 20; + $scope.optionsCurrencyLoading = true; + $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.Code + })); + const newValues = []; + resultValues.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesCurrency.push(e); + newValues.push(e); + } + }); + newValues.forEach(e => { + if (!$scope.optionsCurrency.find(o => o.value === e.value)) { + $scope.optionsCurrency.push(e); + } + }) + $scope.optionsCurrencyHasMore = resultValues.length > 0; + $scope.optionsCurrencyLoading = false; + }, (error) => { + $scope.optionsCurrencyLoading = false; + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Currency', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }; + + $scope.onOptionsCurrencyChange = (event) => { + if (allValuesCurrency.length === 0) { + allValuesCurrency.push(...$scope.optionsCurrency); + } + if (event.originalEvent.target.value === '') { + allValuesCurrency.sort((a, b) => a.text.localeCompare(b.text)); + $scope.optionsCurrency = allValuesCurrency; + $scope.optionsCurrencyHasMore = true; + } else if (isText(event.which)) { + $scope.optionsCurrencyHasMore = false; + let cacheHit = false; + Array.from(lastSearchValuesCurrency).forEach(e => { + if (event.originalEvent.target.value.startsWith(e)) { + cacheHit = true; + } + }) + if (!cacheHit) { + $http.post('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController/search', { + conditions: [ + { 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.Code + })); + searchResult.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesCurrency.push(e); + } + }); + $scope.optionsCurrency = allValuesCurrency.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: 'Currency', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + lastSearchValuesCurrency.add(event.originalEvent.target.value); + } + } + }; + $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.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; + } + + + $scope.alert = (message) => { + if (message) Dialogs.showAlert({ + title: description, + message: message, + type: AlertTypes.Information, + preformatted: true, + }); + }; + + $scope.cancel = () => { + $scope.entity = {}; + $scope.action = 'select'; + Dialogs.closeWindow({ id: 'SupplierPayment-details' }); + }; + + $scope.clearErrorMessage = () => { + $scope.errorMessage = null; + }; + }); \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/index.html b/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/index.html new file mode 100644 index 0000000..cc3d8c5 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/index.html @@ -0,0 +1,418 @@ + + + + + + + + + + + + + + + + + {{ errorMessage }} + + + + +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_SUPPLIER' | t }} +
+
+ + + + + More Options + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_DATE' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_VALOR' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_OURPARTYIBAN' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_COUNTERPARTYIBAN' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_COUNTERPARTYNAME' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_AMOUNT' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_CURRENCY' | t }} +
+
+ + + + + More Options + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_COMPANY' | t }} +
+
+ + + + + More Options + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_REASON' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_DESCRIPTION' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_PAYMENTMETHOD' | t }} +
+
+ + + + + More Options + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_NAME' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_UUID' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_REFERENCE' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_CREATEDAT' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_CREATEDBY' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_UPDATEDAT' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_UPDATEDBY' | t }} +
+
+ + + + +
+
+
+
+
+ + + + + + + + + + + + + + + + diff --git a/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/view.extension b/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/view.extension new file mode 100644 index 0000000..a3f0282 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/view.extension @@ -0,0 +1,6 @@ +{ + "module": "codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/view.js", + "extensionPoint": "application-windows", + "description": "codbex-payments - Application Dialog Window", + "role": "codbex-payments.SupplierPayment.SupplierPaymentReadOnly,codbex-payments.SupplierPayment.SupplierPaymentFullAccess" +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/view.js b/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/view.js new file mode 100644 index 0000000..cee04e7 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/view.js @@ -0,0 +1,20 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const viewData = { + id: "SupplierPayment-details", + label: "SupplierPayment", + translation: { + key: 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT', + }, + path: "/services/web/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/index.html", + perspectiveName: "SupplierPayment", + roles: [ + "codbex-payments.SupplierPayment.SupplierPaymentReadOnly", + ] +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/index.html b/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/index.html new file mode 100644 index 0000000..0239a52 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/index.html @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + {{'codbex-payments:codbex-payments-model.defaults.items' | t}} + + + + + + + + + + + + + + + + + + + + + + + {{next.Date | date: "dd/MMM/yyyy"}} | + {{next.Valor | date: "dd/MMM/yyyy"}} | + {{next.OurPartyIBAN}} | + {{next.CounterpartyIBAN}} | + {{next.CounterpartyName}} | + {{next.Amount}} | + {{optionsCurrencyValue(next.Currency)}} | + {{optionsCompanyValue(next.Company)}} | + {{next.Reason}} | + {{next.Description}} | + {{optionsPaymentMethodValue(next.PaymentMethod)}} | + {{next.Name}} | + {{next.UUID}} | + {{next.Reference}} | + {{next.CreatedAt}} | + {{next.CreatedBy}} | + {{next.UpdatedAt}} | + {{next.UpdatedBy}} + + + + + + + {{ 'codbex-payments:codbex-payments-model.defaults.loadMore' | t }} + + + + + + diff --git a/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/controller.js b/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/controller.js new file mode 100644 index 0000000..6583814 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/controller.js @@ -0,0 +1,658 @@ +angular.module('page', ['blimpKit', 'platformView', 'platformLocale', 'EntityService']) + .config(["EntityServiceProvider", (EntityServiceProvider) => { + EntityServiceProvider.baseUrl = '/services/java/codbex-payments/gen/codbex_payments/api/supplierpayment/SupplierPaymentController'; + }]) + .controller('PageController', ($scope, $http, Extensions, LocaleService, EntityService) => { + const Dialogs = new DialogHub(); + const Notifications = new NotificationHub(); + let description = 'Description'; + let propertySuccessfullyCreated = 'SupplierPayment successfully created'; + let propertySuccessfullyUpdated = 'SupplierPayment successfully updated'; + $scope.entity = {}; + $scope.forms = { + details: {}, + }; + $scope.formHeaders = { + select: 'SupplierPayment Details', + create: 'Create SupplierPayment', + update: 'Update SupplierPayment' + }; + $scope.action = 'select'; + + LocaleService.onInit(() => { + description = LocaleService.t('codbex-payments:codbex-payments-model.defaults.description'); + $scope.formHeaders.select = LocaleService.t('codbex-payments:codbex-payments-model.defaults.formHeadSelect', { name: '$t(codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT)' }); + $scope.formHeaders.create = LocaleService.t('codbex-payments:codbex-payments-model.defaults.formHeadCreate', { name: '$t(codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT)' }); + $scope.formHeaders.update = LocaleService.t('codbex-payments:codbex-payments-model.defaults.formHeadUpdate', { name: '$t(codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT)' }); + propertySuccessfullyCreated = LocaleService.t('codbex-payments:codbex-payments-model.messages.propertySuccessfullyCreated', { name: '$t(codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT)' }); + propertySuccessfullyUpdated = LocaleService.t('codbex-payments:codbex-payments-model.messages.propertySuccessfullyUpdated', { name: '$t(codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT)' }); + }); + + //-----------------Custom Actions-------------------// + Extensions.getWindows(['codbex-payments-custom-action']).then((response) => { + $scope.entityActions = response.data.filter(e => e.perspective === 'SupplierPayment' && e.view === 'SupplierPayment' && e.type === 'entity'); + }); + + $scope.triggerEntityAction = (action) => { + Dialogs.showWindow({ + hasHeader: true, + title: LocaleService.t(action.translation.key, action.translation.options, action.label), + path: action.path, + params: { + id: $scope.entity.Id + }, + closeButton: true + }); + }; + //-----------------Custom Actions-------------------// + + //-----------------Events-------------------// + Dialogs.addMessageListener({ topic: 'codbex-payments.SupplierPayment.SupplierPayment.clearDetails', handler: () => { + $scope.$evalAsync(() => { + $scope.entity = {}; + $scope.optionsSupplier = []; + $scope.optionsCurrency = []; + $scope.optionsCompany = []; + $scope.optionsPaymentMethod = []; + $scope.action = 'select'; + }); + }}); + Dialogs.addMessageListener({ topic: 'codbex-payments.SupplierPayment.SupplierPayment.entitySelected', handler: (data) => { + $scope.$evalAsync(() => { + if (data.entity.Date) { + data.entity.Date = new Date(data.entity.Date); + } + if (data.entity.Valor) { + data.entity.Valor = new Date(data.entity.Valor); + } + if (data.entity.CreatedAt) { + data.entity.CreatedAt = new Date(data.entity.CreatedAt); + } + if (data.entity.UpdatedAt) { + data.entity.UpdatedAt = new Date(data.entity.UpdatedAt); + } + $scope.entity = data.entity; + $scope.optionsSupplier = data.optionsSupplier; + $scope.optionsCurrency = data.optionsCurrency; + $scope.optionsCompany = data.optionsCompany; + $scope.optionsPaymentMethod = data.optionsPaymentMethod; + $scope.action = 'select'; + }); + }}); + Dialogs.addMessageListener({ topic: 'codbex-payments.SupplierPayment.SupplierPayment.createEntity', handler: (data) => { + $scope.$evalAsync(() => { + $scope.entity = {}; + $scope.optionsSupplier = data.optionsSupplier; + $scope.optionsCurrency = data.optionsCurrency; + $scope.optionsCompany = data.optionsCompany; + $scope.optionsPaymentMethod = data.optionsPaymentMethod; + $scope.action = 'create'; + }); + }}); + Dialogs.addMessageListener({ topic: 'codbex-payments.SupplierPayment.SupplierPayment.updateEntity', handler: (data) => { + $scope.$evalAsync(() => { + if (data.entity.Date) { + data.entity.Date = new Date(data.entity.Date); + } + if (data.entity.Valor) { + data.entity.Valor = new Date(data.entity.Valor); + } + if (data.entity.CreatedAt) { + data.entity.CreatedAt = new Date(data.entity.CreatedAt); + } + if (data.entity.UpdatedAt) { + data.entity.UpdatedAt = new Date(data.entity.UpdatedAt); + } + $scope.entity = data.entity; + $scope.optionsSupplier = data.optionsSupplier; + $scope.optionsCurrency = data.optionsCurrency; + $scope.optionsCompany = data.optionsCompany; + $scope.optionsPaymentMethod = data.optionsPaymentMethod; + $scope.action = 'update'; + }); + }}); + + $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-------------------// + + $scope.create = () => { + EntityService.create($scope.entity).then((response) => { + Dialogs.postMessage({ topic: 'codbex-payments.SupplierPayment.SupplierPayment.entityCreated', data: response.data }); + Dialogs.postMessage({ topic: 'codbex-payments.SupplierPayment.SupplierPayment.clearDetails' , data: response.data }); + Notifications.show({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT'), + description: propertySuccessfullyCreated, + type: 'positive' + }); + }, (error) => { + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT'), + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToCreate', { name: '$t(codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT)', message: message }), + type: AlertTypes.Error + }); + console.error('EntityService:', error); + }); + }; + + $scope.update = () => { + EntityService.update($scope.entity.Id, $scope.entity).then((response) => { + Dialogs.postMessage({ topic: 'codbex-payments.SupplierPayment.SupplierPayment.entityUpdated', data: response.data }); + Dialogs.postMessage({ topic: 'codbex-payments.SupplierPayment.SupplierPayment.clearDetails', data: response.data }); + Notifications.show({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT'), + description: propertySuccessfullyUpdated, + type: 'positive' + }); + }, (error) => { + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: LocaleService.t('codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT'), + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToCreate', { name: '$t(codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT)', message: message }), + type: AlertTypes.Error + }); + console.error('EntityService:', error); + }); + }; + + $scope.cancel = () => { + Dialogs.triggerEvent('codbex-payments.SupplierPayment.SupplierPayment.clearDetails'); + }; + + //-----------------Dialogs-------------------// + $scope.alert = (message) => { + if (message) Dialogs.showAlert({ + title: description, + message: message, + type: AlertTypes.Information, + preformatted: true, + }); + }; + + $scope.createSupplier = () => { + Dialogs.showWindow({ + id: 'Supplier-details', + params: { + action: 'create', + entity: {}, + }, + closeButton: false + }); + }; + $scope.createCurrency = () => { + Dialogs.showWindow({ + id: 'Currency-details', + params: { + action: 'create', + entity: {}, + }, + closeButton: false + }); + }; + $scope.createCompany = () => { + Dialogs.showWindow({ + id: 'Company-details', + params: { + action: 'create', + entity: {}, + }, + closeButton: false + }); + }; + $scope.createPaymentMethod = () => { + Dialogs.showWindow({ + id: 'PaymentMethod-details', + params: { + action: 'create', + entity: {}, + }, + closeButton: false + }); + }; + + //-----------------Dialogs-------------------// + + + + //----------------Dropdowns-----------------// + + const lastSearchValuesSupplier = new Set(); + const allValuesSupplier = []; + let loadMoreOptionsSupplierCounter = 0; + $scope.optionsSupplierLoading = false; + $scope.optionsSupplierHasMore = true; + + $scope.loadMoreOptionsSupplier = () => { + const limit = 20; + $scope.optionsSupplierLoading = true; + $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 => ({ + value: e.Id, + text: e.Name + })); + const newValues = []; + resultValues.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesSupplier.push(e); + newValues.push(e); + } + }); + newValues.forEach(e => { + if (!$scope.optionsSupplier.find(o => o.value === e.value)) { + $scope.optionsSupplier.push(e); + } + }) + $scope.optionsSupplierHasMore = resultValues.length > 0; + $scope.optionsSupplierLoading = false; + }, (error) => { + $scope.optionsSupplierLoading = false; + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Supplier', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }; + + $scope.onOptionsSupplierChange = (event) => { + if (allValuesSupplier.length === 0) { + allValuesSupplier.push(...$scope.optionsSupplier); + } + if (event.originalEvent.target.value === '') { + allValuesSupplier.sort((a, b) => a.text.localeCompare(b.text)); + $scope.optionsSupplier = allValuesSupplier; + $scope.optionsSupplierHasMore = true; + } else if (isText(event.which)) { + $scope.optionsSupplierHasMore = false; + let cacheHit = false; + Array.from(lastSearchValuesSupplier).forEach(e => { + if (event.originalEvent.target.value.startsWith(e)) { + cacheHit = true; + } + }) + if (!cacheHit) { + $http.post('/services/java/codbex-partners/gen/codbex_partners/api/suppliers/SupplierController/search', { + conditions: [ + { propertyName: 'Name', operator: 'LIKE', value: `${event.originalEvent.target.value}%` } + ] + }).then((response) => { + const optionValues = allValuesSupplier.map(e => e.value); + const searchResult = response.data.map(e => ({ + value: e.Id, + text: e.Name + })); + searchResult.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesSupplier.push(e); + } + }); + $scope.optionsSupplier = allValuesSupplier.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: 'Supplier', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + lastSearchValuesSupplier.add(event.originalEvent.target.value); + } + } + }; + + $scope.refreshSupplier = () => { + $scope.optionsSupplier = []; + $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 + })); + allValuesSupplier.length === 0; + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Supplier', + 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; + $scope.optionsCurrencyLoading = false; + $scope.optionsCurrencyHasMore = true; + + $scope.loadMoreOptionsCurrency = () => { + const limit = 20; + $scope.optionsCurrencyLoading = true; + $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.Code + })); + const newValues = []; + resultValues.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesCurrency.push(e); + newValues.push(e); + } + }); + newValues.forEach(e => { + if (!$scope.optionsCurrency.find(o => o.value === e.value)) { + $scope.optionsCurrency.push(e); + } + }) + $scope.optionsCurrencyHasMore = resultValues.length > 0; + $scope.optionsCurrencyLoading = false; + }, (error) => { + $scope.optionsCurrencyLoading = false; + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Currency', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + }; + + $scope.onOptionsCurrencyChange = (event) => { + if (allValuesCurrency.length === 0) { + allValuesCurrency.push(...$scope.optionsCurrency); + } + if (event.originalEvent.target.value === '') { + allValuesCurrency.sort((a, b) => a.text.localeCompare(b.text)); + $scope.optionsCurrency = allValuesCurrency; + $scope.optionsCurrencyHasMore = true; + } else if (isText(event.which)) { + $scope.optionsCurrencyHasMore = false; + let cacheHit = false; + Array.from(lastSearchValuesCurrency).forEach(e => { + if (event.originalEvent.target.value.startsWith(e)) { + cacheHit = true; + } + }) + if (!cacheHit) { + $http.post('/services/java/codbex-currencies/gen/codbex_currencies/api/settings/CurrencyController/search', { + conditions: [ + { 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.Code + })); + searchResult.forEach(e => { + if (!optionValues.includes(e.value)) { + allValuesCurrency.push(e); + } + }); + $scope.optionsCurrency = allValuesCurrency.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: 'Currency', + message: LocaleService.t('codbex-payments:codbex-payments-model.messages.error.unableToLoad', { message: message }), + type: AlertTypes.Error + }); + }); + lastSearchValuesCurrency.add(event.originalEvent.target.value); + } + } + }; + + $scope.refreshCurrency = () => { + $scope.optionsCurrency = []; + $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 + })); + allValuesCurrency.length === 0; + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Currency', + 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.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 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; + return false; + } + + //----------------Dropdowns-----------------// + }); \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/index.html b/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/index.html new file mode 100644 index 0000000..5092505 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/index.html @@ -0,0 +1,439 @@ + + + + + + + + + + + + + + + + + + + +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_SUPPLIER' | t }} +
+
+ + + + + More Options + + +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_DATE' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_VALOR' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_OURPARTYIBAN' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_COUNTERPARTYIBAN' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_COUNTERPARTYNAME' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_AMOUNT' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_CURRENCY' | t }} +
+
+ + + + + More Options + + +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_COMPANY' | t }} +
+
+ + + + + More Options + + +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_REASON' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_DESCRIPTION' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_PAYMENTMETHOD' | t }} +
+
+ + + + + More Options + + +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_NAME' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_UUID' | t }} +
+
+ + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_REFERENCE' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_CREATEDAT' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_CREATEDBY' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_UPDATEDAT' | t }} +
+
+ + + + +
+
+ +
+ {{ 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT_UPDATEDBY' | t }} +
+
+ + + + +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + diff --git a/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/view.extension b/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/view.extension new file mode 100644 index 0000000..62825b4 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/view.extension @@ -0,0 +1,6 @@ +{ + "module": "codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/view.js", + "extensionPoint": "application-views", + "description": "codbex-payments - Application View - Main Details", + "role": "codbex-payments.SupplierPayment.SupplierPaymentReadOnly,codbex-payments.SupplierPayment.SupplierPaymentFullAccess" +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/view.js b/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/view.js new file mode 100644 index 0000000..65c2cd4 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/view.js @@ -0,0 +1,20 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const viewData = { + id: 'SupplierPayment-details', + label: 'SupplierPayment', + translation: { + key: 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT', + }, + region: 'center', + lazyLoad: false, + autoFocusTab: true, + path: '/services/web/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/index.html', + perspectiveName: 'SupplierPayment' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/view.extension b/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/view.extension new file mode 100644 index 0000000..0ca3eb5 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/view.extension @@ -0,0 +1,6 @@ +{ + "module": "codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/view.js", + "extensionPoint": "application-views", + "description": "codbex-payments - Application View", + "role": "codbex-payments.SupplierPayment.SupplierPaymentReadOnly,codbex-payments.SupplierPayment.SupplierPaymentFullAccess" +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/view.js b/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/view.js new file mode 100644 index 0000000..47d5ec5 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/view.js @@ -0,0 +1,20 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const viewData = { + id: 'SupplierPayment', + label: 'SupplierPayment', + translation: { + key: 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT', + }, + region: 'left', + lazyLoad: false, + autoFocusTab: false, + path: '/services/web/codbex-payments/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/index.html', + perspectiveName: 'SupplierPayment' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/index.html b/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/index.html new file mode 100644 index 0000000..382eb26 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/index.html @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + {{'codbex-payments:codbex-payments-model.state.busy' | t}} + + + {{'codbex-payments:codbex-payments-model.messages.error.loading' | t}} + + + + + + diff --git a/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/perspective.extension b/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/perspective.extension new file mode 100644 index 0000000..c7d8443 --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/perspective.extension @@ -0,0 +1,6 @@ +{ + "module": "codbex-payments/gen/codbex-payments/ui/SupplierPayment/perspective.js", + "extensionPoint": "application-perspectives", + "description": "codbex-payments - Perspective - SupplierPayment", + "role": "codbex-payments.SupplierPayment.SupplierPaymentReadOnly,codbex-payments.SupplierPayment.SupplierPaymentFullAccess" +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/perspective.js b/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/perspective.js new file mode 100644 index 0000000..4b41e4b --- /dev/null +++ b/codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/perspective.js @@ -0,0 +1,19 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const perspectiveData = { + id: 'SupplierPayment', + label: 'SupplierPayment', + translation: { + key: 'codbex-payments:codbex-payments-model.t.SUPPLIERPAYMENT', + }, + path: '/services/web/codbex-payments/gen/codbex-payments/ui/SupplierPayment/index.html', + groupId: 'purchasing-navigation-group', + order: 300, + icon: '/services/web/resources/unicons/box.svg' +}; +if (typeof exports !== 'undefined') { + exports.getPerspective = () => perspectiveData; +} \ No newline at end of file diff --git a/codbex-payments/bin/gen/codbex_payments/api/customerpayment/CustomerPaymentController.class b/codbex-payments/bin/gen/codbex_payments/api/customerpayment/CustomerPaymentController.class new file mode 100644 index 0000000..c9dac8b Binary files /dev/null and b/codbex-payments/bin/gen/codbex_payments/api/customerpayment/CustomerPaymentController.class differ diff --git a/codbex-payments/bin/gen/codbex_payments/api/employeepayment/EmployeePaymentController.class b/codbex-payments/bin/gen/codbex_payments/api/employeepayment/EmployeePaymentController.class new file mode 100644 index 0000000..8478518 Binary files /dev/null and b/codbex-payments/bin/gen/codbex_payments/api/employeepayment/EmployeePaymentController.class differ diff --git a/codbex-payments/bin/gen/codbex_payments/api/paymentadjustment/PaymentAdjustmentController.class b/codbex-payments/bin/gen/codbex_payments/api/paymentadjustment/PaymentAdjustmentController.class new file mode 100644 index 0000000..4ab77a2 Binary files /dev/null and b/codbex-payments/bin/gen/codbex_payments/api/paymentadjustment/PaymentAdjustmentController.class differ diff --git a/codbex-payments/bin/gen/codbex_payments/api/paymentrecord/PaymentRecordController.class b/codbex-payments/bin/gen/codbex_payments/api/paymentrecord/PaymentRecordController.class new file mode 100644 index 0000000..59dd26b Binary files /dev/null and b/codbex-payments/bin/gen/codbex_payments/api/paymentrecord/PaymentRecordController.class differ diff --git a/codbex-payments/bin/gen/codbex_payments/api/settings/PaymentDirectionController.class b/codbex-payments/bin/gen/codbex_payments/api/settings/PaymentDirectionController.class new file mode 100644 index 0000000..47015f2 Binary files /dev/null and b/codbex-payments/bin/gen/codbex_payments/api/settings/PaymentDirectionController.class differ diff --git a/codbex-payments/bin/gen/codbex_payments/api/settings/PaymentTypeController.class b/codbex-payments/bin/gen/codbex_payments/api/settings/PaymentTypeController.class new file mode 100644 index 0000000..bae5395 Binary files /dev/null and b/codbex-payments/bin/gen/codbex_payments/api/settings/PaymentTypeController.class differ diff --git a/codbex-payments/bin/gen/codbex_payments/api/supplierpayment/SupplierPaymentController.class b/codbex-payments/bin/gen/codbex_payments/api/supplierpayment/SupplierPaymentController.class new file mode 100644 index 0000000..7b5d681 Binary files /dev/null and b/codbex-payments/bin/gen/codbex_payments/api/supplierpayment/SupplierPaymentController.class differ diff --git a/codbex-payments/bin/gen/codbex_payments/data/customerpayment/CustomerPayment.extensionpoint b/codbex-payments/bin/gen/codbex_payments/data/customerpayment/CustomerPayment.extensionpoint new file mode 100644 index 0000000..f4092b6 --- /dev/null +++ b/codbex-payments/bin/gen/codbex_payments/data/customerpayment/CustomerPayment.extensionpoint @@ -0,0 +1,4 @@ +{ + "name": "codbex-payments-CustomerPayment-CustomerPayment", + "description": "Extension Point for the codbex-payments-CustomerPayment-CustomerPayment entity" +} diff --git a/codbex-payments/bin/gen/codbex_payments/data/customerpayment/CustomerPaymentEntity.class b/codbex-payments/bin/gen/codbex_payments/data/customerpayment/CustomerPaymentEntity.class new file mode 100644 index 0000000..6297b0a Binary files /dev/null and b/codbex-payments/bin/gen/codbex_payments/data/customerpayment/CustomerPaymentEntity.class differ diff --git a/codbex-payments/bin/gen/codbex_payments/data/customerpayment/CustomerPaymentRepository.class b/codbex-payments/bin/gen/codbex_payments/data/customerpayment/CustomerPaymentRepository.class new file mode 100644 index 0000000..9420701 Binary files /dev/null and b/codbex-payments/bin/gen/codbex_payments/data/customerpayment/CustomerPaymentRepository.class differ diff --git a/codbex-payments/bin/gen/codbex_payments/data/employeepayment/EmployeePayment.extensionpoint b/codbex-payments/bin/gen/codbex_payments/data/employeepayment/EmployeePayment.extensionpoint new file mode 100644 index 0000000..d253298 --- /dev/null +++ b/codbex-payments/bin/gen/codbex_payments/data/employeepayment/EmployeePayment.extensionpoint @@ -0,0 +1,4 @@ +{ + "name": "codbex-payments-EmployeePayment-EmployeePayment", + "description": "Extension Point for the codbex-payments-EmployeePayment-EmployeePayment entity" +} diff --git a/codbex-payments/bin/gen/codbex_payments/data/employeepayment/EmployeePaymentEntity.class b/codbex-payments/bin/gen/codbex_payments/data/employeepayment/EmployeePaymentEntity.class new file mode 100644 index 0000000..26bc6c1 Binary files /dev/null and b/codbex-payments/bin/gen/codbex_payments/data/employeepayment/EmployeePaymentEntity.class differ diff --git a/codbex-payments/bin/gen/codbex_payments/data/employeepayment/EmployeePaymentRepository.class b/codbex-payments/bin/gen/codbex_payments/data/employeepayment/EmployeePaymentRepository.class new file mode 100644 index 0000000..660ad1b Binary files /dev/null and b/codbex-payments/bin/gen/codbex_payments/data/employeepayment/EmployeePaymentRepository.class differ diff --git a/codbex-payments/bin/gen/codbex_payments/data/paymentadjustment/PaymentAdjustment.extensionpoint b/codbex-payments/bin/gen/codbex_payments/data/paymentadjustment/PaymentAdjustment.extensionpoint new file mode 100644 index 0000000..3d4208b --- /dev/null +++ b/codbex-payments/bin/gen/codbex_payments/data/paymentadjustment/PaymentAdjustment.extensionpoint @@ -0,0 +1,4 @@ +{ + "name": "codbex-payments-PaymentAdjustment-PaymentAdjustment", + "description": "Extension Point for the codbex-payments-PaymentAdjustment-PaymentAdjustment entity" +} diff --git a/codbex-payments/bin/gen/codbex_payments/data/paymentadjustment/PaymentAdjustmentEntity.class b/codbex-payments/bin/gen/codbex_payments/data/paymentadjustment/PaymentAdjustmentEntity.class new file mode 100644 index 0000000..5e1c045 Binary files /dev/null and b/codbex-payments/bin/gen/codbex_payments/data/paymentadjustment/PaymentAdjustmentEntity.class differ diff --git a/codbex-payments/bin/gen/codbex_payments/data/paymentadjustment/PaymentAdjustmentRepository.class b/codbex-payments/bin/gen/codbex_payments/data/paymentadjustment/PaymentAdjustmentRepository.class new file mode 100644 index 0000000..1a545ab Binary files /dev/null and b/codbex-payments/bin/gen/codbex_payments/data/paymentadjustment/PaymentAdjustmentRepository.class differ diff --git a/codbex-payments/bin/gen/codbex_payments/data/paymentrecord/PaymentRecord.extensionpoint b/codbex-payments/bin/gen/codbex_payments/data/paymentrecord/PaymentRecord.extensionpoint new file mode 100644 index 0000000..ea0c354 --- /dev/null +++ b/codbex-payments/bin/gen/codbex_payments/data/paymentrecord/PaymentRecord.extensionpoint @@ -0,0 +1,4 @@ +{ + "name": "codbex-payments-PaymentRecord-PaymentRecord", + "description": "Extension Point for the codbex-payments-PaymentRecord-PaymentRecord entity" +} diff --git a/codbex-payments/bin/gen/codbex_payments/data/paymentrecord/PaymentRecordEntity.class b/codbex-payments/bin/gen/codbex_payments/data/paymentrecord/PaymentRecordEntity.class new file mode 100644 index 0000000..8a87773 Binary files /dev/null and b/codbex-payments/bin/gen/codbex_payments/data/paymentrecord/PaymentRecordEntity.class differ diff --git a/codbex-payments/bin/gen/codbex_payments/data/paymentrecord/PaymentRecordRepository.class b/codbex-payments/bin/gen/codbex_payments/data/paymentrecord/PaymentRecordRepository.class new file mode 100644 index 0000000..a54dc0a Binary files /dev/null and b/codbex-payments/bin/gen/codbex_payments/data/paymentrecord/PaymentRecordRepository.class differ diff --git a/codbex-payments/bin/gen/codbex_payments/data/settings/PaymentDirection.extensionpoint b/codbex-payments/bin/gen/codbex_payments/data/settings/PaymentDirection.extensionpoint new file mode 100644 index 0000000..7a74d59 --- /dev/null +++ b/codbex-payments/bin/gen/codbex_payments/data/settings/PaymentDirection.extensionpoint @@ -0,0 +1,4 @@ +{ + "name": "codbex-payments-Settings-PaymentDirection", + "description": "Extension Point for the codbex-payments-Settings-PaymentDirection entity" +} diff --git a/codbex-payments/bin/gen/codbex_payments/data/settings/PaymentDirectionEntity.class b/codbex-payments/bin/gen/codbex_payments/data/settings/PaymentDirectionEntity.class new file mode 100644 index 0000000..65bd537 Binary files /dev/null and b/codbex-payments/bin/gen/codbex_payments/data/settings/PaymentDirectionEntity.class differ diff --git a/codbex-payments/bin/gen/codbex_payments/data/settings/PaymentDirectionRepository.class b/codbex-payments/bin/gen/codbex_payments/data/settings/PaymentDirectionRepository.class new file mode 100644 index 0000000..4874056 Binary files /dev/null and b/codbex-payments/bin/gen/codbex_payments/data/settings/PaymentDirectionRepository.class differ diff --git a/codbex-payments/bin/gen/codbex_payments/data/settings/PaymentType.extensionpoint b/codbex-payments/bin/gen/codbex_payments/data/settings/PaymentType.extensionpoint new file mode 100644 index 0000000..a310cb5 --- /dev/null +++ b/codbex-payments/bin/gen/codbex_payments/data/settings/PaymentType.extensionpoint @@ -0,0 +1,4 @@ +{ + "name": "codbex-payments-Settings-PaymentType", + "description": "Extension Point for the codbex-payments-Settings-PaymentType entity" +} diff --git a/codbex-payments/bin/gen/codbex_payments/data/settings/PaymentTypeEntity.class b/codbex-payments/bin/gen/codbex_payments/data/settings/PaymentTypeEntity.class new file mode 100644 index 0000000..e42ee95 Binary files /dev/null and b/codbex-payments/bin/gen/codbex_payments/data/settings/PaymentTypeEntity.class differ diff --git a/codbex-payments/bin/gen/codbex_payments/data/settings/PaymentTypeRepository.class b/codbex-payments/bin/gen/codbex_payments/data/settings/PaymentTypeRepository.class new file mode 100644 index 0000000..cb4fcc1 Binary files /dev/null and b/codbex-payments/bin/gen/codbex_payments/data/settings/PaymentTypeRepository.class differ diff --git a/codbex-payments/bin/gen/codbex_payments/data/supplierpayment/SupplierPayment.extensionpoint b/codbex-payments/bin/gen/codbex_payments/data/supplierpayment/SupplierPayment.extensionpoint new file mode 100644 index 0000000..b2af2c8 --- /dev/null +++ b/codbex-payments/bin/gen/codbex_payments/data/supplierpayment/SupplierPayment.extensionpoint @@ -0,0 +1,4 @@ +{ + "name": "codbex-payments-SupplierPayment-SupplierPayment", + "description": "Extension Point for the codbex-payments-SupplierPayment-SupplierPayment entity" +} diff --git a/codbex-payments/bin/gen/codbex_payments/data/supplierpayment/SupplierPaymentEntity.class b/codbex-payments/bin/gen/codbex_payments/data/supplierpayment/SupplierPaymentEntity.class new file mode 100644 index 0000000..b5c72bf Binary files /dev/null and b/codbex-payments/bin/gen/codbex_payments/data/supplierpayment/SupplierPaymentEntity.class differ diff --git a/codbex-payments/bin/gen/codbex_payments/data/supplierpayment/SupplierPaymentRepository.class b/codbex-payments/bin/gen/codbex_payments/data/supplierpayment/SupplierPaymentRepository.class new file mode 100644 index 0000000..1624a47 Binary files /dev/null and b/codbex-payments/bin/gen/codbex_payments/data/supplierpayment/SupplierPaymentRepository.class differ diff --git a/codbex-payments/bin/gen/codbex_payments/roles/default-roles.roles b/codbex-payments/bin/gen/codbex_payments/roles/default-roles.roles new file mode 100644 index 0000000..aae9a47 --- /dev/null +++ b/codbex-payments/bin/gen/codbex_payments/roles/default-roles.roles @@ -0,0 +1,50 @@ +[ + { + "name": "codbex-payments.CustomerPayment.CustomerPaymentReadOnly", + "description": "A role that grants read only permission for CustomerPayment." + }, + { + "name": "codbex-payments.CustomerPayment.CustomerPaymentFullAccess", + "description": "A role that grants full access for CustomerPayment." + }, + { + "name": "codbex-payments.SupplierPayment.SupplierPaymentReadOnly", + "description": "A role that grants read only permission for SupplierPayment." + }, + { + "name": "codbex-payments.SupplierPayment.SupplierPaymentFullAccess", + "description": "A role that grants full access for SupplierPayment." + }, + { + "name": "codbex-payments.EmployeePayment.EmployeePaymentReadOnly", + "description": "A role that grants read only permission for EmployeePayment." + }, + { + "name": "codbex-payments.EmployeePayment.EmployeePaymentFullAccess", + "description": "A role that grants full access for EmployeePayment." + }, + { + "name": "codbex-payments.PaymentRecord.PaymentRecordReadOnly", + "description": "A role that grants read only permission for PaymentRecord." + }, + { + "name": "codbex-payments.PaymentRecord.PaymentRecordFullAccess", + "description": "A role that grants full access for PaymentRecord." + }, + { + "name": "codbex-payments.Settings.PaymentTypeReadOnly", + "description": "A role that grants read only permission for PaymentType." + }, + { + "name": "codbex-payments.Settings.PaymentTypeFullAccess", + "description": "A role that grants full access for PaymentType." + }, + { + "name": "codbex-payments.PaymentAdjustment.PaymentAdjustmentReadOnly", + "description": "A role that grants read only permission for PaymentAdjustment." + }, + { + "name": "codbex-payments.PaymentAdjustment.PaymentAdjustmentFullAccess", + "description": "A role that grants full access for PaymentAdjustment." + } +] diff --git a/codbex-payments/bin/package.json b/codbex-payments/bin/package.json new file mode 100644 index 0000000..42043ad --- /dev/null +++ b/codbex-payments/bin/package.json @@ -0,0 +1,20 @@ +{ + "name": "@codbex/codbex-payments", + "version": "1.4.0", + "repository": { + "url": "https://github.com/codbex/codbex-payments.git", + "type": "git" + }, + "publishConfig": { + "registry": "https://npm.pkg.github.com" + }, + "dependencies": { + "@codbex/codbex-partners": "^1.8.0", + "@codbex/codbex-companies": "^1.6.0", + "@codbex/codbex-employees": "^1.6.0", + "@codbex/codbex-currencies": "^1.5.0", + "@codbex/codbex-number-generator": "^1.4.0", + "@codbex/codbex-number-generator-data": "^1.3.0", + "@codbex/codbex-navigation-groups": "^1.1.0" + } +} diff --git a/codbex-payments/bin/project.json b/codbex-payments/bin/project.json new file mode 100644 index 0000000..b8cb829 --- /dev/null +++ b/codbex-payments/bin/project.json @@ -0,0 +1,4 @@ +{ + "guid":"codbex-payments", + "actions":[] +} diff --git a/codbex-payments/bin/translations/en-US/codbex-payments.model.json b/codbex-payments/bin/translations/en-US/codbex-payments.model.json new file mode 100644 index 0000000..8711f19 --- /dev/null +++ b/codbex-payments/bin/translations/en-US/codbex-payments.model.json @@ -0,0 +1,264 @@ +{ + "codbex-payments-model": { + "aria": { + "showHide": "show/hide {{name}} options", + "options": "{{name}} options", + "tableRowMenu": "Table Row Menu", + "tableRowMenuBtn": "Table Row Menu Button", + "headerMenu": "Header Menu", + "headerMenuBtn": "Header Menu Button", + "addEntity": "add entity", + "editEntity": "edit entity", + "deleteEntity": "delete entity" + }, + "state": { + "busy": "Loading..." + }, + "messages": { + "error": { + "incorrectInput": "Incorrect Input", + "loading": "Encounterd an error while loading", + "unableToCreate": "Unable to create {{name}}: '{{message}}'", + "unableToUpdate": "Unable to update {{name}}: '{{message}}'", + "unableToDelete": "Unable to delete {{name}}: '{{message}}'", + "unableToLoad": "Unable to load data: '{{message}}'", + "unableToLF": "Unable to list/filter {{name}}: '{{message}}'", + "unableToCount": "Unable to count {{name}}: '{{message}}'", + "pattern": "The value doesn't match the required pattern: {{rule}}", + "lengthMinMax": "Value must be between {{min}} and {{max}} characters long", + "lengthMin": "Value must not be less than {{min}} characters", + "lengthMax": "Value must not be more than {{max}} characters" + }, + "propertySuccessfullyCreated": "{{name}} successfully created", + "propertySuccessfullyUpdated": "{{name}} successfully updated", + "inputSearch": "Search {{name}}...", + "inputEnter": "Enter {{name}}...", + "noData": "No data available.", + "deleteConfirm": "Are you sure you want to delete {{name}}? This action cannot be undone.", + "detailSelectRecord": "Select a record to get a list of it's details." + }, + "defaults": { + "yes": "Yes", + "no": "No", + "add": "Add", + "refresh": "Refresh", + "to": "To {{text}}", + "from": "From {{text}}", + "filter": "Filter", + "print": "Print", + "reset": "Reset", + "create": "Create", + "edit": "Edit", + "update": "Update", + "delete": "Delete", + "cancel": "Cancel", + "items": "Items", + "description": "Description", + "formGrpFilter": "{{name}} Filter", + "formHeadSelect": "{{name}} Details", + "formHeadCreate": "Create {{name}}", + "formHeadUpdate": "Update {{name}}", + "reportTitle": "{{name}} Report", + "reportFilter": "Report Filter", + "viewDetails": "View Details", + "deleteTitle": "Delete {{name}}?", + "loadMore": "Load More..." + }, + "extName": "{{content}}", + "t": { + "CUSTOMERPAYMENT": "CustomerPayment", + "CUSTOMERPAYMENT_ID": "Id", + "CUSTOMERPAYMENT_CUSTOMER": "Customer", + "CUSTOMERPAYMENT_DATE": "Date", + "CUSTOMERPAYMENT_VALOR": "Valor", + "CUSTOMERPAYMENT_OURPARTYIBAN": "OurPartyIBAN", + "CUSTOMERPAYMENT_COUNTERPARTYIBAN": "CounterpartyIBAN", + "CUSTOMERPAYMENT_COUNTERPARTYNAME": "CounterpartyName", + "CUSTOMERPAYMENT_AMOUNT": "Amount", + "CUSTOMERPAYMENT_CURRENCY": "Currency", + "CUSTOMERPAYMENT_COMPANY": "Company", + "CUSTOMERPAYMENT_REASON": "Reason", + "CUSTOMERPAYMENT_DESCRIPTION": "Description", + "CUSTOMERPAYMENT_PAYMENTMETHOD": "PaymentMethod", + "CUSTOMERPAYMENT_NAME": "Name", + "CUSTOMERPAYMENT_UUID": "UUID", + "CUSTOMERPAYMENT_REFERENCE": "Reference", + "CUSTOMERPAYMENT_CREATEDAT": "CreatedAt", + "CUSTOMERPAYMENT_CREATEDBY": "CreatedBy", + "CUSTOMERPAYMENT_UPDATEDAT": "UpdatedAt", + "CUSTOMERPAYMENT_UPDATEDBY": "UpdatedBy", + "SUPPLIERPAYMENT": "SupplierPayment", + "SUPPLIERPAYMENT_ID": "Id", + "SUPPLIERPAYMENT_SUPPLIER": "Supplier", + "SUPPLIERPAYMENT_DATE": "Date", + "SUPPLIERPAYMENT_VALOR": "Valor", + "SUPPLIERPAYMENT_OURPARTYIBAN": "OurPartyIBAN", + "SUPPLIERPAYMENT_COUNTERPARTYIBAN": "CounterpartyIBAN", + "SUPPLIERPAYMENT_COUNTERPARTYNAME": "CounterpartyName", + "SUPPLIERPAYMENT_AMOUNT": "Amount", + "SUPPLIERPAYMENT_CURRENCY": "Currency", + "SUPPLIERPAYMENT_COMPANY": "Company", + "SUPPLIERPAYMENT_REASON": "Reason", + "SUPPLIERPAYMENT_DESCRIPTION": "Description", + "SUPPLIERPAYMENT_PAYMENTMETHOD": "PaymentMethod", + "SUPPLIERPAYMENT_NAME": "Name", + "SUPPLIERPAYMENT_UUID": "UUID", + "SUPPLIERPAYMENT_REFERENCE": "Reference", + "SUPPLIERPAYMENT_CREATEDAT": "CreatedAt", + "SUPPLIERPAYMENT_CREATEDBY": "CreatedBy", + "SUPPLIERPAYMENT_UPDATEDAT": "UpdatedAt", + "SUPPLIERPAYMENT_UPDATEDBY": "UpdatedBy", + "EMPLOYEEPAYMENT": "EmployeePayment", + "EMPLOYEEPAYMENT_ID": "Id", + "EMPLOYEEPAYMENT_EMPLOYEE": "Employee", + "EMPLOYEEPAYMENT_DATE": "Date", + "EMPLOYEEPAYMENT_VALOR": "Valor", + "EMPLOYEEPAYMENT_OURPARTYIBAN": "OurPartyIBAN", + "EMPLOYEEPAYMENT_COUNTERPARTYIBAN": "CounterpartyIBAN", + "EMPLOYEEPAYMENT_COUNTERPARTYNAME": "CounterpartyName", + "EMPLOYEEPAYMENT_AMOUNT": "Amount", + "EMPLOYEEPAYMENT_CURRENCY": "Currency", + "EMPLOYEEPAYMENT_COMPANY": "Company", + "EMPLOYEEPAYMENT_REASON": "Reason", + "EMPLOYEEPAYMENT_DESCRIPTION": "Description", + "EMPLOYEEPAYMENT_NAME": "Name", + "EMPLOYEEPAYMENT_UUID": "UUID", + "EMPLOYEEPAYMENT_REFERENCE": "Reference", + "EMPLOYEEPAYMENT_CREATEDAT": "CreatedAt", + "EMPLOYEEPAYMENT_CREATEDBY": "CreatedBy", + "EMPLOYEEPAYMENT_UPDATEDAT": "UpdatedAt", + "EMPLOYEEPAYMENT_UPDATEDBY": "UpdatedBy", + "PAYMENTRECORD": "PaymentRecord", + "PAYMENTRECORD_ID": "Id", + "PAYMENTRECORD_DATE": "Date", + "PAYMENTRECORD_VALOR": "Valor", + "PAYMENTRECORD_OURPARTYIBAN": "OurPartyIBAN", + "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_UUID": "UUID", + "PAYMENTRECORD_REFERENCE": "Reference", + "PAYMENTRECORD_DELETED": "Deleted", + "PAYMENTRECORD_DELETEDAT": "DeletedAt", + "PAYMENTRECORD_DELETEDREASON": "DeletedReason", + "PAYMENTRECORD_CREATEDAT": "CreatedAt", + "PAYMENTRECORD_CREATEDBY": "CreatedBy", + "PAYMENTRECORD_UPDATEDAT": "UpdatedAt", + "PAYMENTRECORD_UPDATEDBY": "UpdatedBy", + "PAYMENTTYPE": "PaymentType", + "PAYMENTTYPE_ID": "Id", + "PAYMENTTYPE_NAME": "Name", + "PAYMENTADJUSTMENT": "PaymentAdjustment", + "PAYMENTADJUSTMENT_ID": "Id", + "PAYMENTADJUSTMENT_DATE": "Date", + "PAYMENTADJUSTMENT_VALOR": "Valor", + "PAYMENTADJUSTMENT_AMOUNT": "Amount", + "PAYMENTADJUSTMENT_CURRENCY": "Currency", + "PAYMENTADJUSTMENT_REASON": "Reason", + "PAYMENTADJUSTMENT_COMPANY": "Company", + "PAYMENTADJUSTMENT_UUID": "UUID", + "PAYMENTADJUSTMENT_CREATEDAT": "CreatedAt", + "PAYMENTADJUSTMENT_CREATEDBY": "CreatedBy", + "PAYMENTADJUSTMENT_UPDATEDAT": "UpdatedAt", + "PAYMENTADJUSTMENT_UPDATEDBY": "UpdatedBy", + "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", + "EMPLOYEE_MIDDLENAME": "Middle Name", + "EMPLOYEE_LASTNAME": "Last Name", + "EMPLOYEE_NAME": "Name", + "EMPLOYEE_EMAIL": "Email", + "EMPLOYEE_PHONENUMBER": "PhoneNumber", + "EMPLOYEE_BIRTHDATE": "BirthDate", + "EMPLOYEE_PERSONALNUMBER": "PersonalNumber", + "EMPLOYEE_NATIONALITY": "Nationality", + "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", + "SUPPLIER_LASTNAME": "LastName", + "SUPPLIER_LEGALENTITYNAME": "LegalEntityName", + "SUPPLIER_NAME": "Name", + "SUPPLIER_EMAIL": "Email", + "SUPPLIER_PHONE": "Phone", + "SUPPLIER_FAX": "Fax", + "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", + "EmployeePayment": "EmployeePayment", + "PaymentAdjustment": "PaymentAdjustment" + } + } +} \ No newline at end of file diff --git a/codbex-payments/codbex-payments.gen b/codbex-payments/codbex-payments.gen index 90d44f9..07a157d 100644 --- a/codbex-payments/codbex-payments.gen +++ b/codbex-payments/codbex-payments.gen @@ -1,9 +1,9 @@ { "tablePrefix": "CODBEX_", "brand": "codbex", - "brandUrl": "https://www.codbex.com/", - "title": "Payments Management Module", - "description": "Managing Payments Data", + "brandUrl": "https://www.codbex.com", + "title": "Payments Management System", + "description": "Managing payments data", "projectName": "codbex-payments", "workspaceName": "workspace", "filePath": "codbex-payments.model", @@ -294,6 +294,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -327,6 +328,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -506,6 +508,9 @@ "dataTypeJava": "double", "dataTypeTypescript": "number", "dataTypeJavaClass": "java.math.BigDecimal", + "isNumberType": true, + "isFloatType": true, + "formatPattern": "### ### ### ##0.00", "inputRule": "" }, { @@ -539,6 +544,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -572,6 +578,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -665,6 +672,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -967,6 +975,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, "properties": [ @@ -1147,6 +1156,9 @@ "dataTypeJava": "double", "dataTypeTypescript": "number", "dataTypeJavaClass": "java.math.BigDecimal", + "isNumberType": true, + "isFloatType": true, + "formatPattern": "### ### ### ##0.00", "inputRule": "" }, { @@ -1180,6 +1192,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -1213,6 +1226,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -1306,6 +1320,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -1458,7 +1473,8 @@ ] }, "hasDropdowns": true, - "hasDates": true + "hasDates": true, + "hasFloats": true }, { "properties": [ @@ -1487,6 +1503,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -1520,6 +1537,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -1699,6 +1717,9 @@ "dataTypeJava": "double", "dataTypeTypescript": "number", "dataTypeJavaClass": "java.math.BigDecimal", + "isNumberType": true, + "isFloatType": true, + "formatPattern": "### ### ### ##0.00", "inputRule": "" }, { @@ -1732,6 +1753,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -1765,6 +1787,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -1858,6 +1881,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -2160,6 +2184,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, "properties": [ @@ -2340,6 +2365,9 @@ "dataTypeJava": "double", "dataTypeTypescript": "number", "dataTypeJavaClass": "java.math.BigDecimal", + "isNumberType": true, + "isFloatType": true, + "formatPattern": "### ### ### ##0.00", "inputRule": "" }, { @@ -2373,6 +2401,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -2406,6 +2435,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -2499,6 +2529,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -2712,7 +2743,8 @@ ] }, "hasDropdowns": true, - "hasDates": true + "hasDates": true, + "hasFloats": true }, { "properties": [ @@ -2741,6 +2773,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -2774,6 +2807,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -2953,6 +2987,9 @@ "dataTypeJava": "double", "dataTypeTypescript": "number", "dataTypeJavaClass": "java.math.BigDecimal", + "isNumberType": true, + "isFloatType": true, + "formatPattern": "### ### ### ##0.00", "inputRule": "" }, { @@ -2986,6 +3023,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -3019,6 +3057,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -3376,6 +3415,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, "properties": [ @@ -3556,6 +3596,9 @@ "dataTypeJava": "double", "dataTypeTypescript": "number", "dataTypeJavaClass": "java.math.BigDecimal", + "isNumberType": true, + "isFloatType": true, + "formatPattern": "### ### ### ##0.00", "inputRule": "" }, { @@ -3589,6 +3632,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -3622,6 +3666,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -3895,7 +3940,8 @@ ] }, "hasDropdowns": true, - "hasDates": true + "hasDates": true, + "hasFloats": true }, { "properties": [ @@ -3924,6 +3970,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -4103,6 +4150,9 @@ "dataTypeJava": "double", "dataTypeTypescript": "number", "dataTypeJavaClass": "java.math.BigDecimal", + "isNumberType": true, + "isFloatType": true, + "formatPattern": "### ### ### ##0.00", "inputRule": "" }, { @@ -4136,6 +4186,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -4169,6 +4220,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -4202,6 +4254,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -4235,6 +4288,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -4788,6 +4842,9 @@ "dataTypeJava": "double", "dataTypeTypescript": "number", "dataTypeJavaClass": "java.math.BigDecimal", + "isNumberType": true, + "isFloatType": true, + "formatPattern": "### ### ### ##0.00", "inputRule": "" }, { @@ -4821,6 +4878,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -4854,6 +4912,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -4887,6 +4946,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -4920,6 +4980,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -5247,6 +5308,7 @@ ] }, "hasDates": true, + "hasFloats": true, "hasDropdowns": true }, { @@ -5276,6 +5338,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -5370,6 +5433,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -5456,6 +5520,9 @@ "dataTypeJava": "double", "dataTypeTypescript": "number", "dataTypeJavaClass": "java.math.BigDecimal", + "isNumberType": true, + "isFloatType": true, + "formatPattern": "### ### ### ##0.00", "inputRule": "" }, { @@ -5489,6 +5556,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -5552,6 +5620,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -5835,6 +5904,9 @@ "dataTypeJava": "double", "dataTypeTypescript": "number", "dataTypeJavaClass": "java.math.BigDecimal", + "isNumberType": true, + "isFloatType": true, + "formatPattern": "### ### ### ##0.00", "inputRule": "" }, { @@ -5868,6 +5940,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -5931,6 +6004,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -6083,6 +6157,7 @@ ] }, "hasDates": true, + "hasFloats": true, "hasDropdowns": true }, { @@ -6112,6 +6187,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -6202,6 +6278,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -6416,6 +6493,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -6448,6 +6526,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -6812,6 +6891,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -7087,6 +7167,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -7119,6 +7200,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -7151,6 +7233,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -7364,6 +7447,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -7818,6 +7902,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -7912,6 +7997,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -8029,6 +8115,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -8083,6 +8170,9 @@ "dataTypeJava": "double", "dataTypeTypescript": "number", "dataTypeJavaClass": "Double", + "isNumberType": true, + "isFloatType": true, + "formatPattern": "### ### ### ##0.00", "inputRule": "" }, { @@ -8235,6 +8325,7 @@ "Id" ], "primaryKeysString": "Id", + "hasFloats": true, "hasDates": true }, { @@ -8264,6 +8355,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -8356,6 +8448,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -8448,6 +8541,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { @@ -8480,6 +8574,7 @@ "dataTypeJava": "int", "dataTypeTypescript": "number", "dataTypeJavaClass": "Integer", + "isNumberType": true, "inputRule": "" }, { diff --git a/codbex-payments/gen/codbex_payments/api/customerpayment/CustomerPaymentController.java b/codbex-payments/gen/codbex_payments/api/customerpayment/CustomerPaymentController.java index b9829a1..7e24276 100644 --- a/codbex-payments/gen/codbex_payments/api/customerpayment/CustomerPaymentController.java +++ b/codbex-payments/gen/codbex_payments/api/customerpayment/CustomerPaymentController.java @@ -5,7 +5,6 @@ import org.eclipse.dirigible.components.api.security.UserFacade; import org.eclipse.dirigible.sdk.platform.Documentation; -import org.eclipse.dirigible.sdk.component.Inject; import org.eclipse.dirigible.sdk.http.Body; import org.eclipse.dirigible.sdk.http.Controller; import org.eclipse.dirigible.sdk.http.Delete; @@ -30,8 +29,11 @@ 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; + private final CustomerPaymentRepository repository; + + public CustomerPaymentController(CustomerPaymentRepository repository) { + this.repository = repository; + } @Get @Documentation("List CustomerPayment") diff --git a/codbex-payments/gen/codbex_payments/api/employeepayment/EmployeePaymentController.java b/codbex-payments/gen/codbex_payments/api/employeepayment/EmployeePaymentController.java index e88c441..846be1f 100644 --- a/codbex-payments/gen/codbex_payments/api/employeepayment/EmployeePaymentController.java +++ b/codbex-payments/gen/codbex_payments/api/employeepayment/EmployeePaymentController.java @@ -5,7 +5,6 @@ import org.eclipse.dirigible.components.api.security.UserFacade; import org.eclipse.dirigible.sdk.platform.Documentation; -import org.eclipse.dirigible.sdk.component.Inject; import org.eclipse.dirigible.sdk.http.Body; import org.eclipse.dirigible.sdk.http.Controller; import org.eclipse.dirigible.sdk.http.Delete; @@ -30,8 +29,11 @@ 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; + private final EmployeePaymentRepository repository; + + public EmployeePaymentController(EmployeePaymentRepository repository) { + this.repository = repository; + } @Get @Documentation("List EmployeePayment") diff --git a/codbex-payments/gen/codbex_payments/api/paymentadjustment/PaymentAdjustmentController.java b/codbex-payments/gen/codbex_payments/api/paymentadjustment/PaymentAdjustmentController.java index ccd505c..0edf056 100644 --- a/codbex-payments/gen/codbex_payments/api/paymentadjustment/PaymentAdjustmentController.java +++ b/codbex-payments/gen/codbex_payments/api/paymentadjustment/PaymentAdjustmentController.java @@ -5,7 +5,6 @@ import org.eclipse.dirigible.components.api.security.UserFacade; import org.eclipse.dirigible.sdk.platform.Documentation; -import org.eclipse.dirigible.sdk.component.Inject; import org.eclipse.dirigible.sdk.http.Body; import org.eclipse.dirigible.sdk.http.Controller; import org.eclipse.dirigible.sdk.http.Delete; @@ -30,8 +29,11 @@ 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; + private final PaymentAdjustmentRepository repository; + + public PaymentAdjustmentController(PaymentAdjustmentRepository repository) { + this.repository = repository; + } @Get @Documentation("List PaymentAdjustment") diff --git a/codbex-payments/gen/codbex_payments/api/paymentrecord/PaymentRecordController.java b/codbex-payments/gen/codbex_payments/api/paymentrecord/PaymentRecordController.java index fe26593..4aa2ec2 100644 --- a/codbex-payments/gen/codbex_payments/api/paymentrecord/PaymentRecordController.java +++ b/codbex-payments/gen/codbex_payments/api/paymentrecord/PaymentRecordController.java @@ -5,7 +5,6 @@ import org.eclipse.dirigible.components.api.security.UserFacade; import org.eclipse.dirigible.sdk.platform.Documentation; -import org.eclipse.dirigible.sdk.component.Inject; import org.eclipse.dirigible.sdk.http.Body; import org.eclipse.dirigible.sdk.http.Controller; import org.eclipse.dirigible.sdk.http.Delete; @@ -30,8 +29,11 @@ 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; + private final PaymentRecordRepository repository; + + public PaymentRecordController(PaymentRecordRepository repository) { + this.repository = repository; + } @Get @Documentation("List PaymentRecord") diff --git a/codbex-payments/gen/codbex_payments/api/settings/PaymentDirectionController.java b/codbex-payments/gen/codbex_payments/api/settings/PaymentDirectionController.java index 8d17314..451101d 100644 --- a/codbex-payments/gen/codbex_payments/api/settings/PaymentDirectionController.java +++ b/codbex-payments/gen/codbex_payments/api/settings/PaymentDirectionController.java @@ -5,7 +5,6 @@ import org.eclipse.dirigible.components.api.security.UserFacade; import org.eclipse.dirigible.sdk.platform.Documentation; -import org.eclipse.dirigible.sdk.component.Inject; import org.eclipse.dirigible.sdk.http.Body; import org.eclipse.dirigible.sdk.http.Controller; import org.eclipse.dirigible.sdk.http.Delete; @@ -30,8 +29,11 @@ public class PaymentDirectionController { private static final Set FILTER_FIELDS = Set.of("Id", "Name"); - @Inject - private PaymentDirectionRepository repository; + private final PaymentDirectionRepository repository; + + public PaymentDirectionController(PaymentDirectionRepository repository) { + this.repository = repository; + } @Get @Documentation("List PaymentDirection") diff --git a/codbex-payments/gen/codbex_payments/api/settings/PaymentTypeController.java b/codbex-payments/gen/codbex_payments/api/settings/PaymentTypeController.java index 049f67e..34d7913 100644 --- a/codbex-payments/gen/codbex_payments/api/settings/PaymentTypeController.java +++ b/codbex-payments/gen/codbex_payments/api/settings/PaymentTypeController.java @@ -5,7 +5,6 @@ import org.eclipse.dirigible.components.api.security.UserFacade; import org.eclipse.dirigible.sdk.platform.Documentation; -import org.eclipse.dirigible.sdk.component.Inject; import org.eclipse.dirigible.sdk.http.Body; import org.eclipse.dirigible.sdk.http.Controller; import org.eclipse.dirigible.sdk.http.Delete; @@ -30,8 +29,11 @@ public class PaymentTypeController { private static final Set FILTER_FIELDS = Set.of("Id", "Name"); - @Inject - private PaymentTypeRepository repository; + private final PaymentTypeRepository repository; + + public PaymentTypeController(PaymentTypeRepository repository) { + this.repository = repository; + } @Get @Documentation("List PaymentType") diff --git a/codbex-payments/gen/codbex_payments/api/supplierpayment/SupplierPaymentController.java b/codbex-payments/gen/codbex_payments/api/supplierpayment/SupplierPaymentController.java index f26aec0..234ff36 100644 --- a/codbex-payments/gen/codbex_payments/api/supplierpayment/SupplierPaymentController.java +++ b/codbex-payments/gen/codbex_payments/api/supplierpayment/SupplierPaymentController.java @@ -5,7 +5,6 @@ import org.eclipse.dirigible.components.api.security.UserFacade; import org.eclipse.dirigible.sdk.platform.Documentation; -import org.eclipse.dirigible.sdk.component.Inject; import org.eclipse.dirigible.sdk.http.Body; import org.eclipse.dirigible.sdk.http.Controller; import org.eclipse.dirigible.sdk.http.Delete; @@ -30,8 +29,11 @@ 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; + private final SupplierPaymentRepository repository; + + public SupplierPaymentController(SupplierPaymentRepository repository) { + this.repository = repository; + } @Get @Documentation("List SupplierPayment") diff --git a/codbex-payments/gen/codbex_payments/data/customerpayment/CustomerPaymentRepository.java b/codbex-payments/gen/codbex_payments/data/customerpayment/CustomerPaymentRepository.java index 99201b6..3f32ddf 100644 --- a/codbex-payments/gen/codbex_payments/data/customerpayment/CustomerPaymentRepository.java +++ b/codbex-payments/gen/codbex_payments/data/customerpayment/CustomerPaymentRepository.java @@ -2,6 +2,12 @@ import org.eclipse.dirigible.components.data.store.java.repository.JavaRepository; import org.eclipse.dirigible.sdk.component.Repository; +import org.eclipse.dirigible.sdk.messaging.Producer; +import org.eclipse.dirigible.sdk.utils.Json; +import org.eclipse.dirigible.sdk.utils.Calc; +// custom imports +import codbex-number-generator.service.Generator; +import org.eclipse.dirigible.sdk.utils; @Repository public class CustomerPaymentRepository extends JavaRepository { @@ -14,6 +20,43 @@ public CustomerPaymentRepository() { public CustomerPaymentEntity save(CustomerPaymentEntity entity) { entity.Name = new Generator().generateByType("Customer Payment"); entity.UUID = Uuid.random(); - return super.save(entity); + CustomerPaymentEntity saved = super.save(entity); + // Publish the create event so listeners (e.g. intent process triggers / reactions under gen/events) can react. + Producer.sendToTopic("codbex-payments-CustomerPayment-CustomerPayment", Json.stringify(saved)); + return saved; + } + + @Override + public CustomerPaymentEntity update(CustomerPaymentEntity entity) { + CustomerPaymentEntity updated = super.update(entity); + // Publish the update event (suffixed topic) so intent reactions under gen/events can react. + Producer.sendToTopic("codbex-payments-CustomerPayment-CustomerPayment-updated", Json.stringify(updated)); + return updated; + } + + /** + * Persists changes WITHOUT publishing the "-updated" event. Intended for system-managed + * back-references — e.g. an intent process trigger writing ProcessId back onto the entity that + * started it. Going through {@link #update} would re-publish "CustomerPayment-updated" and spuriously + * re-fire onUpdate reactions (notifications, roll-ups, integrations) for a change the user never made. + */ + public CustomerPaymentEntity updateWithoutEvent(CustomerPaymentEntity entity) { + return super.update(entity); + } + + @Override + public void delete(CustomerPaymentEntity entity) { + super.delete(entity); + // Publish the delete event (suffixed topic) so intent reactions under gen/events can react. + Producer.sendToTopic("codbex-payments-CustomerPayment-CustomerPayment-deleted", Json.stringify(entity)); + } + + @Override + public void deleteById(Object id) { + CustomerPaymentEntity entity = findById(id); + super.deleteById(id); + if (entity != null) { + Producer.sendToTopic("codbex-payments-CustomerPayment-CustomerPayment-deleted", Json.stringify(entity)); + } } } diff --git a/codbex-payments/gen/codbex_payments/data/employeepayment/EmployeePaymentRepository.java b/codbex-payments/gen/codbex_payments/data/employeepayment/EmployeePaymentRepository.java index f1a5675..7d8d05e 100644 --- a/codbex-payments/gen/codbex_payments/data/employeepayment/EmployeePaymentRepository.java +++ b/codbex-payments/gen/codbex_payments/data/employeepayment/EmployeePaymentRepository.java @@ -2,6 +2,12 @@ import org.eclipse.dirigible.components.data.store.java.repository.JavaRepository; import org.eclipse.dirigible.sdk.component.Repository; +import org.eclipse.dirigible.sdk.messaging.Producer; +import org.eclipse.dirigible.sdk.utils.Json; +import org.eclipse.dirigible.sdk.utils.Calc; +// custom imports +import codbex-number-generator.service.Generator; +import org.eclipse.dirigible.sdk.utils; @Repository public class EmployeePaymentRepository extends JavaRepository { @@ -14,6 +20,43 @@ public EmployeePaymentRepository() { public EmployeePaymentEntity save(EmployeePaymentEntity entity) { entity.Name = new Generator().generateByType("Employee Payment"); entity.UUID = Uuid.random(); - return super.save(entity); + EmployeePaymentEntity saved = super.save(entity); + // Publish the create event so listeners (e.g. intent process triggers / reactions under gen/events) can react. + Producer.sendToTopic("codbex-payments-EmployeePayment-EmployeePayment", Json.stringify(saved)); + return saved; + } + + @Override + public EmployeePaymentEntity update(EmployeePaymentEntity entity) { + EmployeePaymentEntity updated = super.update(entity); + // Publish the update event (suffixed topic) so intent reactions under gen/events can react. + Producer.sendToTopic("codbex-payments-EmployeePayment-EmployeePayment-updated", Json.stringify(updated)); + return updated; + } + + /** + * Persists changes WITHOUT publishing the "-updated" event. Intended for system-managed + * back-references — e.g. an intent process trigger writing ProcessId back onto the entity that + * started it. Going through {@link #update} would re-publish "EmployeePayment-updated" and spuriously + * re-fire onUpdate reactions (notifications, roll-ups, integrations) for a change the user never made. + */ + public EmployeePaymentEntity updateWithoutEvent(EmployeePaymentEntity entity) { + return super.update(entity); + } + + @Override + public void delete(EmployeePaymentEntity entity) { + super.delete(entity); + // Publish the delete event (suffixed topic) so intent reactions under gen/events can react. + Producer.sendToTopic("codbex-payments-EmployeePayment-EmployeePayment-deleted", Json.stringify(entity)); + } + + @Override + public void deleteById(Object id) { + EmployeePaymentEntity entity = findById(id); + super.deleteById(id); + if (entity != null) { + Producer.sendToTopic("codbex-payments-EmployeePayment-EmployeePayment-deleted", Json.stringify(entity)); + } } } diff --git a/codbex-payments/gen/codbex_payments/data/paymentadjustment/PaymentAdjustmentRepository.java b/codbex-payments/gen/codbex_payments/data/paymentadjustment/PaymentAdjustmentRepository.java index 4072f97..d6062a4 100644 --- a/codbex-payments/gen/codbex_payments/data/paymentadjustment/PaymentAdjustmentRepository.java +++ b/codbex-payments/gen/codbex_payments/data/paymentadjustment/PaymentAdjustmentRepository.java @@ -2,6 +2,11 @@ import org.eclipse.dirigible.components.data.store.java.repository.JavaRepository; import org.eclipse.dirigible.sdk.component.Repository; +import org.eclipse.dirigible.sdk.messaging.Producer; +import org.eclipse.dirigible.sdk.utils.Json; +import org.eclipse.dirigible.sdk.utils.Calc; +// custom imports +import org.eclipse.dirigible.sdk.utils; @Repository public class PaymentAdjustmentRepository extends JavaRepository { @@ -13,6 +18,43 @@ public PaymentAdjustmentRepository() { @Override public PaymentAdjustmentEntity save(PaymentAdjustmentEntity entity) { entity.UUID = Uuid.random(); - return super.save(entity); + PaymentAdjustmentEntity saved = super.save(entity); + // Publish the create event so listeners (e.g. intent process triggers / reactions under gen/events) can react. + Producer.sendToTopic("codbex-payments-PaymentAdjustment-PaymentAdjustment", Json.stringify(saved)); + return saved; + } + + @Override + public PaymentAdjustmentEntity update(PaymentAdjustmentEntity entity) { + PaymentAdjustmentEntity updated = super.update(entity); + // Publish the update event (suffixed topic) so intent reactions under gen/events can react. + Producer.sendToTopic("codbex-payments-PaymentAdjustment-PaymentAdjustment-updated", Json.stringify(updated)); + return updated; + } + + /** + * Persists changes WITHOUT publishing the "-updated" event. Intended for system-managed + * back-references — e.g. an intent process trigger writing ProcessId back onto the entity that + * started it. Going through {@link #update} would re-publish "PaymentAdjustment-updated" and spuriously + * re-fire onUpdate reactions (notifications, roll-ups, integrations) for a change the user never made. + */ + public PaymentAdjustmentEntity updateWithoutEvent(PaymentAdjustmentEntity entity) { + return super.update(entity); + } + + @Override + public void delete(PaymentAdjustmentEntity entity) { + super.delete(entity); + // Publish the delete event (suffixed topic) so intent reactions under gen/events can react. + Producer.sendToTopic("codbex-payments-PaymentAdjustment-PaymentAdjustment-deleted", Json.stringify(entity)); + } + + @Override + public void deleteById(Object id) { + PaymentAdjustmentEntity entity = findById(id); + super.deleteById(id); + if (entity != null) { + Producer.sendToTopic("codbex-payments-PaymentAdjustment-PaymentAdjustment-deleted", Json.stringify(entity)); + } } } diff --git a/codbex-payments/gen/codbex_payments/data/paymentrecord/PaymentRecordRepository.java b/codbex-payments/gen/codbex_payments/data/paymentrecord/PaymentRecordRepository.java index 1368c32..cfa081b 100644 --- a/codbex-payments/gen/codbex_payments/data/paymentrecord/PaymentRecordRepository.java +++ b/codbex-payments/gen/codbex_payments/data/paymentrecord/PaymentRecordRepository.java @@ -2,6 +2,11 @@ import org.eclipse.dirigible.components.data.store.java.repository.JavaRepository; import org.eclipse.dirigible.sdk.component.Repository; +import org.eclipse.dirigible.sdk.messaging.Producer; +import org.eclipse.dirigible.sdk.utils.Json; +import org.eclipse.dirigible.sdk.utils.Calc; +// custom imports +import org.eclipse.dirigible.sdk.utils; @Repository public class PaymentRecordRepository extends JavaRepository { @@ -13,6 +18,43 @@ public PaymentRecordRepository() { @Override public PaymentRecordEntity save(PaymentRecordEntity entity) { entity.UUID = Uuid.random(); - return super.save(entity); + PaymentRecordEntity saved = super.save(entity); + // Publish the create event so listeners (e.g. intent process triggers / reactions under gen/events) can react. + Producer.sendToTopic("codbex-payments-PaymentRecord-PaymentRecord", Json.stringify(saved)); + return saved; + } + + @Override + public PaymentRecordEntity update(PaymentRecordEntity entity) { + PaymentRecordEntity updated = super.update(entity); + // Publish the update event (suffixed topic) so intent reactions under gen/events can react. + Producer.sendToTopic("codbex-payments-PaymentRecord-PaymentRecord-updated", Json.stringify(updated)); + return updated; + } + + /** + * Persists changes WITHOUT publishing the "-updated" event. Intended for system-managed + * back-references — e.g. an intent process trigger writing ProcessId back onto the entity that + * started it. Going through {@link #update} would re-publish "PaymentRecord-updated" and spuriously + * re-fire onUpdate reactions (notifications, roll-ups, integrations) for a change the user never made. + */ + public PaymentRecordEntity updateWithoutEvent(PaymentRecordEntity entity) { + return super.update(entity); + } + + @Override + public void delete(PaymentRecordEntity entity) { + super.delete(entity); + // Publish the delete event (suffixed topic) so intent reactions under gen/events can react. + Producer.sendToTopic("codbex-payments-PaymentRecord-PaymentRecord-deleted", Json.stringify(entity)); + } + + @Override + public void deleteById(Object id) { + PaymentRecordEntity entity = findById(id); + super.deleteById(id); + if (entity != null) { + Producer.sendToTopic("codbex-payments-PaymentRecord-PaymentRecord-deleted", Json.stringify(entity)); + } } } diff --git a/codbex-payments/gen/codbex_payments/data/settings/PaymentDirectionRepository.java b/codbex-payments/gen/codbex_payments/data/settings/PaymentDirectionRepository.java index 894d361..e8a5c1f 100644 --- a/codbex-payments/gen/codbex_payments/data/settings/PaymentDirectionRepository.java +++ b/codbex-payments/gen/codbex_payments/data/settings/PaymentDirectionRepository.java @@ -2,6 +2,8 @@ import org.eclipse.dirigible.components.data.store.java.repository.JavaRepository; import org.eclipse.dirigible.sdk.component.Repository; +import org.eclipse.dirigible.sdk.messaging.Producer; +import org.eclipse.dirigible.sdk.utils.Json; @Repository public class PaymentDirectionRepository extends JavaRepository { @@ -9,4 +11,46 @@ public class PaymentDirectionRepository extends JavaRepository { @@ -9,4 +11,46 @@ public class PaymentTypeRepository extends JavaRepository { public PaymentTypeRepository() { super(PaymentTypeEntity.class); } + + @Override + public PaymentTypeEntity save(PaymentTypeEntity entity) { + PaymentTypeEntity saved = super.save(entity); + // Publish the create event so listeners (e.g. intent process triggers / reactions under gen/events) can react. + Producer.sendToTopic("codbex-payments-Settings-PaymentType", Json.stringify(saved)); + return saved; + } + + @Override + public PaymentTypeEntity update(PaymentTypeEntity entity) { + PaymentTypeEntity updated = super.update(entity); + // Publish the update event (suffixed topic) so intent reactions under gen/events can react. + Producer.sendToTopic("codbex-payments-Settings-PaymentType-updated", Json.stringify(updated)); + return updated; + } + + /** + * Persists changes WITHOUT publishing the "-updated" event. Intended for system-managed + * back-references — e.g. an intent process trigger writing ProcessId back onto the entity that + * started it. Going through {@link #update} would re-publish "PaymentType-updated" and spuriously + * re-fire onUpdate reactions (notifications, roll-ups, integrations) for a change the user never made. + */ + public PaymentTypeEntity updateWithoutEvent(PaymentTypeEntity entity) { + return super.update(entity); + } + + @Override + public void delete(PaymentTypeEntity entity) { + super.delete(entity); + // Publish the delete event (suffixed topic) so intent reactions under gen/events can react. + Producer.sendToTopic("codbex-payments-Settings-PaymentType-deleted", Json.stringify(entity)); + } + + @Override + public void deleteById(Object id) { + PaymentTypeEntity entity = findById(id); + super.deleteById(id); + if (entity != null) { + Producer.sendToTopic("codbex-payments-Settings-PaymentType-deleted", Json.stringify(entity)); + } + } } diff --git a/codbex-payments/gen/codbex_payments/data/supplierpayment/SupplierPaymentRepository.java b/codbex-payments/gen/codbex_payments/data/supplierpayment/SupplierPaymentRepository.java index 05497ea..cb88610 100644 --- a/codbex-payments/gen/codbex_payments/data/supplierpayment/SupplierPaymentRepository.java +++ b/codbex-payments/gen/codbex_payments/data/supplierpayment/SupplierPaymentRepository.java @@ -2,6 +2,12 @@ import org.eclipse.dirigible.components.data.store.java.repository.JavaRepository; import org.eclipse.dirigible.sdk.component.Repository; +import org.eclipse.dirigible.sdk.messaging.Producer; +import org.eclipse.dirigible.sdk.utils.Json; +import org.eclipse.dirigible.sdk.utils.Calc; +// custom imports +import codbex-number-generator.service.Generator; +import org.eclipse.dirigible.sdk.utils; @Repository public class SupplierPaymentRepository extends JavaRepository { @@ -14,6 +20,43 @@ public SupplierPaymentRepository() { public SupplierPaymentEntity save(SupplierPaymentEntity entity) { entity.Name = new Generator().generateByType("Employee Payment"); entity.UUID = Uuid.random(); - return super.save(entity); + SupplierPaymentEntity saved = super.save(entity); + // Publish the create event so listeners (e.g. intent process triggers / reactions under gen/events) can react. + Producer.sendToTopic("codbex-payments-SupplierPayment-SupplierPayment", Json.stringify(saved)); + return saved; + } + + @Override + public SupplierPaymentEntity update(SupplierPaymentEntity entity) { + SupplierPaymentEntity updated = super.update(entity); + // Publish the update event (suffixed topic) so intent reactions under gen/events can react. + Producer.sendToTopic("codbex-payments-SupplierPayment-SupplierPayment-updated", Json.stringify(updated)); + return updated; + } + + /** + * Persists changes WITHOUT publishing the "-updated" event. Intended for system-managed + * back-references — e.g. an intent process trigger writing ProcessId back onto the entity that + * started it. Going through {@link #update} would re-publish "SupplierPayment-updated" and spuriously + * re-fire onUpdate reactions (notifications, roll-ups, integrations) for a change the user never made. + */ + public SupplierPaymentEntity updateWithoutEvent(SupplierPaymentEntity entity) { + return super.update(entity); + } + + @Override + public void delete(SupplierPaymentEntity entity) { + super.delete(entity); + // Publish the delete event (suffixed topic) so intent reactions under gen/events can react. + Producer.sendToTopic("codbex-payments-SupplierPayment-SupplierPayment-deleted", Json.stringify(entity)); + } + + @Override + public void deleteById(Object id) { + SupplierPaymentEntity entity = findById(id); + super.deleteById(id); + if (entity != null) { + Producer.sendToTopic("codbex-payments-SupplierPayment-SupplierPayment-deleted", Json.stringify(entity)); + } } }