From ea16746dd11860b854e787777250f64e8888a310 Mon Sep 17 00:00:00 2001 From: Leonardo Hildt <108893281+leonardohildt@users.noreply.github.com> Date: Mon, 10 Jul 2023 11:01:30 -0300 Subject: [PATCH] Squashed commit of the following: (#36) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit d82bd48ecaff3c6b6f585a9e3d6ad599e8318fde Merge: 06e3f03a e127deda Author: Brian Muhimbura Date: Fri Jul 7 16:10:03 2023 +0300 Merge pull request #34 from fiterlatam/BLACKLIST-CHANGES Blacklist changes commit e127dedaa5309828b4df59067e529e99f14ede95 Author: Brian Muhimbura Date: Fri Jul 7 16:06:00 2023 +0300 Blacklist changes commit 06e3f03a19d1f8054bc5a2e7c0eadca9642cb0ef Merge: f894980d 96725a44 Author: Brian Muhimbura Date: Thu Jul 6 11:02:49 2023 +0300 Merge pull request #33 from fiterlatam/BLACKLIST-CHANGES Blacklist Changes. FBR-211-212-213-214-215 commit 96725a443c391eca23ecc04f5afe259e10d1858d Author: Brian Muhimbura Date: Thu Jul 6 10:56:27 2023 +0300 Blacklist Changes. FBR-211-212-213-214-215 commit f894980d75a7acab956e02da0412f62615b284e8 Merge: 4366925b c6e81da4 Author: Brian Muhimbura Date: Wed Jul 5 19:39:22 2023 +0300 Merge pull request #32 from fiterlatam/FBR-217-PRODUCT-SHORT-NAME update length of short name for products commit c6e81da472ba0c4d2d487e90ac0b532b4cc54d32 Author: Brian Muhimbura Date: Wed Jul 5 19:01:41 2023 +0300 update length of short name for products commit 4366925bc8fb7b7b0ea960fded788bb493a14001 Merge: c80eb87e 1cbd3689 Author: Brian Muhimbura Date: Tue Jul 4 20:55:57 2023 +0300 Merge pull request #31 from fiterlatam/FB-143 general manage home page commit 1cbd36890c6a04fd9037a4e862e28ae56e6f190f Author: Brian Muhimbura Date: Tue Jul 4 20:50:28 2023 +0300 general manage home page commit c80eb87e1b655de13e59c4d531f792b038524953 Merge: 0d47666f 19c76094 Author: Brian Muhimbura Date: Tue Jul 4 13:48:02 2023 +0300 Merge pull request #30 from fiterlatam/FBR-181 Remove client from blacklist commit 0d47666f60fa785bda9badd974321e92941e1fef Merge: ed9e6109 14f2fbd6 Author: Brian Muhimbura Date: Tue Jul 4 13:47:00 2023 +0300 Merge pull request #29 from fiterlatam/FB-15 Fb 15 commit 19c76094e7c8687d3139857ea32efcef386f8e68 Author: Brian Muhimbura Date: Tue Jul 4 13:38:43 2023 +0300 Remove client from blacklist commit 14f2fbd612640594368a20a134f4549f5b8af143 Author: Brian Muhimbura Date: Thu Jun 29 20:30:33 2023 +0300 Add to Blacklist View Blacklist clients commit 92e2ad96bccaa01296039dda499b392502eaa324 Merge: 1653d1ec ed9e6109 Author: Brian Muhimbura Date: Wed Jun 28 15:18:12 2023 +0300 Merge branch 'fiter/fb/dev' of https://github.com/fiterlatam/community-app-template into FB-183-DPI commit 1653d1ec82974b32db5464f59c6f008642168e53 Author: Brian Muhimbura Date: Wed Jun 28 15:17:15 2023 +0300 Blacklist changes commit ed9e61096df0cf5fc9b475399fb699335789db56 Merge: 1742019a a901cb2c Author: akapusFITER <108024337+akapusFITER@users.noreply.github.com> Date: Fri Jun 23 08:28:08 2023 -0300 Merge pull request #27 from fiterlatam/FBR-182 FBR-182 commit a901cb2c8451cdba93f0a083b947b37049bd45e7 Author: Magezi Arthur Date: Fri Jun 23 11:27:08 2023 +0300 Update CreateCenterGroupController.js commit 1742019ae6435d0b288066012a8ecc60dd7d11ff Author: fiterlatam <125285115+fiterlatam@users.noreply.github.com> Date: Wed Jun 21 18:54:44 2023 -0300 Changes for FBR-185 (#25) Co-authored-by: Leonardo Hildt commit 097cb96d172ebd8d2d774d709932f7f7d854ffdf Merge: 3d9c94cd 513399e9 Author: Brian Muhimbura Date: Wed Jun 21 23:54:18 2023 +0300 Merge pull request #24 from fiterlatam/FB-183-DPI Add dpi to customer details commit 513399e9314a9019353e92a134f9fb93c9e555ac Author: Brian Muhimbura Date: Wed Jun 21 23:52:21 2023 +0300 Add dpi to customer details commit 3d9c94cdb45b7db5796b99ce297341f3a2961fcd Merge: 8f2fe9cc 50db15ac Author: Magezi Arthur Date: Wed Jun 21 21:57:23 2023 +0300 Merge pull request #23 from fiterlatam/FBR-182 FBR-182 commit 50db15ac07aa38b9114b356b605a28e04e54dd5b Merge: 2d881830 8f2fe9cc Author: Magezi Arthur Date: Wed Jun 21 21:56:57 2023 +0300 Merge branch 'fiter/fb/dev' into FBR-182 Signed-off-by: Magezi Arthur commit 2d8818303e0611b7e60a4a73775a8ad2a2906552 Author: Magezi Arthur Date: Wed Jun 21 17:48:54 2023 +0300 FBR-182 commit 8f2fe9cc95dbd937317399611ed8375ad41942c9 Merge: 44f7195f 36e5f7e2 Author: Brian Muhimbura Date: Wed Jun 21 17:18:53 2023 +0300 Merge pull request #22 from fiterlatam/FBR-186 Fbr 186 commit 36e5f7e20e223c9cb0743abaf721eea55065019d Author: Brian Muhimbura Date: Wed Jun 21 14:48:46 2023 +0300 FBR-186 BLOCK GROUP TRANSFERS commit 44f7195f310fff2f6cf6f8bb190dc343f56efcdb Author: fiterlatam <125285115+fiterlatam@users.noreply.github.com> Date: Thu Jun 8 10:04:30 2023 -0300 Fix for FBR-175 - Error when editing a portfolio (#20) Co-authored-by: Leonardo Hildt commit 08e013f5cfb4c707183b382c1f3303d842082646 Author: fiterlatam <125285115+fiterlatam@users.noreply.github.com> Date: Wed Jun 7 17:04:44 2023 -0300 Mostrar usuario responsable (facilitador) en gestión de cartera (#19) Co-authored-by: Leonardo Hildt commit f9cf3266e22e8008513b9f141222ea138b23841a Author: fiterlatam <125285115+fiterlatam@users.noreply.github.com> Date: Fri Jun 2 19:35:10 2023 -0300 FBR-142 Asignación de responsables por estructura Fiter (#18) Co-authored-by: Leonardo Hildt commit 41818fb28468cc94475bd5411a16990d927d6d21 Author: fiterlatam <125285115+fiterlatam@users.noreply.github.com> Date: Thu Jun 1 17:56:45 2023 -0300 FBR-108 Planificación para facilitadores (#17) Co-authored-by: Leonardo Hildt commit e57337038a1ba39f9c819a95296768e26796394f Author: fiterlatam <125285115+fiterlatam@users.noreply.github.com> Date: Wed May 31 12:18:37 2023 -0300 FBR-137 Como gerente quiero mover una agencia a otra región (#16) Co-authored-by: Leonardo Hildt commit e85c381b50cc776a3f17b9a61505a07ccfc54efc Author: fiterlatam <125285115+fiterlatam@users.noreply.github.com> Date: Tue May 23 12:10:35 2023 -0300 FBR-151 Feedback Sprint 4 (#15) Co-authored-by: Leonardo Hildt commit 6673defba341f200c41f0933b3cc9f3ed8dfdcd9 Author: fiterlatam <125285115+fiterlatam@users.noreply.github.com> Date: Thu May 18 14:35:29 2023 -0300 FBR-101 Fix parameter validation (#13) Co-authored-by: Leonardo Hildt commit b545e8ac07ee207bd4300448846262ca0125a44b Author: fiterlatam <125285115+fiterlatam@users.noreply.github.com> Date: Thu May 18 10:59:40 2023 -0300 FBR-101 - Necesito trasladar grupos a otro centro (#12) Co-authored-by: Leonardo Hildt commit 8896244afbc4939f891da40a67796347465170a4 Author: fiterlatam <125285115+fiterlatam@users.noreply.github.com> Date: --- app/global-translations/locale-en.json | 80 ++++++---- app/global-translations/locale-es.json | 16 +- .../blacklist/AddToBlacklistController.js | 39 +++++ .../blacklist/BlacklistController.js | 49 ++++++ .../blacklist/RemoveBlacklistController.js | 62 ++++++++ app/scripts/mifosXComponents.js | 5 +- app/scripts/models/roleMap.js | 3 +- app/scripts/routes.js | 34 ++-- .../services/ResourceFactoryProvider.js | 18 +++ app/views/_topnavbar.html | 5 +- app/views/blacklist/addToBlacklist.html | 146 ++++++++++++++++++ app/views/blacklist/blacklist.html | 99 ++++++++++++ app/views/blacklist/removeblacklist.html | 121 +++++++++++++++ app/views/products/createloanproduct.html | 2 +- app/views/products/editloanproduct.html | 2 +- 15 files changed, 632 insertions(+), 49 deletions(-) create mode 100644 app/scripts/controllers/blacklist/AddToBlacklistController.js create mode 100644 app/scripts/controllers/blacklist/BlacklistController.js create mode 100644 app/scripts/controllers/blacklist/RemoveBlacklistController.js create mode 100644 app/views/blacklist/addToBlacklist.html create mode 100644 app/views/blacklist/blacklist.html create mode 100644 app/views/blacklist/removeblacklist.html diff --git a/app/global-translations/locale-en.json b/app/global-translations/locale-en.json index cda785adda..39b86010c3 100644 --- a/app/global-translations/locale-en.json +++ b/app/global-translations/locale-en.json @@ -241,8 +241,8 @@ "#Inputs": "..", "label.input.name": "Name", "label.input.unittype": "Unit Type", - "label.input.pcttobase": "Percentage To Base", - "label.input.baseprice": "Base Price", + "label.input.pcttobase": "Percentage To Base", + "label.input.baseprice": "Base Price", "label.input.firstname": "First name", "label.input.lastname": "Last name", "label.input.middlename": "Middle name", @@ -637,6 +637,7 @@ "label.anchor.advsearch": "Advanced search", "label.anchor.keyboardshortcut": "Keyboard Shortcuts", "label.anchor.save": "Save", + "label.anchor.removeblacklist": "Remove From Blacklist", "#Inputs": "..", "label.input.searchbyuser": "Search by user", "label.input.clienttemplate": "Client Template", @@ -660,6 +661,7 @@ "label.input.additionalinformation": "Additional information", "label.input.personalinformation": "Personal information", "label.input.changelanguage": "Change language:", + "label.input.supportingDocuments": "Supporting Documents", "#Search": "..", "label.search.scope.all": "All", "label.search.scope.clients.and.clientIdentifiers": "Clients", @@ -734,6 +736,7 @@ "label.anchor.reactivate": "Reactivate", "label.anchor.undoReject": "Undo Rejection", "label.anchor.undoWithdrawn": "Undo Withdrawal", + "label.anchor.uploadDocuments": "Upload Supporting Documents(Zip Format)", "#Inputs": "..", "label.input.filterbynameaccno": "Filter display by name/client number/staff/office", "label.input.searchByNameAccNo": "Find by name/mobile/client number/external ID/identifier", @@ -795,6 +798,7 @@ "label.button.viewactiveshares": "View Active Shares", "label.button.undoReject": "Undo Rejection", "label.button.undoWithdrawn": "Undo Withdrawal", + "label.button.showinactive": "Show Inactive Blacklist", "#Misc Labels": "..", "label.numofloancycles": "Number of loan cycle(s)", "label.lastloanamount": "Last loan amount", @@ -835,6 +839,8 @@ "error.msg.client.duplicate.externalId": "A client with external id `{{params[0].value}}` already exists.", "error.msg.client.duplicate.accountNo": "A client with account no. `{{params[0].value}}` already exists.", "error.msg.client.duplicate.dpi": "A client with dpi. `{{params[0].value}}` already exists.", + "error.msg.client.blacklisted": "This person is blacklisted. REASON: `{{params[0].value}}` ", + "error.msg.client.already.blacklisted": "A client with dpi. `{{params[0].value}}` is already blacklisted.", "error.msg.client.id.invalid": "Client does not exist.", "error.msg.client.not.active.exception": "The Client with ID `{{params[0].value}}` is not active.", "validation.msg.clientIdentifier.documentKey.cannot.be.blank": "Identification Number is mandatory.", @@ -988,6 +994,7 @@ "label.input.select.groups": "Select and add groups", "label.input.searchforgroup": "Search for a group", "label.input.searchByNameExternalId": "Search by name or external ID", + "label.input.searchByNameDpi": "Search by name or DPI", "#Misc Labels": "..", "label.selectcenter": "Select center", "label.selectclients": "Select clients", @@ -1115,6 +1122,7 @@ "label.anchor.editfinancialmapping": "Edit Financial Activity Mapping", "label.anchor.journalentries": "Journal Entries", "label.anchor.viewjournalentries": "View Journal Entries", + "label.anchor.blacklist": "Blacklist", "#Inputs": "..", "label.input.accountingrulename": "Accounting rule name", "label.input.affectedentries": "Affected entries", @@ -1156,7 +1164,14 @@ "label.input.date.of.opening.balances": "Date of opening balances", "label.input.opening.balances.contra.account": "Opening balances contra", "label.input.smsprovider": "SMS Provider", - "label.input.dpi": "D.P.I", + "label.input.dpi": "DPI", + "label.input.nit": "NIT", + "label.input.year": "Year", + "label.input.typification": "Typification", + "label.input.agencyid": "Agency ID", + "label.input.balance": "Balance", + "label.input.disbursementAmount": "Disbursement Amount", + "label.addtoblacklist": "Add To Blacklist", "#journalEntryType code ": ".............", "journalEntryType.credit": "Credit", "journalEntrytType.debit": "Debit", @@ -1513,6 +1528,7 @@ "label.anchor.unassignsavingsofficer": "Unassign Savings Officer", "label.anchor.rescheduleLoan": "Reschedule Loan", "label.anchor.reschedulerequest": "Reschedule Request", + "label.anchor.blacklistClient": "Blacklist Customer", "#Inputs": "..", "label.input.grouptotal": "Group total", "label.input.centertotal": "Center total", @@ -1581,6 +1597,12 @@ "label.input.applicationdate": "Application Date", "label.input.isTopup": "Is Topup Loan", "label.input.loanIdToClose": "Choose loan to close", + "label.input.typification": "Typification", + "blacklist.option.direct.sanitized": "direct sanitized", + "blacklist.option.indirect.sanitized": "Indirect sanitized", + "blacklist.option.deliquent": "Delinquent", + "blacklist.option.frontman": "Frontman", + "blacklist.option.returns": "Returns", "#Buttons": "..", "label.button.addloancharge": "Add Loan Charge", "label.button.addcollateral": "Add Collateral", @@ -4349,31 +4371,31 @@ "#------------------": "------------", - "#TwoFactorAuthentication": "...", + "#TwoFactorAuthentication": "...", - "#Headings": "..", - "label.heading.twofactor": "Two-Factor Authentication", - "label.heading.sms": "SMS", - "label.heading.token": "Token", + "#Headings": "..", + "label.heading.twofactor": "Two-Factor Authentication", + "label.heading.sms": "SMS", + "label.heading.token": "Token", - "#Labels": "..", - "label.otp.token": "Authentication token", - "label.button.otp.request": "Request token", - "label.button.tfa.remember_me": "Remember this computer", - "label.otp.delivery.select.sms": "Send as an SMS to {{target}}", - "label.otp.delivery.select.email": "Send via Email to {{target}}", - "label.otp.delivery.info": "Please select how you would like to receive an authentication token.", - "label.otp.verify.info": "Please enter the authentication token you received.", - "label.anchor.twofactorconfig": "Two-Factor Configuration", - "label.twofactorconfig": "Two-factor authentication configuration settings", - "label.anchor.viewtwofactorconfig":"View Two-Factor Configuration", - "label.anchor.edittwofactorconfig": "Edit Two-Factor Configuration", + "#Labels": "..", + "label.otp.token": "Authentication token", + "label.button.otp.request": "Request token", + "label.button.tfa.remember_me": "Remember this computer", + "label.otp.delivery.select.sms": "Send as an SMS to {{target}}", + "label.otp.delivery.select.email": "Send via Email to {{target}}", + "label.otp.delivery.info": "Please select how you would like to receive an authentication token.", + "label.otp.verify.info": "Please enter the authentication token you received.", + "label.anchor.twofactorconfig": "Two-Factor Configuration", + "label.twofactorconfig": "Two-factor authentication configuration settings", + "label.anchor.viewtwofactorconfig":"View Two-Factor Configuration", + "label.anchor.edittwofactorconfig": "Edit Two-Factor Configuration", - "#Error messages": "..", + "#Error messages": "..", - "error.otp.validate.invalid": "The provided authentication token is invalid", - "error.otp.validate.other": "An error occurred while trying to validate the authentication token", - "error.twofactor.config.disabled": "Two-Factor authentication is disabled or not supported on the server!", + "error.otp.validate.invalid": "The provided authentication token is invalid", + "error.otp.validate.other": "An error occurred while trying to validate the authentication token", + "error.twofactor.config.disabled": "Two-Factor authentication is disabled or not supported on the server!", "label.tooltip.reportrunfrequncy": "Report Run Frequency", "label.heading.reportrunfrequncy": "Report Run Frequency", @@ -4426,15 +4448,15 @@ "label.anchor.editrate": "Edit Rate", "label.error.rate.already.exist" : "Rate already exist.", "label.selectrate" : "Select Rate", - "label.input.street":"Street", + "label.input.street":"Street", "label.input.fixed.pricipal.percentage.per.installment" : "Fixed Principal % per instalment", "label.heading.fixed.pricipal.percentage.per.installment" : "Fixed Principal % per instalment", - "label.tooltip.fixed.pricipal.percentage.per.installment" : "Principal portion of the instalments except the last installment will be fixed to this value.", + "label.tooltip.fixed.pricipal.percentage.per.installment" : "Principal portion of the instalments except the last installment will be fixed to this value.", "label.input.fixed.pricipal.percentage.per.installment" : "Fixed Principal % per instalment", "label.heading.fixed.pricipal.percentage.per.installment" : "Fixed Principal % per instalment", - "label.tooltip.fixed.pricipal.percentage.per.installment" : "Principal portion of the instalments except the last installment will be fixed to this value.", + "label.tooltip.fixed.pricipal.percentage.per.installment" : "Principal portion of the instalments except the last installment will be fixed to this value.", "label.input.change.fixed.principal.percentage.per.installment" : "Change Fixed Principal % per instalment", "label.input.new.fixed.principal.percentage.per.installment" : "New Fixed Principal % per instalment", "label.cupo": "Cupo", @@ -4482,7 +4504,7 @@ "label.heading.isDocument" : "Doc.", "label.anchor.managemanagecauses" : "Causales", "label.anchor.addcause" : "Add cause", - "label.heading.addcause" : "Add cause", + "label.heading.addcause" : "Add cause", "label.button.createcause" : "Create cause", "label.input.searchByCodeDesc" : "Search by Code or Desc", "label.heading.cause" : "Cause", @@ -4490,7 +4512,7 @@ "label.input.allowOverdraft" : "Allow overdraft", "label.input.isCashOperation" : "Is cash operation", "label.input.operationType" : "Operation type", - "label.input.sendAcrm" : "Send to CRM", + "label.input.sendAcrm" : "Send to CRM", "label.input.shortDescription" : "Short description", "label.input.isDocument" : "Is doc", "label.heading.editcause" : "Edit Cause", diff --git a/app/global-translations/locale-es.json b/app/global-translations/locale-es.json index a4747889cc..5c1e898280 100644 --- a/app/global-translations/locale-es.json +++ b/app/global-translations/locale-es.json @@ -615,7 +615,10 @@ "label.input.searchactivities": "Búsqueda de actividades", "label.input.additionalinformation": "Información adicional", "label.input.changelanguage": "Cambiar el idioma:", - "label.input.dpi": "D.P.I", + "label.input.dpi": "DPI", + "label.input.nit": "NIT", + "label.input.searchByNameDpi": "Buscar por nombre o DPI", + "label.addtoblacklist": "Agregar Persona", "label.search.scope.all": "Todo", "label.search.scope.clients.and.clientIdentifiers": "Clientes", "label.search.scope.groups.and.centers": "Grupos", @@ -681,6 +684,8 @@ "label.anchor.reactivate": "Reactivar", "label.anchor.undoReject": "Deshacer Rechazo", "label.anchor.undoWithdrawn": "Deshacer Retiro", + "label.anchor.blacklistClient": "Cliente de la lista negra", + "label.anchor.blacklist": "lista negra", "label.input.filterbynameaccno": "Filtrar lo que se muestra por nombre/cliente/personal/oficina", "label.input.searchByNameAccNo": "Buscar por nombre/móvil/cliente/id. externo/identificador", "label.input.selectclientimage": "Seleccionar imagen del cliente", @@ -696,6 +701,7 @@ "label.input.reactivationdate": "Fecha de reactivación", "label.input.withdrawaldate": "Fecha de retiro", "label.input.withdrawalreason": "Razón de retiro", + "label.input.reasons": "Razón", "label.input.clientName": "Nombre del cliente", "label.input.clientId": "Id. del cliente", "label.input.reopeneddate": "ReAbrir Fecha", @@ -770,6 +776,7 @@ "error.msg.client.duplicate.externalId": "Un cliente con ID externa `{{params[0].value}}` ya existe.", "error.msg.client.duplicate.accountNo": "Ya existe un cliente con el número de cuenta `{{params[0].value}}`.", "error.msg.client.duplicate.dpi": "Un cliente con dpi. `{{params[0].value}}` ya existe.", + "error.msg.client.blacklisted": "Esta persona esta en la lista negra. MOTIVO: `{{params[0].value}}` ", "error.msg.client.id.invalid": "El cliente no existe.", "error.msg.client.not.active.exception": "El Cliente con el ID `{{params[0].value}}` no está activo.", "validation.msg.clientIdentifier.documentKey.cannot.be.blank": "El n.º de identificación es obligatorio.", @@ -846,6 +853,7 @@ "label.input.revisedmeetingdates": "Fechas de reuniones revisadas", "label.input.error": "Error", "label.input.invaliddaterange": "Selecciona un intervalo de fechas válido", + "label.input.agencyid": "identificador de agencia", "label.button.creategroup": "Crear grupo", "label.button.groupsavingapplication": "Grupo de solicitud de ahorro", "label.button.grouploanapplication": "Grupo de solicitud de préstamo", @@ -1020,6 +1028,7 @@ "label.anchor.editfinancialmapping": "Editar mapeo de actividad financiera", "label.anchor.journalentries": "Entradas de Diario", "label.anchor.viewjournalentries": "Ver Entradas de Diario", + "label.anchor.removeblacklist": "Eliminar de la lista negra", "label.input.accountingrulename": "Nombre de la regla de contabilidad", "label.input.affectedentries": "Entradas afectadas", "label.input.accountingrules": "Normas de contabilidad", @@ -1059,6 +1068,7 @@ "label.input.date.of.opening.balances": "Fecha de saldos de apertura", "label.input.opening.balances.contra.account": "Saldos de apertura de contra", "label.input.smsprovider": "Proveedor de SMS", + "label.input.supportingDocuments": "Documentos de respaldo", "journalEntryType.credit": "Crédito", "journalEntrytType.debit": "Débito", "label.button.addfamilymember": "Añadir miembro de la familia", @@ -1391,6 +1401,7 @@ "label.anchor.unassignsavingsofficer": "Desasignar agente de ahorros", "label.anchor.rescheduleLoan": "Reprogramar Préstamo", "label.anchor.reschedulerequest": "Reschedule Petición", + "label.anchor.uploadDocuments": "Subir documentos de respaldo (formato zip)", "label.input.grouptotal": "Grupo total", "label.input.centertotal": "Centro total", "label.input.charge": "Cargo", @@ -1480,6 +1491,7 @@ "label.button.reschedule": "Reprogramar", "label.button.recreate": "Recrear", "label.button.foreclosure": "Foreclosure", + "label.button.showinactive": "Mostrar lista negra inactiva", "label.selectpurpose": "Seleccione propósito", "label.selectloanproduct": "Seleccione producto de préstamo", "label.selectsavingsofficer": "Seleccionar agente de ahorros", @@ -2935,6 +2947,8 @@ "label.input.principal": "Principal", "label.input.principalamount": "Monto principal", "label.input.totalinstallmentamount": "Monto de importe", + "label.input.disbursementAmount": "monto del desembolso", + "label.input.balance": "Saldo Saneado", "label.input.minimum": "Mínimo", "label.input.maximum": "Máximo", "label.input.default": "Predeterminado", diff --git a/app/scripts/controllers/blacklist/AddToBlacklistController.js b/app/scripts/controllers/blacklist/AddToBlacklistController.js new file mode 100644 index 0000000000..fc8c945f94 --- /dev/null +++ b/app/scripts/controllers/blacklist/AddToBlacklistController.js @@ -0,0 +1,39 @@ +(function (module) { + mifosX.controllers = _.extend(module, { + AddToBlacklistController: function (scope, routeParams, route, location, resourceFactory, http, $uibModal, API_VERSION, $timeout, $rootScope, Upload) { + scope.client = null; + scope.dpi = null; + scope.typificationOptions = []; + scope.loanProductOptions = []; + + scope.formData={}; + + + resourceFactory.blacklistTemplateResource.get(function (data) { + scope.typificationOptions= data.typificationOptions + scope.loanProductOptions= data.loanProducts + }); + + + + scope.submit=function (){ + this.formData.locale = scope.optlang.code; + + resourceFactory.blacklistResource.save(this.formData, function (data) { + location.path('blacklist/'+data.resourceId+'/viewdetails' ); + }); + } + + // scope.routeTo = async ()=>{ + // await setTimeout(function (){ + // location.path('/blacklist' ); + // },3000); + // } + + } + }); + + mifosX.ng.application.controller('AddToBlacklistController', ['$scope', '$routeParams', '$route', '$location', 'ResourceFactory', '$http', '$uibModal', 'API_VERSION', '$timeout', '$rootScope', 'Upload', mifosX.controllers.AddToBlacklistController]).run(function ($log) { + $log.info("AddToBlacklistController initialized"); + }); +}(mifosX.controllers || {})); diff --git a/app/scripts/controllers/blacklist/BlacklistController.js b/app/scripts/controllers/blacklist/BlacklistController.js new file mode 100644 index 0000000000..785a9c70dc --- /dev/null +++ b/app/scripts/controllers/blacklist/BlacklistController.js @@ -0,0 +1,49 @@ +(function (module) { + mifosX.controllers = _.extend(module, { + BlacklistController: function (scope, routeParams, route, location, resourceFactory, http, $uibModal, API_VERSION, $timeout, $rootScope, Upload) { + scope.blacklist = []; + scope.actualBlacklist = []; + scope.showInactive = false; + + scope.formData={}; + scope.searchText; + scope.clientsPerPage=20; + + scope.getResultsPage = function (pageNumber) { + var items = resourceFactory.blacklistResource.getAllBlacklistClients({ + offset: ((pageNumber - 1) * scope.clientsPerPage), + limit: scope.clientsPerPage, + searchText:scope.searchText + }, function (data) { + scope.totalClients = data.totalFilteredRecords; + scope.blacklist = data.pageItems; + }); + } + + // resourceFactory.blacklistResource.getAllBlacklistClients({ + // offset: 0, + // limit: scope.clientsPerPage, + // status: scope.showInactive? 'INACTIVE' : 'ACTIVE', + // searchText:scope.searchText + // }, function (data) { + // scope.totalClients = data.totalFilteredRecords; + // scope.blacklist = data.pageItems; + // }); + + scope.routeTo = function (path) { + location.path(path); + } + + scope.getActiveInactive = function () { + scope.showInactive = !scope.showInactive; + scope.getResultsPage(1); + } + + } + + }); + + mifosX.ng.application.controller('BlacklistController', ['$scope', '$routeParams', '$route', '$location', 'ResourceFactory', '$http', '$uibModal', 'API_VERSION', '$timeout', '$rootScope', 'Upload', mifosX.controllers.BlacklistController]).run(function ($log) { + $log.info("BlacklistController initialized"); + }); +}(mifosX.controllers || {})); diff --git a/app/scripts/controllers/blacklist/RemoveBlacklistController.js b/app/scripts/controllers/blacklist/RemoveBlacklistController.js new file mode 100644 index 0000000000..6c7c4dbb2e --- /dev/null +++ b/app/scripts/controllers/blacklist/RemoveBlacklistController.js @@ -0,0 +1,62 @@ +(function (module) { + mifosX.controllers = _.extend(module, { + RemoveBlacklistController: function (scope, routeParams, route, location, resourceFactory, http, $uibModal, API_VERSION, $timeout, $rootScope, Upload) { + scope.client = null; + scope.dpi = null; + scope.typificationOptions = []; + scope.loanProductOptions = []; + scope.blacklistDocuments = []; + scope.action = routeParams.action; + + scope.formData={}; + + + resourceFactory.blacklistResource.getOne({blacklistId: routeParams.blacklistId}, function (data) { + scope.client = data; + }); + + resourceFactory.blacklistDocumentsResource.getAllDocuments({blacklistId: routeParams.blacklistId}, function (data) { + for (var l in data) { + + var bldocs = {}; + bldocs = API_VERSION + '/' + data[l].parentEntityType + '/' + data[l].parentEntityId + '/documents/' + data[l].id + '/attachment?tenantIdentifier=' + $rootScope.tenantIdentifier; + data[l].docUrl = bldocs; + if (data[l].fileName) + if (data[l].fileName.toLowerCase().indexOf('.jpg') != -1 || data[l].fileName.toLowerCase().indexOf('.jpeg') != -1 || data[l].fileName.toLowerCase().indexOf('.png') != -1) + data[l].fileIsImage = true; + if (data[l].type) + if (data[l].type.toLowerCase().indexOf('image') != -1) + data[l].fileIsImage = true; + } + scope.blacklistDocuments = data; + }); + + scope.submit = function () { + Upload.upload({ + url: $rootScope.hostUrl + API_VERSION + '/blacklist/' + routeParams.blacklistId+ '/removeblacklist', + data: { name : scope.client.clientName, description : scope.formData.description, file: scope.formData.file}, + }).then(function (data) { + // to fix IE not refreshing the model + if (!scope.$$phase) { + scope.$apply(); + } + location.path('/blacklist'); + }); + }; + scope.routeTo = async ()=>{ + await setTimeout(function (){ + location.path('/blacklist' ); + },3000); + } + + scope.onFileSelect = function (files) { + scope.formData.file = files[0]; + }; + + } + }); + + mifosX.ng.application.controller('RemoveBlacklistController', ['$scope', '$routeParams', '$route', '$location', 'ResourceFactory', '$http', '$uibModal', 'API_VERSION', '$timeout', '$rootScope', 'Upload', mifosX.controllers.RemoveBlacklistController]).run(function ($log) { + $log.info("RemoveBlacklistController initialized"); + }); +}(mifosX.controllers || {})); diff --git a/app/scripts/mifosXComponents.js b/app/scripts/mifosXComponents.js index 0a7ca680dd..677a7915f0 100755 --- a/app/scripts/mifosXComponents.js +++ b/app/scripts/mifosXComponents.js @@ -384,7 +384,10 @@ define(['Q', 'underscore', 'mifosX'], function (Q) { 'cupo/CreateCupoController', 'cupo/ViewCupoController', 'cupo/EditCupoController', - 'client/ViewGroupCupoController' + 'client/ViewGroupCupoController', + 'blacklist/AddToBlacklistController', + 'blacklist/BlacklistController', + 'blacklist/RemoveBlacklistController' ], filters: [ 'StatusLookup', diff --git a/app/scripts/models/roleMap.js b/app/scripts/models/roleMap.js index 142c41836c..52cab1bc38 100644 --- a/app/scripts/models/roleMap.js +++ b/app/scripts/models/roleMap.js @@ -3,7 +3,8 @@ roleMap: { 1: "superuser", 2: "branchmanager", - 3: "funder" + 3: "default", + 4: "regional" } }); }(mifosX.models || {})); diff --git a/app/scripts/routes.js b/app/scripts/routes.js index 6752ed0a99..6a78c63291 100755 --- a/app/scripts/routes.js +++ b/app/scripts/routes.js @@ -996,13 +996,13 @@ templateUrl: 'views/clients/addfamilymembers.html' }) .when('/bulkimportoffices', { - templateUrl: 'views/organization/bulkimport/bulkimportoffices.html' - }) - .when('/bulkimportclients', { - templateUrl: 'views/organization/bulkimport/bulkimportclients.html' - }) + templateUrl: 'views/organization/bulkimport/bulkimportoffices.html' + }) + .when('/bulkimportclients', { + templateUrl: 'views/organization/bulkimport/bulkimportclients.html' + }) .when('/bulkimportloanaccounts', { - templateUrl: 'views/organization/bulkimport/bulkimportloanaccounts.html' + templateUrl: 'views/organization/bulkimport/bulkimportloanaccounts.html' }) .when('/bulkimportloanrepayments', { templateUrl: 'views/organization/bulkimport/bulkimportloanrepayments.html' @@ -1052,7 +1052,7 @@ .when('/bulkimport', { templateUrl: 'views/organization/bulkimport/bulkimport.html' }) - .when('/adhocquery/', { + .when('/adhocquery/', { templateUrl: 'views/adhocquery/adhocquerylists.html' }) .when('/createadhocquery/', { @@ -1070,8 +1070,8 @@ .when('/externalservicesCB/CreditBureau', { templateUrl: 'views/administration/CreditBureauSummary.html' }) - .when('/externalservicesCB/CreditBureau/addcb', { - templateUrl: 'views/administration/addNewCreditBureau.html' + .when('/externalservicesCB/CreditBureau/addcb', { + templateUrl: 'views/administration/addNewCreditBureau.html' }) .when('/externalservicesCB/CreditBureau/configuration', { templateUrl: 'views/administration/CreditBureauConfiguration.html' @@ -1111,16 +1111,16 @@ }) .when('/clients/cupo/:clientId', { templateUrl: 'views/cupo/viewclientcupo.html' - }) + }) .when('/createcupo/:entityName/:entityId', { templateUrl: 'views/cupo/createcupo.html' - }) + }) .when('/viewcupo/:cupoId', { templateUrl: 'views/cupo/viewcupo.html' - }) + }) .when('/editcupo/:cupoId', { templateUrl: 'views/cupo/editcupo.html' - }) + }) .when('/groups/cupo/:groupId', { templateUrl: 'views/cupo/viewgroupcupo.html' }) @@ -1195,7 +1195,13 @@ }) .when('/transferagency/:id', { templateUrl: 'views/organization/transferagency.html' - }); + }).when('/blacklist', { + templateUrl: 'views/blacklist/blacklist.html' + }).when('/blacklist/:blacklistId/:action', { + templateUrl: 'views/blacklist/removeblacklist.html' + }).when('/blacklist/createblacklist', { + templateUrl: 'views/blacklist/addToBlacklist.html' + }); $locationProvider.hashPrefix(''); $locationProvider.html5Mode(false); }; diff --git a/app/scripts/services/ResourceFactoryProvider.js b/app/scripts/services/ResourceFactoryProvider.js index c277333cf2..777d4467c8 100755 --- a/app/scripts/services/ResourceFactoryProvider.js +++ b/app/scripts/services/ResourceFactoryProvider.js @@ -50,6 +50,9 @@ officeChildrenByUserResource: defineResource(apiVer + "/offices/user", {}, { get: {method: 'GET', params: {}, isArray: true} }), + officeChildrenByUserResource: defineResource(apiVer + "/offices/user", {}, { + get: {method: 'GET', params: {}, isArray: true} + }), importResource: defineResource(apiVer + "/imports", {}, { getImports: {method: 'GET', params: {}, isArray: true} }), @@ -61,6 +64,21 @@ update: { method: 'PUT'}, retrieveTransferDate: { method: 'GET', params:{}, isArray: true} }), + + blacklistResource: defineResource(apiVer + "/blacklist/:clientId/:blacklistId", {clientId: '@clientId', status: '@status'}, { + getOne: {method: 'GET', params: {blacklistId: '@blacklistId'}}, + getAllBlacklistClients: {method: 'GET', params: {limit: 1000, status: '@status'}}, + save: { method: 'POST'}, + update: { method: 'PUT'} + }), + + blacklistDocumentsResource: defineResource(apiVer + "/blacklist/:blacklistId/documents/:documentId", {blacklistId: '@blacklistId', documentId: '@documentId'}, { + getAllDocuments: {method: 'GET', params: {}, isArray: true} + }), + + blacklistTemplateResource: defineResource(apiVer + "/blacklist/template/:clientId", {clientId: '@clientId'}, { + get: {method: 'GET', params: {}}, + }), clientChargesResource: defineResource(apiVer + "/clients/:clientId/charges/:resourceType", {clientId: '@clientId', resourceType: '@resourceType'}, { getCharges: {method: 'GET'}, waive:{method:'POST' , params:{command : 'waive'}} diff --git a/app/views/_topnavbar.html b/app/views/_topnavbar.html index 889ed9be7b..e14887826a 100644 --- a/app/views/_topnavbar.html +++ b/app/views/_topnavbar.html @@ -25,10 +25,13 @@
  • {{ notification.content }} - \ No newline at end of file + diff --git a/app/views/blacklist/addToBlacklist.html b/app/views/blacklist/addToBlacklist.html new file mode 100644 index 0000000000..a531f5fba0 --- /dev/null +++ b/app/views/blacklist/addToBlacklist.html @@ -0,0 +1,146 @@ +
    + +
    + +
    + {{'label.anchor.blacklistClient' | translate}} + +
    + + +
    + +
    +
    + +
    +
    + +
    + + +
    + +
    +
    + +
    +
    + +
    + + +
    + +
    +
    +
    +
    + +
    + + +
    + +
    +
    + +
    +
    + +
    + + +
    + +
    +
    + +
    +
    + +
    + + +
    + +
    +
    + +
    +
    + +
    + + +
    + +
    +
    + +
    +
    + +
    + + +
    + +
    +
    + +
    +
    + +
    + + +
    + +
    +
    + +
    +
    + + +
    + + +
    + +
    +
    + +
    + + + + +
    +
    +
    +
    diff --git a/app/views/blacklist/blacklist.html b/app/views/blacklist/blacklist.html new file mode 100644 index 0000000000..a4e7f3fd27 --- /dev/null +++ b/app/views/blacklist/blacklist.html @@ -0,0 +1,99 @@ +
    + + + +
    +
    +

    Blacklisted Clients

    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + + +
    +
    +
    +
    +
    + +
    + + + + + + +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    {{'label.heading.name' | translate}}{{'label.input.dpi' | translate}}{{'label.input.nit' | translate}}{{'label.input.typification' | translate}}{{'label.input.status' | translate}}{{'label.input.product' | translate}}{{'label.input.year' | translate}}{{'label.input.agencyId' | translate}}{{'label.input.balance' | translate}}{{'label.input.disbursementAmount' | translate}}{{'label.heading.action' | translate}}
    {{client.clientName}}{{client.dpi}}{{client.nit}}{{client.typification.description|translate}}{{client.status}} + {{client.productCode}}{{client.year}}{{client.agencyId}}{{client.balance |number}}{{client.disbursementAmount |number}} + + + + +
    + + + +
    +
    + + +
    diff --git a/app/views/blacklist/removeblacklist.html b/app/views/blacklist/removeblacklist.html new file mode 100644 index 0000000000..9b58ac7d20 --- /dev/null +++ b/app/views/blacklist/removeblacklist.html @@ -0,0 +1,121 @@ +
    + + +
    + + +
    +

    Details

    +
    +
    +
    +
    +
    + {{'label.input.clientName'| translate}}{{client.clientName}} +
    +
    + {{'label.input.dpi'|translate}}{{client.dpi}} +
    +
    + {{'label.input.nit'|translate}}{{client.nit}} +
    +
    + {{'label.input.product'| translate}}{{client.productCode}} +
    +
    + {{'label.input.description'|translate}}{{client.description}} +
    + +
    +
    +
    + {{'label.input.reasons'| translate}}{{client.typification.description|translate}} +
    +
    + {{'label.input.agencyid'|translate}}{{client.agencyId}} +
    +
    + {{'label.input.disbursementAmount'|translate}}{{client.disbursementAmount}} +
    +
    + {{'label.input.balance'| translate}}{{client.balance}} +
    +
    +
    + +
    + + + + + + + + + + + + + + + + + +
    {{'label.heading.name' | translate}}{{'label.heading.description' | translate}}{{'label.heading.filename' | translate}}{{'label.heading.actions' | translate}}
    {{document.name}}{{document.description}}{{document.fileName}} +   + + +
    +
    + +
    + +
    + {{'label.anchor.uploadDocuments' | translate}} + +
    + + +
    + +
    +
    + +
    +
    + + +
    + + +
    + +
    +
    + +
    + + + + +
    + +
    +
    +
    +
    + + +
    diff --git a/app/views/products/createloanproduct.html b/app/views/products/createloanproduct.html index 0c86d612b2..cb05531956 100755 --- a/app/views/products/createloanproduct.html +++ b/app/views/products/createloanproduct.html @@ -35,7 +35,7 @@
    + class="form-control" maxlength="8" required late-validate/>
    diff --git a/app/views/products/editloanproduct.html b/app/views/products/editloanproduct.html index c100540af7..aad2d336de 100755 --- a/app/views/products/editloanproduct.html +++ b/app/views/products/editloanproduct.html @@ -26,7 +26,7 @@

    {{ 'label.heading.details' | translate }}

    + class="form-control" maxlength="8" required late-validate/>