Additional changes
parent
9f0cc75a3f
commit
eeb83380bd
|
@ -309,7 +309,7 @@ class CrudBloc extends Bloc<CrudEvent, CrudState> {
|
|||
genCode: "5TH");
|
||||
Response addResponse = await post(
|
||||
Uri.parse(
|
||||
'http://${Url.instance.host()}/api/rptass_app/additional_items/'),
|
||||
'https://${Url.instance.host()}/api/rptass_app/additional_items/'),
|
||||
headers: headers,
|
||||
body: jsonEncode(addItems));
|
||||
print(addResponse.body);
|
||||
|
@ -350,7 +350,7 @@ class CrudBloc extends Bloc<CrudEvent, CrudState> {
|
|||
buccPercentage: structure.buccPercentage);
|
||||
Response response = await post(
|
||||
Uri.parse(
|
||||
'http://${Url.instance.host()}/api/rptass_app/bldgappr_structure/'),
|
||||
'https://${Url.instance.host()}/api/rptass_app/bldgappr_structure/'),
|
||||
headers: headers,
|
||||
body: jsonEncode(bldgStruc));
|
||||
print(response.body);
|
||||
|
@ -368,7 +368,7 @@ class CrudBloc extends Bloc<CrudEvent, CrudState> {
|
|||
|
||||
return await post(
|
||||
Uri.parse(
|
||||
'http://${Url.instance.host()}/api/rptass_app/bldgappr_details/'),
|
||||
'https://${Url.instance.host()}/api/rptass_app/bldgappr_details/'),
|
||||
headers: headers,
|
||||
body: jsonEncode(details));
|
||||
}
|
||||
|
@ -389,7 +389,7 @@ class CrudBloc extends Bloc<CrudEvent, CrudState> {
|
|||
var request = MultipartRequest(
|
||||
'POST',
|
||||
Uri.parse(
|
||||
'http://${Url.instance.host()}/api/rptass_app/bldgappr_sketch/'),
|
||||
'https://${Url.instance.host()}/api/rptass_app/bldgappr_sketch/'),
|
||||
);
|
||||
|
||||
// Add the headers to the request
|
||||
|
@ -454,6 +454,7 @@ class CrudBloc extends Bloc<CrudEvent, CrudState> {
|
|||
await SQLServices.instance.readAllBldgOwner();
|
||||
|
||||
for (PropertyInfo infos in propertyOwner) {
|
||||
if (infos.dateSynced == null) {
|
||||
final details = await _prepareBuildingDetails(event, infos);
|
||||
|
||||
Response detailsResponse = await _postBuildingDetails(details);
|
||||
|
@ -494,6 +495,7 @@ class CrudBloc extends Bloc<CrudEvent, CrudState> {
|
|||
|
||||
propertyOwner = await SQLServices.instance.readAllBldgOwner();
|
||||
emit(PropertyInfoLoaded(propertyInfos: propertyOwner));
|
||||
}
|
||||
} catch (e) {
|
||||
print(e.toString());
|
||||
emit(PropertyOwnerInfoErrorState(errorMessage: e.toString()));
|
||||
|
|
|
@ -81,10 +81,41 @@ class _PropertyOwnerInfoEditOffline
|
|||
Container(
|
||||
margin: const EdgeInsets.only(
|
||||
left: 0, top: 20, right: 0, bottom: 10),
|
||||
child: const Text('PROPERTY OWNER INFO',
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: const Text(
|
||||
'PROPERTY OWNER INFO',
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold, fontSize: 18),
|
||||
textAlign: TextAlign.left),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: Alignment.topRight,
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Colors.red,
|
||||
),
|
||||
onPressed: () {},
|
||||
child: const Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text('SAVE'), // <-- Text
|
||||
SizedBox(
|
||||
width: 5,
|
||||
),
|
||||
Icon(
|
||||
// <-- Icon
|
||||
Icons.save,
|
||||
size: 24.0,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 15),
|
||||
customDropDownField(
|
||||
|
|
|
@ -5,7 +5,7 @@ class Url {
|
|||
|
||||
String host() {
|
||||
// // // return '192.168.10.183:3000';
|
||||
// return 'agusandelnorte.gov.ph';
|
||||
return 'agusandelnorte.gov.ph';
|
||||
// return "192.168.10.219:3000";
|
||||
// return "192.168.10.241";
|
||||
// return "192.168.10.185";
|
||||
|
@ -16,7 +16,7 @@ class Url {
|
|||
// return "192.168.10.247";
|
||||
// return "playcensys.agusandelnorte.gov.ph";
|
||||
// return "10.10.10.110:8000";
|
||||
return "192.168.80.20:8000";
|
||||
// return "192.168.80.20:8000";
|
||||
}
|
||||
|
||||
String prefixHost() {
|
||||
|
|
Loading…
Reference in New Issue