forked from FITER1/community-app-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
513399e
commit 1653d1e
Showing
9 changed files
with
303 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
app/scripts/controllers/blacklist/AddToBlacklistController.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
(function (module) { | ||
mifosX.controllers = _.extend(module, { | ||
AddToBlacklistController: function (scope, routeParams, route, location, resourceFactory, http, $uibModal, API_VERSION, $timeout, $rootScope, Upload) { | ||
scope.client = null; | ||
scope.typificationOptions = []; | ||
scope.loanProductOptions = []; | ||
|
||
scope.formData={}; | ||
|
||
|
||
resourceFactory.blacklistTemplateResource.get({clientId: routeParams.clientId}, function (data) { | ||
scope.client = data; | ||
scope.formData['dpiNumber'] = data.dpi | ||
scope.formData['clientName'] = data.clientName | ||
scope.typificationOptions= data.typificationOptions | ||
scope.loanProductOptions= data.loanProducts | ||
}); | ||
|
||
|
||
|
||
scope.submit=function (){ | ||
this.formData.locale = scope.optlang.code; | ||
|
||
resourceFactory.blacklistResource.save({clientId: routeParams.clientId}, this.formData, function (data) { | ||
location.path('/viewclient/' + routeParams.clientId ); | ||
}); | ||
} | ||
|
||
} | ||
}); | ||
|
||
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 || {})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
<div class="content-container" ng-controller="AddToBlacklistController"> | ||
<ul class="breadcrumb"> | ||
<li><a href="#/clients">{{'label.anchor.clients' | translate}}</a></li> | ||
<li><a href="#/viewclient/{{clientId}}">{{'label.anchor.viewclient' | translate}}</a></li> | ||
<li class="active">{{'label.anchor.blacklistClient' | translate}}</li> | ||
</ul> | ||
<form name="blacklistForm" novalidate="" class="card form-horizontal well" rc-submit="submit()"> | ||
<api-validate></api-validate> | ||
<fieldset> | ||
<legend>{{'label.anchor.blacklistClient' | translate}}</legend> | ||
|
||
<div class="form-group"> | ||
<label class="control-label col-sm-2" for="clientName">{{'label.input.clientName' | translate}}<span | ||
class="required">*</span></label> | ||
|
||
<div class="col-sm-3"> | ||
<input id="clientName" type="text" name="clientName" ng-model="formData.clientName" disabled | ||
required="required" class="form-control" required late-Validate/> | ||
</div> | ||
<div class="col-sm-3"> | ||
<form-validate valattributeform="clientidentifierform" valattribute="dpi"/> | ||
</div> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label class="control-label col-sm-2" for="dpiNum">{{'label.input.dpi' | translate}}<span | ||
class="required">*</span></label> | ||
|
||
<div class="col-sm-3"> | ||
<input id="dpiNum" type="text" name="dpi" ng-model="formData.dpiNumber" disabled | ||
required="required" class="form-control" required late-Validate/> | ||
</div> | ||
<div class="col-sm-3"> | ||
<form-validate valattributeform="clientidentifierform" valattribute="dpi"/> | ||
</div> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label class="control-label col-sm-2" for="dpiNum">{{'label.input.nit' | translate}}</label> | ||
|
||
<div class="col-sm-3"> | ||
<input id="nit" type="text" name="nit" ng-model="formData.nit" | ||
class="form-control" required late-Validate/> | ||
</div> | ||
<div class="col-sm-3"> | ||
<form-validate valattributeform="clientidentifierform" valattribute="nit"/> | ||
</div> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label class="control-label col-sm-2" for="typfcn">{{'label.input.typification' | translate}}<span | ||
class="required">*</span></label> | ||
|
||
<div class="col-sm-3"> | ||
<select id="typfcn" ng-model="formData.typification" | ||
ng-options="typification.id as typification.name |translate for typification in typificationOptions" | ||
value="{{typification.id}}" required="required" class="form-control"> | ||
</select> | ||
</div> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label class="control-label col-sm-2" for="loanProd">{{'label.input.loanProduct' | translate}}<span | ||
class="required">*</span></label> | ||
|
||
<div class="col-sm-3"> | ||
<select id="loanProd" ng-model="formData.loanProduct" | ||
ng-options="product.id as product.name |translate for product in loanProductOptions" | ||
value="{{product.id}}" required="required" class="form-control"> | ||
</select> | ||
</div> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label class="control-label col-sm-2" for="agency">{{'label.input.agencyid' | translate}}<span | ||
class="required">*</span></label> | ||
|
||
<div class="col-sm-3"> | ||
<input id="agency" type="text" name="agency" ng-model="formData.agencyId" | ||
required="required" class="form-control" late-Validate/> | ||
</div> | ||
<div class="col-sm-3"> | ||
<form-validate valattributeform="clientidentifierform" valattribute="agency"/> | ||
</div> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label class="control-label col-sm-2" for="balance">{{'label.input.balance' | translate}}<span | ||
class="required">*</span></label> | ||
|
||
<div class="col-sm-3"> | ||
<input id="balance" type="number" name="balance" ng-model="formData.balance" | ||
required="required" class="form-control" late-Validate/> | ||
</div> | ||
<div class="col-sm-3"> | ||
<form-validate valattributeform="clientidentifierform" valattribute="balance"/> | ||
</div> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label class="control-label col-sm-2" for="disbursement">{{'label.input.disbursementAmount' | translate}}<span | ||
class="required">*</span></label> | ||
|
||
<div class="col-sm-3"> | ||
<input id="disbursement" type="number" name="disbursement" ng-model="formData.disbursementAmount" | ||
required="required" class="form-control" late-Validate/> | ||
</div> | ||
<div class="col-sm-3"> | ||
<form-validate valattributeform="clientidentifierform" valattribute="disbursement"/> | ||
</div> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label class="control-label col-sm-2" for="year">{{'label.input.year' | translate}}<span | ||
class="required">*</span></label> | ||
|
||
<div class="col-sm-3"> | ||
<input id="year" type="number" name="year" ng-model="formData.year" | ||
required="required" class="form-control" late-Validate/> | ||
</div> | ||
<div class="col-sm-3"> | ||
<form-validate valattributeform="clientidentifierform" valattribute="year"/> | ||
</div> | ||
</div> | ||
|
||
|
||
<div class="form-group"> | ||
<label class="control-label col-sm-2" for="description">{{'label.input.description' | translate}}</label> | ||
|
||
<div class="col-sm-3"> | ||
<textarea id="description" rows="2" ng-model="formData.description" class="form-control"></textarea> | ||
</div> | ||
</div> | ||
|
||
<div class="col-md-offset-3"> | ||
<a id="cancel" href="#/viewclient/{{clientId}}"> | ||
<button type="reset" class="btn btn-default">{{'label.button.cancel' | translate}}</button> | ||
</a> | ||
<button id="save" type="submit" has-permission='CREATE_CLIENTIDENTIFIER' class="btn btn-primary">{{'label.button.save' | translate}}</button> | ||
</div> | ||
</fieldset> | ||
</form> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
<div class="content-container" ng-controller="ClientController"> | ||
<ul class="breadcrumb"> | ||
<li class="active">{{'label.anchor.clients' | translate}}</li> | ||
</ul> | ||
<api-validate></api-validate> | ||
|
||
<div class="card"> | ||
<div class="toolbar"> | ||
<h4 class="pull-left">List of Clients</h4> | ||
</div> | ||
<div class="content"> | ||
<br> | ||
<div class="row"> | ||
<div class="col-sm-8"> | ||
<form ng-submit="search()" class="form-horizontal"> | ||
<div class="form-group"> | ||
<div class="col-md-4"> | ||
<input ng-autofocus="true" ng-model="filterText" ng-keyup="onFilter()" type="text" | ||
class="form-control unstyled" | ||
placeholder="{{'label.input.filterbynameaccno' | translate}}"> | ||
</div> | ||
<div class="col-md-8"> | ||
<div class="input-group"> | ||
<input data-ng-model="searchText" type="text" | ||
placeholder="{{'label.input.searchByNameAccNo' | translate}}" | ||
class="form-control unstyled"/> | ||
<span class="input-group-btn"> | ||
<button class="btn btn-primary form-control"> | ||
<span class="fa fa-search"></span> | ||
</button> | ||
</span> | ||
<div class="checkbox form-control"> | ||
<label for="showAll"> | ||
<input type="checkbox" id="showAll" name="showAll" ng-model="showClosed"> | ||
{{'label.button.showall' | translate }} | ||
</label> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
<div class="col-sm-4"> | ||
<a href="#/createclient" class="btn btn-primary pull-right" has-permission='CREATE_CLIENT'><i | ||
class="fa fa-plus"></i> {{'label.button.createclient' | translate}}</a> | ||
<a href="#/bulkimportclients" style="margin-right: 5px" class="btn btn-primary pull-right" has-permission='CREATE_CLIENT'><i | ||
class="fa fa-upload"></i> {{'label.button.importclients' | translate}}</a> | ||
</div> | ||
</div> | ||
<hr/> | ||
<table class="table"> | ||
<thead> | ||
<tr> | ||
<th>{{'label.heading.name' | translate}}</th> | ||
<th>{{'label.heading.clientno' | translate}}</th> | ||
<th>{{'label.heading.externalid' | translate}}</th> | ||
<th>{{'label.heading.status' | translate}}</th> | ||
<th>{{'label.heading.office' | translate}}</th> | ||
<th>{{'label.heading.staff' | translate}}</th> | ||
</tr> | ||
</thead> | ||
|
||
<tbody> | ||
<tr dir-paginate="client in clients | orderBy:'displayName':reverse | filter:filterText | itemsPerPage: clientsPerPage" class="pointer-main" | ||
total-items="totalClients" pagination-id="clients" ng-show="client.status.code != 'clientStatusType.closed' || showClosed"> | ||
<td class="pointer" data-ng-click="routeTo(client.id)">{{client.displayName}}</td> | ||
<td class="pointer" data-ng-click="routeTo(client.id)">{{client.accountNo}}</td> | ||
<td class="pointer" data-ng-click="routeTo(client.id)">{{client.externalId}}</td> | ||
<td class="pointer" data-ng-click="routeTo(client.id)"> | ||
<i class="fa fa-stop {{client.status.code | StatusLookup}}" uib-tooltip="{{client.status.value}}" uib-tooltip-placement="top" ></i> | ||
<small ng-if="client.subStatus.description">[{{client.subStatus.description}}]</small> | ||
</td> | ||
<td class="pointer" data-ng-click="routeTo(client.id)">{{client.officeName}}</td> | ||
<td class="pointer" data-ng-click="routeTo(client.id)">{{client.staffName}}</td> | ||
</tr> | ||
</tbody> | ||
|
||
</table> | ||
<dir-pagination-controls align="center" boundary-links="true" | ||
template-url="bower_components/angular-utils-pagination/dirPagination.tpl.html" | ||
on-page-change="getResultsPage(newPageNumber)" pagination-id="clients"> | ||
</dir-pagination-controls> | ||
|
||
</div> | ||
</div> | ||
|
||
|
||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters