From c03e38746f4d159ba7fb805d196a7183cc2d9386 Mon Sep 17 00:00:00 2001 From: tivmof Date: Wed, 1 Jul 2026 11:14:04 +0000 Subject: [PATCH] feat: Regen with Dirigible newest features --- codbex-payments/.classpath | 1056 ++ codbex-payments/.project | 28 + codbex-payments/bin/.classpath | 1056 ++ codbex-payments/bin/.npmrc | 2 + codbex-payments/bin/.project | 28 + codbex-payments/bin/codbex-payments.edm | 249 + codbex-payments/bin/codbex-payments.gen | 8825 +++++++++++++++++ codbex-payments/bin/codbex-payments.model | 3186 ++++++ .../CustomerPaymentToRecord.extension | 5 + .../CustomerPaymentToRecordHandler.ts | 36 + .../EmployeePaymentToRecord.extension | 5 + .../EmployeePaymentToRecordHandler.ts | 36 + .../PaymentAdjustmentToRecord.extension | 5 + .../PaymentAdjustmentToRecordHandler.ts | 32 + .../SupplierPaymentToRecord.extension | 5 + .../SupplierPaymentToRecordHandler.ts | 36 + .../schema/codbex-payments.schema | 722 ++ .../CustomerPayment/controller.js | 469 + .../dialog-filter/controller.js | 547 + .../CustomerPayment/dialog-filter/index.html | 395 + .../dialog-filter/view.extension | 6 + .../CustomerPayment/dialog-filter/view.js | 20 + .../dialog-window/controller.js | 556 ++ .../CustomerPayment/dialog-window/index.html | 418 + .../dialog-window/view.extension | 6 + .../CustomerPayment/dialog-window/view.js | 20 + .../CustomerPayment/index.html | 71 + .../main-details/controller.js | 658 ++ .../CustomerPayment/main-details/index.html | 439 + .../main-details/view.extension | 6 + .../CustomerPayment/main-details/view.js | 20 + .../CustomerPayment/view.extension | 6 + .../CustomerPayment/CustomerPayment/view.js | 20 + .../ui/CustomerPayment/index.html | 50 + .../ui/CustomerPayment/perspective.extension | 6 + .../ui/CustomerPayment/perspective.js | 19 + .../EmployeePayment/controller.js | 405 + .../dialog-filter/controller.js | 449 + .../EmployeePayment/dialog-filter/index.html | 374 + .../dialog-filter/view.extension | 6 + .../EmployeePayment/dialog-filter/view.js | 20 + .../dialog-window/controller.js | 446 + .../EmployeePayment/dialog-window/index.html | 395 + .../dialog-window/view.extension | 6 + .../EmployeePayment/dialog-window/view.js | 20 + .../EmployeePayment/index.html | 72 + .../main-details/controller.js | 536 + .../EmployeePayment/main-details/index.html | 412 + .../main-details/view.extension | 6 + .../EmployeePayment/main-details/view.js | 20 + .../EmployeePayment/view.extension | 6 + .../EmployeePayment/EmployeePayment/view.js | 20 + .../ui/EmployeePayment/index.html | 50 + .../ui/EmployeePayment/perspective.extension | 6 + .../ui/EmployeePayment/perspective.js | 19 + .../PaymentAdjustment/controller.js | 341 + .../dialog-filter/controller.js | 327 + .../dialog-filter/index.html | 251 + .../dialog-filter/view.extension | 6 + .../PaymentAdjustment/dialog-filter/view.js | 20 + .../dialog-window/controller.js | 336 + .../dialog-window/index.html | 251 + .../dialog-window/view.extension | 6 + .../PaymentAdjustment/dialog-window/view.js | 20 + .../PaymentAdjustment/index.html | 65 + .../main-details/controller.js | 414 + .../PaymentAdjustment/main-details/index.html | 264 + .../main-details/view.extension | 6 + .../PaymentAdjustment/main-details/view.js | 20 + .../PaymentAdjustment/view.extension | 6 + .../PaymentAdjustment/view.js | 20 + .../ui/PaymentAdjustment/index.html | 50 + .../PaymentAdjustment/perspective.extension | 6 + .../ui/PaymentAdjustment/perspective.js | 19 + .../PaymentRecord/PaymentRecord/controller.js | 472 + .../PaymentRecord/dialog-filter/controller.js | 565 ++ .../PaymentRecord/dialog-filter/index.html | 424 + .../dialog-filter/view.extension | 6 + .../PaymentRecord/dialog-filter/view.js | 20 + .../PaymentRecord/dialog-window/controller.js | 559 ++ .../PaymentRecord/dialog-window/index.html | 457 + .../dialog-window/view.extension | 6 + .../PaymentRecord/dialog-window/view.js | 20 + .../ui/PaymentRecord/PaymentRecord/index.html | 75 + .../PaymentRecord/main-details/controller.js | 664 ++ .../PaymentRecord/main-details/index.html | 478 + .../PaymentRecord/main-details/view.extension | 6 + .../PaymentRecord/main-details/view.js | 20 + .../PaymentRecord/view.extension | 6 + .../ui/PaymentRecord/PaymentRecord/view.js | 20 + .../ui/PaymentRecord/index.html | 50 + .../ui/PaymentRecord/perspective.extension | 6 + .../ui/PaymentRecord/perspective.js | 19 + .../ui/Reports/PaymentRecord/controller.js | 257 + .../PaymentRecord/dialog-filter/controller.js | 186 + .../PaymentRecord/dialog-filter/index.html | 395 + .../dialog-filter/view.extension | 6 + .../PaymentRecord/dialog-filter/view.js | 20 + .../PaymentRecord/dialog-print/controller.js | 216 + .../PaymentRecord/dialog-print/index.html | 86 + .../dialog-print/print.extension | 6 + .../PaymentRecord/dialog-print/print.js | 15 + .../PaymentRecord/dialog-window/controller.js | 29 + .../PaymentRecord/dialog-window/index.html | 333 + .../dialog-window/view.extension | 6 + .../PaymentRecord/dialog-window/view.js | 20 + .../ui/Reports/PaymentRecord/index.html | 117 + .../ui/Reports/PaymentRecord/view.extension | 6 + .../ui/Reports/PaymentRecord/view.js | 23 + .../Settings/PaymentDirection/controller.js | 202 + .../dialog-filter/controller.js | 67 + .../PaymentDirection/dialog-filter/index.html | 57 + .../dialog-filter/view.extension | 5 + .../PaymentDirection/dialog-filter/view.js | 20 + .../dialog-window/controller.js | 100 + .../PaymentDirection/dialog-window/index.html | 60 + .../dialog-window/view.extension | 5 + .../PaymentDirection/dialog-window/view.js | 17 + .../ui/Settings/PaymentDirection/index.html | 65 + .../Settings/PaymentDirection/view.extension | 5 + .../ui/Settings/PaymentDirection/view.js | 20 + .../ui/Settings/PaymentType/controller.js | 202 + .../PaymentType/dialog-filter/controller.js | 67 + .../PaymentType/dialog-filter/index.html | 57 + .../PaymentType/dialog-filter/view.extension | 6 + .../PaymentType/dialog-filter/view.js | 20 + .../PaymentType/dialog-window/controller.js | 100 + .../PaymentType/dialog-window/index.html | 60 + .../PaymentType/dialog-window/view.extension | 6 + .../PaymentType/dialog-window/view.js | 17 + .../ui/Settings/PaymentType/index.html | 65 + .../ui/Settings/PaymentType/view.extension | 6 + .../ui/Settings/PaymentType/view.js | 20 + .../SupplierPayment/controller.js | 469 + .../dialog-filter/controller.js | 547 + .../SupplierPayment/dialog-filter/index.html | 395 + .../dialog-filter/view.extension | 6 + .../SupplierPayment/dialog-filter/view.js | 20 + .../dialog-window/controller.js | 556 ++ .../SupplierPayment/dialog-window/index.html | 418 + .../dialog-window/view.extension | 6 + .../SupplierPayment/dialog-window/view.js | 20 + .../SupplierPayment/index.html | 73 + .../main-details/controller.js | 658 ++ .../SupplierPayment/main-details/index.html | 439 + .../main-details/view.extension | 6 + .../SupplierPayment/main-details/view.js | 20 + .../SupplierPayment/view.extension | 6 + .../SupplierPayment/SupplierPayment/view.js | 20 + .../ui/SupplierPayment/index.html | 50 + .../ui/SupplierPayment/perspective.extension | 6 + .../ui/SupplierPayment/perspective.js | 19 + .../CustomerPaymentController.class | Bin 0 -> 13011 bytes .../EmployeePaymentController.class | Bin 0 -> 12900 bytes .../PaymentAdjustmentController.class | Bin 0 -> 11586 bytes .../PaymentRecordController.class | Bin 0 -> 12918 bytes .../settings/PaymentDirectionController.class | Bin 0 -> 9922 bytes .../api/settings/PaymentTypeController.class | Bin 0 -> 10369 bytes .../SupplierPaymentController.class | Bin 0 -> 13011 bytes .../CustomerPayment.extensionpoint | 4 + .../CustomerPaymentEntity.class | Bin 0 -> 2847 bytes .../CustomerPaymentRepository.class | Bin 0 -> 1778 bytes .../EmployeePayment.extensionpoint | 4 + .../EmployeePaymentEntity.class | Bin 0 -> 2760 bytes .../EmployeePaymentRepository.class | Bin 0 -> 1778 bytes .../PaymentAdjustment.extensionpoint | 4 + .../PaymentAdjustmentEntity.class | Bin 0 -> 2184 bytes .../PaymentAdjustmentRepository.class | Bin 0 -> 2466 bytes .../PaymentRecord.extensionpoint | 4 + .../paymentrecord/PaymentRecordEntity.class | Bin 0 -> 3000 bytes .../PaymentRecordRepository.class | Bin 0 -> 2382 bytes .../settings/PaymentDirection.extensionpoint | 4 + .../settings/PaymentDirectionEntity.class | Bin 0 -> 1042 bytes .../settings/PaymentDirectionRepository.class | Bin 0 -> 2349 bytes .../data/settings/PaymentType.extensionpoint | 4 + .../data/settings/PaymentTypeEntity.class | Bin 0 -> 1007 bytes .../data/settings/PaymentTypeRepository.class | Bin 0 -> 2289 bytes .../SupplierPayment.extensionpoint | 4 + .../SupplierPaymentEntity.class | Bin 0 -> 2847 bytes .../SupplierPaymentRepository.class | Bin 0 -> 1778 bytes .../codbex_payments/roles/default-roles.roles | 50 + codbex-payments/bin/package.json | 20 + codbex-payments/bin/project.json | 4 + .../en-US/codbex-payments.model.json | 264 + codbex-payments/codbex-payments.gen | 107 +- .../CustomerPaymentController.java | 8 +- .../EmployeePaymentController.java | 8 +- .../PaymentAdjustmentController.java | 8 +- .../PaymentRecordController.java | 8 +- .../settings/PaymentDirectionController.java | 8 +- .../api/settings/PaymentTypeController.java | 8 +- .../SupplierPaymentController.java | 8 +- .../CustomerPaymentRepository.java | 45 +- .../EmployeePaymentRepository.java | 45 +- .../PaymentAdjustmentRepository.java | 44 +- .../PaymentRecordRepository.java | 44 +- .../settings/PaymentDirectionRepository.java | 44 + .../data/settings/PaymentTypeRepository.java | 44 + .../SupplierPaymentRepository.java | 45 +- 199 files changed, 36125 insertions(+), 32 deletions(-) create mode 100644 codbex-payments/.classpath create mode 100644 codbex-payments/.project create mode 100644 codbex-payments/bin/.classpath create mode 100644 codbex-payments/bin/.npmrc create mode 100644 codbex-payments/bin/.project create mode 100644 codbex-payments/bin/codbex-payments.edm create mode 100644 codbex-payments/bin/codbex-payments.gen create mode 100644 codbex-payments/bin/codbex-payments.model create mode 100644 codbex-payments/bin/events/CustomerPayment/CustomerPaymentToRecord.extension create mode 100644 codbex-payments/bin/events/CustomerPayment/CustomerPaymentToRecordHandler.ts create mode 100644 codbex-payments/bin/events/EmployeePayment/EmployeePaymentToRecord.extension create mode 100644 codbex-payments/bin/events/EmployeePayment/EmployeePaymentToRecordHandler.ts create mode 100644 codbex-payments/bin/events/PaymentAdjustment/PaymentAdjustmentToRecord.extension create mode 100644 codbex-payments/bin/events/PaymentAdjustment/PaymentAdjustmentToRecordHandler.ts create mode 100644 codbex-payments/bin/events/SupplierPayment/SupplierPaymentToRecord.extension create mode 100644 codbex-payments/bin/events/SupplierPayment/SupplierPaymentToRecordHandler.ts create mode 100644 codbex-payments/bin/gen/codbex-payments/schema/codbex-payments.schema create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/controller.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-filter/controller.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-filter/index.html create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-filter/view.extension create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-filter/view.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/controller.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/index.html create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/view.extension create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/dialog-window/view.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/index.html create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/main-details/controller.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/main-details/index.html create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/main-details/view.extension create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/main-details/view.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/view.extension create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/CustomerPayment/view.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/index.html create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/perspective.extension create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/CustomerPayment/perspective.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/controller.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-filter/controller.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-filter/index.html create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-filter/view.extension create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-filter/view.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/controller.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/index.html create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/view.extension create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/dialog-window/view.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/index.html create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/main-details/controller.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/main-details/index.html create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/main-details/view.extension create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/main-details/view.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/view.extension create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/EmployeePayment/view.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/index.html create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/perspective.extension create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/EmployeePayment/perspective.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/controller.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-filter/controller.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-filter/index.html create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-filter/view.extension create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-filter/view.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-window/controller.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-window/index.html create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-window/view.extension create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/dialog-window/view.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/index.html create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/main-details/controller.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/main-details/index.html create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/main-details/view.extension create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/main-details/view.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/view.extension create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/PaymentAdjustment/view.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/index.html create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/perspective.extension create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/PaymentAdjustment/perspective.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/controller.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/controller.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/index.html create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/view.extension create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-filter/view.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/controller.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/index.html create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/view.extension create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/dialog-window/view.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/index.html create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/controller.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/index.html create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/view.extension create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/main-details/view.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/view.extension create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/PaymentRecord/view.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/index.html create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/perspective.extension create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/PaymentRecord/perspective.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/controller.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-filter/controller.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-filter/index.html create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-filter/view.extension create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-filter/view.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-print/controller.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-print/index.html create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-print/print.extension create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-print/print.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/controller.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/index.html create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/view.extension create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/dialog-window/view.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/index.html create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/view.extension create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/Reports/PaymentRecord/view.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/controller.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-filter/controller.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-filter/index.html create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-filter/view.extension create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-filter/view.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-window/controller.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-window/index.html create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-window/view.extension create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/dialog-window/view.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/index.html create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/view.extension create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentDirection/view.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/controller.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/dialog-filter/controller.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/dialog-filter/index.html create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/dialog-filter/view.extension create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/dialog-filter/view.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/dialog-window/controller.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/dialog-window/index.html create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/dialog-window/view.extension create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/dialog-window/view.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/index.html create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/view.extension create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/Settings/PaymentType/view.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/controller.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-filter/controller.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-filter/index.html create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-filter/view.extension create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-filter/view.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/controller.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/index.html create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/view.extension create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/dialog-window/view.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/index.html create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/controller.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/index.html create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/view.extension create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/main-details/view.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/view.extension create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/SupplierPayment/view.js create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/index.html create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/perspective.extension create mode 100644 codbex-payments/bin/gen/codbex-payments/ui/SupplierPayment/perspective.js create mode 100644 codbex-payments/bin/gen/codbex_payments/api/customerpayment/CustomerPaymentController.class create mode 100644 codbex-payments/bin/gen/codbex_payments/api/employeepayment/EmployeePaymentController.class create mode 100644 codbex-payments/bin/gen/codbex_payments/api/paymentadjustment/PaymentAdjustmentController.class create mode 100644 codbex-payments/bin/gen/codbex_payments/api/paymentrecord/PaymentRecordController.class create mode 100644 codbex-payments/bin/gen/codbex_payments/api/settings/PaymentDirectionController.class create mode 100644 codbex-payments/bin/gen/codbex_payments/api/settings/PaymentTypeController.class create mode 100644 codbex-payments/bin/gen/codbex_payments/api/supplierpayment/SupplierPaymentController.class create mode 100644 codbex-payments/bin/gen/codbex_payments/data/customerpayment/CustomerPayment.extensionpoint create mode 100644 codbex-payments/bin/gen/codbex_payments/data/customerpayment/CustomerPaymentEntity.class create mode 100644 codbex-payments/bin/gen/codbex_payments/data/customerpayment/CustomerPaymentRepository.class create mode 100644 codbex-payments/bin/gen/codbex_payments/data/employeepayment/EmployeePayment.extensionpoint create mode 100644 codbex-payments/bin/gen/codbex_payments/data/employeepayment/EmployeePaymentEntity.class create mode 100644 codbex-payments/bin/gen/codbex_payments/data/employeepayment/EmployeePaymentRepository.class create mode 100644 codbex-payments/bin/gen/codbex_payments/data/paymentadjustment/PaymentAdjustment.extensionpoint create mode 100644 codbex-payments/bin/gen/codbex_payments/data/paymentadjustment/PaymentAdjustmentEntity.class create mode 100644 codbex-payments/bin/gen/codbex_payments/data/paymentadjustment/PaymentAdjustmentRepository.class create mode 100644 codbex-payments/bin/gen/codbex_payments/data/paymentrecord/PaymentRecord.extensionpoint create mode 100644 codbex-payments/bin/gen/codbex_payments/data/paymentrecord/PaymentRecordEntity.class create mode 100644 codbex-payments/bin/gen/codbex_payments/data/paymentrecord/PaymentRecordRepository.class create mode 100644 codbex-payments/bin/gen/codbex_payments/data/settings/PaymentDirection.extensionpoint create mode 100644 codbex-payments/bin/gen/codbex_payments/data/settings/PaymentDirectionEntity.class create mode 100644 codbex-payments/bin/gen/codbex_payments/data/settings/PaymentDirectionRepository.class create mode 100644 codbex-payments/bin/gen/codbex_payments/data/settings/PaymentType.extensionpoint create mode 100644 codbex-payments/bin/gen/codbex_payments/data/settings/PaymentTypeEntity.class create mode 100644 codbex-payments/bin/gen/codbex_payments/data/settings/PaymentTypeRepository.class create mode 100644 codbex-payments/bin/gen/codbex_payments/data/supplierpayment/SupplierPayment.extensionpoint create mode 100644 codbex-payments/bin/gen/codbex_payments/data/supplierpayment/SupplierPaymentEntity.class create mode 100644 codbex-payments/bin/gen/codbex_payments/data/supplierpayment/SupplierPaymentRepository.class create mode 100644 codbex-payments/bin/gen/codbex_payments/roles/default-roles.roles create mode 100644 codbex-payments/bin/package.json create mode 100644 codbex-payments/bin/project.json create mode 100644 codbex-payments/bin/translations/en-US/codbex-payments.model.json 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 0000000000000000000000000000000000000000..c9dac8bef7fcb0bb76a93cc97fb3fabab3429a47 GIT binary patch literal 13011 zcmcIq3w#vS)jwzR*vV${U=zSa&;=ue5C{*Ynovq!U?e1v5NyOphuujsu-RR9c7bT^ zLuy;CuToouw$@f_tWsNF;Z+sX;^(W{+FD!fLu+f_udnUr*P?v?duL{MvRMeNe1YHW z%$;-2{oixX>)tz0zq9`lB5L#$c*(=m*sn+HLb31$ecPpRZD>%BCe1o6Zq$WRW->OY zC+x<$X8U=yMbsRNCKItpL{E4rpQ(JKwneLpXwm+<&J7#&P?D)+d0YG1)~-vJx3#vn zbTgH;OPW;Dh}3oK$p)sPZlgb{B~uBV>5S2DmspQdV0SWMMEe_-g2R{4<1y1n#u7tJ zE$z9mhqa_O9{8@b6v$MTgd#@NNG@f{tDe1%DZe=u*1c3VYE%{og(fh0+QJG|fYDKj zLKDH&q9t{OCNmYR(;~5iLIEbVGnH7aC6YsJO^qE2oeGi7u~alE)S7Ocmety!4MNcA zOofeuf>@#Hva>`&kA{X6I)lmE92<;lQ9PUpvMyaSV^M`>F%`GyW+-9AlZI%Rjajhg zYn7fHhynK;AhkM}i@TnlwibozFcn>TpDyI1=LL9dPUsj;xDlN%$~-oq!?W?&6Ni?q zx9`b3HVqZixzymLdUQK#u2ot>?}g%GeN0u=>s@ne8B4?L(X-!BL`?5fselTF-5625 zBQ>}|Pps88L|`la_E<=ZtkV*Pc(xl0m)MiIqWWam#q4!H%A;15nn)FBR;W}&KBz1? zV3Q7rgdHuEOlgsJOGVs<$Y-^5N?n06p_{1) z)K~8EblZX_jdtguxZ~1YS+pm`WJ|h}T4>WMEpEq+f{=)@n1*Wi@bMm#es*?Sjl3h8FCz$2P94rdW8WK{)&M zD&0UgBJm|sQAab=vxYrtK+@2QX$RfprO!B1EOjW}sPtLk?)j#18C<>4!Q-x%Y;$z^ z16q!+qqJrr($uv?Xn^VJERZKC!9B?W@JaDQZ=Hi`Qn!Sc?IkdJq{pVAHblH08@M!i zCqK@9w;2q1r0#Mfd<9bgxhT8;;D(`~fxc_TwJ|L@;G_wUfpid}J5>5A-D$_y&M2m} z+C73CRZpiZ*|bQ5AI14yDt(RaMr42jm`)!Rh5Ay_kjSug-KlsyVxUg&(QdleOJ7G} zl&QKLc`AK_zKH-GOSDEzeeFOZwv}mt+YZJGbjKGPs+aC(TKb>n9jju1AtHsNbYNQc z?x(IWBuiALEC2I)&#q)nf+0<^3g&DZQfMEHY-_?u>LPF)Q0ZIrFfu!$xgknu6q4^A zJ!**%J*v_{8WB-M+ajV!N|xwMpLN@v<2mnE`zJwR<5q{OQ=+<^YArRg^=kQM5#2|J zRhmGC(7=DGbVz8x7uF*v_N>4$DcA7DB5&4sUfm+42ng0)ZV1BnzN6Cf^a7mSFk1)X z!n{$gUFfCnF)bD)uo)NY*FI5$ZjB{2)os-`AoeA;=!v>6-HfAH)=`rrQ)cV7kS@bO z5q+Ot^3o5mEY2lBR;TBogtpjJ`XRlHY}C=Y_R{5@JsmAfRxZo#IE$}Ap&ujkWmV5X zl<>hmlrIQm-=$Z@0_Z1j{c5SNaU_a`vwPX%s&+&4GnJmApEHfBhn+~c&P%T|P0rLl z7Hd<=h=g^lrQg6j^d(}0*|T7Ia1h@08vROOUGJq|JA&*C8{MRb&(q8Sq)Z>ZNv#U~ zPK2V(C|FHVIsHLI+dneRblZvpY;2t*SpKZiU+AxJWCXOt5Oy=N>qoJ{Ay&hGQ|a&Y z4^hjbe$udS!8B=9IB&DtLH!o}(@Xz5DvCRARr(hlfpbUoZRo1fk>J{I!Ls`u6o;7v zfYDY#I|(ex-$pskECh%J=SqFZN2Q#H%98WPAGJM)2wz;NvX>PMH38)r34LWWwiN}C z9zm8Ir95ZeUCOhYgz|3kLsqfMDwklU2DME(Hj_eHQWToFGm{$jpoE<`3ljG(kiyuP zDGF{Kz-~oQpQkW3WV}Hw8pZ>RfGbq4WNgP2YVo)p1+cm9Sv@8&+t3;m#s*G)@V&u$ zp|*g^Q-sh!EaBtDO^q#=cD1hQY3*LCFt&G2X^YBSVpp-jG_S(g=~3f} zSX{?OlicxP?D#0+S=eC_*YN@`&&P@^V>5CgrmMV=7eNbMotE>`nnYUd$L3?P5Y(XZ61m!i4lw;;UE!tJDr#LL zUM^GNtBuEq85b(tEOz5M6mA9F_O_L+e#+w&!m`fGni+fIT{Ck`Q)uw=`S7vKsGG$$ zr>wdB*y?N-;uSv?@CrY+r*QFdyTWUP8Cq7Ua5s{^v`Jx+Ju0tb>=h`9Gbnp>4^|X`SkOvWw=Kdwp>RnlQP>&!PiQDI-DI{KfGlmG01=94DPcAC=7O`R zTvAgb_IhpnPOAmOe&^HeLtsThX{9$B9 z{s>d;iDz+9BY9$Rlvuo7r3x|>z6#~Y+5tT{%hBAdpc7w$h8eVzLRheTLdBN&C)1`R zwg~HFa1op22(s5;RU<`-=VObxR>gk$Cl$V)DJaPigky<*44%By&-o5>v zn@vQSn^cx7@WO~5?N1IUd^0>R2fvQ`Ob?sEB$P0yZ8HW_gF%ZW80!lzI!nmvQFs^A z^h?$^&b{#B%NJg;e*WBZBx;FhaMrke&k|GgWfjK}(ADisbL3d%7K!U%BDcO2 z{wjRw7!2bnNa10o{?P**+wDmlOp;19eSCe~TV62C-&W7)$KwvIFbLCb#Z{r2AExE}ZGXj5As1I>%-iQE|$HLF{$< zKxo2wPi_W<_cP6tP#m%o8sWE893P>RM;z049VDHgk`AggTMX?n>~=^1qmG_(!xbud zLdB^Rx<2e!;)zVmLOCy3^UW2kPdlvQKx;g>ix!JspH*@01=jB{&9~KMpMaeh{|hQk z#=!qQhu=OjYZ@Al--7;qmEI%xUvl{EL$wp(M=ptIgB!wH73#NotOjze631U=BFXx? zW2r<)$1Wza(rHd$wWcKQW=ZgTmJu5W7jq7U8>Bn z9Lh1w-zxkUR3CAyHUAr?uFqq!Aj8w&F~+tIJ39{IgM{D)J*WjE;t&w$gjfWjK&=mg z@_%3og3pKstLu5T!dO?!hKR9Am$LqawP#P%#3pJifwSzOvoMnESTW<}Cb7PCR#uK| ztg70gQ7m{OnrZ5$*F)HD8Kd}IR_68KdyCVKPl~G8GD(!%a`ldEfr1))!XBC;&cpHK zl}`%!#fdcT%SfSOQt_q)Pq$J&u0$UyuY8zFd-MF|-M#sKe|K+zzp}fx&_AiW*Xuu} zyI1i~>FzBr^iRdr>pu-w#UI4A$Ug&DpT7#%V*gBBRev?ECH@**OZ~ODmig!5TJE2Z z>jeKoT>bvDaINq!?%qr1JU~nD0|E~%!&M+AI*l4-3*o7Wnr*DhLE}NYuVxRm)XaH^ zmS^}%<)~+1G-qI(Rg!;_MNQ{X8@RwHHGtI%olh%4X=$dNR^eS4Xgl!RiMOjwT0>oU zm@Hxx$TjfJBS_&LA0R8zix!yKj$#{=8Vuq!&FdSxwIBfwel%HZ*hLjgS33w z#QYK3P+t%z_$HY0^tnvD{iBXNv&|doBUb<2Y%9=qReu>Tk{Ilgi1PE~117Z3EeKM{4 ztJ8g611jh}-RGy|1b79=Yr!r|H4Fek^prFJ==-{T^l7H6G9dD#W-Sm60I|en3RBYB zoI;;~mo%;lX)nkR51&7Qf_xyiI~s#i+h) zz50q&ETY5;V=n09zFLaq!QO4#r0F0Q@Q!F^O2s+=cwK2iJ zpUhywW)JAr1JgzDvWwx7m$(#kN*dQGwt^rtt)QpqX&1t0vJgIdj7i*z9)+rEENr%# zZXcoNc2fBP`fl(2^rHVqd+3!%?N>h);nFfiYf8gFt0Ru|A#DtZYTTvCnl$1X8?lHV z2m#a4DbBNTwc^GuVNnHN0vMb{dZr(s*LwZG*h9Zub%5UN-9x|W$X}d~;CRy<|8Muv z?>*F8UwDYN@1*U4!h^J31jK#xC#HRbolS zXM8NT>*(j_9A;xq1<$ZiDTipsPQDdg~{QaQ!{d zH2y^3gYhZ5@mobybS8cm(iy`y<9AtLLIuBfgx|M|W(?EC;;BhK1&66qJhjNDbB3ug zpa#nJ^Kyc7uLzVL;ChV_vgxAg;;r9!Vv9jNl2p)v2NRdLa(xaj^IxAinqn065v15#G|OKioC>L+U}*-a20n1%D0G) z(jqDz^Uh0eG#vpnteRzph|GGH{M>{E4!JGH8xr-)O z@Q}PIwYt504}a)U|6YqK=gaKe^#wW=kzpokopTT!nvtVKIbsz`Esif!3x5<|!xA2{ z<;E=o zgg;Y0;|`bn&t(XvTLiaM@Xitb{4N*Ktv1nZZqZ+H8ZFVcjS+oEhCql0K@QP(+C+C* zQtlE`!ft?f+XTDaeSgDlywBbEfZh0zyK#@xXvu$QjQo8z!2yflz!-vuZGuPLVh`Dk zk6T=i3$98x>~GryPg(>|3W6#(!BaNDGZw)!V+fwJ37)qIo*&c2cWr_fErJ)v5d1(8 zWUTdGtnCP&cX{bfWVpL%D!v}5p?eUkchmdmURsVXuGZqqlzzG&dG0|Z{fFRmInMP{{#<9s0gVqkAKO(=HKw2u$T2`*Y&UR{%`X74|#n{UjHet ZNBA8`5C_LcJ?zQDs^x9k?#VAK`aew!52*kE literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..84785188b62a3485dc9bb67d5d303a908ec0a098 GIT binary patch literal 12900 zcmcIq31C#!)jnsk%**5@gh_}Ff({TNB!sXiVuF-xXcQ7m02>hL%gjsiU@|kz0z^ye zQrD_ge>ZTe)*81~MGT8o!L{zz*0xqF)#`6;{cV5S`nQ!zzkA<%lb6XraQR(c-o5YK zbH97;+3vaX+-JKUC89ds?t4n%^T`o`5!t*=)PC*svw)Tq{bqoGKju3Mee zO;&q}Nz@PtCt{IMNRPQGo2h7xwqC0aY2ohb*3LD0Ai-3yuzAtarnc1!o0}Fjwlj@d zBx#ZfBUIh4Cu*7U+Kuk8mPp2Qrb$D;&NG{mVS6HGgu83!V}vKBMQpzfwoLsn&iP-rxht2wApF$UTqQD_WC zHEIc6p~IMRmTRF%Od%hW+M0|l(PD|d=K8u8g^mErhDb7;&|}fT-tlR@Em|)a9mSMe z*DHt>nt;g~lChW`4)iHBiOJm%>5Xb(G>!&Yo36zpVTGnJO z*y$k~t5OX?tgc8GQ(5^+$3~i(Q9E_$R@dec(+Mi&P_9rCBdoV1dpq^mQmr!t#qchQ z1hmj{EoO+e)tNib+OZSMzX~Ooy4*uq)S%J=QU#hOmGZ~~ktKSJI8#H$IX;(>Kp?r@ zdZI2AVwzj-kV!L?p<9pDX6SOtX^{~Z7IWqo96B%K3J%3on!*Vq(I<`1*9K)YdiCW- z+`v}Ug~O4ACKL@KDq9qZbyw@Kq-b2P4jM6|ThLU;gKMjM5{YQ_iPGX{9fT|z(h^;f zSZ{S>B#;z-Nb<&_bJlC2Bs8H!2*Ga~o#ls^CJu!KbA$cB!iM0hJjlcn->FGG)+fh` ztttx{y#{=kyDZYx71v=H%b*P~lb{FcahghBrw&+cphpj^U82W&jdQuHZ~}fqtP@_S*+Uuy+|37bW4LvhnjO= z)Hdn1G}^C3WeeI9T43#BEo%9VoPcns*oJcF^6?#;er$SQh8W}!%%X@DlX4M0CDSp| zwWlknLhHn4Zd7R51WGWm~2f%&yH(+W0E^BQg@~V#n`)Y-;U#ik&bU6ZFEE%>X zGa+r+Llz_zJ)f?itK4*@y~R?7;)_cECCoiLZk!2|%(d}2lOszV9rl2pgUcu-S+I=j zS}f4Rba5KUL*(GxWC8dqu|s#YjjFU=!b`UjC_TbseP45sX_*CFs=OT^r+(Q8hB#7v zmJ!^<BlM`@Bx6BZP?Y*GVi}VtV-H0O-73z(MzQRqfFwGGu za6Bpwt6d@o-4Kbbt=^z_!uQ42>#^!KJsw4}tRp8$B;!pR1G;nrdGsp%!c9NN88{OI znVp`56xtl7(rfffM5C70rK=aVE^BFIGGkf##A)Md75X(?Ut0F;M+)!nLiz$n_A>oO z9Dv?{>6c4+jlfZylAXsEN4BfcZ&iAR-eMY(58Iw_xto5+bl70-V-BrP8lj+$gY!Gs zhpt$pH+>gO3--gh_R_loYloZu+h$}%*zj6Cc#;`R_U+wH<8ODf6`E-U@9Hr z&YP`%P=7-IaMS+{@#6MZmHtWpf^moSjhL#$=HMu<)VgUOlEc9OfYp{kIx!r|Kc&x9 z+AkQ01LrAvpN9&Wky$dTJtM8!+C#W6&Q>{xaUvfbgYb-)eo8p90SS;E3Z}8K_uU~p zt4j#)Dld5DsqEo=>{PF|R!8M1pe012iMMz{L%~VtiG3h(mV6X0fU5g9^q^Yd*QYCt znvC18g@b5733#;1UM|K;wP;ii16Y-FR}ToxQnXryMcu}Kg1-i0A9*yKqJ z@OiAtNANfpc{GW=7;-TAEQ6$D4O$#w z$5tlO@yk ziPBq(!VQ4CsQHv8FJ*C)(5!`NJ7aCUV`mPi3bk%N2{tyk>IPBMlsT6dbzBzaH~*5Q!5od6+vI>q|nHAm6tMV1xg}f&Y5n&781lTK27DXGs*}#>qPB= zX?6zXb?k>Y7NjTVh*()Y>rhkj4O^_O+Sx%P`i$jfh1>U7IgRqCrV0sa- z1+6r7OCy{c3X_x^g`Q#ln1&?NNoJV=$WjUl5P^`E6k1~y7wkjjyow4@*tPK6y(SFn zn{$LbkzfSeEr(R@75buJnuKPA<6ct4?nIf6Gb`Fvc13%7THH%-qksbNRT_a)0&McD0^*|E&USIVx#Q23;Knud4lDrz6zG8tId+E(A(*x1y9D9)P@8TngG(+)j~iyX-ni6X_~ zb5ts(ZiUZ7In#2&Wp! zO0*Bm<`Naf^9vNd6qN@_4ksLm9hm-d6&3bQg|9$>Q3>EZ4~ zkHXi$@-mFqk)P?oxIY0Q^lBT8-ej-e9O933`DY&^c(p5hJ=26UR@POmSasH{O)FPaCh>79Tle%C!W#|fm5j`#wG&w>7 zvBmC>Y6;{LVgHm7=bj?A=oS@s50KTZOqFu2vP9yzg~%)~g?|8BI>3OD1f=i}nYxEA zaQL)e;UfE08ZQ=k7p!*}X5p-+_z#YG=8PFaSof&7e7P67o9P-M{hsQ2qq|WL7`-^N zD~u!d1UZ3uKa*K@g46vfO%TSk)ix&k66e4}wyC(%!6F9iIpCUbxs!Q-!aJCzODHzk zA+2ziin}6A@)KM29k)h@D5OVK+%AE|Zd;=cMZmM9d>>b-QVf049x5)TMw)i^93fB~ z`>MpypEAv`mTlc+9oqQkRNQc3{0sJY>*}k%Z=~@i^p{jRR*c7K&z#@796OZphzTLB zw=<}f&0wlQR-fs#H}Y{2!P3(nNyY*?s*#8;N7@d0*v0I0k<~!PBOQJlQdha)JuNLF z`K!`TVg5mSmiey2e?k@!WrhC-s;*CGaj-(`&sbw~ixuU1 zleog`)cu-2BrfxC--p8t63rSvDE}9#AjTPCe|Zg0Rrs$~N61*KOJ0A+8FE=Tj$&ve zhC6A$eZY~!ahk@*wc?y=pO9?cI2|>I!#KEvw0K;PyBX)aqlXDTla{#|C+#B-PKxZ- zR7s@G@)QoQkHi?YT^EfN_u6Q=WlJHixLL;gC{ie&RD3Bw>w3z@lW1d6@gr2&k>xFF z@5uIg+dFc+CG8!#-qQ9CxA*Y&4#hjRy`w1CI}T5`_eeYyuOH7m??gO3-ZDJ%y_4}& zz2$focq{NM^iIQbly^FwMcx^Bj`q&N)9XE^eFx2Xkmfyrxm`3LPl1)_Ncx)WA+#1y zorQ8CXk6&`RBWgEipqzmad2FrT<=7zV-i+aCdZeW)U=RJ#3+oDYsdM6PNHT|nld?= zPQkZPpk0K&i}AH3POY>Ajl*1Mooe>94ZgNZneE1mxgeTZ;axgF%PXHIPvrou=%<{b zlKIonnkHM>S#z>0wo&8wG1&w3jhY-^&ixpaEf-sg%^|7)n@TF7X*7|lXgdBCi=S^Y zPl2CFUDOQ>n2>t#=E8{aWY8MGmKOhYOdG2UaV?>Hte7?chK2lQRWVM@R#Tq zz&}tjDGRK;GZoN#6s{ zK@eF|vL=XHfSBh{g|R7Vj-{*V8t}HI1g_}07ClVY(d8+C*QW#AYzt+}aDY+36INGf z0;~}57EcqBF+rI+S`SbS*qTNO%x{iJ0V}kCso*6x(j_69nk>Evh~~ElzA@cEH-dxE zV8_ngWP`j}f>gz-Zo&T$@b{%C*H}o$SxB*y0DJ2$`XSK(-L;$UGjW?cYO3kUzER}vX>dAEOtUb-zMmSzgmMk&Rsz%Mu(DOK$TJ)QIy{Bza7#eonG(=5^iv1I zXVVZqcYsaYfEk6TDokvam~I`Q=QmT)!}M~;R{ELuSKI0J$E;6p3U_I$qPe9(pw*!` zT?iOGG!@=NY^kYi6)D6O7UHNJ%@Z&wZlv)v{l@h|qjGKm7~CehCOk}gJG^gir{6Dr znBMEyPVcv5&&h^!yt>l+hn@6C7j@L+?xAxw(|Nw!-E@v{h&u@pdnY0M)+qg?`IMc6 zK)ahht#SL@JL%s{IA-kNteU*4oeY<-ixr|8&$Kbwn<=lD)qct?=E4Ck^5x-C%q8O0 zgU4xAJ`Xr>DcG|wi%x?t26rCMv}OMdl~1!#S#p?CeN2Akr(*#1oHfT8ZE`llZtt=kh3qpn9C(Q3$QABD(s%EJZ*qy)f9-%IkK~+ z&|cATSkWk7K}XH#0iJsgB#nPA#s5$~ODp*NBO)y6w z9QF@V7VP51CS^^LE%_EH`6WW!MW(n%`3eUm?J*_&+2cb0u=KX70bVXF#*BXF!g&y! zoCj{s3pY20B8Y8KYC%|9g}}6i;!v~%-9$-fU=){M8*!=AM{m-Z^bvl-vX3@#A?_6> z;WsPQbT-dJz5FWtF6CzY4CM|wpLfuO{3Kn>uh1p@4!*rhmm>0A=5o{JE)Vs&O6W?d z@Au+T4~lE+JKoIL;Bg&>O65u@y4N*|Pe;7SqA@O&SMeEG!Av0e0DU>Y+s3Q;8!(4e z)W8~dBF$Jsb2xxE4?V++VKTk=`X*23AnW+Lj|;gAWAlN3pB$lL74M^F-bn>m%Nx`J zxV&a|@CIhp|`FRcA}l&Bwe0CRN6d>9OlZIs%?yGJ^J8c!vhM z%@MmAZCj>B{x+U&=_*I07FKd!12iFM|+xYBf9Nzp~Givg8oShe1ofkVh zziV|~=Is2Q-T5?)2kXlQ_{yS*w>$V>JxDOYB)GPiuN&aaTO33;T0}QHS%2T|G+Ey~ zjP-4U1cEgPGO)hgBD%xma);m&bOOB7BDmW*_m8a3`<$H*Se*|#J0G$;P5uuK=6WIPJ$;af~QP^r-l(cV-Y-S5isvnY z7fpf}hY`Fi2nH4N4x~_o6xvO9Aeh}r%{+QhEYL^(0r)(>x2#d;vYnC(?7gj9!2% zf05VY#^qxC`r|s>$J~t{aqOVi_<3B)ypEq+d`PeJzvvBD0ln!ug5GjXr@gLu^!A|j zx=xTOsA;{WR5GTdq{Lr_|NP>`{HMqx%0`w!SHWP!KLyfit@Kj33FqN`k(@x-eK!AG zeB)op>>J5HzlOG%{PQpQS7^+mJbnuoseAby{yl$yI@KQ?&kyDMNAmd>`TSTu|0bWG Z@ISyoT<-ppKjnYpT=FSm*k`$U{{g>s=ePg> literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..4ab77a2c36c822c5eea43b2e55aff7ac069778e3 GIT binary patch literal 11586 zcmcIq3t&{$ng0LDV{RrlAxy$!5M+1=A%P62piPjHr$j;mOuz;ocr$a8Tr!y%?wtXm z^-)%u+PJ@N(-)$ulbQ(ongtxWliiKyhZ{+Lg(SlW?i!qafRkEc^eZ0NiB{S zb0KHTmewYP=7E$(Q-{oGJ;pB>eQZF#3-Guli3Qqk7mq$R3>MQ8s`gS9cppQvN=s=O z@Fseg7FJ&6qSfA~x+P+R`*Zr$wEx?|WTe_JA=#kOjuA)cMa z!qpCU>nqRImMq!oqdZ!v(uJf7M3<;kL_YA8>N6~+%O{-Y*H&HZd||Jis*lB(F0FKN z(;83dy}DU9L6e)WHp3EneA90@boGR*I9mm7j;D;&pfroXW~iGnpl>xS1KUy`k0(-E z%1FdP)xx%f*&EWK-$_dkMGe#F6@5Zhv_I6BN+m;=OIy6~4Be73E!C4S2SQDWNLsi9 zDH{tf*rmnN(2D7Th+vM7V46P`*hbCN2K1C}jzL&`hN&gOO=;a6lw-w)EsPlh2KgIr9SvC{X+}q?h6`^MvsKZO`OjAdF zn6v*XZKO@GVI!V`b&Hk4JGA;JOk2Fv$<%Ug9FR&|=}Ii9$B0LzE>={wwoagD1-X1S(Nq?*5UHUScLG$ zyTn3VFda{v+mcJb6uFKojZ|NY5rZKy1szE;t_qfN2kjWw<;L!)ekcbY}3B$ihrJLy%ghVqP&u}wu+``8!Nh*9X?WJ42 z^gEeNmMn@lD%~bbKi@L0huIfq@VJv0M2p&N|ojZEhuM&+Uib`J&( zAgG#D>)5&DaKo;SnN9b!_dKBr?Xl|B~r_y8eIGlFEY>ruaXP=qa&9uU; z6S)H2-o}CIr6-vhew%n?=Mzv&1b8GCOikxz6AL3Up=H|l+hvDNzH^RLYo?uM=W3Ng z&q48an?_0(ZsmEEUZ8Ix2Y|OXMCy&?^W3ZhnMasjQt4%SM)(ej}L zRh^6dI7jqNnpJL0i_G|Z`?!+JvTeIX^aKs7G?lsp7l&1PMR4JZ>Mb4IAcS?kq0*al4DP_Nng^0X`H|>t^U`;iR*Cf4N{SyUoi!&G{kzK__| z-qE?erDIEb6O$eJ#!ozMT%AHcgnP`%yn{FZ1bdL`z}X$Acf>L3_n6jHO3o&cDNerb zgO4jy4$~i~G(vyKG$xnMc+0I``Xi|Q8qB@Soe}cW}F%tv1J7L>)5El0? z{h2_!-b+8ph;m|bykC#5)2u!OSs(qFRx0$Ka8^5!>RKY(`YYj+f6BDTtuYyBxw(}X z@^h8`n*IjH4VPyQq9`#w>lAegak742rN5)U7bgMaTpG#`IP;8g`mIhodVfIw_*C@#}G@$keAtc7kN&TAn#T`WPPmC zC-i^VsR6BDM@=ZAr9^UyJ1eE3oFp_QbChuxa}+uSbr0_D(@j07*C@;|zMvM5;sHv) zc`D~~0amIdlX@J$mbrKJw7?uyt5etunuC`GYe5?qsq7Q9DWFZB;{cykl}or3hMr7g zFUFky9i?$C`%G%|0hg&fReFy;&1%QiDvZjIFOrBy4S5I`N#^@-2s~Zo8N$ws8|s_3 zZ*JbSr8(TGFsei|TjMgmIC*a{J67TIaC}ReiKK3(2HW9(6h`ex5zj&oi+C>2^Kvj# zr?PED)M#{-=Q9dO`I|dBIz{1TRHx(-Pe)o($``1-h*3x?P9?U0X|qwY5QZ{Z;F6X} zoyTtCT0eQ{VL}`BAZ4Efn`7KNavLew4a!@$zbg z>xCNHTB&d&5&@}`LL-}1Zedg!lvKi=bG!jNND#@mRpl!fMTml(qH@7>(FDrt+7EG% z7@y7~ZsqmuL|rP7v)GK1!#a|ppaLT+=rK$SYRubkFP$049y^2WMIaV^rKvj_;oeY~ zq?9Q14D*{BQc-s|#|+RdtDpc8iD_w}HBMPVDvdY^RaJ?St%E<)YQu2exktz|3`W4+ z^0g{&7y6=Lnv`b5Ek7w@ceSdhS6vJwbZ%&Ac=$J^D(MIU>4yMa~1FS9S zSgbx0(Jf0jjF`#;GBIfB*xbJ^OerGA2(ViG+(S6@_c)ilZN* zZWxjtp$XY7JSVCXb36O=;9~K-IGFK0LBk3<0V68J>`_tmhO4_CB?#Fao;6{fzW?V{ zl*VzEn{KP+0M2Bg2BWu0j~D|uRVjQk(>y82uAZM>(ic<;P?y3uv@ehYG9~uY54lZ6 z^}SQLqT5xzL-?t}m>%y<^(nlMsYXhHmY_7hIH)6q)1y`}1r7$ZJ;p$KAZT|ECVGM^ zmM<5pze}Y#0>eG1aoQN{V*cqNd|5@EAKv~xrfNAtRQxBK?V?p;G8|SHh@m*IF1II> zC#q<};AG=3lwfgMT`b1qz-o_oJ|djWc<6de8|aQ|3zsw1B4e2-o1Huzh9mHW6KOM| zqc#Jp$xQ(pvmcadgwF;`lO_10BOtwIoUH|yjBp?9T6CXS9Jp{=b0%>g!J&!^a#5f}! ztgPiF3cv0&#EgDj%6bzy@|L)Tl2F3L_q$*wfs@0J%a{Ek56@(P8QIAGTH|pfW--mO zbj!=%!_hE@_=&X4%O`N&I&)X}L0ct}7RXZu%|lY3hYFX6W{Gcrc=F08h5X_R9PX!( zLdB%wO$najl#eS>dztz=m3HO%%femxet)>Dz+VyWD)dhecX|CY!(EDhR=BII&_5ej zum5~p6@L)dBL93`eg1{G7W)^44^!p0sOA+&^w4r#1p=b;X@zVdJY7f^Idiw5j|c6( zszY>fRrPDMYIIzwT*Z8#TL9b(<@o7#Z@QE|gHaeKSA?vIYN-xA?Uk;k%kXXr`mVw6 zXYqEeMfKExhZ!C`HQFsrqqohHiDQ_t5S><3`CEo*UG)j_RS#3!5EYbFtXYburSd61 zZ&iNPL0UCuTK+I?t}O@@yo^ElanYjBs3v3YbYZHL_J&{J%h-J+qT8!g3@Kee7ep<-Suc!*FG z18g32$wP(YL2}TOA){BWw+TJP^waJ2`uoJHhRHZgvBPAFMcF&(!!OarfWJ~MM1a63 zXCX|xX-}5>!R(yZqZfG3&Uu5}0G#TWK9Au-^#oKQdR7(y_`Y$3zQA3JR6{BxdSaschW6cfcwS+{8EOLyK(_00Z-UcsSU77z}v7? zFk^$Vb+iGX8Zl{;1QxVMWPz1Bz*NW*8|je{ZA}*M1VsCthIjayK=(j`&|ufj-J1dV zWeHLhtNIH52f_DADt9xbxPuRHa9ktc;3gBLk3Pc;SvGwp4 z8(jEjXYtR*3_?w3VTP~MQxfCT^o)a1SlRW!>R8!OE{7fHAvU?Z%Kxmes>AdRp=Ut% z;;4$*M1}#V6GpwowZr9EAmws;vGP~wRTo9yvU$i-bWmdO3of%1jp|%Cz=$oKX~S6x zr}NrU2NUf3&?qJxGSTlUV7eMsb`31@S{Fexv$$qD1VLt&pb!f&5u6L(`q zK~pyvX8c?DWo3x23n(M>4@}4CWUV*g9ie|= zI!yn5nEtD_XxRw;l0nx064m;aPRrj02a#_F!0f^T$ z!o_)XC0sFtGyav&fm4rEpWvSAa`ro*l;gB_KX(R{W3*S!%N4-m8{$g>K8dHcC{QGU zmjsFg@ZuqwDp}@f8hPN%vH~W=sP9Zq`ZLNc|=7Q;5S4IhG3v{Szu~8FB|620h&KV*NCSJgh( z^6Ancst>4vDMxq}(GXo8C_T=fIY84K&;j)b*AYqJvKO4l5Y4kkAQTRb_AEKVpS63| zmPyu&%6YA%y+LqYW^+9yP&!Jp&!+j)w}kF39p)zBT_>!?j(mG5i2E3YYU2%1a=)jT+Yu}BXqrdi4&I0rtN@z#&{hDvn|Kp%hACV_4IJi9q!>GBC2zr< zk4~U0R1PQZMLDdRxAK*E`!N^u=PC56=s$5^VPVMv*K;B$O8C7nsy3KrN~R{CCf|i z;wtV4JwG5ig`BH6=be{M;;olT@mGv{_Y~Nfq?<>|Ee+ zg*R)$w_eJV@IRpvtmPCuntz;JA;az^mn~KzA4}0%iX@|?q&QGqd9pUS2 zJFgm_wLE~V!?%1)A+GPX=jyc1T# z5*{MuqS@d9-*#<$ywl;~!>WU9zU^}5X**)_Zg=CL(|Cis@g}G77I))br}5SkGzX$@ z9p*2VMW1rXztidPCHJVioyL3ZQTK{b3*Do>;&iy*?r^{8P~qS@>(T57FXL1mous zg5RK{^bWmFKf~Qg1Z&|~2iGTf8!h~FmxdxK$L#R~IP zi)_^f1JQ8M@7KdlN@vR7pl#GD{92&1qIvxW-5X`fS<=whR^M{gl7{-mx>lyVMoANk z8vcq_JzB+-)oOGGv}i1>Gfhr@yU=V(hON=C5$LR1gb}W=9tuW`XfWKzw74-9Zl4y_ z4hOs?!2$e~g* ze=w}j7$&tj7G9x+qkRoE)lCW&gGp^L7KrNM&|vSeLwcLE9xxiulv&*)h!vW^hw3>0oCxD_htV0ey zL2=?>vj#{{LUUyZn_<2cyKOaV`m*U{I>kv4dQOr`sI-`>A>&{NQ%UJsn+ljZRW&_X zNvg7lsaB;7$`tBl1oWm@&w4%FrmgowrQD4{ujXH+g$>cRIx`nq`(0alwCXc`m5b7- zL8T?63M9)^$|4t}8|^Y8OsAyef5c`5iDh=`(Q3b+X+fz?77b9SPCZ(zRHLg5Px+b5R7U<10kA{#$dR!LWk{zB6@|- z2pgS(rXu3&uIP$JLlvh=|1kG3WFfy6?Ffc@D(ZsXnDAJVHx`_+QS-;-?n3~cB%j4J zDH#-u71js)OhQ+Fm}w=t(_?zLPmUFvRN^;!4EQ@|NwA|MqQex{LI+?NJ{Oc?ol0lY zSuk5~m+tLep@(~nNW_%FX#3V!PEP2QMqVeaXBsu=Q>{H$$wye4Vg#b_I%1XZS`9Ah zB*RHvOpA`rA*!^2y0MTBBjA&IS6JH6kV2<2tQ8leP(cX96a(Cj=8eWQf1@cLZh(U{ zdzz)3KpEB}F+W6?Z?kJlZ;O(R7jDfm;HDw8N3Ezitx?U}y<7`f6J&UW8;1Bx?Mugd zZ1xF5`%=Uyn@}2qR@}-&c$G{GWI#w(ONDyH7M`zCFMUmJ=~5S6NEbWlBBtCyB@o=y3~RxW2Kxio3_xUPWon&f5ifXfBlwNgbkwQS%>!wUwoci!)hbi zwZ!nlXqY?}CmGX)goY2=Fofjr0<+L88p`PKqY`4CGLq%42ui0oA;m6uda*E1hqba1 zIn@MxeO1E1uU6^1bPd8=I2MS@W#W)UCoM-Rcs6aN>z#C6e1oL~#T%8j2@_9`80X?6 zGmgieJXxw}vjg-TUP1}Ef@MV4!d^IwONM|vLJsyV7J!f1{+tzYM1`#qTC#OO*%1b7 z`Wk#pr(2Mvs>kEt^rMMXh!+*-8NSU-V-RzaXZEb`^B9=5Y(%ZnqFwQD;4t9!JLwLU zenfX#zO*@jtt_=;Pm#|w%k)h1SGkdy-=)$|=%?@nSUS^$B(KvE3&^~$qBRx@`3+D8#bc4a1D>Bw2vM|yoR?n zL@JD=@aQljJLsgxReFN<2p^$s6h0y*(`=^8?HU%hj-xS-qZHAIS>B46$WX_c=YnKO znzolk5709zjiMg0?&nl`QmotMlZO=3B^0Gvv^dF48_8B8`oN#PPI4WRktXaCb$oz8)SeyipHVwCIr#5?&n{Ml=?w z-{jS$k!R7b=nW^mj#FWi_JC3*ps{irk#3VNgvW51k$sd^v5_GD_#b=b>C@PqzeJi zMITdxLZ1moa}LtZh{%HeEd1zSn5NpbBo1qM&Lf8WO{KrnKVYjNy3Zox=naimk{3dZt%)eIiFE08PlV6>!=fXwWvrM@huY7P+AgN5}N@H90;ne5=m#92NdW|kE(uA#5 z7)2SEHyH34@(?T%z|Y|bxJ>18Vc*#`)pcjJ)StexzO_wZlxB`;2*|i$<)og(ScOrk zQA6QiNJp(n){hwF8b!2)9%k`8KEcVy<6JeUGx9j4t301ks7Y^WZf+9=lA-UBO62lM zDpxZ6VsC$=;Tn{8 z>Q5Ih>r~ik{UJQY8ih|4#kM9z92?Uc8r_6IQ3%L5M^q1(=A}?x+kS{7e`uNqzviIAnfEBOfLeqpp~X>X@q@4VUm)g&@;>*){s8h$t*JfSwcYp!t2*!LTjuN zLHvNYu&hj!aV`AuUK57(&OSn(FE9e`mcuGXguW=4CaM{Mh?^9#I~yTNvvxf*WYw-` zCB?kt7OI!N=77J?#hdtCCu1WPq^?DIQGpExAUCrV9?`uq*w& z3P47rA8twC}N{NVCjRX(^W_hAsfP(yagEB?3O|zR z*8`nVjK2L6R4&&lYZkVvgw*m<_=ij<9%8^q0#dl2 zsWW+j!>9c}T;z{bI#w+5$1uZTn1#og<~cm(IkRUAVf{qK4GPZ7MW%m)^t&o*jLtgU zYxLkqt?)hAb2))|$&y-jg3}I_CQ^^W_aiws5m}cnhaNJZ(qu7YSA3@|_mjAxIrPvy zDoqhXA4GhWvspvMHO`?&J*?t}2U6R|G)s)RB#ULB(AZ#=iuYD#x3LH{X$oVD1Sg z2oN~ZohX?6JPyLT$ExWY3B+8fZog2eN{s(ie0<_+Yvl0=7=Ep1y-zEdje-i&{ZvQ5 zkg?HLl7Z@Q27XaSapi zVtUS=8(AYw=BME};MXH4Ed;w`p%lkaTV|9rP*{|m{K#LLQyzY-yuGRehRvZnh z@-q3|eC!rZM!#42b$$aKzsu)0T>J@t=HyRt9X3o%X6^tfC{vtuQY`b23jY-;MhIumzeCOSSu9RlX#Ee?*wAD}&7K(U<<{#S&Epq0bhyOB z2?yC{r3aM%ger(}M!-{A$A5r|2;&0}<3dgJE1Qd*Y`aIUGl6yzCZ- z*Z8q1&KpOjhCl$P8NU{Z=nA_^T0y7d zT^?v#@Y#yDZ4p{YtI!zZKx?(x^OeD`?NW;SFk>c&=9IbD4A2?n`^i;4Kxg+;Mt1FrR(($9y2dJYmqd4Op3`&=aEy8vYm4Qt;719ivL^Ej?{u7H|WHL{H zpF@7?0R~J+0eo{{#CQr)2rwoA{yF%Tj{(K`A!e?1`agBYLtaeN;6cpln_& z7Q*yxx-234%M){60V>EnG3S+X1DpcncQ9P2tq%YM>#+#{koQ%)=~`Sc z4T4CMk~Kk80mMR^DvV7?b1ZGA8^Aj*C2&R0jp$*ziLOZiym=_VTjD~wbvVEf;0Zg- zH360hc*|!9$(W!_9jyVVT5L_71m-bEB!J~wz*O)O8|jb`O-&Z>1Vr;)4DXn}N8bkr zp~1GD`#~J!Z4xAkZA?GJKM44CDas8N(s342>?FYU@1Y+P4ba{D=m8VAxud3da?2+X}?WGPnmK^i0Ee$gImZlA)-N@ zTMsZ|OOG+(%z)E*dWMAw_WkT2CRBAmw-%VrfR(L-MV@IB&@l;I$5;Xa&xC-Urx$Dp zUmSw)r9*6DFJ=^?Dl@TJV(K5Dm$y;=UV5#42mR9h>z(w@Bi5_;g}XFW(cDrW(CSc} z4up^{nofpIl4S|RWfo%LKi~o;Vp3c~<7xVhn}tSY+yXGTPIOG%OCPqoKiWyZU%r<< zZr@3tG^Ni^hjYB9-2Lfp`jdm&D>EOZE!*hg;>>-tML5LWgjl|t5V|Xse$tAS-Go@Y zkGaxW?A*<1OuIO97iU#w&D_m7jEk9EqDt3{(dpYLtAO48lv%)q16)*`g+~F86<=L= zte#oy5*)^XJx@rZ)$qmO&iHNH_JcQ+?`NaDfTvohlt*dnHeOwgUR0 zmjqOqRh%V}=M-lNqH9JSOyS#sGh1<^Z1|EXIs}7r}WD zqM8d1!;P3W8qsVHqF57R**ZAC4RC*#!~NYvF}fA~cOqClMSb)ZqQs|k9&S1|LlMsB z$@nQt1zo@k=|a95KV-QXR}#15rz^WqW`BY%<(KeFl=t!O1G)^6?{bHeu5h@h&rwKM zNqxTyw|-FExW40?85>-VF?=>_P;|E=kJlq!q|s=H%3k(i1#^JpGxTKuZwu?(0drVK zwcN>FNHaFjd^YgSMNjc^o`#h;QCOSB8@L;94{$E~F*Y0c56BTJR`C%^>s^$CwY*7f zpv%RIUXWb!fPE_W;BCGP2QoL1I7K)x(cK7i5)%g!n1Yy9&d(uyle6M&w#WqdQyP7c zYADM|?4&JD`Vdd?jRYmpL7GR|!`?X=BnO<7i~q&A4-Y~*BalJf;GKJrrXFUpEXqil zOaLey!dW2Ont(SpEtgQXhmjP?s4+BixfYqnRwSL*OS3Wax(QN!NhX&F4&$K@_z|Kt&(+XL5uxhb zYs%q{wvnfRW4pL_JB=ye&GJjGIqlbW@g2c;|i^4=z^@@OSek-DYF8b&z19NpO7uZyVqnw%dqqwuo-Ev;Ka((`0??FxIyX z5(w5HNWuDci|7uM%N>G?&kpcTi{LK%+;>}@_u4z}vpOHJckZ-0ciTJnTAdG>lRh+T z(nlt(5j<%UJShlD?69A*2%a_xo*qWfH)y_&MVNgTFbn%AqQcRIg`N`p?a-`W> z`Q=~|Y@Xg5z29sHI&p&FO`G n=ilV_f5_+O^7$|MJRqN6h&hlupupltb7bHagK3K+Gc)Tycv|3$ literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..47015f27960c3f0633c581e392c8e043687a3a2a GIT binary patch literal 9922 zcmcIp3wRXQc|E^gv)UaYu?XRHj9IX3goKa{G1wAd^N>JBNPqwZJAeo6NE)=-U1nzi z#decAby~Yknlw#pNaH?|R&C?9j_t^RQ^&4bJ5AiieNiV(+N5pzNZa(4)~V~7oO@?> zHF^M!`Kk|gXYTX-=YQV2UwZT0vj8^9eFn+|9m95}Z7`cUVxK&mv&P5ljF)e-a!y;` z_By8UH_RNJkWqH=cVecu;=W3DlgJ~z@cpC-fO)K^bDz;=(b_BJ8vhGv_^V!mCjoC3Q zz(ND{lxdm>CK|AaW3xkoo0~$2eF{2ex2%{hWk)px2@{p5Qv5g>ySFfQ#CG>uN7CdZ z-jf})()%sfQSU)x)%pPPrlu>Cf5rYN%CW@6H82&9r6#HorO4ihlNW55bM?1q6C}54 z*!DK1(}G*V%yefwd)Riv)D)Y--1InkWgy<$oVtEa?3cET&Wz`H72GoKk_F^A(r0ukiQEx%h z9RX4usr9BY4B&u)cTJ0yltD$yJKs*A^yRPBVhlLmNSBkQ(F>A6bkG?^4Vq2b(HTQ7 z%~=q(H_lw>(z8lTUw=8z+m+Q(ZQ0z4NS>f<$)P~F%PzJ#n;P$kGHxF+F^Ckisawbt zsaZNh?r9QfBadMSBL;?xI@Tnr9utmo@`}9k9)_Z-BA#&e4h%Bn3v9VGNhNBzWZt&i z!4bjxXMlW*D}=SI0AHaG8Y~ukJd67E!z>S>!84a_9`7c}eF0`|?!~aP;_as!2K}~s zoYZ}StC=`vZJj(ao^-fv^JPuT@egi+sqGhT?Dz0bZ{rEA4 zxr{OWxGQ|tpuS8!}gRX6PWb^pj zslS3M^DUPWQ>pDuzydD1VK_(l8@UDwHXj^&ieve3HIz^4UkRr#6EsT0wV zD*sMo-O;ua_7O%g_qgr0?XmMY7OFNY3$KvxJUM7@4Y;8zVy@Sru<0=h8V&hpit zX5!cI>&z&xkenMzWceYm)VIa){LjPYc0eP#s>@;j<<_fhSlnhm}$cZ2Jv7C0I07!T3`*7o2p;b|aXiCWhSX z*epHxKANPt&6=T{t#cGvuEs++^W8~Lg;MYVc?Hg`%MLUO4~@*-0>J*!JnA; zQ?-CP0Pe8Iqd1RO4gC4EI|83URZf2O@>~RTtMK+0CcchukN}sI@+x9SCVPTKkDX?Y zoJMI;MIlOqCPnE;oNIm4#JBL*)ZdsjYV$f{(DGDu$)~($@%}?8y?6i#-$O+3w{(r< zi4ohillH0z{*I2Cv@$8aD3kdI6aR?sP<|_yvoi$N8rJnifdzI+7y4(CpWKjaS7d(I z#J?&sBP3IwxfJ|=H}N0%PX>itff|~2z7FgrBzDmqW;ZD-_%9Rxts~8dmG7m(Bltc8 z-e5M9a`b^$m5DE@;PJmE-cT_iwt3Um!+Sb+@9XT}8^N1`tGY8f*94VovNSg$B-zZl z*_`cqFe98u0f_OO&`o`mK*0K zYD!E@BJ#5P$h5n~$}>3?tst~ovG|>?#O654@J+Q)ohkG6xt1JI{k#E^1-#Yi+^sqn zn)Kj?83CZk>75a|O5GLpM&xS3?djgp8ArKXL(7uIGc*$@KBR_=nnH&mOXzu1Qg2Zg zZMx!$^RkT>HQ&NF;;58s;=DNGhapQNa)UBM-zp>0#KKbBBrQ^!O=*#pq~6Q=d(L$0 z00~2?tTLrdZshD^>Y6~XW)9;G=|dd_!X;#IfG!_7mgddYEMbdAPVdO6+Y35b<&fj% zX~x2{VWkdnBzyV}er#dp^2s2oF-@MA9j5dstE@`fnPG1vBE5o^&^()|-A?6`9+w)k zPC8?Sv7|pVnH@^5rV1lzYwSqMYUE=(qxf8T|MG<* z%8-zOPn)=xS4QFCZ@tss^3rp|XQN={Emk_+&%EDJTP6GJ@D(OYIc!Rw>|(>AI@uMK zL9q>CI%=FnlkfgynJKU;2x2hVQ^U6wj#PiK z_`G=C8N{E&RiEXnnhrf3xEAlwE#Q=EusE35#W8AXwE1aV+uZUwB&X)h(-4-S0@rcV zMm@j5AB|;fQ-4tnN0kPRxSk_@m^WZK`)WD1iQg;O+nguHm3&!L#sAeUqrYScatqdD19w)eZRArKXDr5TxSg9{L(rS}RKeNh*o-Y?e=A2Sp8b|i zwsf&2hKkrGc>^)IT}i(U+d09PzFSLQucg{ZB*aw8cxz5SAr7>;8by(QdOA-=3A)hQ^5SbPWB0o!Q~3dGDEt_7om9?8VgWC zf&WS7aZTIZoU8CPC|!}a6X$RbFp2j*hX;JLzRrB}>!Mq32E%2G2oXwY#MX9l-$KCX9;E8a?UOxe=A2tkn&U&)a1@X7!Qee~265o)$$l`ywYwYjI;P-!5RG78GNn1y7esnQg|2fS3rAo<-&?nh{XSfaWekx zN&J1Hnji6hQcqES474VqYWlyZwg0Ug0}P*P>F)_nUwE|TMM<^9UkeaLp2yHB=}$zS z!;rt}{}4=cLe?gt8cch2qFSS_NmMJ;v56wRugCvS(VK|HFX+VrsAeLzK&066gp^N8 zb$g9!tkI3_^8#699%ZRb)EsD^KPk1JA;a0JSRy&1J|Rt z%>6v=PCsBCWKq^xM2 zlvd>%ey+M7+?oayg-w$g!a@x5huRVJ^4FS!3|%VDKEwcansN1$Y@a|5FED_;$`JM) z};zOVDb{(C&MT)+p) z%5bdA#Dm(-AH#fQuthuPlON%uWwmmXtfqm-%M4jVH04-WRw3_{n<>Ff^oD2IR!O{l zvR2m74G!XVxkYZJrys={Y3EZEFGx4O&%kWpRcV$ES@{$n|J1xEFL3|M3@g)XpTEG; z=;E7IqjK723c&IiD=TC}C3siQ*=wL&!+!%NWw}7BiO*P9t>KT-Vk=4X>v^`GXGW>1 zi6vsO3$%&4w>*f2%X5=qvl-CY8u+m{a_s?q<_TOXMvhwdGeq6?_7gJb|m4 z&&uX9`dEDs5}MCRr|;*@Q&otc#y-dr@Ix#UKdjxxugR8Z^Mx)4nG_atAO2Vq>~jzO zMD4S#`6=mo3G;(37RYu#6G_*LSgiUc<&L`gPlpEVR0F0`R0B;KOw|TH#xU_P%g{%# zmY`KN@8ejfQ>TxENpNAZE~-w70gzS#QGYezR5+ET)!70pS&D~)3fax~GTB2L)Fr(1 z^V=^+WUuVw3*A`W&3mzfa<^DA%%kZ@=<}$4PV3K%{>; literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..bae539595c15671b3bf2c67670f0898c311b0c94 GIT binary patch literal 10369 zcmcIq349dSdH=rEv8&zD!3trPfLSmGApvV}z*qtTNCFFl1QJKU#$>cRk_N4I*0ZyK z?D$Na#%F9NP7IEd)H#&IPMbK6xY`)Ujnk&C+oo-tHYH8lv~JTjy<4|+P5{A7>X% zhU1u-{#;_G+q!!=YqVGy$F|aG!wym@Q_W%hh@MF6nf^pq?_ne9Fja18@7UeeeP~O2 zTSsdTQ+0JL;}vYKAf}i`WmGQIm>HupKh$g3yY=2Q=!kY$ zNj<$+w@rEX8q3#tkk{2uTlJ-T!&E}^HJVGBKveWj?r(}enJXOenvXXoLGc4&8h3Agndy{Xv;XJGpsBs)}6=8kg?aynP7TT zCSy6eV_F%Iv8cnc`x6E%C7Ux6DbqIlWlSQM8cYm0PByVsnenPi49liD+o!OhGEdc7 zpAQyH4otZEGez{Ilh@N7E-&29q`56!iXe=%ja)tr&T4#~>)Gk7@$QLu=(*_D31g>k zn3X+_o*dkvXFbVfNeh+=!t4DyqaR$ap4c`;`1G;SVR_-S9O2#-+9Kb6GYruV*|Oal z?Vvp>NNx+$KH49o_cK+EZMw+P=m6b}olz#;g@{;Nzs&=w0=QZ)LI>$kkZv6pNdaFX z=?A70L|xUZl?MAvXJCt&hLbSGJ&RR|Mg~ph>+pmjm!``L=^G{ry7a6f$=6=aQ+HY_ z_RX8L2l1m&E8genby+!^t<-R{xbuKUCLKn8wey(*D+?y5JWd&9)e%ZlCP+ht?N$6q zk4Ba_bZO4K9RaJnfXAQDJu~zfKUyx$PmxuK%o)0!9ALU@0>~?r;NM^YJbkANqH=Jd zM0?bO-z8w-NO7Bo+fz*2JfzCL3(;liw6YL#LE;WGbth9D@`-=Jc<*rB#9|GXwIJOY zD1`ceiIBdY?$YRPy2lHbT^Vd#y&tm2zMr|StfW0X-5fEG$e0{zj$ zgBqlVk*MBP?r_sQ>Z6y(a1%U_|*f4VIcEsjsKw8l9lW#M$*D;_UgXEA(!^@f7TRdh1MU z))f?EJM&UO&fcRC`zdqXsDd7%&uLUmEu!bM8a*v~hEqlwwUz7Cv!+r~4hKsv=YXwB ziY)IwONM=vV0LLHbpkpQaL^3c;IDsk+lN`Ubs#w9whL`_PuI zJ)NygZc>@J@Pv8IA$k$f$ycPtQ6NcmMIl)24brbMT{TvGxKlUh&2-AJL-cL%-)CDxe)e4tjKf*Z(mBDoI!NCs z2=P)}X3$98q~`{Zv%>T;%@5IcC1~7+@-Qc5%l9N0{wCAnsX+PaDi5bj`MyTKO|QW( z5qj)l9Cs%cZgK*a!{zH5{Vx5Ul*=eybR2A%W{r!s?Or=Z|A785NPjRc$QF7v`Xl-w z+%{tz!%{N~5_|{p<{;_I85j1&w})maR+;s zZ7KGCdU-CqU6mO17aIK~{R{-ypwzUD?HTJR>JlT3)HaUNf+hGU^_qmzOcb)-)aY;M zZ?S(v`k>rFBy~q>KRo3e9rqPtIfX-k|MDP2e+R>lA004kBW|n+(LcZq<9a5A7cq^0 z)aak+pP|2=%^Dd1TkhZMivsgZ4-WFLAV0o7-XvuHyGH*ZWQIVdIsys&w>0`M`fs>= zHjf<|cSiQ?#;10{;wLwW6}+v{|Ef4LpyxWV;UT(!NS3rRDN~(XrILFcp@9P$mx#wl zHg9S@)ZMmgPg~FK5SPJC+A}I)c*SMBI5)&W9E7sAl{IWY-C`lPhGt82GhV2oLsIxHEe63+7sjiX!(M2@uwOxrDb4r!)f1wLto z`gHszHbf~vZ;GI+G@h-Fncx81kGmV5gZr4aUD7#Mg9p#MNEA5`;`wsR(;4CgfZNf& zy)8;5d<`s%7fsk1Z{vO2a8Xle4)S7n-k8=cayzC9r6_L5>cwz>7Ns)2CW z;gU+C*cm*-)=?Syhk0&*VMPN4h-6yNi`94sd}TCp+-PW!D?$%{q1A=q_4#M0g92tC z2=g|Lw~M`mu#BUdnOu}YvOAqj%iIgm<%J8;6$sqwGIWJ69d_d$r7M#j4)ad#4)QKo z(bP9bNoxpc9E24vR+D*Da>I!|Nb_6tq@IEo^)TEgWaip4-IiPhj!T6F^MetiE?IFU z;I`z`=}pO`k;_R)c)!N`RS~eIt9x^MYinC4GC1Fi%*eMu+bhrDQWpiREXpcAq~X4F zV~BN}6m}07@g=gKOX7tn5;t>kFZ82aIL}FqQ{uYiX(Q9`41^dr293UX2C5q)m5VzN zHKZRihw?*lcWB(|i?6y4?4nH3>e7V0QiI0s%7~O1HPR_CQ><+^juu{1&TYOuPv$zLTu|)Zc znK@z&8i@|2HU{c_xU0e?xW+ca9V56OEHp8_=J$SYrYrm=B)qhd!@Z_8n9oj8g!z1b z+(fzY_Yc4FPIt*m&-I`7JjpG3I^BbksJXhFGd1)>)De7C<9;4M!;u;u2=g6$XOKUL zgTW-4Tqgm`s1D#&iYNs4yO^H(|EI?D(3^c!PLa*0Q1kW>-wT(@a)>_!6E{|{)Dw8S zA3C;o#?|dwd?=6W;$9=J$J26gjJsvzaKzW9I7Z?C9+7!wCSKpfOGEsC*N`>`4JGR# zlummxIUL+A+c8q{LS9$XA5ooyQl1qGgMw@n1?`y(@^xCz<&0dAAH&&U67f@6S&*M# zy86;X5er>UsTEHF%$P@Qv;{C00{&J!m11rQ-9+t> zyA30SakphVS~}1Yq0$+f_-%^tM&V%xbz*|cLzm)Vrs6?yu(LqME~RfPM#}QDTz#Y6 zqSYw%oT9y_=oV4R-N7)v3BOU4(`u!NfWRzI5hk5_i`*xRYo;&?ycgFr)CQoyW$MFp zv6~bCi0C;*0N}g-Gz~J{KL(;iG3$b828eY&Q=qcchoi0ZNR;qs$fPje9wXHh?%>{q& z9zl>1s}pMPC)pji)`XitSD49xY#_J?i{6&<5Y8&p4p1=|C`AE&l1{)KrEvFhv~$H&osWu1C7ylJVc?FDSe#x z#X{#Otriu#X$p^UQ!K2&G*!eZ6za-Yg`kd%&TT@^ZHj5J>NC8MXoR-Ls$S-6Pf(qQJEoms z#0`aAjan+B7PvDSlL-UY=p{dd4;fDKiM0o2&R6d9xcNkIlL2_`xou_BeK7ug! z3Jueb=yv)!9Q7@_lf!fu&!@Wq?H*oB_wu83AD_SvAK9to7tqk(c74%E=&%GRH!8Dg{rTgQ`|7s7#BUduPa$fJP>Hvv@%)dfP_%b20rDz}OzI2L8|V$vdHgH$&R)R! zml+mNvd>>YxpncyDyVGSVgg{v1j&LdU4%Dh%HANADEMzvC3Lw!gA|=0S7f-Ol-i<+ zdOeTU^C&VZD=89*63FuczGp=;T7=3|vH>pVGtSQwm?A>HKVTriZ#coLz zbpZA&1=;);kkn3ddjLK*(+dd=XBg(8GRDNJpG3j=lyV!lrkk(KmsDYi#4r!u zg8wzeTjvSbq-3Yo=yi<YHcs$(D@FL&(Jzq5cfSWP- z)>mns^o??F&CDZ{x2bneHo{Suh1I&(jwK7%hL@i(YrhWNL{=pET>}+ z$Z`OYze>f1m$Jv|3OP^7)WU(Nluf(`_%M7#9b0%1-)=$0X&%DMI;vm?*Q9wq#>0F! uj^p?EKJQb{A6B0qQJ)`GpAV|fhY>~zAvwSwg~A^7+LzuB2P z=bZb$=bqQScb@rl`y)hD@5%F$hpE0-kJf}@;g$OOGvnGozaCARHCo)LF;nq)#LyFV zV@;?1ywoCUj75`)SR|q+yp+pSx=LHC)kL&tZ%zBkReC7NRJ6FIby;)AnTuPRTbnwW zN?IjNDrrP&I`w27Q$eTE8`YAjgwAy6$hQlvM=7u~nJ}Wgb&J5^OX%^KX(VHb0j8$b zY}mtEQX30=M_LMGDhopqBWffUG38XwSk9E&7z^uODj6{<3xq=Bm^>|Eh04I_s6?Uh z;A+y6x>9u z_5Ffap(*IBF_lQ@(a?ZGhcbB^WBqY0iig8M)}d==EUM6SrotxO3?+ zrTSOuiDlZ#2yDgQ8VhNW);>Oy-@x?pd-Y^}B*Ju5rAsF*u#a9nQJ1C3t*2JQ6i#&3=VV=&bp-q4JO;R=nowrttq+ki_)bpgi2=zgrm7-h^cx6k-ilaHkEz2kPJuPRO~O8yN4H9+(h4|os80{AUaBYh z4b!yrFy1{ub}SRtbvm8tr8Ahu4Tny9=2iMCX>fTXnnWlO<3wO;@ll8nmcmR8Up(%q z)I+@(Opg%_OA9QoY-!12U3vDX%d!|Flwzp@VMhxkQ(C0eQW3Wx@>wnIQdgi%=w>Pc z^_99j-L~KfBi(r*?znVE2JM$(vPGRqEwuV1EpEq+ypV{on1)LC@bMm#ene(lmbBzj zOl!!q(V6%U((kf+i&=$n`*Y4Gic zpJkON*g$1+lzkS`20GtM-x?8jF$58Jzb%I00%=Fw(JiBgUm{0wijnMFY((HbOhH?c zOyWXEqnTD^knCG!Hkw75g7(doR`g+G`S8-143bl_&O>k=h8FCx$2O*{hFEx@PB{Bz zDqT)jAn_$qQAaaVGKM{3K+@0)X(L_brSCdZEOjW}sC2b(_gvFB3$C8;;BnVWwmG`| z0WJI1QChPQY3f=c)W>vD2FU%C;GSdw_)GCaZ;gX$LZ^h6=_N3Fq{oJV7DT)*8@M!i zCqK^kq8SW%q~>fRd=66pxhS*$;L3rZfxfH8v@tE&=cEabfpid}+g18L-C@Vq_9&*c z(mjGKRZqJt*|bQVAI15dD*b@&LS%pfm<|~cg?duakjSvXd8@dUBXD}B5>?b=_m9sGCQKVAxdZzl3yG>YKag% zs?tsx5>Z53E22nBmgr1ZyY0^LoG+^VFF|2rR)#0R zf&Wrzm(YMOtVdAnS%G6hw&9CK-t@7&x=BhA5UjiG5QOi&pwf%<5}e&IoBQL!yiu;5 z>ZPACEf6KJ85ir<9#Mm?izQaqtkYK__9fQpiJA`GjH6iAQIjN7X7l=xF2g_p{hVI) z(l4+q&L%)sr^lm&w%AnqCB24h)YiW2%*E|pZB0y8F3apVgRf4ZUm^5mRL?<_@WCFG zF9>8W)0<)e^lP|&rPS9L62-#Vy=-w+yCHg8rKjmPOe5-HClW6A(z{Ft4A(vuYeUM2 zgmtW?-@`ogBx3!UvtW5}5Z?6;{a#>Q;iW$~g6s?%U9E?Y*UUboOdq{Z%?f=WLeUx& ztfr`({vx97hfLGlw&DOAT_*{azp33>H=ap$c{|DoM*?x?;VU6nf$T>C9pc7KZEa5w>Av=z`! z0*mrbP>wST0b;>j*lN$D*gq=7G68A2U!q}H72(IhH zZbeX^tuQuZyg@A*#siFi%Tz9BY{%ql@wgrZuvzX|-77HL(CQS%22O79m|(3?TR`QB zLTw7vCRbvB&y!T1%m>5C<0;I=h?To-G_GOq%ZxtepvqHZQ($_;_JMebbp8%_ny?cP>*H+dBugL}f0qtJq+gS7Ge*sPRNBu4AJ~ z?)Wfvd=&94?681qc&?Y{U_~};GjbuOt2~eALkk`4?aRbwOXhnN9L0Qu$_p5qKZVIy z7c`w{)J&uu#|kXZ6T39JQwWckL|W>{=3}7{RHyPnx!Q#eF#Ta&;YHXgYCc)KJWhqL z*6$@|oT_l6*o|vbxEXL;TTX2DQw}c?mUVo_%-9p}nwh0O%%9_iM ztgZ?7VH3o?syWUQRNHP}-Mj2f(CC9KBYTyPeZ3#+Qc zUayVcX|-V3@7x@6MFI|lTaKz66ZWE@o1|t$O+P7Ob`W-tv^KeC+56e%?2NpZ`HW4~ zaCPXZm3==egss?E6uPtb&Gk?U_1-{D7jpb!Eu@9vQ0sU-KpAFBv?C^V zFh}G-#}Z-BXE7c98F4O7MI!Z~kZzhHP<&10b7V2FxV@vHrKzd84OyJeMP}r0Fjen= z78f;=Cl*JE#T!&ABSYcyQI0I@(}U9;%}ozF@g-=OK|3jg1K{Iw!cwQEM9rc+WHiJnhpgi|CJ7>k5Sx3uXJj>g;bF1giIj2I<-k|c0!Z5u3S`zz)rouNfg+#}Q=_y?Zoj!5| z;h1j90!?yAAdcFDaV?2jA{v}NX5Z7r6n#&{aRhXA8`DfVR=GvuI+)0=FNMDkU)l@9 zSPD{jkg0d%07rNGB@XfjDoqxHyc^y-3bP1S(}VlQJa^6CXzD$Ni>dkniB62OR~r|fWrN}f=0Duu3} zbS!ayCT5W33GDX7HKxyaXNzhGIv#7$Jj?;v)ft&AI4g7Y796HW9oi6!CCy|)i(6-vrjOs| zcf5=x<5XFU$%4a(u8plmGLgdvq1Jg{4W0%@(Q(xr6`rL*uC!mUp01Jv%;myEX$!R!~B!N ze@FEZ$6E8hVe0y977H>w{S#wsX|uCqe+ox`EA^ljjEF-(oD*UZgaWlT2+IF~DF{9z z8mz44846=vEgK@nYF*0u57wStQ4?P^#1c5m4mt}X$&M8>Ual7FTW4kE$i}LwB^t$o zC!(3AZhAe0?UqrB&t_#_55BiJc;BR`iY=2wxh+@k$QCH5u_x@IiQ+sQPhRE^8_0sZ(skl4GU)tH7>-Tqd=lRP!yYu}MI=j9813SAF|HRJj z(tQ6UT)qB-aaH_5TnqeDarOBta4qyt!&UWH;#%ad!nN36jcbX2Hm;@qIk=AV&%@R4 zKOEOG|ANk~bkqa1=sqCu&~dm5#6$;Ey=);oHBh6Cbunl>X!liZp{A;t57FXbzG6A* zsTj?n7-xm#pI}kb@zeq?@JS6|^+G4miJ-JJ(@H1dT?uI0@Y{~JOHDeNI`D9Sn5|B$ zW!dm;m(<)&^q3E#xmEt)u|B7iX! z@cVI>3*H=xQVeqApcIpAwX8u)0xgAuks~#0fv5wBg)UQ=nAYY*x`wWW zY)4Cwik9op!nBF5NCVuQ3GjMHDL0G;7zaGzd&L&ODgp1LYM~hmlx3q00M&@8X_CN# z7DpObu?Xn_`Qc0k@DL8@X@-?LubDpk44 zMmotxikSr1+qTmn(GcCelkT%{TQh2z=?TDnA{A3B1@Jo&eF`(R@J~wPpG3DxGo6SY z9-s#$#)lx&!YI7#VsP1Bwq>*q+d&~Fxva{+Re04_+Ai!2=pGq1F-wu10JIEF-Q}9$ zvNVt~*}WL~E_%$RqQ@;gq*e5U#NZdYOsi6+IMoO`KdrVg!M~px#)Qot z(5(Qb)8J*N!z0gdDd@m7t^;iaL1tP(Pt!9lgwJLmd~Pq3xDGuERaIHoY&G3BM9*)c z(jD}2_x<#W|Me~O#-sMDw?w$KOwpRsFwp9VBRxnPeWDt7X|gJfxXMN>;s-*&6m*L7 zY+S9lu~}GD-pv4mvq;aB9rRAO|F>J{cPH(j_q(^yAKP*l8Bypuku^#;7#Xb;m?_H5<6+JafzxPWOp zBahYks>kPUqJlCm9;Ey-E*)Zjpa7RLo*-_0xSTR8;DZD{5aRiu96AND7}6OZ%Wd9s z{mduXm|4bCZB)uG+PH~N2`D>hqwJU~0LVAUwE>?5R9g@zkjRSy1p;~DAdQo1=EKUk zQs_BQSjJUSoDEnNE!9rT{XBb!53el}jYrAG+G1x!M`J`Kfuio(aYI~tH#Chu5%^$y z%02k4ASyTvzw_wO!E5n*Twq)oA2YzIkWaxuY8OvU^698Sst>4vlI^^h z;M_|B#k;s=GmW=#2h{C+B9X){sgMc>X^O>xbT~LnS+t$oEy~(bNApXi<~xMCh5DiH zl0fmWrhS&CKYdKtU-b|#n>EB=5gub@zw;102wBUA+~r5G8;@`|7vZjr*1&%f$Z{rK ziUf5drRWy4-$m=`DH@Q%RD|B@RZY)(%$dEksu7$v3J~Axxwc-fKTJoVd#EO z37>&{kwfD>Dxb+;#R%pC$p>i51KtkScqQE7bZX=fhf!v%q6Mtu&PPx2NkACG+c$YO z_i!)X?&f0d18*Vl@0J`YXx_(;dzgwamN#fA=!!9-7o?ODV4ubY-j>RAAZr7OQ=|h6 z-E}}GG4ZN2rq$?G_RkUA$zJicP*ei^A&uXI+N!`y?4=D}dIwi=N1*(eXb;V&!cp(M z^a_B6M4B(j;u6VWGVB3gHroAc1iQ#kP5$LG5so%du#DGiWpgtfP{srDrr7HC z>@EEDNBvtZs;nMvojhDL{uXGxpq{$F{`4E4%bn5Lc z`PU2+OtA>AE8|T=eEnt@(M>kdEpE}bI*pd-TSke#eV9Oq20<3lci2RCT2k&5Qo?S4 zci9B@xcmN*-FTn7@d3N>A$Q{zr_qxC&?x!aY=RvY!H!V`58DKfy2b9Y8y~m09v58Y zZrDGy37)bDo)QEVZi1(6f@dv)XGak{Zxg&|5xh96iM- zmte8)(%A;KR=PxBIbhP&uF21#(ddJg9?|M$A_l8~D(;@3q%e4=n z@#D+O%Yzm89~3u1{KsFZPi!sO?mi3dB>sw|Pus=kaD{9w?OSCJA}Zwa>$rOOS91A+ zr2)TzXKQJ|Z}PA4u#gIn`f~Vp{0IIc{}p>#e{)^`A@4tu*MG_D$MX7bdEL#QLV`Fr T-s53U4puFn&<0O#e!>3%uagiB literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..6297b0ab2ff9f429486db831e2d4d7ff1755e91f GIT binary patch literal 2847 zcmbuBZFAE`5XV=ElaLTf3Lzwfq|O60&;}JKr3D%y%SsTnEmxLZLOYXD?86b&gDc5Q z{jvJ0Gkwty&=1w=|72T9tPS z@5ddp=P)-6#FiPFVzV2Bp2PgXS5Y3!t9?pwLo4jfP)?wQ_vQyvv`x1yYA5emGZbh- zZ3%R}boPVlhOEu}=K`(hU6?woVFlKS%_P_LLNl~HHxOu} zjtg%&*L0Xb*W`N5(8`Klm5$2LI97`SJsP9YvCZ(E=R0E2Yj$}RqLe^z>H}W~mNCq~ zK+9?I;T)9PwQUnAn?#KX;S{lSfo}9G!P735yryaM&k$c6S`Nc3N`?ZT$eriIEd6ss zDrvev^IF%hnts?*3sMD(Jy+*i=v!_Z(znyLS{=#IjibKJw9VXhc*?`vL)XMjn+eFJ{)JoTtij0<;kv*qlx`1w`-N;(G zDpkNt>&y&1HzN{Vk!l)}f4Rtlrf+rl4iacJtyENMvaVJQm9tj{d$-KOQx6+-Elm&F zpsX0LG&F3kpVW~q876WONWIQmdj#R1d1|(?hOTS<##?w+XYUx#3*J}Ku65-=;fX=} z&B{LGJ6J+#24_grxvCq4rW>LzJ7abd&WYF_=!hd3nKKkL`kA8wYH%^hLT`*@0R@|_ zcW`?4WB-U`OlC>et9&c=qa1)2h%zR}Nb)GBUs$dc?g=!xbFYCS%3h1j(IoviPh~=* zTrF8Ht8|?c<{SJp;d`7P8x7O9_dJy-oB`9u>Z;@yPz?NjKSWw;^r`l1V^;8gfoXNQG@{ZZ*;Dn->9HYxLPgn5zNkCU=0WY5hfRWAEV1*_?OmN~lExx52L+l!`CAx`` z>z>1w6W9`fl`QO50$TyLO1B4U>ygt*?sSdTRr)N!u7b*Eu^Xdo9_(foyT#dUu6t*= zqD`=O>GMGhTTu)-9>WgZQ|Uf^q0*O$K<)zF&C1k+1hxxI%)-7(xEFyv%nJ2U9BQ2W zhhQIPv0uk*ysXDypJciJCK2TmU{A9ozvYtOB|?1)_F2rH%hYquzUb?Ie=fDpV6Yb( zoGb6k*dUH~59~hv|MeSd4NY7?gAIC6PQYRhoxQpNq6Vk8Fq}7D< zA<)+e=^xIdOQX`S!3+Fw!l;4d)fDiYy8kCt|G>)x=@|JwBy6u5#`!)#2GyhA8`1bv Vw4au-mN%Fmfk6kp9rozY{{cVAd{Y1b literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..9420701c81d251cb6b5122a106b06b1c97e97942 GIT binary patch literal 1778 zcmb`HZBNud5XWbahr3o3MN#nq7atOc=E@5b6OWJpqLEyLaDefZ*=r}gh2Czn-CpQh zKY(AyL=%1QhcZsD2bX9u==o;1vzh*8cILnH{m1980I&v+s!(CD9-{Jm9klWIeJrvr zDw}wLu)_1x#Of}Z!Kt?~uy+ctU5s@itu|Q|#u;pB6ME=JGEUG7q>-U)M@Zyutkn=o zNQ2&?=n2o90=zA43rbh7Pa_4uk3bpOH|Zw`q(vHMqc-yRQr; zI_hD-^LR26R%*p#qbY@M@|?TQUI)3PRE#B;{Ic8^N@>g6$WMNDomQr-IOdq6IT5Tr zLX|w>0Y+$%+YTnQ_77cWTSXZc+-5Q6u$)vxz@W~l8udXn>ZjGHC&5uYwK7UhVkSf* zMlAdz5u)q7LWM?9jY`rhT=Q_Qv!6=3>+d&kp#~SHU;-{Nm|biRtJShbs<4q)bGj)N zzDc`nG<$*y#9*eWeGwf9BXfIjIBq*KVeq0kx{N1V&Jr7sDw=oIe%>azd5inYO7aCcyqfc38#w( zGRX(hTK?$!xBi0gxRh`k n?v&o5EQjS%!d;j@H{n?cVGQn3?JB^jL-~Fm9?+im=pn#Q_@D7c literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..26bc6c1811df5a83572770def49e4be302652084 GIT binary patch literal 2760 zcmbuATXWM!6vxjd&Xu$T5<)^C%?%o8g9?R#iF|9FhnPM~o(n2BW3? z#ScS7yvc*-jMmH+OkG~HL;K9(st{geMYbnGMq7C=Xezw!*nY^Bh8@^V$tYptSEX^L z7!BC(k7r(T!2>Jejhf}OIQZExlJjQ!vZe^7()MFhBc~TDM&*Rj-SJ*E&uO^=-ZH{+ zIiu@(p`0(B=z3W_DL~`Y$T506M#Fck=$#k1O3tgdcIptw7}MdA#At!SlOR)2Fk z(2k5Y27=hc8H)>S)3tmbCl+ntw3H3Lgy$4ZW1PWkhcYya=N#tqoUYIUeS+6dL%K?f zc)1n=Ml}fY^Tv<>ziecp{>CypT_W7wnn20frJ4Eiz^ z$UUI@qbl_j@I7kfo*6oMHAPM9E>>>S#QFhE7bmt2^yUnGh;y479O=P!$ zYB3tOL~c0lEOkxa&2C_M5_M2VxTMI1FY6CnKRkuW5`nH8{_hyQd5$ zI_hJ<^LR26R%*p#qv;C0TWjLhxf=A`Y)gu(OH_yTEA2@}z$NFSE|8P`-++N`lWE}#b2 z82D$9%(%568K*J*B&@+agT+5bB#lxX3jep#c6Dl-efl;8Da6NMbNt*<_1yxuk-Z9j zk;r!E0DU`Zzdo=!ZmHKuc=J0c38#nq zGRYg#dj9DL?SZtta>`}tn~oZnH)>1`SOn@x)I9;t(Q0ZiR>^uoyNqV{3)J4tx}RYB z8(9^Y8F~UZaEaE_g%@0gS+W>hfvYqg6DqV<5avn<%lXggdZsX2R1F!UWu<+*N>6h4T3x+^0FO(F1^=M+5L& literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..5e1c0459ac7d60fb3a50365f242dfdb825bac678 GIT binary patch literal 2184 zcmbtWU31$+6us-X`J&L!rcK;WCrwM5(g*?+N=sYWa*JBW&N#M*^d+;l7DYi?8EMtQ zKZ_@3c;E-{qZrQ0juVZIn;Bl#yV`Tlz4zR^cl`H1fBr>8CcT}b9HWveq|ptXj`;1c z$NPbhDmEOhxG_9&=QxR#{%-6I?#~(x$N*OAyyimrB)~aFT8lvlay;vBI7kRG67_sw<;dBh! zf&HWDnAbvzh%4c=xt|E&=VPVMZvVWd2&LKYrKYx3sWt890i%1dE0_VV2z}1ma@?1-F zy@300wmNQW?$%qiCZmO31Xv6ewZA3!ixFh%96dK*PNGQ2E~;^ToTJ=oG%B?+^qy@9 z9*2_A0Pm7z^b{=q@v%(y-6dir6w%Tq?x4Ii=R<<&iz0HztIIe3}&$@YGca z37n6#)SpUPI?&lHgSpkia~~w}0p<~MGIMKB_u3%bA@m&Kj*wGHOS&DNdD2tQ8O>}y zXror;&=HF?LoYAVGx~wirK%@IEeSdzYU)MYnCblQAd&S{%iD#{F6bRs?Jv z=?tR0o$}6T-VM5E(|wKo>?G86pf)E_KFCmR0=6}xJQM0eP5JqN^3fUIEf{Q*F^u6B z{w@Q34Cs>#_4lXLPsgdB z0MGP;!ulLY9Y4eGg{?p6#qZeU@ZW(_xd@F=!d~|f08}O`y|1L}tF%E@k;`kGe*^~d J+b5#G`4@K-2e$wK literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..1a545abc72b4b7d48dfc4e8f2c7dfab1200e2989 GIT binary patch literal 2466 zcmb_dU31e$6g}&N$W{anN=Qo+irP|090w6f_=rPVCnP{HEklAk?Mp|t7PCQ?Jo?Ds zztG42lJHxh#MX<4wqAV4zelVjDQy*>;4=lEGF&>^ z)Peodj6&fA=62w@8ZO~;hEfod7tj0u&or%5#TCpem}968Pt@f>V0B0q^NH`-QJec3 zDp+6`54daZdb?gvv>C1pij(3GXfvoR-A1|x4EIjLAPh<>8{Lv*^sNYAcu}~yPl@O* z+uY$Hx%&RexVkAV@r8zKxbc>I4lU6v;^uogAmM5=sL5!(|B&p!a7V+6v|#bMaP4Gq z1gjcuNfHG?0s4U0DG`R#JE7Hn`Pk~k9YX@uCGjOW+K{f+?mefsa}N%&%o+S&Q15m~Lvn<9`ugSu=4ag(5~ zd2I+`dABmsW?plRE+zdB=Tj6*PCs{m5B{K8f+EuZQv(QUhCm0HB79G~CAq1}!U1Of zMDelyarF(1H@IB=Im0>=@3}w)T%<@N#x#<+6jNrZVv$fw7{^r_$>Pi`&s~~JrlrF? zIe0>}5`#`Bn=;T+3QD?TDW&`-zFSLO0hhVQZ4qO9Xm-0Jxk1mos3x3Mud_ z0+w3LRu*34w$wsqs8#=hrZ1W;V+fER5%3>76m-J? literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..8a877736005a2a827900a135e23d2eb8b38b7b10 GIT binary patch literal 3000 zcmbW3Yj@j35QayIn_E*F+FW}HNt#01l8UyJLX(!tl2QbYZ4}$o!`?*k>noo zv-re0eBcN0qbTplij%e7ki(a?R(j^0+1c4y|NYOOe-V*JwQ(9z=y6l{YCUMw#Bcj; z=ddOGI8qxBrwe!YNJ;!gVh1zRTj};oR8VX&` z9e=R=STserrO=YyfoV%r+{mqYLi7C~c49a1BZXFTLD*D9-E-TKP#bROHknbQ#xH84 zrdkcyZ=TLP7rqFcSTrh**Ad_+qL}B+!?T(ql+s~4F|`acU$RP7g>IhiRS&#Q%ZIm& z@3aI`Qq-!uu(eISU>p0Eq0s$P6xyB>zY4;ZY6SHT=RZjZn{abQwk(wGqGp$>U5hbK_|5o$ovk4OdVp;fVf$EeS+>>-<$TFJsUX?plRTbc zlh<}lcGloQQD{tSu}g*KyP>z7_(09NO+(b(mg6D(Svdf0mm^SUvW@yiF$O*>%^*<` zGMi)#hhtn1T5ZQi^~}lUdSSPyvG%+prWaEbL1P-Iz46;Gs35SnM zUrr4(XO>I^FqztE*w3_$Bt>ueQSA6JEc<+>mKyf+LTY=Il&f-dDcQ{puj(z_>7n4B z!R|IrIj87BJ#sJx9h!)qV>lAbqA1QLm_2-_V7AI(&O)`^Mq55pm_2e(wOr)>&~=)humIw`F{G(-rl|GptpW{WhAi!o7D?O z)_k!qm7PM@qySdXFlW5AR2SkwdzSkqwq;1jGmvvo!Y-aw&ERz``(WQNk90Ezy-!Z8=dJWwonx&7$iP zy98=^82iB>y9{<^7`w{s8tdLT3UvkSI^9fTxRJz=;TS%ok1X1tTNd4x0$B%or72qek=*IB)L{=ZcV5?_vVrRE|2E85F0{euXV(hD_FIl&TJpu3x{~`yltb{!SpbztG zuxC?Zb+9`<$?G^0&r#KBMSmrsJ3y_T>>ALo6ErE;Z&*4f@fP@9NjiTlU69aSphZdg z+hb{aP`U_S;Rc7X43cX@!SA`-e^BLjJdDr_jC`sIhqa1vx(m=t`ab#oLo)uDBzzHT Q`3duVFev+tf8SH$FSPruGyA$ zi@$l^v-(}`2EJ)qfn_F{$J^4g&ByV7TT!;fd(szy^!ge`88)TYF?rh&J)fJl@I*(n z98Rd+o^&%np9;A7%G$L|F9k3+DbMg2##V$Yf>nl**|{de=(@DIh62O#VVG{Xfe89K zMlf#R7z~D~*+xXcvD}Wi?pVHGSAB{N;qvdoZi{<67O`h2HDudznwBS2p1d3lUJ9S# zZsRayvN7v4m~ZV;mmg;j1r^U#pF2vihAEmm6Jx{kq?gAuN&Uq2xG$YuZdcSU3dahB zbSphik`&$Lie7jU3i{7-T^Uqbyt2Ps*D;Atl+lJSYG+f3ld6maGhO4n%7xwMC@PRiEWN|B7$LIJ`!xs$aKW5e?XH#Md_50&ly&ZVh9E;k&E0PM?Z+*r3{0OU1~sQ)8-Bj$hCKl z=Gvy(`l|*m~DQDkL&+)r(@5Uw4+9Kni#8>)Fu zP(f)x)Pw-T@$JBBzkX!(qLZ(H))e7I6|F1RmQ=K1;3P`ab6bX9o8K4e<|uz)$n4Z# zQhp{^ZHta;1))bve`A=w)PG1_JK+!Rb(XU3?5^@v)TD6qlgZ>MJIUJ{7ot{9E7Ea&uhyQp1^PpWBoxriJ}J8F);z8i7v7 zi&D@+0!q4LF`@i0fhsDfE2X9Rm~N(D%+@5S7YX#r0B|t{E~da_{{;9A0V^%a)%mx$ zskBfX>b1XMl$H`vRF{!xm!=6HxK8ulpbj@_(p#88J?a)~Q%<{;aT}|VHj`1`9PUtU z9_&44G~_4N)D4iZm`lbZrHH~?+|34ym10o~5|hg4n=z#9-a&x}%T5k0`+8^@jeVa; S=kN`_jh+v%Nl(S;A@DET;ZLss literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..65bd5379865bb653a13542dd18977002cbf90795 GIT binary patch literal 1042 zcmbVLU2oGc6us`pI!ebzx3Mo^9ot|afhC?0Af(b16sc>ct*RI=mD`xiBXOd{ndr~r z35f@O06z+GoH2n0Du|aGU;Es1>~n9ve*64|h?=xlp#q~PzSMjic_aB@7>h|LwMn@r zjNqv>Mrl9g2j|<4O61t6NVm07W>TRNqlHs(CU_vU&wHa&95X7o9;3z1&jVK*>C5C9 zqqV~frJ)?CRE+}J)H*W4GNz2SI#J?tISy2uO75vd`4+=d?>+ZM-1SiZa60C-)G`r9 zdIJ$;68PEF*xaA|YbmbMpTv2o>$JOlw|~rNce-jT3bIf`t)xXL@$`e{@jhxD_psgS zyS?tvbr?OKLJ|kUyo-{MJJC3^4ahwKWBJTJ1kBx>x&Di(M@@wg6X$aY%AF}@W0vyE z1GduYIWOC9hL;^=w0Zd&4Ri%F-v~tcDbrZCioVTDi@@dJ-+)SH5g$<+)E~#|xD9{9XzZ0z01Hv}B{DI)Stt z<*TOJYe~XvcRY6pjuNEx!rr$nzYk#T(DwjOU}{adN^b}x7YlWPi7n5ODP#oh9AD?Q ztCj9$k;JrtNf-jNi`7s-%XXXAR?7~83bW*@%9X!#+k4XAwMn~xS@jxrt8V*>zvIOT z{aghC8`a}W8I)L|q5^xLIQAFE0E%j=6vj_wKV}V_!koa>VLyJ|dqMpr=z&G?QW{?g z6rv$19}G#k7SBid@O)&kfU_xlEpYkh(FmNER#&T5VC@8+Yaowv0+~SjG;Zoy@6);cS+9Y?SVBi|&(kKet_-wPwQ9dE1`jHt$zbXCP>+0=& z5==ynY)MUXxBew_S7)I&3@qcOz}&EB2jf#uHHs?!kapo<~m;R#l2=7F==M>SOrp(z8 z^J0`2V-f-`;|if>FpaAeu{7%KQ9O$w&(bKK1;RK>nfXuhlwzK8pJ$zTx%Ld#!#sl` z*fo$eHe^29)EA$L#S0$HSn{J7D#uXQ&6Q$g%fRKxl_E8yOrXm{z_~tft`AJ7BnEy( z!0dT`srVY-u@}tned%8q=1Ob|vn0b_&J#W;H-i;oxJ8w&k~_CUwx|dBK3g6YtPu~tMrGe8(FtthLHPa&Khv8vJp?`i2K+m_ literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..e42ee955e0a7bf85fa01dc29a87a75ab3cc216d6 GIT binary patch literal 1007 zcmbVLU2oGc6us`pI!d>dZj7ybtYaGtB(MbH34~PIf+BTY#j1+(Qn`uAJQAl$oQeJ{ zo{)Ip2k@g1#~BlqkP70(@wLx~eSGu%$JcK})TF}_pC3=oq-z-E9FNg@_xFaQjr3*woYD5% z6x2`-RiY+=Y-$}DVN|3OM!Vf8_PKNeHBBV;6GZ7c_X!qg^}J+ z1gQjmIWe~OXa7pYQS1dR)oFKn17|Q|bgw=I99A!KmLEJ8ec! z7VxKmFdw2g_{XwyDl&t*f-`rQt-z150C6>qf2!h9XwB z{s+e3$ z0EQc_W3+@j5Lkf_5F2#ep-sB+p0+NrHK6cYP#xnWKz%?w@zCE?RsFu*jlDv#Ab#=AjOIJ%d}q##|M~Cl4*)i?lR--0T1&cC({uLZ zo8P;3zaw28SdOi2E09_%w-s1VqUGIwS3Z?pFHqX^`x#6K?0A05lFhd22GVkruUcxa zEeWpE_1pv!6-euqy>DCo0KnRz`4CTFYF)WXZwRCpml^^STb?5`$O)_-N#eGvmG0+} z#2?{mk%16DszBgI z?MNzyja8|Yz}_eL_TtenqE4zyV^y&Mvj$FJPT*3~fX92UWK$FB(35y6i*E!jL|LdD zWT8@zV^B%NAddx{&fpYnKRf|}^V;fZ)efwkz;g{0@tr^}&^`r9z36{gQa#*S&Ep50 z&ESkcc{EW+27%ooWb29VIlZRz4V=Syf$2cH&aSuXbyZW~a?*tuKVd?=!pWGT=u(CR z*2c14V3H5qA)sEDu9D=lSTb-Kb6J$Am9Me55|t82W-v0N(KDrAdOf|pPcn(ak!`6d zUf0KrSA*sKXkZ0D3Ctx;I*3Xmi>qHNJ5ock^U>&b|Gtw4y)y=`a~88NlIwt&CqNODH;KpWi$H@`M+qG!VLZ9=?fUNaR$f2QMe5S z9H*IJe`AQ}w3DG{mrL((@*}bj&H3_seES~Xm;a>o2=7?9=LFH8q{`V4^GsA1V-f-` z;3A>sFpWzzVrg`uhw&_iJjF;`2GEklXh{`Kf7pDGM z{nVL$=nv?R>hxXNRwCPDGSe@si=XqJvuEF3`JaFP`kROp`elm7B-(2-F4x`03H$xn zv)V1j!$59Wp(O{A=Q%d>yKm)6_qp7mG#=Vvdx|m=&3~{yTC!vDrd&Gt!0MqyV|qiP zYx%PubRM!M^Pfw!Y(xlcv6>y&Ck|6McS9?*T^>lZk$3&3%<7Kq1x#+(zTFgz95jBF z8z-{fK>Y4#=8$pbTOn)IEGJ^%r-M*DH`^BtMJZ<6i$nFCRy1|o@0gYUB4yg+d#tOSIH4 z-g^ecBge7OvT>|2p`0A1F46VQN{F`0dADvk;x)t{bBd`UCwk}l2$W;`EI0ILYCd9*A*SL3c@Q%$Rp?=xP9E9JC`YUpKC7wqNk-Yu~3)Wrr}?Wemo zC}`%Z5)7N^Gsq`}zO(5kaxD6*uzh?7$YeZuXA4)Ticw z_?Ue1AntsYptwESBJm7>EvltlR(pHgXGe+F`ifY`nT!wKddu=WoN%;((^VLJ0oMtd z#5jegEy~a|t}}R^Wps(==rV3U3+M{XF+p6Tg?Dtlhg}7>NH;JF z-E-Jd3R?uQJPf;;!j^%p(5zUJFHU=QrIpqc^LL}D!mNs;jmI4C8Z|K ze+c&RF!q~-O{Vo2?2}>XzfD#71lZGIlHUo*?^C5d1^X;v&voj#U|)1}e>m6LX9(C! z0?sY(%OoJFcMt47{{MB1wF(nwVX&?T)l?n(fO3iKCQvO#W9J+U)|~@?n38^VCatHW z4}rc;N&k2zogb8b4PFw56UGuqv6>RD6Zik5@*lVvBLkz@hlK4_!8q3e$fRogdo3P+ ViucnJ=JFQLM_}Nz20h=joo4!*cIMyt_Wjcr09bR-3E};|#X62|e^987Jrk(#TM@BP4P+*6JrH z9YF6u^n_g6$d3=ZPAgMZ9C6IioCsDQ zqDmg|03)=>Z3hz?`+dgcp$6xtU;-{Mm|biRv(>Ujs<4q~bGj)N zzDm1oG`oTl#9*eWeG%;oBXfJOIc_^LVeqUuxbEz zm8=R(4?F=JxJc`%!V50J3|R~=!xb8j2^HEa2(u-G*;2x_QwY~f2=k?c8-GD~SW37F nw@P18c8BFs!flv8GvP@IVGQn2?kd2kLiv0b?$Mmr=sv&?WT^3A literal 0 HcmV?d00001 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)); + } } }