Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
UPSMF
uphrh-smf-mobile
Commits
ab5338ec
Commit
ab5338ec
authored
2 years ago
by
Shoaib
Browse files
Options
Download
Patches
Plain Diff
Fixed issue in form details page.
parent
e76c4a66
master
add-assessor-location
deps-update
two-lead-assessor
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
android/app/src/main/res/drawable/flutter_devs.png
+0
-0
android/app/src/main/res/drawable/flutter_devs.png
lib/pages/application_details_page.dart
+2
-1
lib/pages/application_details_page.dart
lib/repositories/application_repository.dart
+10
-5
lib/repositories/application_repository.dart
lib/services/application_service.dart
+1
-1
lib/services/application_service.dart
lib/widgets/lead_inspector_application_field.dart
+38
-24
lib/widgets/lead_inspector_application_field.dart
with
51 additions
and
31 deletions
+51
-31
android/app/src/main/res/drawable/flutter_devs.png
0 → 100644
+
0
−
0
View file @
ab5338ec
37 KB
This diff is collapsed.
Click to expand it.
lib/pages/application_details_page.dart
+
2
−
1
View file @
ab5338ec
...
...
@@ -127,7 +127,8 @@ class _ApplicationDetailsPageState extends State<ApplicationDetailsPage>
_formData
=
await
Provider
.
of
<
FormRespository
>(
context
,
listen:
false
)
.
getFormDetails
(
widget
.
application
.
formId
);
}
catch
(
_
)
{
if
(
mounted
)
{
// ignore: unnecessary_null_comparison
if
(
mounted
&&
_formData
.
id
==
null
)
{
Helper
.
toastMessage
(
AppLocalizations
.
of
(
context
)
!.
formNotAvailable
);
Navigator
.
popAndPushNamed
(
context
,
AppUrl
.
homePage
);
}
...
...
This diff is collapsed.
Click to expand it.
lib/repositories/application_repository.dart
+
10
−
5
View file @
ab5338ec
...
...
@@ -89,6 +89,7 @@ class ApplicationRespository with ChangeNotifier {
}
else
{
statusCode
=
200
;
}
// print(_data);
return
statusCode
;
}
...
...
@@ -129,18 +130,22 @@ class ApplicationRespository with ChangeNotifier {
}
catch
(
_
)
{
return
false
;
}
if
(
data1
[
'statusInfo'
][
'statusCode'
]
!=
200
||
data2
[
'statusInfo'
][
'statusCode'
]
!=
200
)
{
_errorMessage
=
_data
[
'statusInfo'
][
'errorMessage'
];
if
(
data1
[
'statusInfo'
]
!=
null
&&
data2
[
'statusInfo'
]
!=
null
)
{
if
(
data1
[
'statusInfo'
][
'statusCode'
]
!=
200
||
data2
[
'statusInfo'
][
'statusCode'
]
!=
200
)
{
_errorMessage
=
_data
[
'statusInfo'
][
'errorMessage'
];
}
}
if
((
inspections
.
isNotEmpty
&&
data1
[
'statusInfo'
][
'statusCode'
])
||
(
consents
.
isNotEmpty
&&
data2
[
'statusInfo'
][
'statusCode'
]))
{
if
((
inspections
.
isNotEmpty
&&
data1
[
'statusInfo'
][
'statusCode'
]
==
200
)
||
(
consents
.
isNotEmpty
&&
data2
[
'statusInfo'
][
'statusCode'
]
==
200
))
{
for
(
var
attachment
in
attachments
)
{
await
OfflineModel
.
deleteAttachments
(
attachment
[
'attachment'
]);
}
await
OfflineModel
.
deleteInspections
();
response
=
true
;
}
// print(_errorMessage);
// print('Data synced');
return
response
;
}
...
...
This diff is collapsed.
Click to expand it.
lib/services/application_service.dart
+
1
−
1
View file @
ab5338ec
...
...
@@ -40,7 +40,7 @@ class ApplicationService extends BaseService {
final
response
=
await
http
.
post
(
Uri
.
parse
(
ApiUrl
.
submitBulkInspection
),
headers:
headers
,
body:
body
);
// developer.log(ApiUrl.submitInspection);
// developer.log(ApiUrl.submit
Bulk
Inspection);
// developer.log(body);
// developer.log(response.body);
return
response
;
...
...
This diff is collapsed.
Click to expand it.
lib/widgets/lead_inspector_application_field.dart
+
38
−
24
View file @
ab5338ec
...
...
@@ -467,16 +467,20 @@ class _LeadInspectorApplicationFieldState
margin:
const
EdgeInsets
.
only
(
right:
10
),
decoration:
BoxDecoration
(
color:
_radioValue
==
color:
_radioValue
.
toLowerCase
()
==
_options
[
i
]
.
toLowerCase
()
?
AppColors
.
radioSelected
:
Colors
.
transparent
,
borderRadius:
const
BorderRadius
.
all
(
Radius
.
circular
(
4.0
)),
border:
Border
.
all
(
color:
_radioValue
==
color:
_radioValue
.
toLowerCase
()
==
_options
[
i
]
.
toLowerCase
()
?
AppColors
.
primaryBlue
:
AppColors
.
black16
,
),
...
...
@@ -537,13 +541,15 @@ class _LeadInspectorApplicationFieldState
if
(
widget
.
applicationStatus
!=
InspectionStatus
.
inspectionCompleted
&&
_radioValue
!=
FieldValue
.
correct
)
{
_radioValue
.
toLowerCase
()
!=
FieldValue
.
correct
.
toLowerCase
())
{
_displayCommentDialog
();
}
},
icon:
_radioValue
!=
FieldValue
.
correct
&&
icon:
_radioValue
.
toLowerCase
()
!=
FieldValue
.
correct
.
toLowerCase
()
&&
widget
.
applicationStatus
!=
InspectionStatus
.
inspectionCompleted
&&
...
...
@@ -566,26 +572,29 @@ class _LeadInspectorApplicationFieldState
if
(
widget
.
applicationStatus
!=
InspectionStatus
.
inspectionCompleted
&&
_radioValue
!=
FieldValue
.
correct
)
{
_radioValue
.
toLowerCase
()
!=
FieldValue
.
correct
.
toLowerCase
())
{
_photoOptions
(
context
);
}
},
icon:
_radioValue
!=
FieldValue
.
correct
?
const
Icon
(
Icons
.
camera_alt
,
color:
AppColors
.
black40
,
)
:
const
Icon
(
Icons
.
camera_alt_outlined
,
color:
AppColors
.
black40
,
),
icon:
_radioValue
.
toLowerCase
()
!=
FieldValue
.
correct
.
toLowerCase
()
?
const
Icon
(
Icons
.
camera_alt
,
color:
AppColors
.
black40
,
)
:
const
Icon
(
Icons
.
camera_alt_outlined
,
color:
AppColors
.
black40
,
),
),
)
],
)),
_radioValue
!=
FieldValue
.
correct
&&
_radioValue
.
toLowerCase
()
!=
FieldValue
.
correct
.
toLowerCase
()
&&
_summaryText
!=
''
?
Container
(
width:
MediaQuery
.
of
(
context
)
.
size
.
width
,
...
...
@@ -601,7 +610,8 @@ class _LeadInspectorApplicationFieldState
),
))
:
const
Center
(),
_radioValue
!=
FieldValue
.
correct
&&
_radioValue
.
toLowerCase
()
!=
FieldValue
.
correct
.
toLowerCase
()
&&
_summaryText
!=
''
?
Container
(
margin:
const
EdgeInsets
.
only
(
top:
10
),
...
...
@@ -625,7 +635,8 @@ class _LeadInspectorApplicationFieldState
),
)
:
const
Center
(),
_radioValue
!=
FieldValue
.
correct
&&
_radioValue
.
toLowerCase
()
!=
FieldValue
.
correct
.
toLowerCase
()
&&
_inspectionValue
!=
''
?
Container
(
width:
MediaQuery
.
of
(
context
)
.
size
.
width
,
...
...
@@ -641,7 +652,8 @@ class _LeadInspectorApplicationFieldState
),
))
:
const
Center
(),
_radioValue
!=
FieldValue
.
correct
&&
_radioValue
.
toLowerCase
()
!=
FieldValue
.
correct
.
toLowerCase
()
&&
_inspectionValue
!=
''
?
Container
(
margin:
const
EdgeInsets
.
only
(
top:
10
),
...
...
@@ -665,7 +677,8 @@ class _LeadInspectorApplicationFieldState
),
)
:
const
Center
(),
_radioValue
!=
FieldValue
.
correct
&&
_radioValue
.
toLowerCase
()
!=
FieldValue
.
correct
.
toLowerCase
()
&&
_attachment
!=
''
?
Container
(
width:
MediaQuery
.
of
(
context
)
.
size
.
width
,
...
...
@@ -681,7 +694,8 @@ class _LeadInspectorApplicationFieldState
),
))
:
const
Center
(),
_radioValue
!=
FieldValue
.
correct
&&
_radioValue
.
toLowerCase
()
!=
FieldValue
.
correct
.
toLowerCase
()
&&
_attachment
!=
''
?
Container
(
margin:
const
EdgeInsets
.
only
(
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets