diff --git a/android/app/build.gradle b/android/app/build.gradle index be52da5..b67491c 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -44,7 +44,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.unit2" + applicationId "com.app.rpass" // You can update the following values to match your application needs. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. minSdkVersion flutter.minSdkVersion diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_background.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher_background.png new file mode 100644 index 0000000..1966948 Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher_background.png differ diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..3952c6e Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_monochrome.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher_monochrome.png new file mode 100644 index 0000000..3952c6e Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher_monochrome.png differ diff --git a/android/app/src/main/res/mipmap-hdpi/unit.png b/android/app/src/main/res/mipmap-hdpi/unit.png index f8ecca0..ab1b61c 100644 Binary files a/android/app/src/main/res/mipmap-hdpi/unit.png and b/android/app/src/main/res/mipmap-hdpi/unit.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_background.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher_background.png new file mode 100644 index 0000000..75025cf Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher_background.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..d08fcf4 Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_monochrome.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher_monochrome.png new file mode 100644 index 0000000..d08fcf4 Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher_monochrome.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/unit.png b/android/app/src/main/res/mipmap-mdpi/unit.png index 1467edc..003036c 100644 Binary files a/android/app/src/main/res/mipmap-mdpi/unit.png and b/android/app/src/main/res/mipmap-mdpi/unit.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png new file mode 100644 index 0000000..9784f16 Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..e6ccbfd Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.png new file mode 100644 index 0000000..e6ccbfd Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/unit.png b/android/app/src/main/res/mipmap-xhdpi/unit.png index 15a1e02..3f59190 100644 Binary files a/android/app/src/main/res/mipmap-xhdpi/unit.png and b/android/app/src/main/res/mipmap-xhdpi/unit.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png new file mode 100644 index 0000000..04ef206 Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..f6c7285 Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.png new file mode 100644 index 0000000..f6c7285 Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/unit.png b/android/app/src/main/res/mipmap-xxhdpi/unit.png index c1a8e83..0823d4e 100644 Binary files a/android/app/src/main/res/mipmap-xxhdpi/unit.png and b/android/app/src/main/res/mipmap-xxhdpi/unit.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png new file mode 100644 index 0000000..66a5487 Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..c913af0 Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.png new file mode 100644 index 0000000..c913af0 Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/unit.png b/android/app/src/main/res/mipmap-xxxhdpi/unit.png index d7c5bfe..31dddd5 100644 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/unit.png and b/android/app/src/main/res/mipmap-xxxhdpi/unit.png differ diff --git a/assets/svgs/rpass_logo.svg b/assets/svgs/rpass_logo.svg new file mode 100644 index 0000000..23d3735 --- /dev/null +++ b/assets/svgs/rpass_logo.svg @@ -0,0 +1,595 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/bloc/offline/offline_passo/admin/municipalities_admin/municipalities_admin_bloc.dart b/lib/bloc/offline/offline_passo/admin/municipalities_admin/municipalities_admin_bloc.dart index ce2c941..e340f5e 100644 --- a/lib/bloc/offline/offline_passo/admin/municipalities_admin/municipalities_admin_bloc.dart +++ b/lib/bloc/offline/offline_passo/admin/municipalities_admin/municipalities_admin_bloc.dart @@ -3,6 +3,8 @@ import 'package:equatable/equatable.dart'; import 'package:unit2/model/passo/city.dart'; import 'package:unit2/sevices/offline/offline_passo/admin/sql_services/sql_services.dart'; +import '../../../../../sevices/offline/offline_passo/admin/api_services/municipalities_api_services.dart'; + part 'municipalities_admin_event.dart'; part 'municipalities_admin_state.dart'; @@ -15,6 +17,28 @@ class MunicipalitiesAdminBloc emit(MunicipalitiesLoaded(city: city)); }); + // on((event, emit) async { + // try { + // final result = + // await MunicipalityAdminApiServices.instance.fetch(); + + // // Assuming result is a List of JSON objects, convert them to City objects. + // final cities = + // result.map((json) => City.fromJson(json)).toList(); + + // // Loop through the list of City objects and insert them into the local database. + // for (City city in cities) { + // print(city.cityDescription); + // print(city.cityCode); + // await SQLServices.instance.createMunicipalities(city); + // } + // } catch (e) { + // // Handle any errors that might occur during the API call or database insertion. + // print("Error: $e"); + // } + + // // emit(const LoadMunicipalities()); + // }); on((event, emit) async { await SQLServices.instance.createMunicipalities( City( diff --git a/lib/bloc/offline/offline_passo/admin/municipalities_admin/municipalities_admin_event.dart b/lib/bloc/offline/offline_passo/admin/municipalities_admin/municipalities_admin_event.dart index c72025c..769f5fe 100644 --- a/lib/bloc/offline/offline_passo/admin/municipalities_admin/municipalities_admin_event.dart +++ b/lib/bloc/offline/offline_passo/admin/municipalities_admin/municipalities_admin_event.dart @@ -32,3 +32,10 @@ class LoadMunicipalities extends MunicipalitiesAdminEvent { @override List get props => []; } + +class MunicipalitiesSyncToDevice extends MunicipalitiesAdminEvent { + const MunicipalitiesSyncToDevice(); + + @override + List get props => []; +} diff --git a/lib/bloc/offline/offline_passo/building/assessment_offline/bldg_assessment_offline_bloc.dart b/lib/bloc/offline/offline_passo/building/assessment_offline/bldg_assessment_offline_bloc.dart index b0b1347..5380953 100644 --- a/lib/bloc/offline/offline_passo/building/assessment_offline/bldg_assessment_offline_bloc.dart +++ b/lib/bloc/offline/offline_passo/building/assessment_offline/bldg_assessment_offline_bloc.dart @@ -32,6 +32,7 @@ class BldgAssessmentOfflineBloc recommendapprName: event.recommendapprName, recommendapprDate: event.recommendapprDate, approvedbyName: event.approvedbyName, + approvedbyDate: event.approvedbyDate, memoranda: event.memoranda, swornstatementNo: event.swornstatementNo, dateReceived: event.dateReceived, diff --git a/lib/bloc/offline/offline_passo/building/assessment_offline/bldg_assessment_offline_event.dart b/lib/bloc/offline/offline_passo/building/assessment_offline/bldg_assessment_offline_event.dart index 357b893..44a89d6 100644 --- a/lib/bloc/offline/offline_passo/building/assessment_offline/bldg_assessment_offline_event.dart +++ b/lib/bloc/offline/offline_passo/building/assessment_offline/bldg_assessment_offline_event.dart @@ -27,6 +27,7 @@ class AddBldgAssessment extends BldgAssessmentOfflineEvent { final String recommendapprName; final String recommendapprDate; final String approvedbyName; + final String approvedbyDate; final String memoranda; final String swornstatementNo; final String dateReceived; @@ -58,6 +59,7 @@ class AddBldgAssessment extends BldgAssessmentOfflineEvent { required this.recommendapprName, required this.recommendapprDate, required this.approvedbyName, + required this.approvedbyDate, required this.memoranda, required this.swornstatementNo, required this.dateReceived, @@ -91,6 +93,7 @@ class AddBldgAssessment extends BldgAssessmentOfflineEvent { recommendapprName, recommendapprDate, approvedbyName, + approvedbyDate, memoranda, swornstatementNo, dateReceived, diff --git a/lib/bloc/offline/offline_passo/building/owner_info_bloc/crud_bloc.dart b/lib/bloc/offline/offline_passo/building/owner_info_bloc/crud_bloc.dart index caaa115..960d5eb 100644 --- a/lib/bloc/offline/offline_passo/building/owner_info_bloc/crud_bloc.dart +++ b/lib/bloc/offline/offline_passo/building/owner_info_bloc/crud_bloc.dart @@ -4,6 +4,7 @@ import 'package:bloc/bloc.dart'; import 'package:equatable/equatable.dart'; import 'package:intl/intl.dart'; import 'package:unit2/sevices/offline/offline_passo/admin/sql_services/sql_services.dart'; +import 'package:unit2/sevices/passo/building/building_services.dart'; import '../../../../../model/offline/offline_profile.dart'; import '../../../../../model/passo/additional_items.dart'; import '../../../../../model/passo/bldg_loc.dart'; @@ -16,6 +17,7 @@ import '../../../../../model/passo/structureMaterial.dart'; import '../../../../../model/passo/todo.dart'; import '../../../../../sevices/offline/offline_passo/building/property_owner_info_service.dart'; import 'package:http/http.dart'; +// as http; import '../../../../../utils/urls.dart'; part 'crud_event.dart'; @@ -84,265 +86,293 @@ class CrudBloc extends Bloc { }); on(((event, emit) async { emit(UploadBuildingFaasLoading()); - List propertyOwner = - await SQLServices.instance.readAllBldgOwner(); - for (PropertyInfo infos in propertyOwner) { - //General Description - List> genDesc = - await SQLServices.instance.getGeneralDescription(infos.id); - List genDescList = - genDesc.map((map) => GeneralDesc.fromJson2(map)).toList(); + try { + List propertyOwner = + await SQLServices.instance.readAllBldgOwner(); + for (PropertyInfo infos in propertyOwner) { + //General Description + List> genDesc = + await SQLServices.instance.getGeneralDescription(infos.id); + List genDescList = + genDesc.map((map) => GeneralDesc.fromJson2(map)).toList(); - GeneralDesc firstGenDesc = genDescList.first; + GeneralDesc firstGenDesc = genDescList.first; - //Location - List> loc = - await SQLServices.instance.getLandRef(infos.id); + //Location + List> loc = + await SQLServices.instance.getLocation(infos.id); - List locList = - loc.map((map) => BldgLoc.fromJson2(map)).toList(); + List locList = + loc.map((map) => BldgLoc.fromJson2(map)).toList(); - BldgLoc firstLoc = locList.first; + BldgLoc firstLoc = locList.first; - //Land Refeernce - List> landRef = - await SQLServices.instance.getLocation(infos.id); + //Land Refeernce + List> landRef = + await SQLServices.instance.getLandRef(infos.id); - List landRefList = - landRef.map((map) => LandRef.fromJson2(map)).toList(); + List landRefList = + landRef.map((map) => LandRef.fromJson2(map)).toList(); - LandRef firstLandRef = landRefList.first; + LandRef firstLandRef = landRefList.first; - //Assessment - List> assessment = - await SQLServices.instance.getBldgAssessment(infos.id); + //Assessment + List> assessment = + await SQLServices.instance.getBldgAssessment(infos.id); - List assessList = - assessment.map((map) => PropertyAssessment.fromJson2(map)).toList(); + List assessList = assessment + .map((map) => PropertyAssessment.fromJson2(map)) + .toList(); - PropertyAssessment firstAssess = assessList.first; + PropertyAssessment firstAssess = assessList.first; - //Structural Materials - List> strucMat = - await SQLServices.instance.getStructuralMaterials(infos.id); - List strcuMatList = - strucMat.map((map) => StructureMaterials.fromJson2(map)).toList(); + //Structural Materials + List> strucMat = + await SQLServices.instance.getStructuralMaterials(infos.id); + List strcuMatList = + strucMat.map((map) => StructureMaterials.fromJson2(map)).toList(); - StructureMaterials firstStructMat = strcuMatList.first; + StructureMaterials firstStructMat = strcuMatList.first; - //Additional Items - List> addItems = - await SQLServices.instance.getAdditionalItems(infos.id); - List addItemsList = - addItems.map((map) => AdditionalItems.fromJson(map)).toList(); + //Additional Items + List> addItems = + await SQLServices.instance.getAdditionalItems(infos.id); + List addItemsList = + addItems.map((map) => AdditionalItems.fromJson(map)).toList(); - //BLDG Structure - List> bldgStructure = - await SQLServices.instance.getBuildingAndStructure(infos.id); - List bldgStructureList = - bldgStructure.map((map) => BldgAndStructure.fromJson(map)).toList(); + //BLDG Structure + List> bldgStructure = + await SQLServices.instance.getBuildingAndStructure(infos.id); + List bldgStructureList = bldgStructure + .map((map) => BldgAndStructure.fromJson(map)) + .toList(); - DateTime dateIssued = DateTime.parse(firstGenDesc.dateIssued!); + DateTime dateIssued = DateTime.parse(firstGenDesc.dateIssued!); - final details = { - "assessed_by_id": event.offlineProfile.id.toString(), - "assessed_by_name": event.offlineProfile.firstName, - "date_created": "{{currentTimestamp}}", - "date_modified": "{{currentTimestamp}}", - "trans_code": infos.transCode, - "tdn": infos.tdn, - "pin": infos.pin, - "fname": infos.fname, - "mname": infos.mname, - "lname": infos.lname, - "bday": infos.bday, - "address": infos.address, - "telno": infos.telno, - "tin": infos.tin, - "admin_user": infos.adminUser, - "admin_address": infos.adminAddress, - "admin_telno": infos.adminTelno, - "admin_tin": infos.adminTin, - "faas_type": infos.faasType, - "gen_code": "5TH", - "bldgappr_location.date_created": "{{currentTimestamp}}", - "bldgappr_location.date_modified": "{{currentTimestamp}}", - "bldgappr_location.street": firstLoc.street, - "bldgappr_location.barangay": firstLoc.barangay, - "bldgappr_location.municipality": firstLoc.municipality, - "bldgappr_location.province": firstLoc.province, - "bldgappr_location.gen_code": "5TH", - "bldgappr_landref.date_created": "{{currentTimestamp}}", - "bldgappr_landref.date_modified": "{{currentTimestamp}}", - "bldgappr_landref.owner": firstLandRef.owner, - "bldgappr_landref.cloa_no": firstLandRef.cloaNo, - "bldgappr_landref.lot_no": firstLandRef.lotNo, - "bldgappr_landref.tdn": firstLandRef.tdn, - "bldgappr_landref.area": firstLandRef.area, - "bldgappr_landref.survey_no": firstLandRef.surveyNo, - "bldgappr_landref.blk_no": firstLandRef.blkNo, - "bldgappr_landref.gen_code": "5TH", - "bldgappr_generaldesc.date_created": "{{currentTimestamp}}", - "bldgappr_generaldesc.date_modified": "{{currentTimestamp}}", - "bldgappr_generaldesc.bldg_kind": firstGenDesc.bldgKind, - "bldgappr_generaldesc.struc_type": firstGenDesc.strucType, - "bldgappr_generaldesc.bldg_permit": firstGenDesc.bldgPermit, - "bldgappr_generaldesc.date_issued": DateFormat("yyyy-MM-dd") - .format(DateTime.parse(firstGenDesc.dateIssued!)), - "bldgappr_generaldesc.cct": null, - "bldgappr_generaldesc.cert_completion_issued": - DateFormat("yyyy-MM-dd") - .format(DateTime.parse(firstGenDesc.certCompletionIssued!)), - "bldgappr_generaldesc.cert_ocscupancy_issued": - DateFormat("yyyy-MM-dd") - .format(DateTime.parse(firstGenDesc.certOccupancyIssued!)), - "bldgappr_generaldesc.date_completed": DateFormat("yyyy-MM-dd") - .format(DateTime.parse(firstGenDesc.dateCompleted!)), - "bldgappr_generaldesc.date_occupied": DateFormat("yyyy-MM-dd") - .format(DateTime.parse(firstGenDesc.dateOccupied!)), - "bldgappr_generaldesc.bldg_age": firstGenDesc.bldgAge, - "bldgappr_generaldesc.no_storeys": firstGenDesc.noStoreys, - "bldgappr_generaldesc.area_1stfloor": firstGenDesc.area1Stfloor, - "bldgappr_generaldesc.area_2ndfloor": firstGenDesc.area2Ndfloor, - "bldgappr_generaldesc.area_3rdfloor": firstGenDesc.area3Rdfloor, - "bldgappr_generaldesc.area_4thfloor": firstGenDesc.area4Thfloor, - "bldgappr_generaldesc.total_floor_area": firstGenDesc.totalFloorArea, - "bldgappr_generaldesc.floor_sketch": null, - "bldgappr_generaldesc.actual_use": firstGenDesc.actualUse, - "bldgappr_generaldesc.unit_value": firstGenDesc.unitValue, - "bldgappr_generaldesc.gen_code": "5TH", - "bldgappr_struct_materials.date_created": "{{currentTimestamp}}", - "bldgappr_struct_materials.date_modified": "{{currentTimestamp}}", - "bldgappr_struct_materials.foundation": firstStructMat.foundation, - "bldgappr_struct_materials.columns": firstStructMat.columns, - "bldgappr_struct_materials.beams": firstStructMat.beams, - "bldgappr_struct_materials.truss_framing": - firstStructMat.trussFraming, - "bldgappr_struct_materials.roof": firstStructMat.roof, - "bldgappr_struct_materials.flooring": firstStructMat.flooring, - "bldgappr_struct_materials.walls": firstStructMat.walls, - "bldgappr_struct_materials.others": firstStructMat.others, - "bldgappr_struct_materials.gen_code": "5TH", - "bldgappr_property_assessment.date_created": "{{currentTimestamp}}", - "bldgappr_property_assessment.date_modified": "{{currentTimestamp}}", - "bldgappr_property_assessment.actual_use": firstAssess.actualUse, - "bldgappr_property_assessment.market_value": firstAssess.marketValue, - "bldgappr_property_assessment.assessment_level": - firstAssess.assessmentLevel, - "bldgappr_property_assessment.assessed_value": - firstAssess.assessedValue, - "bldgappr_property_assessment.taxable": firstAssess.taxable, - "bldgappr_property_assessment.exempt": firstAssess.exempt, - "bldgappr_property_assessment.qtr": firstAssess.qtr, - "bldgappr_property_assessment.yr": firstAssess.yr, - "bldgappr_property_assessment.appraisedby_name": - firstAssess.appraisedbyName, - "bldgappr_property_assessment.appraisedby_date": - DateFormat("yyyy-MM-dd") - .format(DateTime.parse(firstAssess.appraisedbyDate!)), - "bldgappr_property_assessment.recommendappr_name": - firstAssess.recommendapprName, - "bldgappr_property_assessment.recommendappr_date": - DateFormat("yyyy-MM-dd") - .format(DateTime.parse(firstAssess.recommendapprDate!)), - "bldgappr_property_assessment.approvedby_name": - firstAssess.approvedbyName, - "bldgappr_property_assessment.approvedby_date": null, - "bldgappr_property_assessment.memoranda": firstAssess.memoranda, - "bldgappr_property_assessment.swornstatement_no": - firstAssess.swornstatementNo, - "bldgappr_property_assessment.date_received": DateFormat("yyyy-MM-dd") - .format(DateTime.parse(firstAssess.dateReceived!)), - "bldgappr_property_assessment.entry_date_assessment": null, - "bldgappr_property_assessment.entry_date_by": DateFormat("yyyy-MM-dd") - .format(DateTime.parse(firstAssess.entryDateAssessment!)), - "bldgappr_property_assessment.gen_code": "5TH", - "bldgappr_rec_supersededass.date_created": "{{currentTimestamp}}", - "bldgappr_rec_supersededass.date_modified": "{{currentTimestamp}}", - "bldgappr_rec_supersededass.pin": null, - "bldgappr_rec_supersededass.tdn": null, - "bldgappr_rec_supersededass.total_assval": null, - "bldgappr_rec_supersededass.owner": null, - "bldgappr_rec_supersededass.effectivity_ass": null, - "bldgappr_rec_supersededass.page_no": null, - "bldgappr_rec_supersededass.total_marketval": null, - "bldgappr_rec_supersededass.total_area": null, - "bldgappr_rec_supersededass.rec_assessment": null, - "bldgappr_rec_supersededass.rec_taxmapping": null, - "bldgappr_rec_supersededass.rec_records": null, - "bldgappr_rec_supersededass.date": null, - "bldgappr_rec_supersededass.gen_code": "5TH" - }; + final details = { + "assessed_by_id": event.offlineProfile.id.toString(), + "assessed_by_name": event.offlineProfile.firstName, + "date_created": "{{currentTimestamp}}", + "date_modified": "{{currentTimestamp}}", + "trans_code": infos.transCode, + "tdn": '222', + "pin": infos.pin, + "fname": infos.fname, + "mname": infos.mname, + "lname": infos.lname, + "bday": infos.bday, + "address": infos.address, + "telno": infos.telno, + "tin": infos.tin, + "admin_user": infos.adminUser, + "admin_address": infos.adminAddress, + "admin_telno": infos.adminTelno, + "admin_tin": infos.adminTin, + "faas_type": infos.faasType, + "gen_code": "5TH", + "bldgappr_location.date_created": "{{currentTimestamp}}", + "bldgappr_location.date_modified": "{{currentTimestamp}}", + "bldgappr_location.street": firstLoc.street, + "bldgappr_location.barangay": firstLoc.barangay, + "bldgappr_location.municipality": firstLoc.municipality, + "bldgappr_location.province": firstLoc.province, + "bldgappr_location.gen_code": "5TH", + "bldgappr_landref.date_created": "{{currentTimestamp}}", + "bldgappr_landref.date_modified": "{{currentTimestamp}}", + "bldgappr_landref.owner": firstLandRef.owner, + "bldgappr_landref.cloa_no": firstLandRef.cloaNo, + "bldgappr_landref.lot_no": firstLandRef.lotNo, + "bldgappr_landref.tdn": firstLandRef.tdn, + "bldgappr_landref.area": firstLandRef.area, + "bldgappr_landref.survey_no": firstLandRef.surveyNo, + "bldgappr_landref.blk_no": firstLandRef.blkNo, + "bldgappr_landref.gen_code": "5TH", + "bldgappr_generaldesc.date_created": "{{currentTimestamp}}", + "bldgappr_generaldesc.date_modified": "{{currentTimestamp}}", + "bldgappr_generaldesc.bldg_kind": firstGenDesc.bldgKind, + "bldgappr_generaldesc.struc_type": firstGenDesc.strucType, + "bldgappr_generaldesc.bldg_permit": firstGenDesc.bldgPermit, + "bldgappr_generaldesc.date_issued": DateFormat("yyyy-MM-dd") + .format(DateTime.parse(firstGenDesc.dateIssued!)), + "bldgappr_generaldesc.cct": null, + "bldgappr_generaldesc.cert_completion_issued": + DateFormat("yyyy-MM-dd") + .format(DateTime.parse(firstGenDesc.certCompletionIssued!)), + "bldgappr_generaldesc.cert_occupancy_issued": + DateFormat("yyyy-MM-dd") + .format(DateTime.parse(firstGenDesc.certOccupancyIssued!)), + "bldgappr_generaldesc.date_completed": DateFormat("yyyy-MM-dd") + .format(DateTime.parse(firstGenDesc.dateCompleted!)), + "bldgappr_generaldesc.date_occupied": DateFormat("yyyy-MM-dd") + .format(DateTime.parse(firstGenDesc.dateOccupied!)), + "bldgappr_generaldesc.bldg_age": firstGenDesc.bldgAge, + "bldgappr_generaldesc.no_storeys": firstGenDesc.noStoreys, + "bldgappr_generaldesc.area_1stfloor": firstGenDesc.area1Stfloor, + "bldgappr_generaldesc.area_2ndfloor": firstGenDesc.area2Ndfloor, + "bldgappr_generaldesc.area_3rdfloor": firstGenDesc.area3Rdfloor, + "bldgappr_generaldesc.area_4thfloor": firstGenDesc.area4Thfloor, + "bldgappr_generaldesc.total_floor_area": + firstGenDesc.totalFloorArea, + "bldgappr_generaldesc.floor_sketch": null, + "bldgappr_generaldesc.actual_use": firstGenDesc.actualUse, + "bldgappr_generaldesc.unit_value": firstGenDesc.unitValue, + "bldgappr_generaldesc.gen_code": "5TH", + "bldgappr_struct_materials.date_created": "{{currentTimestamp}}", + "bldgappr_struct_materials.date_modified": "{{currentTimestamp}}", + "bldgappr_struct_materials.foundation": firstStructMat.foundation, + "bldgappr_struct_materials.columns": firstStructMat.columns, + "bldgappr_struct_materials.beams": firstStructMat.beams, + "bldgappr_struct_materials.truss_framing": + firstStructMat.trussFraming, + "bldgappr_struct_materials.roof": firstStructMat.roof, + "bldgappr_struct_materials.flooring": firstStructMat.flooring, + "bldgappr_struct_materials.walls": firstStructMat.walls, + "bldgappr_struct_materials.others": firstStructMat.others, + "bldgappr_struct_materials.gen_code": "5TH", + "bldgappr_property_assessment.date_created": "{{currentTimestamp}}", + "bldgappr_property_assessment.date_modified": + "{{currentTimestamp}}", + "bldgappr_property_assessment.actual_use": firstAssess.actualUse, + "bldgappr_property_assessment.market_value": + firstAssess.marketValue, + "bldgappr_property_assessment.assessment_level": + firstAssess.assessmentLevel, + "bldgappr_property_assessment.assessed_value": + firstAssess.assessedValue, + "bldgappr_property_assessment.taxable": firstAssess.taxable, + "bldgappr_property_assessment.exempt": firstAssess.exempt, + "bldgappr_property_assessment.qtr": firstAssess.qtr, + "bldgappr_property_assessment.yr": firstAssess.yr, + "bldgappr_property_assessment.appraisedby_name": + firstAssess.appraisedbyName, + "bldgappr_property_assessment.appraisedby_designation": + firstAssess.appraisedbyDesignation, + "bldgappr_property_assessment.appraisedby_date": + DateFormat("yyyy-MM-dd") + .format(DateTime.parse(firstAssess.appraisedbyDate!)), + "bldgappr_property_assessment.recommendappr_name": + firstAssess.recommendapprName, + "bldgappr_property_assessment.recommendappr_designation": + firstAssess.recommendapprDesignation, + "bldgappr_property_assessment.recommendappr_date": + DateFormat("yyyy-MM-dd") + .format(DateTime.parse(firstAssess.recommendapprDate!)), + "bldgappr_property_assessment.approvedby_name": + firstAssess.approvedbyName, + "bldgappr_property_assessment.approvedby_designation": + firstAssess.approvedbyDesignation, + "bldgappr_property_assessment.approvedby_date": + DateFormat("yyyy-MM-dd") + .format(DateTime.parse(firstAssess.approvedbyDate!)), + "bldgappr_property_assessment.memoranda": firstAssess.memoranda, + "bldgappr_property_assessment.note": firstAssess.note, + "bldgappr_property_assessment.swornstatement_no": + firstAssess.swornstatementNo, + "bldgappr_property_assessment.date_received": + DateFormat("yyyy-MM-dd") + .format(DateTime.parse(firstAssess.dateReceived!)), + "bldgappr_property_assessment.entry_date_assessment": + DateFormat("yyyy-MM-dd") + .format(DateTime.parse(firstAssess.entryDateAssessment!)), + "bldgappr_property_assessment.entry_date_by": " ", + "bldgappr_property_assessment.gen_code": "5TH", + "bldgappr_rec_supersededass.date_created": "{{currentTimestamp}}", + "bldgappr_rec_supersededass.date_modified": "{{currentTimestamp}}", + "bldgappr_rec_supersededass.pin": " ", + "bldgappr_rec_supersededass.tdn": " ", + "bldgappr_rec_supersededass.total_assval": "0", + "bldgappr_rec_supersededass.owner": " ", + "bldgappr_rec_supersededass.effectivity_ass": null, + "bldgappr_rec_supersededass.page_no": "0", + "bldgappr_rec_supersededass.total_marketval": "0", + "bldgappr_rec_supersededass.total_area": "0", + "bldgappr_rec_supersededass.rec_assessment": null, + "bldgappr_rec_supersededass.rec_taxmapping": " ", + "bldgappr_rec_supersededass.rec_records": " ", + "bldgappr_rec_supersededass.date": null, + "bldgappr_rec_supersededass.gen_code": "5TH" + }; - // print(details); + // http.Response response = + // (await BuildingServices.instance.add(details))!; + // print(response.body); - String xClientKey = "unitK3CQaXiWlPReDsBzmmwBZPd9Re1z"; - String xClientKeySecret = "unitcYqAN7GGalyz"; - Map headers = { - 'Content-Type': 'application/json; charset=UTF-8', - 'X-Client-Key': xClientKey, - 'X-Client-Secret': xClientKeySecret - }; + String xClientKey = "unitK3CQaXiWlPReDsBzmmwBZPd9Re1z"; + String xClientKeySecret = "unitcYqAN7GGalyz"; + Map headers = { + 'Content-Type': 'application/json; charset=UTF-8', + 'X-Client-Key': xClientKey, + 'X-Client-Secret': xClientKeySecret + }; - Response details_response = await post( - Uri.parse( - 'http://${Url.instance.host()}/api/rptass_app/bldgappr_details/'), - headers: headers, - body: jsonEncode(details)); - - final datas = json.decode(details_response.body); - for (AdditionalItems items in addItemsList) { - final addItems = AdditionalItems( - id: 1, - bldgapprDetailsId: datas['data']['id'], - classId: items.classId, - className: items.className, - structType: items.structType, - unitValue: items.unitValue, - baseUnitValue: items.baseUnitValue, - area: items.area, - marketValue: items.marketValue, - depreciationRate: items.depreciationRate, - adjustedMarketVal: items.adjustedMarketVal, - amtDepreciation: items.amtDepreciation, - painted: items.painted, - secondhand: items.secondhand, - paintedUnitval: items.paintedUnitval, - secondhandUnitval: items.secondhandUnitval, - actualUse: items.actualUse, - genCode: "5TH"); - Response add_response = await post( + Response details_response = await post( Uri.parse( - 'http://${Url.instance.host()}/api/rptass_app/additional_items/'), + 'https://${Url.instance.host()}/api/rptass_app/bldgappr_details/'), headers: headers, - body: jsonEncode(addItems)); - } - for (BldgAndStructure structure in bldgStructureList) { - final bldgStruc = BldgAndStructure( - id: 1, - bldgapprDetailsId: datas['data']['id'], - bldgArea: structure.bldgArea, - bldgType: structure.bldgType, - structType: structure.structType, - description: structure.description, - actualUse: structure.actualUse, - floorCount: structure.floorCount, - unitValue: structure.unitValue, - depRate: structure.depRate, - marketValue: structure.marketValue, - depAmount: structure.depAmount, - adjustedMarketValue: structure.adjustedMarketValue, - genCode: '5TH', - buccPercentage: structure.buccPercentage); - print(bldgStruc.toJson()); - Response response = await post( - Uri.parse( - 'http://${Url.instance.host()}/api/rptass_app/bldgappr_structure/'), - headers: headers, - body: jsonEncode(bldgStruc)); + body: jsonEncode(details)); + + final datas = json.decode(details_response.body); + + for (AdditionalItems items in addItemsList) { + final addItems = AdditionalItems( + id: 1, + bldgapprDetailsId: datas['data']['id'], + classId: items.classId, + className: items.className, + structType: items.structType, + unitValue: items.unitValue, + baseUnitValue: items.baseUnitValue, + area: items.area, + marketValue: items.marketValue, + depreciationRate: items.depreciationRate, + adjustedMarketVal: items.adjustedMarketVal, + amtDepreciation: items.amtDepreciation, + painted: items.painted, + secondhand: items.secondhand, + paintedUnitval: items.paintedUnitval, + secondhandUnitval: items.secondhandUnitval, + actualUse: items.actualUse, + genCode: "5TH"); + Response add_response = await post( + Uri.parse( + 'https://${Url.instance.host()}/api/rptass_app/additional_items/'), + headers: headers, + body: jsonEncode(addItems)); + print('add_response.body'); + print(add_response.body); + } + for (BldgAndStructure structure in bldgStructureList) { + final bldgStruc = BldgAndStructure( + id: 1, + bldgapprDetailsId: datas['data']['id'], + bldgArea: structure.bldgArea, + bldgType: structure.bldgType, + structType: structure.structType, + description: structure.description, + actualUse: structure.actualUse, + floorCount: structure.floorCount, + unitValue: structure.unitValue, + depRate: structure.depRate, + marketValue: structure.marketValue, + depAmount: structure.depAmount, + adjustedMarketValue: structure.adjustedMarketValue, + genCode: '5TH', + buccPercentage: structure.buccPercentage); + print(bldgStruc.toJson()); + Response response = await post( + Uri.parse( + 'https://${Url.instance.host()}/api/rptass_app/bldgappr_structure/'), + headers: headers, + body: jsonEncode(bldgStruc)); + print('response.body'); + print(response.body); + } } + emit(PropertyInfoLoaded(propertyInfos: propertyOwner)); + } catch (e) { + print(e.toString()); + emit(PropertyOwnerInfoErrorState(errorMessage: e.toString())); } - emit(PropertyInfoLoaded(propertyInfos: propertyOwner)); })); } } diff --git a/lib/model/passo/property_assessment.dart b/lib/model/passo/property_assessment.dart index 9ee1bd2..b62c1ab 100644 --- a/lib/model/passo/property_assessment.dart +++ b/lib/model/passo/property_assessment.dart @@ -31,6 +31,7 @@ class PropertyAssessment { final String recommendapprName; final String recommendapprDate; final String approvedbyName; + final String approvedbyDate; final String memoranda; final String swornstatementNo; final String dateReceived; @@ -62,6 +63,7 @@ class PropertyAssessment { required this.recommendapprName, required this.recommendapprDate, required this.approvedbyName, + required this.approvedbyDate, required this.memoranda, required this.swornstatementNo, required this.dateReceived, @@ -95,6 +97,7 @@ class PropertyAssessment { String? recommendapprName, String? recommendapprDate, String? approvedbyName, + String? approvedbyDate, String? memoranda, String? swornstatementNo, String? dateReceived, @@ -126,6 +129,7 @@ class PropertyAssessment { recommendapprName: recommendapprName ?? this.recommendapprName, recommendapprDate: recommendapprDate ?? this.recommendapprDate, approvedbyName: approvedbyName ?? this.approvedbyName, + approvedbyDate: approvedbyDate ?? this.approvedbyDate, memoranda: memoranda ?? this.memoranda, swornstatementNo: swornstatementNo ?? this.swornstatementNo, dateReceived: dateReceived ?? this.dateReceived, @@ -162,6 +166,7 @@ class PropertyAssessment { recommendapprName: json["recommendappr_name"], recommendapprDate: json["recommendappr_date"], approvedbyName: json["approvedby_name"], + approvedbyDate: json["approvedby_date"], memoranda: json["memoranda"], swornstatementNo: json["swornstatement_no"], dateReceived: json["date_received"], @@ -195,6 +200,7 @@ class PropertyAssessment { recommendapprName: json["recommendapprName"], recommendapprDate: json["recommendapprDate"], approvedbyName: json["approvedbyName"], + approvedbyDate: json["approvedbyDate"], memoranda: json["memoranda"], swornstatementNo: json["swornstatementNo"], dateReceived: json["dateReceived"], @@ -227,6 +233,7 @@ class PropertyAssessment { "recommendappr_name": recommendapprName, "recommendappr_date": recommendapprDate, "approvedby_name": approvedbyName, + "approvedby_date": approvedbyDate, "memoranda": memoranda, "swornstatement_no": swornstatementNo, "date_received": dateReceived, diff --git a/lib/screens/offline/passo/admin/barangay.dart b/lib/screens/offline/passo/admin/barangay.dart index b482d97..5e97384 100644 --- a/lib/screens/offline/passo/admin/barangay.dart +++ b/lib/screens/offline/passo/admin/barangay.dart @@ -40,6 +40,8 @@ class _BarangayAdminPage extends State { for (Brgy brgy in brgys) { await SQLServices.instance.createBarangay(brgy); } + + context.read().add(LoadBarangay()); } catch (e) { // Handle any errors that might occur during the API call or database insertion. print("Error: $e"); diff --git a/lib/screens/offline/passo/admin/class_components.dart b/lib/screens/offline/passo/admin/class_components.dart index aee55b9..4169055 100644 --- a/lib/screens/offline/passo/admin/class_components.dart +++ b/lib/screens/offline/passo/admin/class_components.dart @@ -73,6 +73,10 @@ class _ClassComponentsAdminPage extends State { } } + context + .read() + .add(LoadClassComponents()); + // Assuming result is a List of JSON objects, convert them to City objects. } catch (e) { // Handle any errors that might occur during the API call or database insertion. diff --git a/lib/screens/offline/passo/admin/memoranda.dart b/lib/screens/offline/passo/admin/memoranda.dart index d7955e3..034c805 100644 --- a/lib/screens/offline/passo/admin/memoranda.dart +++ b/lib/screens/offline/passo/admin/memoranda.dart @@ -59,6 +59,8 @@ class _MemorandaAdminPage extends State { await SQLServices.instance.createMemoranda(memo); } } + + context.read().add(LoadMemoranda()); } catch (e) { // Handle any errors that might occur during the API call or database insertion. print("Error: $e"); diff --git a/lib/screens/offline/passo/admin/municipalities.dart b/lib/screens/offline/passo/admin/municipalities.dart index efe9421..253e7a9 100644 --- a/lib/screens/offline/passo/admin/municipalities.dart +++ b/lib/screens/offline/passo/admin/municipalities.dart @@ -43,6 +43,10 @@ class _MunicipalitiesAdminPage extends State { print(city.cityCode); await SQLServices.instance.createMunicipalities(city); } + + context + .read() + .add(LoadMunicipalities()); } catch (e) { // Handle any errors that might occur during the API call or database insertion. print("Error: $e"); diff --git a/lib/screens/offline/passo/admin/signatories.dart b/lib/screens/offline/passo/admin/signatories.dart index 610e4cd..931e016 100644 --- a/lib/screens/offline/passo/admin/signatories.dart +++ b/lib/screens/offline/passo/admin/signatories.dart @@ -54,6 +54,7 @@ class _SignatoriesAdminPage extends State { await SQLServices.instance.createSignatories(signatory); } } + context.read().add(LoadSignatories()); } catch (e) { // Handle any errors that might occur during the API call or database insertion. print("Error: $e"); diff --git a/lib/screens/offline/passo/admin/unit_construction.dart b/lib/screens/offline/passo/admin/unit_construction.dart index 9ce7153..e99b902 100644 --- a/lib/screens/offline/passo/admin/unit_construction.dart +++ b/lib/screens/offline/passo/admin/unit_construction.dart @@ -13,6 +13,8 @@ import '../../../../sevices/offline/offline_passo/admin/sql_services/sql_service import '../../../../theme-data.dart/colors.dart'; import 'package:http/http.dart'; +import '../../../../utils/urls.dart'; + class UnitConstructionAdminPage extends StatefulWidget { const UnitConstructionAdminPage(); @@ -45,7 +47,7 @@ class _UnitConstructionAdminPage extends State { // Loop through the list of City objects and insert them into the local database. Response response = await get(Uri.parse( - 'http://192.168.80.20:8000/api/rptass_app/unitconstruct_values/')); + 'http://${Url.instance.host()}/api/rptass_app/unitconstruct_values/')); print(response.body); if (response.statusCode == 200) { @@ -60,6 +62,10 @@ class _UnitConstructionAdminPage extends State { for (UnitConstruct unit in units) { await SQLServices.instance.createUnitConstruction(unit); } + + context + .read() + .add(LoadUnitConstruct()); } } catch (e) { // Handle any errors that might occur during the API call or database insertion. diff --git a/lib/screens/offline/passo/building/add/AddExtraItemsOffline.dart b/lib/screens/offline/passo/building/add/AddExtraItemsOffline.dart index 51e39b6..c4e132b 100644 --- a/lib/screens/offline/passo/building/add/AddExtraItemsOffline.dart +++ b/lib/screens/offline/passo/building/add/AddExtraItemsOffline.dart @@ -75,6 +75,14 @@ class _AddExtraItemsOffline extends State { } } + double _calculateMarketValue(unitVal, unitBase, area, withBUCC) { + if (withBUCC == false) { + return ((unitVal * unitBase) * area); + } else { + return (unitVal * area); + } + } + @override Widget build(BuildContext context) { return BlocBuilder( @@ -143,6 +151,12 @@ class _AddExtraItemsOffline extends State { 'unitValue': value.minBaseUnitvalPercent }); + formKey.currentState!.patchValue({ + 'buccValue': (double.parse(value + .minBaseUnitvalPercent!) * + 100) + .toString() + }); } if (value.maxBaseUnitvalPercent != '0.00') { @@ -159,6 +173,12 @@ class _AddExtraItemsOffline extends State { 'unitValue': value.maxBaseUnitvalPercent }); + formKey.currentState!.patchValue({ + 'buccValue': (double.parse(value + .maxBaseUnitvalPercent!) * + 100) + .toString() + }); } if (value.minUnitvalSqrmtr != '0.00') { setState(() { @@ -173,6 +193,8 @@ class _AddExtraItemsOffline extends State { formKey.currentState!.patchValue({ 'unitValue': value.minUnitvalSqrmtr }); + formKey.currentState! + .patchValue({'buccValue': '100'}); } if (value.maxUnitvalSqrmtr != '0.00') { setState(() { @@ -187,6 +209,8 @@ class _AddExtraItemsOffline extends State { formKey.currentState!.patchValue({ 'unitValue': value.maxUnitvalSqrmtr }); + formKey.currentState! + .patchValue({'buccValue': '100'}); } if (value.minAddBaseunitval != '0.00') { setState(() { @@ -201,6 +225,8 @@ class _AddExtraItemsOffline extends State { formKey.currentState!.patchValue({ 'unitValue': value.minAddBaseunitval }); + formKey.currentState! + .patchValue({'buccValue': '100'}); } if (value.maxAddBaseunitval != '0.00') { setState(() { @@ -215,6 +241,8 @@ class _AddExtraItemsOffline extends State { formKey.currentState!.patchValue({ 'unitValue': value.maxAddBaseunitval }); + formKey.currentState! + .patchValue({'buccValue': '100'}); } if (value.minDeductBaserate != '0.00') { setState(() { @@ -229,6 +257,8 @@ class _AddExtraItemsOffline extends State { formKey.currentState!.patchValue({ 'unitValue': value.minDeductBaserate }); + formKey.currentState! + .patchValue({'buccValue': '100'}); } if (value.maxDeductBaserate != '0.00') { setState(() { @@ -243,6 +273,8 @@ class _AddExtraItemsOffline extends State { formKey.currentState!.patchValue({ 'unitValue': value.maxDeductBaserate }); + formKey.currentState! + .patchValue({'buccValue': '100'}); } }, ), @@ -284,10 +316,11 @@ class _AddExtraItemsOffline extends State { onSuggestionTap: (unit) { setState(() { if (_withoutBUCC) { - _unitBase = double.parse( - unit.item!.unitValue); + _unitBase = _unitValue; _structureType = '${unit.item!.bldgType} - ${unit.item!.building}'; + formKey.currentState! + .patchValue({'buccValue': '100'}); } else { _unitBase = double.parse( unit.item!.unitValue); @@ -341,6 +374,40 @@ class _AddExtraItemsOffline extends State { ), ), const SizedBox(width: 10), + Expanded( + flex: 1, + child: FormBuilderTextField( + name: 'buccValue', + decoration: + normalTextFieldStyle("BUCC", ""), + validator: + FormBuilderValidators.compose([]), + onChanged: (value) { + // setState(() { + // _areaValue = double.parse(value!); + // }); + }, + ), + ), + const SizedBox( + height: 40, + width: 40, + child: Center( + child: Text( + '%', + style: TextStyle( + fontSize: 18, + fontWeight: FontWeight.bold), + ), + ), + ) + ], + ), + SizedBox( + height: 10, + ), + Row( + children: [ Expanded( flex: 1, child: FormBuilderTextField( @@ -579,33 +646,33 @@ class _AddExtraItemsOffline extends State { final tempID = await SharedPreferences .getInstance(); - context - .read< - AdditionalItemsOfflineBloc>() - .add(AddAdditionalItems( + context.read().add( + AddAdditionalItems( id: 1, - bldgapprDetailsId: tempID.getInt( - 'tempid')!, + bldgapprDetailsId: + tempID.getInt('tempid')!, classId: _classId, assessedById: widget .offlineProfile.id .toString(), - assessedByName: - widget - .offlineProfile.firstName!, + assessedByName: widget + .offlineProfile + .firstName!, dateCreated: formatter, dateModified: 'None', className: _className, structType: _structureType, - unitValue: _withoutBUCC == - true - ? 0 - : _unitValue, + unitValue: _withoutBUCC == true + ? 100 + : _unitValue * 100, baseUnitValue: _unitBase, area: _areaValue, - marketValue: (_unitValue * - _unitBase) * - _areaValue, + marketValue: + _calculateMarketValue( + _unitValue, + _unitBase, + _areaValue, + _withoutBUCC), depreciationRate: _depValue, adjustedMarketVal: _totalMarketValue( diff --git a/lib/screens/offline/passo/building/add/general_description.dart b/lib/screens/offline/passo/building/add/general_description.dart index 92066e3..cce549e 100644 --- a/lib/screens/offline/passo/building/add/general_description.dart +++ b/lib/screens/offline/passo/building/add/general_description.dart @@ -261,31 +261,31 @@ class _GeneralDescriptionOfflinePage dateModified: 'None', bldgKind: bldgKind ?? "", strucType: bldgType ?? "", - bldgPermit: offlineBldgKey - .currentState?.value['bldg_permit'] ?? - "", + bldgPermit: + offlineBldgKey.currentState?.value['bldg_permit'] ?? + " ", dateIssued: offlineBldgKey .currentState!.value['date_issued'] .toString() ?? - "", + " ", cct: 'None', certCompletionIssued: offlineBldgKey .currentState!.value['coc_issued'] .toString() ?? - "", + " ", certOccupancyIssued: offlineBldgKey .currentState!.value['coo_issued'] .toString() ?? - "", + " ", dateCompleted: offlineBldgKey.currentState!.value['date_cnstructed'].toString() ?? "", dateOccupied: offlineBldgKey.currentState!.value['date_occupied'].toString() ?? "", - bldgAge: offlineBldgKey.currentState!.value['bldg_age'] ?? "", - noStoreys: offlineBldgKey.currentState!.value['no_of_storeys'] ?? "", - area1Stfloor: offlineBldgKey.currentState!.value['area_of_1stFl'] ?? "", - area2Ndfloor: offlineBldgKey.currentState!.value['area_of_2ndFl'] ?? "", - area3Rdfloor: offlineBldgKey.currentState!.value['area_of_3rdFl'] ?? "", - area4Thfloor: offlineBldgKey.currentState!.value['area_of_4thFl'] ?? "", - totalFloorArea: offlineBldgKey.currentState?.value['total_area'] ?? "", + bldgAge: offlineBldgKey.currentState!.value['bldg_age'] ?? "0", + noStoreys: offlineBldgKey.currentState!.value['no_of_storeys'] ?? "0", + area1Stfloor: offlineBldgKey.currentState!.value['area_of_1stFl'] ?? "0", + area2Ndfloor: offlineBldgKey.currentState!.value['area_of_2ndFl'] ?? "0", + area3Rdfloor: offlineBldgKey.currentState!.value['area_of_3rdFl'] ?? "0", + area4Thfloor: offlineBldgKey.currentState!.value['area_of_4thFl'] ?? "0", + totalFloorArea: offlineBldgKey.currentState?.value['total_area'] ?? "0", floorSketch: null, actualUse: offlineBldgKey.currentState?.value['actual_use'] ?? "", unitValue: unitValue ?? "", diff --git a/lib/screens/offline/passo/building/add/landref_location.dart b/lib/screens/offline/passo/building/add/landref_location.dart index 548e158..fb00c36 100644 --- a/lib/screens/offline/passo/building/add/landref_location.dart +++ b/lib/screens/offline/passo/building/add/landref_location.dart @@ -298,7 +298,7 @@ class _LandRefLocationOfflinePage extends State { ?.value['municipality'] .cityDescription ?? "", - province: "Agusan Del Norte", + province: "AGUSAN DEL NORTE", genCode: "5th")); context.read().add(AddLandRef( @@ -324,7 +324,7 @@ class _LandRefLocationOfflinePage extends State { ?.value['l_td_arp'] ?? "", area: - offlineBldgKey.currentState?.value['area'] ?? "", + offlineBldgKey.currentState?.value['area'] ?? "0", surveyNo: offlineBldgKey.currentState?.value['survey_no'] ?? "", blkNo: offlineBldgKey.currentState?.value['blk_no'] ?? "", genCode: '5th')); diff --git a/lib/screens/offline/passo/building/add/property_appraisal.dart b/lib/screens/offline/passo/building/add/property_appraisal.dart index 3f845c5..49f5a41 100644 --- a/lib/screens/offline/passo/building/add/property_appraisal.dart +++ b/lib/screens/offline/passo/building/add/property_appraisal.dart @@ -589,7 +589,7 @@ class _PropertyAppraisalOfflinePage ...state.bldgAndStructure .map((dataRow) { return DataRow(cells: [ - DataCell(Text(dataRow.actualUse!)), + DataCell(Text(dataRow.structType!)), DataCell(Text("")), DataCell(Text( NumberFormat.currency( diff --git a/lib/screens/offline/passo/building/add/property_assessment.dart b/lib/screens/offline/passo/building/add/property_assessment.dart index ff6ec84..b4a7cb5 100644 --- a/lib/screens/offline/passo/building/add/property_assessment.dart +++ b/lib/screens/offline/passo/building/add/property_assessment.dart @@ -12,7 +12,11 @@ import 'package:accordion/accordion.dart'; import 'package:accordion/controllers.dart'; import 'package:unit2/widgets/passo/custom_formBuilder_fields.dart'; +import '../../../../../bloc/offline/offline_passo/building/additional_items_offline/additional_items_offline_bloc.dart'; import '../../../../../bloc/offline/offline_passo/building/assessment_offline/bldg_assessment_offline_bloc.dart'; +import '../../../../../bloc/offline/offline_passo/building/building_and_structure/building_and_structure_bloc.dart'; +import '../../../../../model/passo/additional_items.dart'; +import '../../../../../model/passo/building_and_structure.dart'; import '../../../../../model/passo/memoranda.dart'; import '../../../../../model/passo/signatories.dart'; import '../../../../../theme-data.dart/colors.dart'; @@ -54,6 +58,441 @@ class _PropertyAssessmentOfflinePage TextEditingController memorandaController = TextEditingController(); TextEditingController noteController = TextEditingController(); + String assessmentLevel(marketValues, property_class) { + final marketValue = marketValues; + switch (property_class) { + case 'Residential': + if (marketValue < 175000) { + // setState(() { + // assessment_level = 0; + // }); + return '0 '; + } else if (marketValue < 300000 && marketValue > 175000) { + // setState(() { + // assessment_level = 0.10; + // }); + return '10 '; + } else if (marketValue < 500000 && marketValue > 300000) { + // setState(() { + // assessment_level = 0.20; + // }); + return '20 '; + } else if (marketValue < 750000 && marketValue > 500000) { + // setState(() { + // assessment_level = 0.25; + // }); + return '25 '; + } else if (marketValue < 1000000 && marketValue > 750000) { + // setState(() { + // assessment_level = 0.30; + // }); + return '30 '; + } else if (marketValue < 2000000 && marketValue > 1000000) { + // setState(() { + // assessment_level = 0.35; + // }); + return '35 '; + } else if (marketValue < 5000000 && marketValue > 2000000) { + // setState(() { + // assessment_level = 0.40; + // }); + return '40 '; + } else if (marketValue < 10000000 && marketValue > 5000000) { + // setState(() { + // assessment_level = 0.50; + // }); + return '50 '; + } else if (marketValue > 10000000) { + // setState(() { + // assessment_level = 0.60; + // }); + return '60 '; + } + break; + case 'Agricultural': + if (marketValue < 300000) { + // setState(() { + // assessment_level = 0.45; + // }); + return '45 '; + } else if (marketValue < 500000 && marketValue > 300000) { + // setState(() { + // assessment_level = 0.50; + // }); + return '50 '; + } else if (marketValue < 750000 && marketValue > 5000000) { + // setState(() { + // assessment_level = 0.55; + // }); + return '55 '; + } else if (marketValue < 1000000 && marketValue > 750000) { + // setState(() { + // assessment_level = 0.60; + // }); + return '60 '; + } else if (marketValue < 2000000 && marketValue > 1000000) { + // setState(() { + // assessment_level = 0.65; + // }); + return '65 '; + } else if (marketValue > 2000000) { + // setState(() { + // assessment_level = 0.70; + // }); + return '70 '; + } + break; + case 'Commercial': + if (marketValue < 300000) { + // setState(() { + // assessment_level = 0.30; + // }); + return '30 '; + } else if (marketValue < 500000 && marketValue > 300000) { + // setState(() { + // assessment_level = 0.35; + // }); + return '35 '; + } else if (marketValue < 750000 && marketValue > 500000) { + // setState(() { + // assessment_level = 0.40; + // }); + return '40 '; + } else if (marketValue < 1000000 && marketValue > 750000) { + // setState(() { + // assessment_level = 0.50; + // }); + return '50 '; + } else if (marketValue < 2000000 && marketValue > 1000000) { + // setState(() { + // assessment_level = 0.60; + // }); + return '60 '; + } else if (marketValue < 5000000 && marketValue > 2000000) { + // setState(() { + // assessment_level = 0.70; + // }); + return '70 '; + } else if (marketValue < 10000000 && marketValue > 5000000) { + // setState(() { + // assessment_level = 0.75; + // }); + return '75 '; + } else if (marketValue > 10000000) { + // setState(() { + // assessment_level = 0.80; + // }); + } + break; + case 'Industrial': + if (marketValue < 300000) { + // setState(() { + // assessment_level = 0.30; + // }); + return '30 '; + } else if (marketValue < 500000 && marketValue > 300000) { + // setState(() { + // assessment_level = 0.35; + // }); + return '35 '; + } else if (marketValue < 750000 && marketValue > 500000) { + // setState(() { + // assessment_level = 0.40; + // }); + return '40 '; + } else if (marketValue < 1000000 && marketValue > 750000) { + // setState(() { + // assessment_level = 0.50; + // }); + return '50 '; + } else if (marketValue < 2000000 && marketValue > 1000000) { + // setState(() { + // assessment_level = 0.60; + // }); + return '60 '; + } else if (marketValue < 5000000 && marketValue > 2000000) { + // setState(() { + // assessment_level = 0.70; + // }); + return '70 '; + } else if (marketValue < 10000000 && marketValue > 5000000) { + // setState(() { + // assessment_level = 0.75; + // }); + return '75 '; + } else if (marketValue > 10000000) { + // setState(() { + // assessment_level = 0.80; + // }); + return '80 '; + } + break; + case 'Mineral': + break; + case 'Timberland': + if (marketValue < 300000) { + // setState(() { + // assessment_level = 0.45; + // }); + return '45 '; + } else if (marketValue < 500000 && marketValue > 300000) { + // setState(() { + // assessment_level = 0.50; + // }); + return '50 '; + } else if (marketValue < 750000 && marketValue > 500000) { + // setState(() { + // assessment_level = 0.55; + // }); + return '55 '; + } else if (marketValue < 1000000 && marketValue > 750000) { + // setState(() { + // assessment_level = 0.60; + // }); + return '60 '; + } else if (marketValue < 2000000 && marketValue > 1000000) { + // setState(() { + // assessment_level = 0.65; + // }); + return '65 '; + } else if (marketValue < 2000000) { + // setState(() { + // assessment_level = 0.70; + // }); + return '70 '; + } + break; + default: + } + return ''; + } + + double assessmentValue(marketValues, property_class) { + final marketValue = marketValues; + switch (property_class) { + case 'Residential': + if (marketValue < 175000) { + // setState(() { + // assessment_level = 0; + // }); + return marketValue * 0; + } else if (marketValue < 300000 && marketValue > 175000) { + // setState(() { + // assessment_level = 0.10; + // }); + return marketValue * 0.10; + } else if (marketValue < 500000 && marketValue > 300000) { + // setState(() { + // assessment_level = 0.20; + // }); + return marketValue * 0.20; + } else if (marketValue < 750000 && marketValue > 500000) { + // setState(() { + // assessment_level = 0.25; + // }); + return marketValue * 0.25; + } else if (marketValue < 1000000 && marketValue > 750000) { + // setState(() { + // assessment_level = 0.30; + // }); + return marketValue * 0.30; + } else if (marketValue < 2000000 && marketValue > 1000000) { + // setState(() { + // assessment_level = 0.35; + // }); + return marketValue * 0.35; + } else if (marketValue < 5000000 && marketValue > 2000000) { + // setState(() { + // assessment_level = 0.40; + // }); + return marketValue * 0.40; + } else if (marketValue < 10000000 && marketValue > 5000000) { + // setState(() { + // assessment_level = 0.50; + // }); + return marketValue * 0.50; + } else if (marketValue > 10000000) { + // setState(() { + // assessment_level = 0.60; + // }); + return marketValue * 0.60; + } + break; + case 'Agricultural': + if (marketValue < 300000) { + // setState(() { + // assessment_level = 0.45; + // }); + return marketValue * 0.45; + } else if (marketValue < 500000 && marketValue > 300000) { + // setState(() { + // assessment_level = 0.50; + // }); + return marketValue * 0.50; + } else if (marketValue < 750000 && marketValue > 5000000) { + // setState(() { + // assessment_level = 0.55; + // }); + return marketValue * 0.55; + } else if (marketValue < 1000000 && marketValue > 750000) { + // setState(() { + // assessment_level = 0.60; + // }); + return marketValue * 0.60; + } else if (marketValue < 2000000 && marketValue > 1000000) { + // setState(() { + // assessment_level = 0.65; + // }); + return marketValue * 0.65; + } else if (marketValue > 2000000) { + // setState(() { + // assessment_level = 0.70; + // }); + return marketValue * 0.70; + } + break; + case 'Commercial': + if (marketValue < 300000) { + // setState(() { + // assessment_level = 0.30; + // }); + return marketValue * 0.30; + } else if (marketValue < 500000 && marketValue > 300000) { + // setState(() { + // assessment_level = 0.35; + // }); + return marketValue * 0.35; + } else if (marketValue < 750000 && marketValue > 500000) { + // setState(() { + // assessment_level = 0.40; + // }); + return marketValue * 0.40; + } else if (marketValue < 1000000 && marketValue > 750000) { + // setState(() { + // assessment_level = 0.50; + // }); + return marketValue * 0.50; + } else if (marketValue < 2000000 && marketValue > 1000000) { + // setState(() { + // assessment_level = 0.60; + // }); + return marketValue * 0.60; + } else if (marketValue < 5000000 && marketValue > 2000000) { + // setState(() { + // assessment_level = 0.70; + // }); + return marketValue * 0.70; + } else if (marketValue < 10000000 && marketValue > 5000000) { + // setState(() { + // assessment_level = 0.75; + // }); + return marketValue * 0.75; + } else if (marketValue > 10000000) { + // setState(() { + // assessment_level = 0.80; + // }); + } + break; + case 'Industrial': + if (marketValue < 300000) { + // setState(() { + // assessment_level = 0.30; + // }); + return marketValue * 0.30; + } else if (marketValue < 500000 && marketValue > 300000) { + // setState(() { + // assessment_level = 0.35; + // }); + return marketValue * 0.35; + } else if (marketValue < 750000 && marketValue > 500000) { + // setState(() { + // assessment_level = 0.40; + // }); + return marketValue * 0.40; + } else if (marketValue < 1000000 && marketValue > 750000) { + // setState(() { + // assessment_level = 0.50; + // }); + return marketValue * 0.50; + } else if (marketValue < 2000000 && marketValue > 1000000) { + // setState(() { + // assessment_level = 0.60; + // }); + return marketValue * 0.60; + } else if (marketValue < 5000000 && marketValue > 2000000) { + // setState(() { + // assessment_level = 0.70; + // }); + return marketValue * 0.70; + } else if (marketValue < 10000000 && marketValue > 5000000) { + // setState(() { + // assessment_level = 0.75; + // }); + return marketValue * 0.75; + } else if (marketValue > 10000000) { + // setState(() { + // assessment_level = 0.80; + // }); + return marketValue * 0.80; + } + break; + case 'Mineral': + break; + case 'Timberland': + if (marketValue < 300000) { + // setState(() { + // assessment_level = 0.45; + // }); + return marketValue * 0.45; + } else if (marketValue < 500000 && marketValue > 300000) { + // setState(() { + // assessment_level = 0.50; + // }); + return marketValue * 0.50; + } else if (marketValue < 750000 && marketValue > 500000) { + // setState(() { + // assessment_level = 0.55; + // }); + return marketValue * 0.55; + } else if (marketValue < 1000000 && marketValue > 750000) { + // setState(() { + // assessment_level = 0.60; + // }); + return marketValue * 0.60; + } else if (marketValue < 2000000 && marketValue > 1000000) { + // setState(() { + // assessment_level = 0.65; + // }); + return marketValue * 0.65; + } else if (marketValue < 2000000) { + // setState(() { + // assessment_level = 0.70; + // }); + return marketValue * 0.70; + } + break; + default: + } + return 0; + } + + _calculateMarketValue( + List items, List bldg) { + double add_sum = 0; + double product = 1; + double bldg_sum = 0; + + for (AdditionalItems value in items) { + add_sum += double.parse(value.adjustedMarketVal.toString()); + } + + for (BldgAndStructure value in bldg) { + bldg_sum += double.parse(value.adjustedMarketValue.toString()); + } + + return add_sum + bldg_sum; + } + @override Widget build(BuildContext context) { var width = MediaQuery.of(context).size.width; @@ -71,822 +510,976 @@ class _PropertyAssessmentOfflinePage }, builder: (context, state) { if (state is SignatoriesLoaded) { - return Scaffold( - body: ListView(children: [ - Align( - alignment: Alignment.center, - child: Container( - margin: const EdgeInsets.fromLTRB(0, 20, 0, 20), - child: const Text( - 'PROPERTY ASSESSMENT cont..', - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 18, - ), - textAlign: TextAlign.left, - ), - ), - ), - Expanded( - flex: 3, - child: SingleChildScrollView( - padding: const EdgeInsets.only(left: 20.0, right: 20.0), - scrollDirection: Axis.vertical, - child: Column( - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - Row( - children: [ - const Text('Taxable'), - Checkbox( - checkColor: Colors.white, - value: isTaxable, - onChanged: (bool? value) { - setState(() { - isTaxable = value!; - }); - }, - ) - ], - ), - Row( - children: [ - const Text('Exempt'), - Checkbox( - checkColor: Colors.white, - value: isExempt, - onChanged: (bool? value) { - setState(() { - isExempt = value!; - }); - }, - ) - ], - ), - ], - ), - Column( - children: [ - const SizedBox( - height: 20, - ), - const Text( - 'EFFECTIVITY OF ASSESSMENT / REASSESSMENT / SWORN STATEMENT:', - style: TextStyle(fontWeight: FontWeight.bold), - ), - const SizedBox( - height: 20, - ), - Row( - mainAxisAlignment: - MainAxisAlignment.spaceAround, - children: [ - SizedBox( - width: width / 3 - 20, - height: 50, - child: customDropDownField( - 'Qtr', '', 'qtr', quarter)), - SizedBox( - width: width / 3 - 20, - height: 50, - child: customTextField( - 'Sworn Statement No.', - '', - 'sworn_statement')), - SizedBox( - width: width / 3 - 20, - height: 50, - child: - customTextField('Year', '', 'yr')), - ], - ), - ], - ), - const SizedBox( - height: 30, - ), - const Divider( - thickness: 2, - ), - SingleChildScrollView( - scrollDirection: Axis.horizontal, - child: Expanded( - child: Row( - children: [ - const SizedBox( - width: 10, + final signatories = state.signatories; + return BlocConsumer( + listener: (context, state) { + // TODO: implement listener + }, + builder: (context, state) { + if (state is AdditionalItemsLoaded) { + final addItem = state.addItem; + return BlocConsumer( + listener: (context, state) { + // TODO: implement listener + }, + builder: (context, state) { + if (state is BuildingAndStructureLoaded) { + return Scaffold( + body: ListView(children: [ + Align( + alignment: Alignment.center, + child: Container( + margin: + const EdgeInsets.fromLTRB(0, 20, 0, 20), + child: const Text( + 'PROPERTY ASSESSMENT cont..', + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 18, ), - SizedBox( - width: width / 2 - 100, - height: 50, - child: customDatTimePicker( - 'Date Received', - '', - 'date_received')), - const SizedBox( - width: 20, - ), - SizedBox( - width: width / 2 - 100, - height: 50, - child: customDatTimePicker( - 'Date of Entry', - '', - 'date_of_entry')) - ], + textAlign: TextAlign.left, + ), ), ), - ), - const SizedBox( - height: 30, - ), - const Align( - alignment: Alignment.centerLeft, - child: Text( - 'APPRAISED/ASSESSED BY:', - style: TextStyle(fontWeight: FontWeight.bold), - textAlign: TextAlign.start, - ), - ), - const SizedBox( - height: 15, - ), - SingleChildScrollView( - scrollDirection: Axis.horizontal, - child: Row(children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const Text('Name'), - Container( - padding: EdgeInsets.fromLTRB(20, 0, 0, 0), - margin: const EdgeInsets.fromLTRB( - 0, 10, 0, 0), - width: 250, - decoration: BoxDecoration( - border: Border.all( - color: Colors - .grey, // You can set the color here - width: - 0.9, // You can set the width here - ), - borderRadius: BorderRadius.circular( - 5), // Set the border radius here - ), - child: SearchField( - itemHeight: 65, - - suggestions: state.signatories - .map((Signatories signatories) => - SearchFieldListItem( - '${signatories.firstname} ${signatories.middlename} ${signatories.lastname}', - item: signatories, - child: ListTile( - title: Text( - '${signatories.firstname} ${signatories.middlename} ${signatories.lastname!}', - overflow: TextOverflow - .ellipsis, - textAlign: - TextAlign.center, - ), - ))) - .toList(), - - validator: - FormBuilderValidators.required( - errorText: - "This field is required"), - searchStyle: TextStyle(), - - ////agency suggestion tap - focusNode: appraisedByFocus, - suggestionState: Suggestion.expand, - onSuggestionTap: (appraised) { - setState(() { - appraised_by = - "${appraised.item?.firstname} ${appraised.item?.middlename} ${appraised.item?.lastname}"; - appraised_by_designation = - appraised.item!.designation; - }); - appraisedByFocus.unfocus(); - }, - ), - ), - ], - ), - const SizedBox( - width: 10, - ), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text('Designation'), - Container( - padding: - EdgeInsets.fromLTRB(10, 15, 10, 10), - margin: const EdgeInsets.fromLTRB( - 0, 10, 0, 0), - width: 250, - height: 50, - decoration: BoxDecoration( - border: Border.all( - color: Colors - .grey, // You can set the color here - width: - 0.9, // You can set the width here - ), - borderRadius: BorderRadius.circular( - 5), // Set the border radius here - ), - child: Text( - appraised_by_designation - .toUpperCase(), - style: TextStyle(fontSize: 15), - textAlign: TextAlign.center, - )), - ], - ), - const SizedBox( - width: 10, - ), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text('Date'), - Container( - width: 100, - child: customDatTimePicker( - '', '', 'app_date')), - ], - ), - ]), - ), - - const SizedBox( - height: 30, - ), - const Align( - alignment: Alignment.centerLeft, - child: Text( - 'RECOMMENDING APPROVAL:', - style: TextStyle(fontWeight: FontWeight.bold), - )), - const SizedBox( - height: 15, - ), - SingleChildScrollView( - scrollDirection: Axis.horizontal, - child: Row(children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const Text('Name'), - Container( - padding: EdgeInsets.fromLTRB(20, 0, 0, 0), - margin: const EdgeInsets.fromLTRB( - 0, 10, 0, 0), - width: 250, - decoration: BoxDecoration( - border: Border.all( - color: Colors - .grey, // You can set the color here - width: - 0.9, // You can set the width here - ), - borderRadius: BorderRadius.circular( - 5), // Set the border radius here - ), - child: SearchField( - itemHeight: 65, - - suggestions: state.signatories - .map((Signatories signatories) => - SearchFieldListItem( - '${signatories.firstname} ${signatories.middlename} ${signatories.lastname}', - item: signatories, - child: ListTile( - title: Text( - '${signatories.firstname} ${signatories.middlename} ${signatories.lastname!}', - overflow: TextOverflow - .ellipsis, - textAlign: - TextAlign.center, - ), - ))) - .toList(), - - validator: - FormBuilderValidators.required( - errorText: - "This field is required"), - searchStyle: TextStyle(), - - ////agency suggestion tap - focusNode: recByFocus, - suggestionState: Suggestion.expand, - onSuggestionTap: (appraised) { - setState(() { - rec_by = - "${appraised.item?.firstname} ${appraised.item?.middlename} ${appraised.item?.lastname}"; - rec_by_designation = - appraised.item!.designation; - }); - recByFocus.unfocus(); - }, - ), - ), - ], - ), - const SizedBox( - width: 10, - ), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text('Designation'), - Container( - padding: - EdgeInsets.fromLTRB(10, 15, 10, 10), - margin: const EdgeInsets.fromLTRB( - 0, 10, 0, 0), - width: 250, - height: 50, - decoration: BoxDecoration( - border: Border.all( - color: Colors - .grey, // You can set the color here - width: - 0.9, // You can set the width here - ), - borderRadius: BorderRadius.circular( - 5), // Set the border radius here - ), - child: Text( - rec_by_designation.toUpperCase(), - style: TextStyle(fontSize: 15), - textAlign: TextAlign.center, - )), - ], - ), - const SizedBox( - width: 10, - ), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text('Date'), - Container( - width: 100, - child: customDatTimePicker( - '', '', 'rec_date')), - ], - ), - ]), - ), - - const SizedBox( - height: 30, - ), - const Align( - alignment: Alignment.centerLeft, - child: Text( - 'APPROVED BY:', - style: TextStyle( - fontWeight: FontWeight.bold, - ), - )), - const SizedBox( - height: 15, - ), - SingleChildScrollView( - scrollDirection: Axis.horizontal, - child: Row(children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const Text('Name'), - Container( - padding: EdgeInsets.fromLTRB(20, 0, 0, 0), - margin: const EdgeInsets.fromLTRB( - 0, 10, 0, 0), - width: 250, - decoration: BoxDecoration( - border: Border.all( - color: Colors - .grey, // You can set the color here - width: - 0.9, // You can set the width here - ), - borderRadius: BorderRadius.circular( - 5), // Set the border radius here - ), - child: SearchField( - itemHeight: 65, - - suggestions: state.signatories - .map((Signatories signatories) => - SearchFieldListItem( - '${signatories.firstname} ${signatories.middlename} ${signatories.lastname}', - item: signatories, - child: ListTile( - title: Text( - '${signatories.firstname} ${signatories.middlename} ${signatories.lastname!}', - overflow: TextOverflow - .ellipsis, - textAlign: - TextAlign.center, - ), - ))) - .toList(), - - validator: - FormBuilderValidators.required( - errorText: - "This field is required"), - searchStyle: TextStyle(), - - ////agency suggestion tap - focusNode: apprvdByFocus, - suggestionState: Suggestion.expand, - onSuggestionTap: (appraised) { - setState(() { - approved_by = - "${appraised.item?.firstname} ${appraised.item?.middlename} ${appraised.item?.lastname}"; - approved_by_designation = - appraised.item!.designation; - }); - apprvdByFocus.unfocus(); - }, - ), - ), - ], - ), - const SizedBox( - width: 10, - ), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text('Designation'), - Container( - padding: - EdgeInsets.fromLTRB(10, 15, 10, 10), - margin: const EdgeInsets.fromLTRB( - 0, 10, 0, 0), - width: 250, - height: 50, - decoration: BoxDecoration( - border: Border.all( - color: Colors - .grey, // You can set the color here - width: - 0.9, // You can set the width here - ), - borderRadius: BorderRadius.circular( - 5), // Set the border radius here - ), - child: Text( - approved_by_designation.toUpperCase(), - style: TextStyle(fontSize: 15), - textAlign: TextAlign.center, - )), - ], - ), - ]), - ), - - const SizedBox( - height: 50, - ), - const Align( - alignment: Alignment.centerLeft, - child: Text( - 'MEMORANDA: ', - style: TextStyle( - fontWeight: FontWeight.bold, - ), - )), - const SizedBox( - height: 30, - ), - SizedBox( - width: 500, - height: 50, - child: SearchField( - itemHeight: 200, - controller: memorandaController, - suggestions: memoranda - .map((Memoranda memoranda) => - SearchFieldListItem( - '${memoranda.memoranda}', - item: - memoranda, // Change: Use individual Memoranda object - child: ListTile( - title: Text( - '${memoranda.memoranda}', - overflow: TextOverflow.visible, - ), + Expanded( + flex: 3, + child: SingleChildScrollView( + padding: const EdgeInsets.only( + left: 20.0, right: 20.0), + scrollDirection: Axis.vertical, + child: Column( + children: [ + Row( + mainAxisAlignment: + MainAxisAlignment.spaceAround, + children: [ + Row( + children: [ + const Text('Taxable'), + Checkbox( + checkColor: Colors.white, + value: isTaxable, + onChanged: (bool? value) { + setState(() { + isTaxable = value!; + }); + }, + ) + ], ), - )) - .toList(), - validator: FormBuilderValidators.required( - errorText: "This field is required"), - // searchInputDecoration: - // normalTextFieldStyle("Memoranda", "") - // .copyWith( - // suffixIcon: - // const Icon(Icons.arrow_drop_down), - // contentPadding: EdgeInsets.symmetric( - // vertical: 15.0, horizontal: 16.0), - // border: OutlineInputBorder( - // borderRadius: BorderRadius.circular(10.0), - // borderSide: BorderSide( - // color: - // Colors.grey, // Adjust border color - // ), - // ), - // focusedBorder: OutlineInputBorder( - // borderRadius: BorderRadius.circular(10.0), - // borderSide: BorderSide( - // color: Colors - // .blue, // Adjust focused border color - // ), - // ), - // ), - focusNode: focuss, - suggestionState: Suggestion.expand, - suggestionDirection: SuggestionDirection.up, - onSuggestionTap: (memoranda) { - setState(() { - _memoranda = memorandaController.text; - }); - focuss.unfocus(); - }, - )), - Container( - alignment: Alignment.center, - padding: EdgeInsets.all(10), - child: Column( - children: [ - TextField( - controller: memorandaController, - keyboardType: TextInputType.multiline, - maxLines: 7, - decoration: InputDecoration( - focusedBorder: OutlineInputBorder( - borderSide: BorderSide( - width: 1, - color: Colors.redAccent)), - disabledBorder: OutlineInputBorder( - borderSide: const BorderSide( - width: 1, - color: Colors.grey, - ), - borderRadius: BorderRadius.circular(5), - ), - enabledBorder: OutlineInputBorder( - borderSide: const BorderSide( - color: Colors.grey, - width: 1, - ), - borderRadius: BorderRadius.circular(5), - ), - ), - ), - ], - ), - ), - const SizedBox( - height: 30, - ), - const Align( - alignment: Alignment.centerLeft, - child: Text( - 'NOTE: ', - style: TextStyle( - fontWeight: FontWeight.bold, - ), - )), - const SizedBox( - height: 30, - ), - SizedBox( - width: 400, - height: 50, - child: SearchField( - itemHeight: 200, - controller: noteController, - suggestions: note - .map((Memoranda note) => - SearchFieldListItem( - '${note.memoranda}', - item: - note, // Change: Use individual Memoranda object - child: ListTile( - title: Text( - '${note.memoranda}', - overflow: TextOverflow.visible, - ), + Row( + children: [ + const Text('Exempt'), + Checkbox( + checkColor: Colors.white, + value: isExempt, + onChanged: (bool? value) { + setState(() { + isExempt = value!; + }); + }, + ) + ], ), - )) - .toList(), - validator: FormBuilderValidators.required( - errorText: "This field is required"), - searchInputDecoration: - InputDecoration().copyWith( - suffixIcon: - const Icon(Icons.arrow_drop_down), - ), - focusNode: focus, - suggestionState: Suggestion.expand, - suggestionDirection: SuggestionDirection.up, - onSuggestionTap: (memoranda) { - setState(() { - _notes = noteController.text; - }); - focus.unfocus(); - }, - )), - Container( - alignment: Alignment.center, - padding: EdgeInsets.all(10), - child: Column( - children: [ - TextField( - controller: noteController, - keyboardType: TextInputType.multiline, - maxLines: 7, - decoration: InputDecoration( - focusedBorder: OutlineInputBorder( - borderSide: BorderSide( - width: 1, - color: Colors.redAccent)), - disabledBorder: OutlineInputBorder( - borderSide: const BorderSide( - width: 1, - color: Colors.grey, + ], ), - borderRadius: BorderRadius.circular(5), - ), - enabledBorder: OutlineInputBorder( - borderSide: const BorderSide( - color: Colors.grey, - width: 1, + Column( + children: [ + const SizedBox( + height: 20, + ), + const Text( + 'EFFECTIVITY OF ASSESSMENT / REASSESSMENT / SWORN STATEMENT:', + style: TextStyle( + fontWeight: FontWeight.bold), + ), + const SizedBox( + height: 20, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceAround, + children: [ + SizedBox( + width: width / 3 - 20, + height: 50, + child: customDropDownField( + 'Qtr', + '', + 'qtr', + quarter)), + SizedBox( + width: width / 3 - 20, + height: 50, + child: customTextField( + 'Sworn Statement No.', + '', + 'sworn_statement')), + SizedBox( + width: width / 3 - 20, + height: 50, + child: customTextField( + 'Year', '', 'yr')), + ], + ), + ], ), - borderRadius: BorderRadius.circular(5), - ), - ), - ), - ], - ), - ), - const SizedBox( - height: 30, - ), - // Container( - // alignment: Alignment.center, - // padding: EdgeInsets.all(10), - // child: Column( - // children: [ - // TextField( - // enabled: false, - // keyboardType: TextInputType.multiline, - // maxLines: 5, - // decoration: InputDecoration( - // hintText: "Note", - // focusedBorder: OutlineInputBorder( - // borderSide: BorderSide( - // width: 1, - // color: Colors.redAccent)), - // disabledBorder: OutlineInputBorder( - // borderSide: const BorderSide( - // width: 1, - // color: Colors.grey, - // ), - // borderRadius: BorderRadius.circular(5), - // ), - // enabledBorder: OutlineInputBorder( - // borderSide: const BorderSide( - // color: Colors.grey, - // width: 1, - // ), - // borderRadius: BorderRadius.circular(5), - // ), - // ), - // ), - // ], - // ), - // ), + const SizedBox( + height: 30, + ), + const Divider( + thickness: 2, + ), + SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: Expanded( + child: Row( + children: [ + const SizedBox( + width: 10, + ), + SizedBox( + width: width / 2 - 100, + height: 50, + child: customDatTimePicker( + 'Date Received', + '', + 'date_received')), + const SizedBox( + width: 20, + ), + SizedBox( + width: width / 2 - 100, + height: 50, + child: customDatTimePicker( + 'Date of Entry', + '', + 'date_of_entry')) + ], + ), + ), + ), + const SizedBox( + height: 30, + ), + const Align( + alignment: Alignment.centerLeft, + child: Text( + 'APPRAISED/ASSESSED BY:', + style: TextStyle( + fontWeight: FontWeight.bold), + textAlign: TextAlign.start, + ), + ), + const SizedBox( + height: 15, + ), + SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: Row(children: [ + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + const Text('Name'), + Container( + padding: EdgeInsets.fromLTRB( + 20, 0, 0, 0), + margin: + const EdgeInsets.fromLTRB( + 0, 10, 0, 0), + width: 250, + decoration: BoxDecoration( + border: Border.all( + color: Colors + .grey, // You can set the color here + width: + 0.9, // You can set the width here + ), + borderRadius: + BorderRadius.circular( + 5), // Set the border radius here + ), + child: SearchField( + itemHeight: 65, - const SizedBox( - height: 30, - ), - ElevatedButton( - onPressed: () async { - final tempID = - await SharedPreferences.getInstance(); - print(tempID.getInt('tempid')! - 1); - // final List - // propertyAssessments = []; - DateTime? appDate = offlineBldgKey - .currentState!.value['app_date']; - DateTime? recDate = offlineBldgKey - .currentState!.value['rec_date']; - DateTime? dateReceived = offlineBldgKey - .currentState!.value['date_received']; - DateTime? entryDate = offlineBldgKey - .currentState!.value['date_of_entry']; - String appDateString = - appDate != null ? appDate.toString() : ''; - String recDateString = - recDate != null ? recDate.toString() : ''; - String receivedDateString = - recDate != null ? recDate.toString() : ''; - String entryDateString = - recDate != null ? recDate.toString() : ''; - context.read().add( - AddBldgAssessment( - id: 1, - bldgapprDetailsId: - tempID.getInt('tempid')!, - assessedById: - widget.offlineProfile.id.toString(), - assessedByName: - widget.offlineProfile.firstName!, - dateCreated: '', - dateModified: '', - actualUse: offlineBldgKey.currentState! - .value['actual_use'] ?? - '', // Replace null with an empty string - marketValue: '0.00', - assessmentLevel: '0.00', - assessedValue: '0.00', - taxable: isTaxable == true ? '1' : '0', - exempt: isExempt == true ? '1' : '0', - qtr: offlineBldgKey - .currentState!.value['qtr'] ?? - '0', // Replace null with '0' - yr: int.parse( - offlineBldgKey.currentState!.value['yr'] ?? - '0'), // Replace null with '0' - appraisedbyName: appraised_by, - appraisedbyDate: - appDateString, // Replace null with current date - recommendapprName: rec_by, - recommendapprDate: - recDateString, // Replace null with current date - approvedbyName: approved_by, - memoranda: _memoranda, - note: _notes, - swornstatementNo: offlineBldgKey + suggestions: signatories + .map((Signatories + signatories) => + SearchFieldListItem( + '${signatories.firstname} ${signatories.middlename} ${signatories.lastname}', + item: + signatories, + child: ListTile( + title: Text( + '${signatories.firstname} ${signatories.middlename} ${signatories.lastname!}', + overflow: + TextOverflow + .ellipsis, + textAlign: + TextAlign + .center, + ), + ))) + .toList(), + + validator: FormBuilderValidators + .required( + errorText: + "This field is required"), + searchStyle: TextStyle(), + + ////agency suggestion tap + focusNode: appraisedByFocus, + suggestionState: + Suggestion.expand, + onSuggestionTap: + (appraised) { + setState(() { + appraised_by = + "${appraised.item?.firstname} ${appraised.item?.middlename} ${appraised.item?.lastname}"; + appraised_by_designation = + appraised.item! + .designation; + }); + appraisedByFocus + .unfocus(); + }, + ), + ), + ], + ), + const SizedBox( + width: 10, + ), + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Text('Designation'), + Container( + padding: + EdgeInsets.fromLTRB( + 10, 15, 10, 10), + margin: const EdgeInsets + .fromLTRB(0, 10, 0, 0), + width: 250, + height: 50, + decoration: BoxDecoration( + border: Border.all( + color: Colors + .grey, // You can set the color here + width: + 0.9, // You can set the width here + ), + borderRadius: + BorderRadius.circular( + 5), // Set the border radius here + ), + child: Text( + appraised_by_designation + .toUpperCase(), + style: TextStyle( + fontSize: 15), + textAlign: + TextAlign.center, + )), + ], + ), + const SizedBox( + width: 10, + ), + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Text('Date'), + Container( + width: 100, + child: customDatTimePicker( + '', '', 'app_date')), + ], + ), + ]), + ), + + const SizedBox( + height: 30, + ), + const Align( + alignment: Alignment.centerLeft, + child: Text( + 'RECOMMENDING APPROVAL:', + style: TextStyle( + fontWeight: FontWeight.bold), + )), + const SizedBox( + height: 15, + ), + SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: Row(children: [ + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + const Text('Name'), + Container( + padding: EdgeInsets.fromLTRB( + 20, 0, 0, 0), + margin: + const EdgeInsets.fromLTRB( + 0, 10, 0, 0), + width: 250, + decoration: BoxDecoration( + border: Border.all( + color: Colors + .grey, // You can set the color here + width: + 0.9, // You can set the width here + ), + borderRadius: + BorderRadius.circular( + 5), // Set the border radius here + ), + child: SearchField( + itemHeight: 65, + + suggestions: signatories + .map((Signatories + signatories) => + SearchFieldListItem( + '${signatories.firstname} ${signatories.middlename} ${signatories.lastname}', + item: + signatories, + child: ListTile( + title: Text( + '${signatories.firstname} ${signatories.middlename} ${signatories.lastname!}', + overflow: + TextOverflow + .ellipsis, + textAlign: + TextAlign + .center, + ), + ))) + .toList(), + + validator: FormBuilderValidators + .required( + errorText: + "This field is required"), + searchStyle: TextStyle(), + + ////agency suggestion tap + focusNode: recByFocus, + suggestionState: + Suggestion.expand, + onSuggestionTap: + (appraised) { + setState(() { + rec_by = + "${appraised.item?.firstname} ${appraised.item?.middlename} ${appraised.item?.lastname}"; + rec_by_designation = + appraised.item! + .designation; + }); + recByFocus.unfocus(); + }, + ), + ), + ], + ), + const SizedBox( + width: 10, + ), + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Text('Designation'), + Container( + padding: + EdgeInsets.fromLTRB( + 10, 15, 10, 10), + margin: const EdgeInsets + .fromLTRB(0, 10, 0, 0), + width: 250, + height: 50, + decoration: BoxDecoration( + border: Border.all( + color: Colors + .grey, // You can set the color here + width: + 0.9, // You can set the width here + ), + borderRadius: + BorderRadius.circular( + 5), // Set the border radius here + ), + child: Text( + rec_by_designation + .toUpperCase(), + style: TextStyle( + fontSize: 15), + textAlign: + TextAlign.center, + )), + ], + ), + const SizedBox( + width: 10, + ), + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Text('Date'), + Container( + width: 100, + child: customDatTimePicker( + '', '', 'rec_date')), + ], + ), + ]), + ), + + const SizedBox( + height: 30, + ), + const Align( + alignment: Alignment.centerLeft, + child: Text( + 'APPROVED BY:', + style: TextStyle( + fontWeight: FontWeight.bold, + ), + )), + const SizedBox( + height: 15, + ), + SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: Row(children: [ + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + const Text('Name'), + Container( + padding: EdgeInsets.fromLTRB( + 20, 0, 0, 0), + margin: + const EdgeInsets.fromLTRB( + 0, 10, 0, 0), + width: 250, + decoration: BoxDecoration( + border: Border.all( + color: Colors + .grey, // You can set the color here + width: + 0.9, // You can set the width here + ), + borderRadius: + BorderRadius.circular( + 5), // Set the border radius here + ), + child: SearchField( + itemHeight: 65, + + suggestions: signatories + .map((Signatories + signatories) => + SearchFieldListItem( + '${signatories.firstname} ${signatories.middlename} ${signatories.lastname}', + item: + signatories, + child: ListTile( + title: Text( + '${signatories.firstname} ${signatories.middlename} ${signatories.lastname!}', + overflow: + TextOverflow + .ellipsis, + textAlign: + TextAlign + .center, + ), + ))) + .toList(), + + validator: FormBuilderValidators + .required( + errorText: + "This field is required"), + searchStyle: TextStyle(), + + ////agency suggestion tap + focusNode: apprvdByFocus, + suggestionState: + Suggestion.expand, + onSuggestionTap: + (appraised) { + setState(() { + approved_by = + "${appraised.item?.firstname} ${appraised.item?.middlename} ${appraised.item?.lastname}"; + approved_by_designation = + appraised.item! + .designation; + }); + apprvdByFocus.unfocus(); + }, + ), + ), + ], + ), + const SizedBox( + width: 10, + ), + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Text('Designation'), + Container( + padding: + EdgeInsets.fromLTRB( + 10, 15, 10, 10), + margin: const EdgeInsets + .fromLTRB(0, 10, 0, 0), + width: 250, + height: 50, + decoration: BoxDecoration( + border: Border.all( + color: Colors + .grey, // You can set the color here + width: + 0.9, // You can set the width here + ), + borderRadius: + BorderRadius.circular( + 5), // Set the border radius here + ), + child: Text( + approved_by_designation + .toUpperCase(), + style: TextStyle( + fontSize: 15), + textAlign: + TextAlign.center, + )), + ], + ), + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Text('Date'), + Container( + width: 100, + child: customDatTimePicker( + '', + '', + 'approve_date')), + ], + ), + ]), + ), + + const SizedBox( + height: 50, + ), + const Align( + alignment: Alignment.centerLeft, + child: Text( + 'MEMORANDA: ', + style: TextStyle( + fontWeight: FontWeight.bold, + ), + )), + const SizedBox( + height: 30, + ), + SizedBox( + width: 500, + height: 50, + child: SearchField( + itemHeight: 200, + controller: memorandaController, + suggestions: memoranda + .map((Memoranda memoranda) => + SearchFieldListItem( + '${memoranda.memoranda}', + item: + memoranda, // Change: Use individual Memoranda object + child: ListTile( + title: Text( + '${memoranda.memoranda}', + overflow: + TextOverflow + .visible, + ), + ), + )) + .toList(), + validator: FormBuilderValidators + .required( + errorText: + "This field is required"), + // searchInputDecoration: + // normalTextFieldStyle("Memoranda", "") + // .copyWith( + // suffixIcon: + // const Icon(Icons.arrow_drop_down), + // contentPadding: EdgeInsets.symmetric( + // vertical: 15.0, horizontal: 16.0), + // border: OutlineInputBorder( + // borderRadius: BorderRadius.circular(10.0), + // borderSide: BorderSide( + // color: + // Colors.grey, // Adjust border color + // ), + // ), + // focusedBorder: OutlineInputBorder( + // borderRadius: BorderRadius.circular(10.0), + // borderSide: BorderSide( + // color: Colors + // .blue, // Adjust focused border color + // ), + // ), + // ), + focusNode: focuss, + suggestionState: + Suggestion.expand, + suggestionDirection: + SuggestionDirection.up, + onSuggestionTap: (memoranda) { + setState(() { + _memoranda = + memorandaController.text; + }); + focuss.unfocus(); + }, + )), + Container( + alignment: Alignment.center, + padding: EdgeInsets.all(10), + child: Column( + children: [ + TextField( + controller: memorandaController, + keyboardType: + TextInputType.multiline, + maxLines: 7, + decoration: InputDecoration( + focusedBorder: + OutlineInputBorder( + borderSide: BorderSide( + width: 1, + color: Colors + .redAccent)), + disabledBorder: + OutlineInputBorder( + borderSide: + const BorderSide( + width: 1, + color: Colors.grey, + ), + borderRadius: + BorderRadius.circular( + 5), + ), + enabledBorder: + OutlineInputBorder( + borderSide: + const BorderSide( + color: Colors.grey, + width: 1, + ), + borderRadius: + BorderRadius.circular( + 5), + ), + ), + ), + ], + ), + ), + const SizedBox( + height: 30, + ), + const Align( + alignment: Alignment.centerLeft, + child: Text( + 'NOTE: ', + style: TextStyle( + fontWeight: FontWeight.bold, + ), + )), + const SizedBox( + height: 30, + ), + SizedBox( + width: 400, + height: 50, + child: SearchField( + itemHeight: 200, + controller: noteController, + suggestions: note + .map((Memoranda note) => + SearchFieldListItem( + '${note.memoranda}', + item: + note, // Change: Use individual Memoranda object + child: ListTile( + title: Text( + '${note.memoranda}', + overflow: + TextOverflow + .visible, + ), + ), + )) + .toList(), + validator: FormBuilderValidators + .required( + errorText: + "This field is required"), + searchInputDecoration: + InputDecoration().copyWith( + suffixIcon: const Icon( + Icons.arrow_drop_down), + ), + focusNode: focus, + suggestionState: + Suggestion.expand, + suggestionDirection: + SuggestionDirection.up, + onSuggestionTap: (memoranda) { + setState(() { + _notes = noteController.text; + }); + focus.unfocus(); + }, + )), + Container( + alignment: Alignment.center, + padding: EdgeInsets.all(10), + child: Column( + children: [ + TextField( + controller: noteController, + keyboardType: + TextInputType.multiline, + maxLines: 7, + decoration: InputDecoration( + focusedBorder: + OutlineInputBorder( + borderSide: BorderSide( + width: 1, + color: Colors + .redAccent)), + disabledBorder: + OutlineInputBorder( + borderSide: + const BorderSide( + width: 1, + color: Colors.grey, + ), + borderRadius: + BorderRadius.circular( + 5), + ), + enabledBorder: + OutlineInputBorder( + borderSide: + const BorderSide( + color: Colors.grey, + width: 1, + ), + borderRadius: + BorderRadius.circular( + 5), + ), + ), + ), + ], + ), + ), + const SizedBox( + height: 30, + ), + // Container( + // alignment: Alignment.center, + // padding: EdgeInsets.all(10), + // child: Column( + // children: [ + // TextField( + // enabled: false, + // keyboardType: TextInputType.multiline, + // maxLines: 5, + // decoration: InputDecoration( + // hintText: "Note", + // focusedBorder: OutlineInputBorder( + // borderSide: BorderSide( + // width: 1, + // color: Colors.redAccent)), + // disabledBorder: OutlineInputBorder( + // borderSide: const BorderSide( + // width: 1, + // color: Colors.grey, + // ), + // borderRadius: BorderRadius.circular(5), + // ), + // enabledBorder: OutlineInputBorder( + // borderSide: const BorderSide( + // color: Colors.grey, + // width: 1, + // ), + // borderRadius: BorderRadius.circular(5), + // ), + // ), + // ), + // ], + // ), + // ), + + const SizedBox( + height: 30, + ), + ElevatedButton( + onPressed: () async { + final tempID = + await SharedPreferences + .getInstance(); + print(tempID.getInt('tempid')! - 1); + // final List + // propertyAssessments = []; + DateTime? appDate = offlineBldgKey .currentState! - .value['sworn_statement'] ?? - '', // Replace null with an empty string - dateReceived: receivedDateString, - // Replace null with current date - entryDateAssessment: entryDateString, - // Replace null with current date - entryDateBy: - widget.offlineProfile.firstName!, - genCode: '5th', - appraisedbyDesignation: - appraised_by_designation, - approvedbyDesignation: - approved_by_designation, - recommendapprDesignation: rec_by_designation - // Replace null with an empty string - )); + .value['app_date']; + DateTime? recDate = offlineBldgKey + .currentState! + .value['rec_date']; + DateTime? approveDate = + offlineBldgKey.currentState! + .value['approve_date']; + DateTime? dateReceived = + offlineBldgKey.currentState! + .value['date_received']; + DateTime? entryDate = offlineBldgKey + .currentState! + .value['date_of_entry']; + String appDateString = + appDate != null + ? appDate.toString() + : ''; + String recDateString = + recDate != null + ? recDate.toString() + : ''; + String approveDateString = + approveDate != null + ? approveDate.toString() + : ''; + String receivedDateString = + recDate != null + ? recDate.toString() + : ''; + String entryDateString = + recDate != null + ? recDate.toString() + : ''; + context.read().add( + AddBldgAssessment( + id: 1, + bldgapprDetailsId: tempID + .getInt('tempid')!, + assessedById: widget + .offlineProfile.id + .toString(), + assessedByName: widget + .offlineProfile + .firstName!, + dateCreated: '', + dateModified: '', + actualUse: offlineBldgKey + .currentState! + .value[ + 'actual_use'] ?? + '', // Replace null with an empty string + marketValue: + _calculateMarketValue(addItem, state.bldgAndStructure) + .toString(), + assessmentLevel: assessmentLevel( + _calculateMarketValue( + addItem, state.bldgAndStructure), + offlineBldgKey.currentState?.value['actual_use']), + assessedValue: assessmentValue(_calculateMarketValue(addItem, state.bldgAndStructure), offlineBldgKey.currentState?.value['actual_use']).toString(), + taxable: isTaxable == true ? '1' : '0', + exempt: isExempt == true ? '1' : '0', + qtr: offlineBldgKey.currentState!.value['qtr'] ?? '0', // Replace null with '0' + yr: int.parse(offlineBldgKey.currentState!.value['yr'] ?? '0'), // Replace null with '0' + appraisedbyName: appraised_by, + appraisedbyDate: appDateString, // Replace null with current date + recommendapprName: rec_by, + recommendapprDate: recDateString, // Replace null with current date + approvedbyName: approved_by, + approvedbyDate: approveDateString, + memoranda: _memoranda, + note: _notes, + swornstatementNo: offlineBldgKey.currentState!.value['sworn_statement'] ?? '', // Replace null with an empty string + dateReceived: receivedDateString, + // Replace null with current date + entryDateAssessment: entryDateString, + // Replace null with current date + entryDateBy: widget.offlineProfile.firstName!, + genCode: '5th', + appraisedbyDesignation: appraised_by_designation, + approvedbyDesignation: approved_by_designation, + recommendapprDesignation: rec_by_designation + // Replace null with an empty string + )); + // print('assess'); + // print((asses)); - widget.function(); - }, - style: ElevatedButton.styleFrom( - backgroundColor: primary, - foregroundColor: Colors.red), - child: const Expanded( - child: Padding( - padding: EdgeInsets.all(15.0), - child: Align( - alignment: Alignment.center, - child: Text( - 'Save', - style: TextStyle( - color: Colors.white, - ), - textAlign: TextAlign.center, + widget.function(); + }, + style: ElevatedButton.styleFrom( + backgroundColor: primary, + foregroundColor: Colors.red), + child: const Expanded( + child: Padding( + padding: EdgeInsets.all(15.0), + child: Align( + alignment: Alignment.center, + child: Text( + 'Save', + style: TextStyle( + color: Colors.white, + ), + textAlign: TextAlign.center, + ), + ), + ), + ), + ), + const SizedBox( + height: 30, + ), + ], ), - ), - ), - ), - ), - const SizedBox( - height: 30, - ), - ], - ), - )) - ])); + )) + ])); + } + return Container(); + }, + ); + } + return Container(); + }, + ); } return Container(); }, diff --git a/lib/screens/offline/passo/building/add/property_owner_info.dart b/lib/screens/offline/passo/building/add/property_owner_info.dart index 77585bb..b8c7c27 100644 --- a/lib/screens/offline/passo/building/add/property_owner_info.dart +++ b/lib/screens/offline/passo/building/add/property_owner_info.dart @@ -136,37 +136,39 @@ class _PropertyInfoPage extends State { transCode: offlineBldgKey .currentState!.value['transaction_code'] ?.toString() ?? - '', + ' ', tdn: offlineBldgKey.currentState!.value['arp_td'] ?? - '', - pin: - offlineBldgKey.currentState!.value['pin'] ?? '', - fname: offlineBldgKey.currentState!.value['fname'] ?? - '', - mname: offlineBldgKey.currentState!.value['mname'] ?? - '', - lname: offlineBldgKey.currentState!.value['lname'] ?? - '', + ' ', + pin: offlineBldgKey.currentState!.value['pin'] ?? + ' ', + fname: + offlineBldgKey.currentState!.value['fname'] ?? + ' ', + mname: + offlineBldgKey.currentState!.value['mname'] ?? + ' ', + lname: + offlineBldgKey.currentState!.value['lname'] ?? + ' ', bday: offlineBldgKey.currentState!.value['bday'] .toString() ?? - '', + ' ', address: offlineBldgKey.currentState!.value['address'] ?? - '', - telno: offlineBldgKey.currentState!.value['tel_no'] ?? - '', - tin: - offlineBldgKey.currentState!.value['tin'] ?? '', - adminUser: - offlineBldgKey.currentState!.value['benificiary'] ?? '', - adminAddress: offlineBldgKey.currentState!.value['benificiary_address'] ?? '', - adminTin: offlineBldgKey.currentState!.value['benificiary_tin'] ?? '', - adminTelno: offlineBldgKey.currentState!.value['benificiary_telno'] ?? '', + ' ', + telno: + offlineBldgKey.currentState!.value['tel_no'] ?? + ' ', + tin: offlineBldgKey.currentState!.value['tin'] ?? ' ', + adminUser: offlineBldgKey.currentState!.value['benificiary'] ?? ' ', + adminAddress: offlineBldgKey.currentState!.value['benificiary_address'] ?? ' ', + adminTin: offlineBldgKey.currentState!.value['benificiary_tin'] ?? ' ', + adminTelno: offlineBldgKey.currentState!.value['benificiary_telno'] ?? ' ', faasType: "BUILDING", assessedById: widget.offlineProfile.id.toString(), assessedByName: widget.offlineProfile.firstName!, dateCreated: formatter, - dateModified: '', + dateModified: ' ', genCode: '5th'), ); widget.handleButtonPress(); diff --git a/lib/screens/offline/passo/building/edit/edit_building.dart b/lib/screens/offline/passo/building/edit/edit_building.dart index 37da9d2..16e958c 100644 --- a/lib/screens/offline/passo/building/edit/edit_building.dart +++ b/lib/screens/offline/passo/building/edit/edit_building.dart @@ -16,6 +16,7 @@ import 'package:unit2/screens/offline/passo/building/edit/property_assessment_ed import 'package:unit2/screens/offline/passo/building/edit/property_owner_info_edit.dart'; import 'package:unit2/screens/offline/passo/building/edit/structural_materials_edit.dart'; +import '../../../../../bloc/offline/offline_passo/building/structural_materials_offline.dart/structural_material_offline_bloc.dart'; import '../../../../../model/passo/property_info.dart'; import '../../../../../theme-data.dart/colors.dart'; @@ -59,6 +60,56 @@ class _EditBuildingOffline extends State { return Navigator.of(context).pop(); } + List foundation = []; + List column = []; + List beam = []; + List trussFraming = []; + List roof = []; + List flooring = []; + List walls = []; + + void updateFoundation(List updatedList) { + setState(() { + foundation = updatedList; + }); + } + + void updateColumn(List updatedList) { + setState(() { + column = updatedList; + }); + } + + void updateBeam(List updatedList) { + setState(() { + beam = updatedList; + }); + } + + void updateTrussFraming(List updatedList) { + setState(() { + trussFraming = updatedList; + }); + } + + void updateRoof(List updatedList) { + setState(() { + roof = updatedList; + }); + } + + void updateFlooring(List updatedList) { + setState(() { + flooring = updatedList; + }); + } + + void updateWalls(List updatedList) { + setState(() { + walls = updatedList; + }); + } + @override Widget build(BuildContext context) { return Scaffold( @@ -71,49 +122,62 @@ class _EditBuildingOffline extends State { padding: const EdgeInsets.all(24), backgroundColor: Colors.black87, indicatorWidget: const SpinKitFadingCircle(color: Colors.white), - child: BlocConsumer( + child: BlocConsumer( listener: (context, state) { // TODO: implement listener }, builder: (context, state) { - if (state is UnitConstructLoaded) { - final unit = state.unit; - return BlocConsumer( + if (state is SpecificStructuralMaterialLoaded) { + return BlocConsumer( listener: (context, state) { // TODO: implement listener }, builder: (context, state) { - if (state is ClassComponentsAdminLoaded) { - return Column( - children: [ - NumberStepper( - numbers: const [1, 2, 3, 4, 5, 6, 7, 8], - activeStepColor: primary, - numberStyle: const TextStyle(color: Colors.white), - lineColor: primary, - // activeStep property set to activeStep variable defined above. - activeStep: activeStep, - activeStepBorderColor: Colors.white, - activeStepBorderWidth: 1, - // This ensures step-tapping updates the activeStep. - onStepReached: (index) { - setState(() { - activeStep = index; - }); - }, - ), - Expanded( - child: StatefulBuilder(builder: - (BuildContext context, StateSetter setState) { - return Container( - child: content( - PrevBtn, NextBtn, unit, state.classes), - ); - }), - ), - ], + if (state is UnitConstructLoaded) { + final unit = state.unit; + return BlocConsumer( + listener: (context, state) { + // TODO: implement listener + }, + builder: (context, state) { + if (state is ClassComponentsAdminLoaded) { + return Column( + children: [ + NumberStepper( + numbers: const [1, 2, 3, 4, 5, 6, 7, 8], + activeStepColor: primary, + numberStyle: + const TextStyle(color: Colors.white), + lineColor: primary, + // activeStep property set to activeStep variable defined above. + activeStep: activeStep, + activeStepBorderColor: Colors.white, + activeStepBorderWidth: 1, + // This ensures step-tapping updates the activeStep. + onStepReached: (index) { + setState(() { + activeStep = index; + }); + }, + ), + Expanded( + child: StatefulBuilder(builder: + (BuildContext context, + StateSetter setState) { + return Container( + child: content(PrevBtn, NextBtn, unit, + state.classes), + ); + }), + ), + ], + ); + } + return Container(); + }, ); } return Container(); @@ -132,7 +196,7 @@ class _EditBuildingOffline extends State { return PropertyOwnerInfoEditOffline( widget.index, widget.faas, - 'EDit', + 'Edit', PrevBtn, NextBtn, ); diff --git a/lib/screens/offline/passo/building/edit/property_assessment_edit.dart b/lib/screens/offline/passo/building/edit/property_assessment_edit.dart index a36e718..11e2c5e 100644 --- a/lib/screens/offline/passo/building/edit/property_assessment_edit.dart +++ b/lib/screens/offline/passo/building/edit/property_assessment_edit.dart @@ -556,6 +556,8 @@ class _PropertyAssessmentEditOfflinePage 'date_of_entry': assessment.entryDateAssessment?.toString() ?? '', + 'approve_date': + assessment.approvedbyDate?.toString() ?? '', }, enabled: true, onChanged: () { @@ -1129,6 +1131,20 @@ class _PropertyAssessmentEditOfflinePage )), ], ), + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Text('Date'), + Container( + width: 100, + child: + customDatTimePicker( + '', + '', + 'approve_date')), + ], + ), ]), ), const SizedBox( @@ -1417,17 +1433,18 @@ class _PropertyAssessmentEditOfflinePage .value['app_date'] .toString(), recommendapprName: rec_by, - recommendapprDate: offlineBldgEditKey - .currentState! - .value['rec_date'] - .toString(), + recommendapprDate: + offlineBldgEditKey + .currentState! + .value['rec_date'] + .toString(), approvedbyName: approved_by, + approvedbyDate: + offlineBldgEditKey.currentState!.value['approve_date'].toString(), memoranda: _memoranda, note: _notes, - swornstatementNo: offlineBldgEditKey - .currentState! - .value['sworn_statement'], + swornstatementNo: offlineBldgEditKey.currentState!.value['sworn_statement'], dateReceived: offlineBldgEditKey.currentState!.value['date_received'].toString(), entryDateAssessment: offlineBldgEditKey.currentState!.value['date_of_entry'].toString(), entryDateBy: '', diff --git a/lib/screens/offline/passo/building/edit/property_owner_info_edit.dart b/lib/screens/offline/passo/building/edit/property_owner_info_edit.dart index 1ee697a..b01ffc5 100644 --- a/lib/screens/offline/passo/building/edit/property_owner_info_edit.dart +++ b/lib/screens/offline/passo/building/edit/property_owner_info_edit.dart @@ -211,9 +211,11 @@ class _PropertyOwnerInfoEditOffline fname: offlineBldgEditKey .currentState!.value['fname'] ?? widget.faas.fname, - mname: offlineBldgEditKey - .currentState!.value['mname'] ?? - widget.faas.mname, + mname: + offlineBldgEditKey.currentState!.value['mname'] ?? + widget.faas.mname, + bday: offlineBldgEditKey.currentState!.value['bday'].toString(), + lname: offlineBldgEditKey.currentState!.value['lname'] ?? widget.faas.lname, address: offlineBldgEditKey.currentState!.value['address'] ?? widget.faas.address, telno: offlineBldgEditKey.currentState!.value['tel_no'] ?? widget.faas.telno, tin: offlineBldgEditKey.currentState!.value['tin'] ?? widget.faas.tin, diff --git a/lib/screens/offline/passo/building/edit/structural_materials_edit.dart b/lib/screens/offline/passo/building/edit/structural_materials_edit.dart index c7d2b4d..4a25638 100644 --- a/lib/screens/offline/passo/building/edit/structural_materials_edit.dart +++ b/lib/screens/offline/passo/building/edit/structural_materials_edit.dart @@ -47,13 +47,13 @@ class _StructuralMaterialsPageEditOffline StructuralMaterialOfflineState>(listener: (context, state) { if (state is SpecificStructuralMaterialLoaded) { setState(() { - // foundation = state.materials.foundation?.split(', ') ?? []; - // column = state.materials.columns?.split(', ') ?? []; - // beam = state.materials.beams?.split(', ') ?? []; - // truss_framing = state.materials.trussFraming?.split(', ') ?? []; - // roof = state.materials.roof?.split(', ') ?? []; - // flooring = state.materials.flooring?.split(', ') ?? []; - // walls = state.materials.walls?.split(', ') ?? []; + foundation = state.materials.foundation?.split(', ') ?? []; + column = state.materials.columns?.split(', ') ?? []; + beam = state.materials.beams?.split(', ') ?? []; + truss_framing = state.materials.trussFraming?.split(', ') ?? []; + roof = state.materials.roof?.split(', ') ?? []; + flooring = state.materials.flooring?.split(', ') ?? []; + walls = state.materials.walls?.split(', ') ?? []; // Update other local state variables here if needed }); } @@ -412,40 +412,48 @@ class _StructuralMaterialsPageEditOffline foundation: foundationOthers ? offlineBldgEditKey .currentState!.value['other_foundation'] - .split(',') - : foundation, + : foundation.isNotEmpty + ? foundation + : [state.materials.foundation!], columns: columOthers ? offlineBldgEditKey .currentState!.value['other_column'] - .split(',') - : column, + : column.isNotEmpty + ? column + : [state.materials.columns!], beams: beamsOthers ? offlineBldgEditKey .currentState!.value['other_beam'] - .split(',') - : beam, + : beam.isNotEmpty + ? beam + : [state.materials.beams!], trussFraming: tfOthers ? offlineBldgEditKey .currentState!.value['other_tf'] - .split(',') - : truss_framing, + : truss_framing.isNotEmpty + ? truss_framing + : [state.materials.trussFraming!], roof: roofOthers ? offlineBldgEditKey .currentState!.value['other_roof'] - .split(',') - : roof, + : roof.isNotEmpty + ? roof + : [state.materials.roof!], flooring: flooringOthers ? offlineBldgEditKey .currentState!.value['other_flooring'] - .split(',') - : flooring, + : flooring.isNotEmpty + ? flooring + : [state.materials.flooring!], walls: wpOthers ? offlineBldgEditKey .currentState!.value['other_wp'] - .split(',') - : walls, + : walls.isNotEmpty + ? walls + : [state.materials.walls!], others: ["Others"]); - + print('struct mat'); + print(strucMaterials.toJson()); context.read().add( UpdateStructuralMaterials( id: widget.tempId, materials: strucMaterials)); diff --git a/lib/screens/offline/passo/building_home_offline.dart b/lib/screens/offline/passo/building_home_offline.dart index e437166..fb3a23a 100644 --- a/lib/screens/offline/passo/building_home_offline.dart +++ b/lib/screens/offline/passo/building_home_offline.dart @@ -100,10 +100,14 @@ class BuildingHomeOffline extends StatelessWidget { // 'actualUse', state.gendesc.actualUse!); // } - // if (state is GenDescErrorState) { - // final progress = ProgressHUD.of(context); - // progress?.dismiss(); - // } + if (state is PropertyInfoLoaded) { + final progress = ProgressHUD.of(context); + progress?.dismiss(); + } + if (state is PropertyOwnerInfoErrorState) { + final progress = ProgressHUD.of(context); + progress?.dismiss(); + } }, builder: (context, state) { if (state is PropertyInfoLoaded) { diff --git a/lib/screens/unit2/login/login.dart b/lib/screens/unit2/login/login.dart index d02695a..97aada5 100644 --- a/lib/screens/unit2/login/login.dart +++ b/lib/screens/unit2/login/login.dart @@ -138,7 +138,7 @@ class _UniT2LoginState extends State { mainAxisAlignment: MainAxisAlignment.center, children: [ SvgPicture.asset( - 'assets/svgs/logo.svg', + 'assets/svgs/rpass_logo.svg', height: blockSizeVertical * 12, allowDrawingOutsideViewBox: true, color: primary, diff --git a/lib/sevices/offline/offline_passo/admin/sql_services/sql_services.dart b/lib/sevices/offline/offline_passo/admin/sql_services/sql_services.dart index cea6f76..300d2d5 100644 --- a/lib/sevices/offline/offline_passo/admin/sql_services/sql_services.dart +++ b/lib/sevices/offline/offline_passo/admin/sql_services/sql_services.dart @@ -116,7 +116,7 @@ class SQLServices { firstname TEXT NOT NULL, middlename TEXT NOT NULL, lastname TEXT NOT NULL, - designation TEXT + designation TEXT NOT NULL ) '''); @@ -373,6 +373,7 @@ class SQLServices { recommendappr_designation TEXT, approvedbyName TEXT NOT NULL, approvedby_designation TEXT, + approvedbyDate TEXT, memoranda TEXT NOT NULL, swornstatementNo TEXT NOT NULL, dateReceived TEXT NOT NULL, @@ -1220,7 +1221,6 @@ class SQLServices { id, StructureMaterialsII materials) async { final db = await instance.database; final data = { - "bldgapprDetailsId": materials.bldgapprDetailsId, "foundation": materials.foundation?.join(', ').splitMapJoin(', '), "columns": materials.columns!.join(', ').splitMapJoin(', '), "beams": materials.beams!.join(', ').splitMapJoin(', '), @@ -1434,6 +1434,8 @@ class SQLServices { Future createBldgAssessment( PropertyAssessment assessment) async { final db = await instance.database; + print('assesss'); + print(assessment.toJson()); final data = { // "id": assessment.id, @@ -1455,6 +1457,7 @@ class SQLServices { "recommendapprName": assessment.recommendapprName, "recommendapprDate": assessment.recommendapprDate, "approvedbyName": assessment.approvedbyName, + "approvedbyDate": assessment.approvedbyDate, "memoranda": assessment.memoranda, "swornstatementNo": assessment.swornstatementNo, "dateReceived": assessment.dateReceived, diff --git a/lib/sevices/passo/building/building_services.dart b/lib/sevices/passo/building/building_services.dart new file mode 100644 index 0000000..d30f991 --- /dev/null +++ b/lib/sevices/passo/building/building_services.dart @@ -0,0 +1,35 @@ +import 'dart:convert'; +import 'dart:developer'; +import 'dart:io'; + +import 'package:http/http.dart' as http; +import 'package:unit2/model/passo/building_details.dart'; +import 'package:unit2/model/passo/structural_materials_ii.dart'; +import 'package:unit2/model/passo/structureMaterial.dart'; +import 'package:unit2/utils/request.dart'; +import 'package:unit2/utils/urls.dart'; + +class BuildingServices { + static final BuildingServices _instance = BuildingServices(); + static BuildingServices get instance => _instance; + + String xClientKey = "unitK3CQaXiWlPReDsBzmmwBZPd9Re1z"; + String xClientKeySecret = "unitcYqAN7GGalyz"; + + Future add(details) async { + String path = Url.instance.buildingDetails(); + Map headers = { + 'Content-Type': 'application/json; charset=UTF-8', + 'X-Client-Key': xClientKey, + 'X-Client-Secret': xClientKeySecret + }; + http.Response? response; + try { + response = await Request.instance + .postRequest(param: {}, path: path, body: details, headers: headers); + } catch (e) { + log(e.toString()); + } + return response; + } +} diff --git a/lib/utils/text_container.dart b/lib/utils/text_container.dart index 79be6de..500bb07 100644 --- a/lib/utils/text_container.dart +++ b/lib/utils/text_container.dart @@ -16,7 +16,7 @@ const String sOSReceivedMessage = "your SOS request has been received. Please wait for respondent's acknowledgement."; const String unit2ModuleScreen = "uniT Dashboard"; const String welcome = "Welcome to!"; -const String unitApp = 'uniT-App'; +const String unitApp = 'Rpass-App'; const String loginToContinue = "Please login to continue."; const String loginViaQr = "Login via QR code"; const String emergencyReponseLabel = " Request Emergency Response "; diff --git a/lib/utils/urls.dart b/lib/utils/urls.dart index 4c3bed1..eb57b81 100644 --- a/lib/utils/urls.dart +++ b/lib/utils/urls.dart @@ -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() { @@ -368,6 +368,10 @@ class Url { return "/api/rptass_app/additional_items/"; } + String buildingDetails() { + return "/api/rptass_app/bldgappr_details/"; + } + String generalDescription() { return "/api/rptass_app/bldgappr_gendesc/"; }