Skip to content

Commit

Permalink
Added few changes and server base url to qa-trinity
Browse files Browse the repository at this point in the history
Signed-off-by: Piyush7034 <[email protected]>
  • Loading branch information
Piyush7034 authored and jainhitesh9998 committed Nov 9, 2023
1 parent 269438a commit 644d2bd
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ ext {
clientmanagerLibVersionCode = 1
clientmanagerLibVersionName = "\"1.0.0\""

serverBaseURL = "\"https://api-internal.qa-triad.mosip.net/\""
serverBaseURL = "\"https://api-internal.qa-trinity.mosip.net/\""
serverHealthCheckPath = "\"v1/syncdata/actuator/health\""
serverActuatorInfoPath = "\"v1/syncdata/actuator/info\""
}
Expand Down
18 changes: 13 additions & 5 deletions lib/ui/process_ui/widgets/language_selector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,23 @@ class _LanguageSelectorState extends State<LanguageSelector> {
Navigator.of(context).pop();
}

_getRegistrationLanguageList() {
return context.read<GlobalProvider>().chosenLang.map((e) {
return context.read<GlobalProvider>().langToCode(e) as String;
}).toList();
}

_startRegistration(List<String> langList) async {
await context.read<RegistrationTaskProvider>().startRegistration(langList);
}

_navigateToConsentPage() async {
context.read<GlobalProvider>().getThresholdValues();
context.read<GlobalProvider>().fieldDisplayValues = {};
context.read<GlobalProvider>().fieldValues(widget.newProcess);
await context.read<GlobalProvider>().fieldValues(widget.newProcess);

List<String> langList = context.read<GlobalProvider>().chosenLang.map((e) {
return context.read<GlobalProvider>().langToCode(e) as String;
}).toList();
await context.read<RegistrationTaskProvider>().startRegistration(langList);
List<String> langList = _getRegistrationLanguageList();
await _startRegistration(langList);
String registrationStartError = _getRegistrationError();
_navigateBack();
if (registrationStartError.isEmpty) {
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/process_ui/widgets/new_process_screen_content.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class _NewProcessScreenContentState extends State<NewProcessScreenContent> {
switch (e.controlType) {
case "checkbox":
if (e.subType == "gender") {
return ButtonControl(field: e);
return RadioButtonControl(field: e);
}
return CheckboxControl(field: e);
case "html":
Expand Down
6 changes: 5 additions & 1 deletion lib/ui/process_ui/widgets/textbox_control.dart
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,11 @@ class _TextBoxControlState extends State<TextBoxControl> {
},
validator: (value) {
if (!widget.e.required! && widget.e.requiredOn!.isEmpty) {
return null;
if (value == null || value.isEmpty) {
return null;
} else if (!widget.validation.hasMatch(value)) {
return 'Invalid input';
}
}
if (value == null || value.isEmpty) {
return 'Please enter a value';
Expand Down

0 comments on commit 644d2bd

Please sign in to comment.