Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Commit

Permalink
mdms v2 and location changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rahuldevgarg committed Feb 21, 2024
1 parent 79e982d commit 007b764
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 5 deletions.
28 changes: 26 additions & 2 deletions frontend/mgramseva/lib/providers/consumer_details_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -479,11 +479,35 @@ class ConsumerProvider with ChangeNotifier {
"tenantId": commonProvider.userDetails!.selectedtenant!.code
});
boundaryList = [];
boundaryList.addAll(
TenantBoundary.fromJson(result['TenantBoundary'][0]).boundary!);
result['TenantBoundary']!=null && result['TenantBoundary'].length>0?boundaryList.addAll(
TenantBoundary.fromJson(result['TenantBoundary'][0]).boundary!):{};
if (boundaryList.length == 1) {
property.address.localityCtrl = boundaryList.first;
onChangeOfLocality(property.address.localityCtrl);
}else{
boundaryList.add(Boundary.fromJson({
"code": "WARD1",
"name": commonProvider.userDetails!.selectedtenant!.name,
"label": "Locality",
"latitude": null,
"longitude": null,
"area": null,
"pincode": null,
"boundaryNum": 1,
"children": []
}));
property.address.localityCtrl = Locality.fromJson({
"code": "WARD1",
"name": commonProvider.userDetails!.selectedtenant!.name,
"label": "Locality",
"latitude": null,
"longitude": null,
"area": null,
"pincode": null,
"boundaryNum": 1,
"children": []
});
onChangeOfLocality(property.address.localityCtrl);
}
// notifyListeners();
} catch (e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ class ExpensesDetailsProvider with ChangeNotifier {
if (boundaryList.length > 0) {
code = boundaryList.first.code;
} else {
code = commonProvider.userDetails?.selectedtenant?.city?.code;
code = "WARD1";
}

var body = {
Expand Down
2 changes: 1 addition & 1 deletion frontend/mgramseva/lib/services/urls.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class Url {

static const String LOCALIZATION = 'localization/messages/v1/_search';

static const String MDMS = 'egov-mdms-service/v1/_search';
static const String MDMS = 'mdms-v2/v1/_search';
static const String FILE_UPLOAD = 'filestore/v1/files';
static const String FILE_FETCH = 'filestore/v1/files/url';
static const String URL_SHORTNER = 'egov-url-shortening/shortener';
Expand Down
2 changes: 1 addition & 1 deletion frontend/mgramseva/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html

version: 1.2.20+36
version: 1.2.21+37

environment:
sdk: ">=2.12.0 <4.0.0"
Expand Down

0 comments on commit 007b764

Please sign in to comment.