Not able to create the client address due to missing street field in UI (#3385)

* Not able to create the client address due to missing street field in UI
#3249

* address issue fixes

* Edit address and add address bug fix
This commit is contained in:
habile-technologies 2021-05-21 18:29:42 +05:30 committed by GitHub
parent 396611b003
commit 6b05e46d8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 86 additions and 37 deletions

View File

@ -4284,6 +4284,7 @@
"label.anchor.editrate": "Edit Rate",
"label.error.rate.already.exist" : "Rate already exist.",
"label.selectrate" : "Select Rate",
"label.input.street":"Street",
"----End---": "--End of file--- "
}

View File

@ -100,12 +100,11 @@
scope.enableAddress=data.isAddressEnabled;
if(scope.enableAddress===true)
{
scope.addressTypes=data.address[0].addressTypeIdOptions;
scope.countryOptions=data.address[0].countryIdOptions;
scope.stateOptions=data.address[0].stateProvinceIdOptions;
if (scope.enableAddress === true) {
scope.addressTypes = data.address[0].addressTypeIdOptions;
scope.countryOptions = data.address.countryIdOptions;
scope.stateOptions = data.address.stateProvinceIdOptions;
resourceFactory.addressFieldConfiguration.get({entity:entityname},function(data){
for(var i=0;i<data.length;i++)
@ -320,14 +319,13 @@
{
temp.addressTypeId=scope.addressArray[i].addressTypeId;
}
if (scope.addressArray[i].street) {
temp.street = scope.addressArray[i].street;
}
if(scope.addressArray[i].addressLine1)
{
temp.addressLine1=scope.addressArray[i].addressLine1;
}
if(scope.addressArray[i].street)
{
temp.street=scope.addressArray[i].street;
}
if(scope.addressArray[i].addressLine2)
{
temp.addressLine2=scope.addressArray[i].addressLine2;

View File

@ -39,7 +39,7 @@
for(var i=0;i<data.length;i++)
{
data[i].field='scope.view.'+data[i].field;
eval(data[i].field+"="+data[i].is_enabled);
eval(data[i].field+"="+data[i].isEnabled);
}

View File

@ -22,15 +22,19 @@
for(var i=0;i<data.length;i++)
{
data[i].field='$scope.'+data[i].field;
eval(data[i].field+"="+data[i].is_enabled);
for(var i=0;i<data.length;i++)
{
data[i].field='$scope.'+data[i].field;
if(data[i].is_enabled == undefined) {
//For dev.mifos.io or demo.mifos.io
eval(data[i].field+"="+data[i].isEnabled);
} else {
//For fineract server
eval(data[i].field+"="+data[i].is_enabled);
}
}
}
})
})
$scope.routeTo=function()
{
location.path('/viewclient/'+clientId);
@ -82,4 +86,4 @@
});
}
(mifosX.controllers || {}));
(mifosX.controllers || {}));

View File

@ -32,17 +32,20 @@
for(var i=0;i<data.length;i++)
{
data[i].field='$scope.'+data[i].field;
if(data[i].is_enabled == undefined) {
//For dev.mifos.io or demo.mifos.io
eval(data[i].field+"="+data[i].isEnabled);
} else {
//For fineract server
eval(data[i].field+"="+data[i].is_enabled);
}
}
for(var i=0;i<data.length;i++)
{
data[i].field='$scope.'+data[i].field;
eval(data[i].field+"="+data[i].is_enabled);
})
}
})
$scope.routeTo=function()
{
location.path('/viewclient/'+clientId);
@ -61,6 +64,11 @@
{
if(data[i].addressId==addressId)
{
if(data[i].street&&$scope.street)
{
$scope.formData.street=data[i].street;
}
if(data[i].addressLine1&&$scope.addressLine1)
{
$scope.formData.addressLine1=data[i].addressLine1;
@ -139,4 +147,4 @@
});
}
(mifosX.controllers || {}));
(mifosX.controllers || {}));

View File

@ -17,6 +17,19 @@
</div>
</div>
<div class="form-group" ng-show="street">
<label class="control-label col-sm-2" for="street">{{
'label.input.street' | translate }}<span class="required">*</span>
</label>
<div class="col-sm-3">
<input type="text" id="street" name="street"
ng-model="formData.street" class="form-control">
</div>
</div>
<div class="form-group" ng-show="addressLine1">

View File

@ -7,6 +7,15 @@
<div class="form-group" ng-show="street">
<label class="control-label col-sm-2" for="street">{{ 'label.input.street' | translate }}<span class="required">*</span></label>
<div class="col-sm-3">
<input type="text" id="street" name="street" ng-model="formData.street" class="form-control">
</div>
</div>
<div class="form-group" ng-show="addressLine1">
<label class="control-label col-sm-2" for="addressline1">{{ 'label.input.addressline1' | translate }}</label>

View File

@ -434,7 +434,7 @@
</div>
<div class="col-sm-3" >
<select chosen="addressTypes" name="addressType" ng-model="addressArray[$index].addressTypeId" class="form-control"
ng-options="addressType.id as addressType.name for addressType in addressTypes track by addressType.id"
ng-options="addressType.id as addressType.name for addressType in addressTypes "
value="addressTypeId" required late-validate></select>
</div>
<div class = "col-sm-2">
@ -442,6 +442,19 @@
</div>
<a ng-click="removeAddress($index)" uib-tooltip="{{'label.remove.row' | translate}}"><i class="fa fa-times"></i></a>
</div>
<div class="form-group" ng-show="street">
<div class="control-label col-sm-2">
<label>{{ 'label.input.street' | translate }}<span class="required">*</span></label>
</div>
<div class="col-sm-3">
<input type="text" name="street" ng-model="addressArray[$index].street" class="form-control" required late-validate/>
</div>
<div class = "col-sm-2">
<form-validate valattributeform="createclientform" valattribute="street"/>
</div>
</div>
<div class="form-group" ng-show="addressLine1">
<label class="control-label col-sm-2" >{{ 'label.input.addressline1' | translate }}</label>
<div class="col-sm-3">
@ -460,12 +473,7 @@
<input type="text" name="addressline3" ng-model="addressArray[$index].addressLine3" class="form-control">
</div>
</div>
<div class="form-group" ng-show="street">
<label class="control-label col-sm-2" >{{ 'label.input.street' | translate }}<span class="required">*</span></label>
<div class="col-sm-3">
<input type="text" name="street" ng-model="addressArray[$index].street" class="form-control">
</div>
</div>
<div class="form-group" ng-show="city">
<label class="control-label col-sm-2" >{{ 'label.input.city' | translate }}</label>
<div class="col-sm-3">

View File

@ -849,6 +849,14 @@
</tr>
</thead>
<tbody>
<tr ng-show="view.street">
<th >
{{'label.input.street' | translate }}
</th>
<td>
{{address.street}}
</td>
</tr>
<tr ng-show="view.addressLine1">
<th>
{{'label.input.addressline1' | translate }}