mifosx-1041 collection sheet issue fix

This commit is contained in:
goutham-M 2014-04-04 17:39:58 +05:30
parent f23f931e7f
commit f0fe586572
5 changed files with 24 additions and 14 deletions

View File

@ -198,6 +198,7 @@
"error.msg.column.mandatory": "Mandatory field not provided.",
"error.msg.header": "You have the following errors:",
"validation.msg.validation.errors.exist": "Validation errors exist.",
"validation.msg.productivecollectionsheet.staffId.cannot.be.blank":"Staff is mandatory.",
"validation.msg.domain.rule.violation": "Errors contain reason for domain rule violation.",
"validation.msg.invalid.date.format": "Invalid date format.",
"validation.msg.invalid.month.day": "`{{params[0].value}}` is an invalid month day. ",

View File

@ -28,9 +28,17 @@
scope.officeSelected = function (officeId) {
scope.officeId = officeId;
if (officeId) {
resourceFactory.employeeResource.getAllEmployees({loanOfficersOnly: 'true', officeId: officeId}, function (data) {
resourceFactory.employeeResource.getAllEmployees({officeId: officeId}, function (data) {
scope.loanOfficers = data;
});
resourceFactory.centerResource.getAllCenters({officeId: scope.officeId, orderBy: 'name', sortOrder: 'ASC', limit: -1}, function (data) {
scope.centers = data;
});
resourceFactory.groupResource.getAllGroups({officeId: scope.officeId, orderBy: 'name', sortOrder: 'ASC', limit: -1}, function (data) {
scope.groups = data;
});
}
};
@ -48,16 +56,10 @@
if (loanOfficerId) {
resourceFactory.centerResource.getAllCenters({officeId: scope.officeId, staffId: loanOfficerId, orderBy: 'name', sortOrder: 'ASC', limit: -1}, function (data) {
scope.centers = data;
if (data.length > 0) {
scope.centerMandatory = true;
}
});
resourceFactory.groupResource.getAllGroups({officeId: scope.officeId, staffId: loanOfficerId, orderBy: 'name', sortOrder: 'ASC', limit: -1}, function (data) {
scope.groups = data;
if (data.length > 0 && scope.centers.length < 0) {
scope.groupMandatory = true;
}
});
} else {
scope.centers = '';
@ -75,7 +77,9 @@
}
if (data.collectionMeetingCalendar && data.collectionMeetingCalendar.recentEligibleMeetingDate) {
scope.date.transactionDate = new Date(dateFilter(data.collectionMeetingCalendar.recentEligibleMeetingDate, scope.df));
if (!scope.date.transactionDate) {
scope.date.transactionDate = new Date(dateFilter(data.collectionMeetingCalendar.recentEligibleMeetingDate, scope.df));
}
}
if (data.collectionMeetingCalendar) {
scope.calendarId = data.collectionMeetingCalendar.id;
@ -94,7 +98,10 @@
scope.calendarId = data.collectionMeetingCalendar.id;
}
if (data.collectionMeetingCalendar && data.collectionMeetingCalendar.recentEligibleMeetingDate) {
scope.date.transactionDate = new Date(dateFilter(data.collectionMeetingCalendar.recentEligibleMeetingDate, scope.df));
if (!scope.date.transactionDate) {
scope.date.transactionDate = new Date(dateFilter(data.collectionMeetingCalendar.recentEligibleMeetingDate, scope.df));
}
}
centerOrGroupResource = "groupResource";
});

View File

@ -7,6 +7,9 @@
params.meetingDate = routeParams.meetingDate;
params.officeId = routeParams.officeId;
params.staffId = routeParams.staffId;
if (params.staffId === "undefined") {
params.staffId = null;
}
var centerIdArray = [];
scope.submitButtonShow = false;
scope.completedCenter = false;

View File

@ -31,7 +31,7 @@
</div>
<div class="form-group">
<label class="control-label col-sm-2">{{ 'label.input.loanofficer' | translate }}<span class="required">*</span></label>
<label class="control-label col-sm-2">{{ 'label.input.staff' | translate }}</label>
<div class="col-sm-5">
<select id="loanOfficerId" ng-model="loanOfficerId"
@ -50,8 +50,7 @@
<div class="form-group">
<label class="control-label col-sm-2">{{ 'label.input.center' | translate }}<span ng-show="centerMandatory"
class="required">*</span></label>
<label class="control-label col-sm-2">{{ 'label.input.center' | translate }}</label>
<div class="col-sm-5">
<select id="centerId" name="center" ng-model="centerId"
@ -63,8 +62,7 @@
</div>
<div class="form-group">
<label class="control-label col-sm-2">{{ 'label.input.group' | translate }}<span ng-show="groupMandatory"
class="required">*</span></label>
<label class="control-label col-sm-2">{{ 'label.input.group' | translate }}</label>
<div class="col-sm-5">
<select id="groupId" ng-model="groupId" ng-options="group.id as group.name for group in groups"

View File

@ -1,4 +1,5 @@
<div ng-controller="ProductiveCollectionSheetController">
<api-validate></api-validate>
<div>
<div class="col-md-offset-9 paddedtop">
<button class="btn btn-primary" ng-click="viewFullScreen()">{{'label.button.viewfullscreen' | translate}}