Skip to content

Commit

Permalink
Squashed commit of the following: (#36)
Browse files Browse the repository at this point in the history
commit d82bd48
Merge: 06e3f03 e127ded
Author: Brian Muhimbura <[email protected]>
Date:   Fri Jul 7 16:10:03 2023 +0300

    Merge pull request #34 from fiterlatam/BLACKLIST-CHANGES

    Blacklist changes

commit e127ded
Author: Brian Muhimbura <[email protected]>
Date:   Fri Jul 7 16:06:00 2023 +0300

    Blacklist changes

commit 06e3f03
Merge: f894980 96725a4
Author: Brian Muhimbura <[email protected]>
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 96725a4
Author: Brian Muhimbura <[email protected]>
Date:   Thu Jul 6 10:56:27 2023 +0300

    Blacklist Changes. FBR-211-212-213-214-215

commit f894980
Merge: 4366925 c6e81da
Author: Brian Muhimbura <[email protected]>
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 c6e81da
Author: Brian Muhimbura <[email protected]>
Date:   Wed Jul 5 19:01:41 2023 +0300

    update length of short name for products

commit 4366925
Merge: c80eb87 1cbd368
Author: Brian Muhimbura <[email protected]>
Date:   Tue Jul 4 20:55:57 2023 +0300

    Merge pull request #31 from fiterlatam/FB-143

    general manage home page

commit 1cbd368
Author: Brian Muhimbura <[email protected]>
Date:   Tue Jul 4 20:50:28 2023 +0300

    general manage home page

commit c80eb87
Merge: 0d47666 19c7609
Author: Brian Muhimbura <[email protected]>
Date:   Tue Jul 4 13:48:02 2023 +0300

    Merge pull request #30 from fiterlatam/FBR-181

    Remove client from blacklist

commit 0d47666
Merge: ed9e610 14f2fbd
Author: Brian Muhimbura <[email protected]>
Date:   Tue Jul 4 13:47:00 2023 +0300

    Merge pull request #29 from fiterlatam/FB-15

    Fb 15

commit 19c7609
Author: Brian Muhimbura <[email protected]>
Date:   Tue Jul 4 13:38:43 2023 +0300

    Remove client from blacklist

commit 14f2fbd
Author: Brian Muhimbura <[email protected]>
Date:   Thu Jun 29 20:30:33 2023 +0300

    Add to Blacklist
    View Blacklist clients

commit 92e2ad9
Merge: 1653d1e ed9e610
Author: Brian Muhimbura <[email protected]>
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 1653d1e
Author: Brian Muhimbura <[email protected]>
Date:   Wed Jun 28 15:17:15 2023 +0300

    Blacklist changes

commit ed9e610
Merge: 1742019 a901cb2
Author: akapusFITER <[email protected]>
Date:   Fri Jun 23 08:28:08 2023 -0300

    Merge pull request #27 from fiterlatam/FBR-182

    FBR-182

commit a901cb2
Author: Magezi Arthur <[email protected]>
Date:   Fri Jun 23 11:27:08 2023 +0300

    Update CreateCenterGroupController.js

commit 1742019
Author: fiterlatam <[email protected]>
Date:   Wed Jun 21 18:54:44 2023 -0300

    Changes for FBR-185 (#25)

    Co-authored-by: Leonardo Hildt <[email protected]>

commit 097cb96
Merge: 3d9c94c 513399e
Author: Brian Muhimbura <[email protected]>
Date:   Wed Jun 21 23:54:18 2023 +0300

    Merge pull request #24 from fiterlatam/FB-183-DPI

    Add dpi to customer details

commit 513399e
Author: Brian Muhimbura <[email protected]>
Date:   Wed Jun 21 23:52:21 2023 +0300

    Add dpi to customer details

commit 3d9c94c
Merge: 8f2fe9c 50db15a
Author: Magezi Arthur <[email protected]>
Date:   Wed Jun 21 21:57:23 2023 +0300

    Merge pull request #23 from fiterlatam/FBR-182

    FBR-182

commit 50db15a
Merge: 2d88183 8f2fe9c
Author: Magezi Arthur <[email protected]>
Date:   Wed Jun 21 21:56:57 2023 +0300

    Merge branch 'fiter/fb/dev' into FBR-182

    Signed-off-by: Magezi Arthur <[email protected]>

commit 2d88183
Author: Magezi Arthur <[email protected]>
Date:   Wed Jun 21 17:48:54 2023 +0300

    FBR-182

commit 8f2fe9c
Merge: 44f7195 36e5f7e
Author: Brian Muhimbura <[email protected]>
Date:   Wed Jun 21 17:18:53 2023 +0300

    Merge pull request #22 from fiterlatam/FBR-186

    Fbr 186

commit 36e5f7e
Author: Brian Muhimbura <[email protected]>
Date:   Wed Jun 21 14:48:46 2023 +0300

    FBR-186
    BLOCK GROUP TRANSFERS

commit 44f7195
Author: fiterlatam <[email protected]>
Date:   Thu Jun 8 10:04:30 2023 -0300

    Fix for FBR-175 - Error when editing a portfolio (#20)

    Co-authored-by: Leonardo Hildt <[email protected]>

commit 08e013f
Author: fiterlatam <[email protected]>
Date:   Wed Jun 7 17:04:44 2023 -0300

    Mostrar usuario responsable (facilitador) en gestión de cartera (#19)

    Co-authored-by: Leonardo Hildt <[email protected]>

commit f9cf326
Author: fiterlatam <[email protected]>
Date:   Fri Jun 2 19:35:10 2023 -0300

    FBR-142 Asignación de responsables por estructura Fiter (#18)

    Co-authored-by: Leonardo Hildt <[email protected]>

commit 41818fb
Author: fiterlatam <[email protected]>
Date:   Thu Jun 1 17:56:45 2023 -0300

    FBR-108 Planificación para facilitadores (#17)

    Co-authored-by: Leonardo Hildt <[email protected]>

commit e573370
Author: fiterlatam <[email protected]>
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 <[email protected]>

commit e85c381
Author: fiterlatam <[email protected]>
Date:   Tue May 23 12:10:35 2023 -0300

    FBR-151 Feedback Sprint 4 (#15)

    Co-authored-by: Leonardo Hildt <[email protected]>

commit 6673def
Author: fiterlatam <[email protected]>
Date:   Thu May 18 14:35:29 2023 -0300

    FBR-101 Fix parameter validation (#13)

    Co-authored-by: Leonardo Hildt <[email protected]>

commit b545e8a
Author: fiterlatam <[email protected]>
Date:   Thu May 18 10:59:40 2023 -0300

    FBR-101 - Necesito trasladar grupos a otro centro (#12)

    Co-authored-by: Leonardo Hildt <[email protected]>

commit 8896244
Author: fiterlatam <[email protected]>
Date:
  • Loading branch information
leonardohildt authored Jul 10, 2023
1 parent 2e0ba6f commit ea16746
Show file tree
Hide file tree
Showing 15 changed files with 632 additions and 49 deletions.
80 changes: 51 additions & 29 deletions app/global-translations/locale-en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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.",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -4482,15 +4504,15 @@
"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",
"label.input.codigoAcrm" : "Cod.",
"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",
Expand Down
16 changes: 15 additions & 1 deletion app/global-translations/locale-es.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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.",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
39 changes: 39 additions & 0 deletions app/scripts/controllers/blacklist/AddToBlacklistController.js
Original file line number Diff line number Diff line change
@@ -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 || {}));
49 changes: 49 additions & 0 deletions app/scripts/controllers/blacklist/BlacklistController.js
Original file line number Diff line number Diff line change
@@ -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 || {}));
Loading

0 comments on commit ea16746

Please sign in to comment.