Merge pull request 'consol/feature/passo/PASSO-#55-Refactor-property-assessment-and-add-condition-to-edit-faas-to-save-changes-or-not__develop' (#63) from consol/feature/passo/PASSO-#55-Refactor-property-assessment-and-add-condition-to-edit-faas-to-save-changes-or-not__develop into develop
Reviewed-on: http://git.agusandelnorte.gov.ph:3000/SoftwareDevelopmentSection/unit2-null-safety-repository/pulls/63feature/passo/PASSO-#1-Sync-data-from-device-to-postgre-and-vice-versa
commit
5a17258c82
|
@ -16,11 +16,6 @@ class AdditionalItemBloc
|
||||||
on<LoadAdditionalItems>((event, emit) async {
|
on<LoadAdditionalItems>((event, emit) async {
|
||||||
emit(AdditionalItemsLoading());
|
emit(AdditionalItemsLoading());
|
||||||
try {
|
try {
|
||||||
// final tempID = await SharedPreferences.getInstance();
|
|
||||||
// print(tempID.getInt('tempid'));
|
|
||||||
// final additionalItem = await GetAdditionalItems.getAdditionalItems(
|
|
||||||
// tempID.getInt('tempid'));
|
|
||||||
|
|
||||||
emit(AdditionalItemsLoaded(globalAdditionalItems));
|
emit(AdditionalItemsLoaded(globalAdditionalItems));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
emit(AdditionalItemsErrorState(e.toString()));
|
emit(AdditionalItemsErrorState(e.toString()));
|
||||||
|
@ -42,7 +37,7 @@ class AdditionalItemBloc
|
||||||
|
|
||||||
emit(AdditionalItemsLoaded(globalAdditionalItems));
|
emit(AdditionalItemsLoaded(globalAdditionalItems));
|
||||||
} else {
|
} else {
|
||||||
emit(AdditionalItemsErrorState('error'));
|
emit(const AdditionalItemsErrorState('error'));
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
emit(AdditionalItemsErrorState(e.toString()));
|
emit(AdditionalItemsErrorState(e.toString()));
|
||||||
|
@ -56,7 +51,7 @@ class AdditionalItemBloc
|
||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
globalAdditionalItems
|
globalAdditionalItems
|
||||||
.removeWhere(((AdditionalItems element) => element.id == event.id));
|
.removeWhere(((AdditionalItems element) => element.id == event.id));
|
||||||
emit(AdditionalItemsDeletedState(success: true));
|
emit(const AdditionalItemsDeletedState(success: true));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -12,14 +12,14 @@ part 'property_appraisal_state.dart';
|
||||||
|
|
||||||
class PropertyAppraisalBloc
|
class PropertyAppraisalBloc
|
||||||
extends Bloc<PropertyAppraisalEvent, PropertyAppraisalState> {
|
extends Bloc<PropertyAppraisalEvent, PropertyAppraisalState> {
|
||||||
PropertyAppraisalBloc() : super(PropertyAppraisalInitial()) {
|
PropertyAppraisalBloc() : super(PropertyAppraisalLoading()) {
|
||||||
List<PropertyAppraisal> globalPropertyAppraisal = [];
|
List<PropertyAppraisal> globalPropertyAppraisal = [];
|
||||||
on<LoadPropertyAppraisal>((event, emit) async {
|
on<LoadPropertyAppraisal>((event, emit) async {
|
||||||
emit(PropertyAppraisalLoading());
|
emit(PropertyAppraisalLoading());
|
||||||
try {
|
try {
|
||||||
final appraisal = await PropertyAppraisalServices.instance.fetch();
|
// final appraisal = await PropertyAppraisalServices.instance.fetch();
|
||||||
print(appraisal);
|
// print(appraisal);
|
||||||
emit(PropertyAppraisalLoaded(appraisal));
|
emit(PropertyAppraisalLoaded(PropertyAppraisal()));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
emit(PropertyAppraisalErrorState(e.toString()));
|
emit(PropertyAppraisalErrorState(e.toString()));
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,8 @@ class LandExtBloc extends Bloc<LandExtEvent, LandExtState> {
|
||||||
});
|
});
|
||||||
on<UpdateLandExt>((event, emit) async {
|
on<UpdateLandExt>((event, emit) async {
|
||||||
final tempID = await SharedPreferences.getInstance();
|
final tempID = await SharedPreferences.getInstance();
|
||||||
final tempID2 = tempID.getInt('tempid')! - 1;
|
final tempID2 = tempID.getInt('landid')! - 1;
|
||||||
|
|
||||||
http.Response response =
|
http.Response response =
|
||||||
(await LandExtServices.instance.update(event.landext, tempID2))!;
|
(await LandExtServices.instance.update(event.landext, tempID2))!;
|
||||||
print('landext');
|
print('landext');
|
||||||
|
|
|
@ -59,6 +59,11 @@ class LandPropertyOwnerInfoBloc
|
||||||
print(event.land_loc.id!);
|
print(event.land_loc.id!);
|
||||||
print('Land LOc');
|
print('Land LOc');
|
||||||
print(response.statusCode);
|
print(response.statusCode);
|
||||||
|
if (response.statusCode == 200) {
|
||||||
|
emit(ShowLandLocSuccessAlertState());
|
||||||
|
} else {
|
||||||
|
emit(ShowLandLocErrorAlertState());
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
on<UpdateLandBoundaries>((event, emit) async {
|
on<UpdateLandBoundaries>((event, emit) async {
|
||||||
|
@ -67,6 +72,21 @@ class LandPropertyOwnerInfoBloc
|
||||||
.update(event.land_boundaries, event.land_boundaries.id))!;
|
.update(event.land_boundaries, event.land_boundaries.id))!;
|
||||||
print('Land Boundaries');
|
print('Land Boundaries');
|
||||||
print(response.body);
|
print(response.body);
|
||||||
|
if (response.statusCode == 200) {
|
||||||
|
emit(ShowLandBoundariesSuccessState());
|
||||||
|
} else {
|
||||||
|
emit(ShowLandBoundariesErrorAlertState());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
on<DeleteLandFaas>((event, emit) async {
|
||||||
|
print(event.id);
|
||||||
|
emit(LandLoading());
|
||||||
|
http.Response response = (await LandServices.instance.remove(event.id));
|
||||||
|
print(response.statusCode);
|
||||||
|
if (response.statusCode == 200) {
|
||||||
|
emit(LandFaasDeletedState(success: true));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,3 +58,12 @@ class UpdateLandBoundaries extends LandPropertyOwnerInfoEvent {
|
||||||
@override
|
@override
|
||||||
List<Object> get props => [land_boundaries];
|
List<Object> get props => [land_boundaries];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class DeleteLandFaas extends LandPropertyOwnerInfoEvent {
|
||||||
|
final int id;
|
||||||
|
|
||||||
|
const DeleteLandFaas({required this.id});
|
||||||
|
|
||||||
|
@override
|
||||||
|
List<Object> get props => [id];
|
||||||
|
}
|
||||||
|
|
|
@ -24,3 +24,18 @@ class LandErrorState extends LandPropertyOwnerInfoState {
|
||||||
@override
|
@override
|
||||||
List<Object> get props => [error];
|
List<Object> get props => [error];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class LandFaasDeletedState extends LandPropertyOwnerInfoState {
|
||||||
|
final bool success;
|
||||||
|
const LandFaasDeletedState({required this.success});
|
||||||
|
@override
|
||||||
|
List<Object> get props => [success];
|
||||||
|
}
|
||||||
|
|
||||||
|
class ShowLandLocErrorAlertState extends LandPropertyOwnerInfoState {}
|
||||||
|
|
||||||
|
class ShowLandBoundariesErrorAlertState extends LandPropertyOwnerInfoState {}
|
||||||
|
|
||||||
|
class ShowLandLocSuccessAlertState extends LandPropertyOwnerInfoState {}
|
||||||
|
|
||||||
|
class ShowLandBoundariesSuccessState extends LandPropertyOwnerInfoState {}
|
||||||
|
|
|
@ -31,6 +31,8 @@ import 'package:unit2/widgets/error_state.dart';
|
||||||
GlobalKey<FormBuilderState> formKey = GlobalKey<FormBuilderState>();
|
GlobalKey<FormBuilderState> formKey = GlobalKey<FormBuilderState>();
|
||||||
|
|
||||||
class AddBuilding extends StatefulWidget {
|
class AddBuilding extends StatefulWidget {
|
||||||
|
Function triggerBlocEvent;
|
||||||
|
AddBuilding(this.triggerBlocEvent);
|
||||||
@override
|
@override
|
||||||
_AddBuilding createState() => _AddBuilding();
|
_AddBuilding createState() => _AddBuilding();
|
||||||
}
|
}
|
||||||
|
@ -293,6 +295,7 @@ class _AddBuilding extends State<AddBuilding> {
|
||||||
}
|
}
|
||||||
|
|
||||||
void onSAveAll() {
|
void onSAveAll() {
|
||||||
return Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
|
widget.triggerBlocEvent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:flutter_form_builder/flutter_form_builder.dart';
|
import 'package:flutter_form_builder/flutter_form_builder.dart';
|
||||||
import 'package:flutter_progress_hud/flutter_progress_hud.dart';
|
import 'package:flutter_progress_hud/flutter_progress_hud.dart';
|
||||||
import 'package:flutter_spinkit/flutter_spinkit.dart';
|
import 'package:flutter_spinkit/flutter_spinkit.dart';
|
||||||
|
import 'package:fluttertoast/fluttertoast.dart';
|
||||||
import 'package:form_builder_validators/form_builder_validators.dart';
|
import 'package:form_builder_validators/form_builder_validators.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
|
@ -509,7 +510,37 @@ class _PropertyAppraisalPage extends State<PropertyAppraisalPage> {
|
||||||
padding: const EdgeInsets.all(24),
|
padding: const EdgeInsets.all(24),
|
||||||
backgroundColor: Colors.black87,
|
backgroundColor: Colors.black87,
|
||||||
indicatorWidget: const SpinKitFadingCircle(color: Colors.white),
|
indicatorWidget: const SpinKitFadingCircle(color: Colors.white),
|
||||||
child: BlocConsumer<AdditionalItemBloc, AdditionalItemState>(
|
child: BlocConsumer<PropertyAppraisalBloc, PropertyAppraisalState>(
|
||||||
|
listener: (context, state) {
|
||||||
|
if (state is PropertyAppraisalLoading) {
|
||||||
|
final progress = ProgressHUD.of(context);
|
||||||
|
progress!.showWithText("Please wait...");
|
||||||
|
print('app_load');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (state is PropertyAppraisalErrorState) {
|
||||||
|
final progress = ProgressHUD.of(context);
|
||||||
|
progress?.dismiss();
|
||||||
|
}
|
||||||
|
if (state is PropertyAppraisalLoaded) {
|
||||||
|
final progress = ProgressHUD.of(context);
|
||||||
|
progress?.dismiss();
|
||||||
|
}
|
||||||
|
if (state is ShowPropertyAppraisalSuccessAlertState) {
|
||||||
|
final progress = ProgressHUD.of(context);
|
||||||
|
progress?.dismiss();
|
||||||
|
widget.NextBtn();
|
||||||
|
}
|
||||||
|
if (state is ShowPropertyAppraisalErrorAlertState) {
|
||||||
|
final progress = ProgressHUD.of(context);
|
||||||
|
progress?.dismiss();
|
||||||
|
Fluttertoast.showToast(
|
||||||
|
msg: "Slow internet connection, please try again!");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
builder: (context, state) {
|
||||||
|
if (state is PropertyAppraisalLoaded) {
|
||||||
|
return BlocConsumer<AdditionalItemBloc, AdditionalItemState>(
|
||||||
listener: (context, state) {
|
listener: (context, state) {
|
||||||
if (state is AdditionalItemsLoading) {
|
if (state is AdditionalItemsLoading) {
|
||||||
final progress = ProgressHUD.of(context);
|
final progress = ProgressHUD.of(context);
|
||||||
|
@ -536,7 +567,8 @@ class _PropertyAppraisalPage extends State<PropertyAppraisalPage> {
|
||||||
left: 0, top: 20, right: 0, bottom: 20),
|
left: 0, top: 20, right: 0, bottom: 20),
|
||||||
child: const Text('PROPERTY APPRAISAL',
|
child: const Text('PROPERTY APPRAISAL',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.bold, fontSize: 18),
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 18),
|
||||||
textAlign: TextAlign.left),
|
textAlign: TextAlign.left),
|
||||||
),
|
),
|
||||||
Row(
|
Row(
|
||||||
|
@ -546,7 +578,8 @@ class _PropertyAppraisalPage extends State<PropertyAppraisalPage> {
|
||||||
child: Text(
|
child: Text(
|
||||||
"Unit Construction Cost",
|
"Unit Construction Cost",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.bold, fontSize: 13),
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 13),
|
||||||
textAlign: TextAlign.left,
|
textAlign: TextAlign.left,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -568,7 +601,8 @@ class _PropertyAppraisalPage extends State<PropertyAppraisalPage> {
|
||||||
child: Text(
|
child: Text(
|
||||||
"Building Core",
|
"Building Core",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.bold, fontSize: 13),
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 13),
|
||||||
textAlign: TextAlign.left,
|
textAlign: TextAlign.left,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -588,14 +622,15 @@ class _PropertyAppraisalPage extends State<PropertyAppraisalPage> {
|
||||||
child: Text(
|
child: Text(
|
||||||
"Sub-total",
|
"Sub-total",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.bold, fontSize: 13),
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 13),
|
||||||
textAlign: TextAlign.left,
|
textAlign: TextAlign.left,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
child: Text(
|
child: Text(
|
||||||
(double.parse(formKey
|
(double.parse(formKey.currentState!
|
||||||
.currentState!.value['total_area']) *
|
.value['total_area']) *
|
||||||
double.parse(formKey.currentState!
|
double.parse(formKey.currentState!
|
||||||
.value['bldg_type'].unitValue))
|
.value['bldg_type'].unitValue))
|
||||||
.toString(),
|
.toString(),
|
||||||
|
@ -612,7 +647,8 @@ class _PropertyAppraisalPage extends State<PropertyAppraisalPage> {
|
||||||
child: Text(
|
child: Text(
|
||||||
"Cost of Additional Items",
|
"Cost of Additional Items",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.bold, fontSize: 13),
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 13),
|
||||||
textAlign: TextAlign.left,
|
textAlign: TextAlign.left,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -632,13 +668,15 @@ class _PropertyAppraisalPage extends State<PropertyAppraisalPage> {
|
||||||
child: Text(
|
child: Text(
|
||||||
"Sub-total",
|
"Sub-total",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.bold, fontSize: 13),
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 13),
|
||||||
textAlign: TextAlign.left,
|
textAlign: TextAlign.left,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
child: Text(
|
child: Text(
|
||||||
calculateAdditionalItems(state.items).toString(),
|
calculateAdditionalItems(state.items)
|
||||||
|
.toString(),
|
||||||
textAlign: TextAlign.right,
|
textAlign: TextAlign.right,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
@ -652,7 +690,8 @@ class _PropertyAppraisalPage extends State<PropertyAppraisalPage> {
|
||||||
child: Text(
|
child: Text(
|
||||||
"Total Construction Cost",
|
"Total Construction Cost",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.bold, fontSize: 13),
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 13),
|
||||||
textAlign: TextAlign.left,
|
textAlign: TextAlign.left,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -661,8 +700,10 @@ class _PropertyAppraisalPage extends State<PropertyAppraisalPage> {
|
||||||
calculateTotalConstructionCost(
|
calculateTotalConstructionCost(
|
||||||
(double.parse(formKey.currentState!
|
(double.parse(formKey.currentState!
|
||||||
.value['total_area']) *
|
.value['total_area']) *
|
||||||
double.parse(formKey.currentState!
|
double.parse(formKey
|
||||||
.value['bldg_type'].unitValue)),
|
.currentState!
|
||||||
|
.value['bldg_type']
|
||||||
|
.unitValue)),
|
||||||
state.items)
|
state.items)
|
||||||
.toString(),
|
.toString(),
|
||||||
textAlign: TextAlign.right,
|
textAlign: TextAlign.right,
|
||||||
|
@ -678,7 +719,8 @@ class _PropertyAppraisalPage extends State<PropertyAppraisalPage> {
|
||||||
child: Text(
|
child: Text(
|
||||||
"Depreciation Rate",
|
"Depreciation Rate",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.bold, fontSize: 13),
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 13),
|
||||||
textAlign: TextAlign.left,
|
textAlign: TextAlign.left,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -688,7 +730,8 @@ class _PropertyAppraisalPage extends State<PropertyAppraisalPage> {
|
||||||
child: FormBuilderTextField(
|
child: FormBuilderTextField(
|
||||||
name: 'depRate',
|
name: 'depRate',
|
||||||
decoration: normalTextFieldStyle("", ""),
|
decoration: normalTextFieldStyle("", ""),
|
||||||
validator: FormBuilderValidators.compose([]),
|
validator:
|
||||||
|
FormBuilderValidators.compose([]),
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
setState(() {
|
setState(() {
|
||||||
depRate = double.parse(value!);
|
depRate = double.parse(value!);
|
||||||
|
@ -706,7 +749,8 @@ class _PropertyAppraisalPage extends State<PropertyAppraisalPage> {
|
||||||
child: Text(
|
child: Text(
|
||||||
"Depreciation Cost",
|
"Depreciation Cost",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.bold, fontSize: 13),
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 13),
|
||||||
textAlign: TextAlign.left,
|
textAlign: TextAlign.left,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -715,8 +759,10 @@ class _PropertyAppraisalPage extends State<PropertyAppraisalPage> {
|
||||||
calculateDepCost(
|
calculateDepCost(
|
||||||
(double.parse(formKey.currentState!
|
(double.parse(formKey.currentState!
|
||||||
.value['total_area']) *
|
.value['total_area']) *
|
||||||
double.parse(formKey.currentState!
|
double.parse(formKey
|
||||||
.value['bldg_type'].unitValue)),
|
.currentState!
|
||||||
|
.value['bldg_type']
|
||||||
|
.unitValue)),
|
||||||
state.items,
|
state.items,
|
||||||
depRate)
|
depRate)
|
||||||
.toString(),
|
.toString(),
|
||||||
|
@ -733,7 +779,8 @@ class _PropertyAppraisalPage extends State<PropertyAppraisalPage> {
|
||||||
child: Text(
|
child: Text(
|
||||||
"Total % Depreciation",
|
"Total % Depreciation",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.bold, fontSize: 13),
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 13),
|
||||||
textAlign: TextAlign.left,
|
textAlign: TextAlign.left,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -753,7 +800,8 @@ class _PropertyAppraisalPage extends State<PropertyAppraisalPage> {
|
||||||
child: Text(
|
child: Text(
|
||||||
"Market Value",
|
"Market Value",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.bold, fontSize: 13),
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 13),
|
||||||
textAlign: TextAlign.left,
|
textAlign: TextAlign.left,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -762,8 +810,10 @@ class _PropertyAppraisalPage extends State<PropertyAppraisalPage> {
|
||||||
calculateMarketValue(
|
calculateMarketValue(
|
||||||
(double.parse(formKey.currentState!
|
(double.parse(formKey.currentState!
|
||||||
.value['total_area']) *
|
.value['total_area']) *
|
||||||
double.parse(formKey.currentState!
|
double.parse(formKey
|
||||||
.value['bldg_type'].unitValue)),
|
.currentState!
|
||||||
|
.value['bldg_type']
|
||||||
|
.unitValue)),
|
||||||
state.items,
|
state.items,
|
||||||
depRate)
|
depRate)
|
||||||
.toString(),
|
.toString(),
|
||||||
|
@ -794,9 +844,11 @@ class _PropertyAppraisalPage extends State<PropertyAppraisalPage> {
|
||||||
child: const Text(
|
child: const Text(
|
||||||
'PROPERTY ASSESSMENT',
|
'PROPERTY ASSESSMENT',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight:
|
||||||
|
FontWeight.bold,
|
||||||
fontSize: 18),
|
fontSize: 18),
|
||||||
textAlign: TextAlign.left),
|
textAlign:
|
||||||
|
TextAlign.left),
|
||||||
),
|
),
|
||||||
Column(
|
Column(
|
||||||
children: [
|
children: [
|
||||||
|
@ -805,77 +857,89 @@ class _PropertyAppraisalPage extends State<PropertyAppraisalPage> {
|
||||||
Container(
|
Container(
|
||||||
width: 100,
|
width: 100,
|
||||||
margin:
|
margin:
|
||||||
const EdgeInsets.only(
|
const EdgeInsets
|
||||||
top: 15, left: 15),
|
.only(
|
||||||
|
top: 15,
|
||||||
|
left: 15),
|
||||||
padding:
|
padding:
|
||||||
const EdgeInsets.all(
|
const EdgeInsets
|
||||||
5.0),
|
.all(5.0),
|
||||||
child: const Text(
|
child: const Text(
|
||||||
'Actual Use',
|
'Actual Use',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight:
|
fontWeight:
|
||||||
FontWeight.bold,
|
FontWeight
|
||||||
|
.bold,
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
),
|
),
|
||||||
textAlign:
|
textAlign: TextAlign
|
||||||
TextAlign.center,
|
.center,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
width: 100,
|
width: 100,
|
||||||
margin:
|
margin:
|
||||||
const EdgeInsets.only(
|
const EdgeInsets
|
||||||
top: 15, left: 15),
|
.only(
|
||||||
|
top: 15,
|
||||||
|
left: 15),
|
||||||
padding:
|
padding:
|
||||||
const EdgeInsets.all(
|
const EdgeInsets
|
||||||
5.0),
|
.all(5.0),
|
||||||
child: const Text(
|
child: const Text(
|
||||||
'Market Value',
|
'Market Value',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight:
|
fontWeight:
|
||||||
FontWeight.bold,
|
FontWeight
|
||||||
|
.bold,
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
),
|
),
|
||||||
textAlign:
|
textAlign: TextAlign
|
||||||
TextAlign.center,
|
.center,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
width: 100,
|
width: 100,
|
||||||
margin:
|
margin:
|
||||||
const EdgeInsets.only(
|
const EdgeInsets
|
||||||
top: 15, left: 15),
|
.only(
|
||||||
|
top: 15,
|
||||||
|
left: 15),
|
||||||
padding:
|
padding:
|
||||||
const EdgeInsets.all(
|
const EdgeInsets
|
||||||
5.0),
|
.all(5.0),
|
||||||
child: const Text(
|
child: const Text(
|
||||||
'Ass. Level',
|
'Ass. Level',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight:
|
fontWeight:
|
||||||
FontWeight.bold,
|
FontWeight
|
||||||
|
.bold,
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
),
|
),
|
||||||
textAlign:
|
textAlign: TextAlign
|
||||||
TextAlign.center,
|
.center,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
width: 100,
|
width: 100,
|
||||||
margin:
|
margin:
|
||||||
const EdgeInsets.only(
|
const EdgeInsets
|
||||||
top: 15, left: 15),
|
.only(
|
||||||
|
top: 15,
|
||||||
|
left: 15),
|
||||||
padding:
|
padding:
|
||||||
const EdgeInsets.all(
|
const EdgeInsets
|
||||||
5.0),
|
.all(5.0),
|
||||||
child: const Text(
|
child: const Text(
|
||||||
'Ass. Value',
|
'Ass. Value',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight:
|
fontWeight:
|
||||||
FontWeight.bold,
|
FontWeight
|
||||||
|
.bold,
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
),
|
),
|
||||||
textAlign:
|
textAlign: TextAlign
|
||||||
TextAlign.center,
|
.center,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -887,102 +951,72 @@ class _PropertyAppraisalPage extends State<PropertyAppraisalPage> {
|
||||||
Container(
|
Container(
|
||||||
width: 100,
|
width: 100,
|
||||||
margin:
|
margin:
|
||||||
const EdgeInsets.only(
|
const EdgeInsets
|
||||||
|
.only(
|
||||||
top: 15,
|
top: 15,
|
||||||
left: 15),
|
left: 15),
|
||||||
padding:
|
padding:
|
||||||
const EdgeInsets.all(
|
const EdgeInsets
|
||||||
5.0),
|
.all(5.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
formKey.currentState
|
formKey.currentState
|
||||||
?.value[
|
?.value[
|
||||||
'actual_use']!,
|
'actual_use']!,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight:
|
fontWeight:
|
||||||
FontWeight.bold,
|
FontWeight
|
||||||
|
.bold,
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
),
|
),
|
||||||
textAlign:
|
textAlign:
|
||||||
TextAlign.center,
|
TextAlign
|
||||||
|
.center,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
width: 100,
|
width: 100,
|
||||||
margin:
|
margin:
|
||||||
const EdgeInsets.only(
|
const EdgeInsets
|
||||||
|
.only(
|
||||||
top: 15,
|
top: 15,
|
||||||
left: 15),
|
left: 15),
|
||||||
padding:
|
padding:
|
||||||
const EdgeInsets.all(
|
const EdgeInsets
|
||||||
5.0),
|
.all(5.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
calculateMarketValue(
|
|
||||||
(double.parse(formKey
|
|
||||||
.currentState!
|
|
||||||
.value[
|
|
||||||
'total_area']) *
|
|
||||||
double.parse(formKey
|
|
||||||
.currentState!
|
|
||||||
.value[
|
|
||||||
'bldg_type']
|
|
||||||
.unitValue)),
|
|
||||||
state.items,
|
|
||||||
depRate)
|
|
||||||
.toString(),
|
|
||||||
style: TextStyle(
|
|
||||||
fontWeight:
|
|
||||||
FontWeight.bold,
|
|
||||||
fontSize: 13,
|
|
||||||
),
|
|
||||||
textAlign:
|
|
||||||
TextAlign.center,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
width: 100,
|
|
||||||
margin:
|
|
||||||
const EdgeInsets.only(
|
|
||||||
top: 15,
|
|
||||||
left: 15),
|
|
||||||
padding:
|
|
||||||
const EdgeInsets.all(
|
|
||||||
5.0),
|
|
||||||
child: Text(
|
|
||||||
assessmentLevel(
|
|
||||||
calculateMarketValue(
|
calculateMarketValue(
|
||||||
(double.parse(formKey.currentState!.value[
|
(double.parse(formKey.currentState!.value[
|
||||||
'total_area']) *
|
'total_area']) *
|
||||||
double.parse(formKey
|
double.parse(formKey
|
||||||
.currentState!
|
.currentState!
|
||||||
.value[
|
.value['bldg_type']
|
||||||
'bldg_type']
|
|
||||||
.unitValue)),
|
.unitValue)),
|
||||||
state.items,
|
state.items,
|
||||||
depRate)
|
depRate)
|
||||||
.toString(),
|
.toString(),
|
||||||
formKey.currentState
|
|
||||||
?.value[
|
|
||||||
'actual_use']),
|
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight:
|
fontWeight:
|
||||||
FontWeight.bold,
|
FontWeight
|
||||||
|
.bold,
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
),
|
),
|
||||||
textAlign:
|
textAlign:
|
||||||
TextAlign.center,
|
TextAlign
|
||||||
|
.center,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
width: 100,
|
width: 100,
|
||||||
margin:
|
margin:
|
||||||
const EdgeInsets.only(
|
const EdgeInsets
|
||||||
|
.only(
|
||||||
top: 15,
|
top: 15,
|
||||||
left: 15),
|
left: 15),
|
||||||
padding:
|
padding:
|
||||||
const EdgeInsets.all(
|
const EdgeInsets
|
||||||
5.0),
|
.all(5.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
assessmentValue(
|
assessmentLevel(
|
||||||
calculateMarketValue(
|
calculateMarketValue(
|
||||||
(double.parse(formKey.currentState!.value['total_area']) *
|
(double.parse(formKey.currentState!.value['total_area']) *
|
||||||
double.parse(formKey
|
double.parse(formKey
|
||||||
|
@ -996,15 +1030,45 @@ class _PropertyAppraisalPage extends State<PropertyAppraisalPage> {
|
||||||
.toString(),
|
.toString(),
|
||||||
formKey.currentState
|
formKey.currentState
|
||||||
?.value[
|
?.value[
|
||||||
'actual_use'])
|
'actual_use']),
|
||||||
.toString(),
|
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight:
|
fontWeight:
|
||||||
FontWeight.bold,
|
FontWeight
|
||||||
|
.bold,
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
),
|
),
|
||||||
textAlign:
|
textAlign:
|
||||||
TextAlign.center,
|
TextAlign
|
||||||
|
.center,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: 100,
|
||||||
|
margin:
|
||||||
|
const EdgeInsets
|
||||||
|
.only(
|
||||||
|
top: 15,
|
||||||
|
left: 15),
|
||||||
|
padding:
|
||||||
|
const EdgeInsets
|
||||||
|
.all(5.0),
|
||||||
|
child: Text(
|
||||||
|
assessmentValue(
|
||||||
|
calculateMarketValue((double.parse(formKey.currentState!.value['total_area']) * double.parse(formKey.currentState!.value['bldg_type'].unitValue)), state.items, depRate)
|
||||||
|
.toString(),
|
||||||
|
formKey
|
||||||
|
.currentState
|
||||||
|
?.value['actual_use'])
|
||||||
|
.toString(),
|
||||||
|
style: TextStyle(
|
||||||
|
fontWeight:
|
||||||
|
FontWeight
|
||||||
|
.bold,
|
||||||
|
fontSize: 13,
|
||||||
|
),
|
||||||
|
textAlign:
|
||||||
|
TextAlign
|
||||||
|
.center,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -1044,11 +1108,12 @@ class _PropertyAppraisalPage extends State<PropertyAppraisalPage> {
|
||||||
id: 1,
|
id: 1,
|
||||||
bldgapprDetailsId:
|
bldgapprDetailsId:
|
||||||
tempID.getInt('tempid')! - 1,
|
tempID.getInt('tempid')! - 1,
|
||||||
unitconstructCost: formKey.currentState!
|
unitconstructCost: formKey
|
||||||
.value['bldg_type'].unitValue,
|
.currentState!
|
||||||
|
.value['bldg_type']
|
||||||
|
.unitValue,
|
||||||
buildingCore: 'test',
|
buildingCore: 'test',
|
||||||
unitconstructSubtotal:
|
unitconstructSubtotal: (double.parse(formKey.currentState!.value['total_area']) *
|
||||||
(double.parse(formKey.currentState!.value['total_area']) *
|
|
||||||
double.parse(formKey
|
double.parse(formKey
|
||||||
.currentState!
|
.currentState!
|
||||||
.value['bldg_type']
|
.value['bldg_type']
|
||||||
|
@ -1070,8 +1135,6 @@ class _PropertyAppraisalPage extends State<PropertyAppraisalPage> {
|
||||||
context.read<PropertyAppraisalBloc>()
|
context.read<PropertyAppraisalBloc>()
|
||||||
..add(AddPropertyAppraisal(
|
..add(AddPropertyAppraisal(
|
||||||
appraisal: appraisals));
|
appraisal: appraisals));
|
||||||
|
|
||||||
widget.NextBtn();
|
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
},
|
},
|
||||||
|
@ -1085,6 +1148,10 @@ class _PropertyAppraisalPage extends State<PropertyAppraisalPage> {
|
||||||
}
|
}
|
||||||
return Container();
|
return Container();
|
||||||
},
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return Container();
|
||||||
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
@ -580,8 +580,9 @@ class _PropertyAssessmentPage extends State<PropertyAssessmentPage> {
|
||||||
|
|
||||||
propertyAssessments.add(ass);
|
propertyAssessments.add(ass);
|
||||||
|
|
||||||
context.read<PropertyAssessmentBloc>()
|
context
|
||||||
..add(UpdatePropertyAssessment(
|
.read<PropertyAssessmentBloc>()
|
||||||
|
.add(UpdatePropertyAssessment(
|
||||||
assessment:
|
assessment:
|
||||||
propertyAssessments[0]));
|
propertyAssessments[0]));
|
||||||
widget.function();
|
widget.function();
|
||||||
|
@ -589,7 +590,7 @@ class _PropertyAssessmentPage extends State<PropertyAssessmentPage> {
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
backgroundColor: primary,
|
backgroundColor: primary,
|
||||||
foregroundColor: Colors.red),
|
foregroundColor: Colors.red),
|
||||||
child: SizedBox(
|
child: const SizedBox(
|
||||||
width: 200,
|
width: 200,
|
||||||
height: 50,
|
height: 50,
|
||||||
child: Align(
|
child: Align(
|
||||||
|
@ -604,7 +605,7 @@ class _PropertyAssessmentPage extends State<PropertyAssessmentPage> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(
|
const SizedBox(
|
||||||
height: 30,
|
height: 30,
|
||||||
),
|
),
|
||||||
]),
|
]),
|
||||||
|
@ -613,10 +614,26 @@ class _PropertyAssessmentPage extends State<PropertyAssessmentPage> {
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
if (state is MemorandaErrorState) {
|
||||||
|
return SomethingWentWrong(
|
||||||
|
message: onError,
|
||||||
|
onpressed: () {
|
||||||
|
context.read<MemorandaBloc>().add(LoadMemoranda());
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
return Container();
|
return Container();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
if (state is SignatoriesErrorState) {
|
||||||
|
return SomethingWentWrong(
|
||||||
|
message: onError,
|
||||||
|
onpressed: () {
|
||||||
|
context.read<SignatoriesBloc>().add(LoadSignatories());
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
return Container();
|
return Container();
|
||||||
},
|
},
|
||||||
)));
|
)));
|
||||||
|
|
|
@ -1129,10 +1129,30 @@ class _PropertyAssessmentEditPage extends State<PropertyAssessmentEditPage> {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
if (state is MemorandaErrorState) {
|
||||||
|
return SomethingWentWrong(
|
||||||
|
message: state.error,
|
||||||
|
onpressed: () {
|
||||||
|
context
|
||||||
|
.read<MemorandaBloc>()
|
||||||
|
.add(const LoadMemoranda());
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
return Container();
|
return Container();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
if (state is SignatoriesErrorState) {
|
||||||
|
return SomethingWentWrong(
|
||||||
|
message: state.error,
|
||||||
|
onpressed: () {
|
||||||
|
context
|
||||||
|
.read<SignatoriesBloc>()
|
||||||
|
.add(const LoadSignatories());
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
return Container();
|
return Container();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
|
@ -48,16 +48,16 @@ class _AddLand extends State<AddLand> {
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
centerTitle: true,
|
centerTitle: true,
|
||||||
backgroundColor: primary,
|
backgroundColor: primary,
|
||||||
title: Text('Land FAAS'),
|
title: const Text('Land FAAS'),
|
||||||
),
|
),
|
||||||
body: Padding(
|
body: Padding(
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
NumberStepper(
|
NumberStepper(
|
||||||
numbers: [1, 2, 3, 4, 5, 6, 7],
|
numbers: const [1, 2, 3, 4, 5, 6, 7],
|
||||||
activeStepColor: primary,
|
activeStepColor: primary,
|
||||||
numberStyle: TextStyle(color: Colors.white),
|
numberStyle: const TextStyle(color: Colors.white),
|
||||||
lineColor: primary,
|
lineColor: primary,
|
||||||
// activeStep property set to activeStep variable defined above.
|
// activeStep property set to activeStep variable defined above.
|
||||||
activeStep: activeStep,
|
activeStep: activeStep,
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:flutter_form_builder/flutter_form_builder.dart';
|
import 'package:flutter_form_builder/flutter_form_builder.dart';
|
||||||
|
import 'package:flutter_progress_hud/flutter_progress_hud.dart';
|
||||||
|
import 'package:flutter_spinkit/flutter_spinkit.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
import 'package:unit2/bloc/passo/land/land_appraisal/land_appraisal_bloc.dart';
|
import 'package:unit2/bloc/passo/land/land_appraisal/land_appraisal_bloc.dart';
|
||||||
|
@ -12,6 +14,8 @@ import 'package:unit2/model/passo/land_value_adjustment.dart';
|
||||||
import 'package:unit2/model/passo/type_of_location.dart';
|
import 'package:unit2/model/passo/type_of_location.dart';
|
||||||
import 'package:unit2/model/passo/type_of_road.dart';
|
import 'package:unit2/model/passo/type_of_road.dart';
|
||||||
import 'package:unit2/theme-data.dart/form-style.dart';
|
import 'package:unit2/theme-data.dart/form-style.dart';
|
||||||
|
import 'package:unit2/utils/text_container.dart';
|
||||||
|
import 'package:unit2/widgets/error_state.dart';
|
||||||
|
|
||||||
class AddLandValueAdjustmentModal extends StatefulWidget {
|
class AddLandValueAdjustmentModal extends StatefulWidget {
|
||||||
// final List<UnitConstruct> unit;
|
// final List<UnitConstruct> unit;
|
||||||
|
@ -103,7 +107,12 @@ class _AddLandValueAdjustmentModal extends State<AddLandValueAdjustmentModal> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return BlocBuilder<LandValueAdjustmentsBloc, LandValueAdjustmentsState>(
|
return Scaffold(
|
||||||
|
body: ProgressHUD(
|
||||||
|
padding: const EdgeInsets.all(24),
|
||||||
|
backgroundColor: Colors.black87,
|
||||||
|
indicatorWidget: const SpinKitFadingCircle(color: Colors.white),
|
||||||
|
child: BlocBuilder<LandValueAdjustmentsBloc, LandValueAdjustmentsState>(
|
||||||
buildWhen: (previous, current) {
|
buildWhen: (previous, current) {
|
||||||
return false;
|
return false;
|
||||||
}, builder: (context, state) {
|
}, builder: (context, state) {
|
||||||
|
@ -121,7 +130,8 @@ class _AddLandValueAdjustmentModal extends State<AddLandValueAdjustmentModal> {
|
||||||
builder: (context, state) {
|
builder: (context, state) {
|
||||||
if (state is TypeOfRoadLoaded) {
|
if (state is TypeOfRoadLoaded) {
|
||||||
final roadType = state.road_type;
|
final roadType = state.road_type;
|
||||||
return BlocConsumer<TypeOfLocationBloc, TypeOfLocationState>(
|
return BlocConsumer<TypeOfLocationBloc,
|
||||||
|
TypeOfLocationState>(
|
||||||
listener: (context, state) {
|
listener: (context, state) {
|
||||||
// TODO: implement listener
|
// TODO: implement listener
|
||||||
},
|
},
|
||||||
|
@ -139,7 +149,8 @@ class _AddLandValueAdjustmentModal extends State<AddLandValueAdjustmentModal> {
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.start,
|
||||||
crossAxisAlignment:
|
crossAxisAlignment:
|
||||||
CrossAxisAlignment.start,
|
CrossAxisAlignment.start,
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
@ -152,12 +163,14 @@ class _AddLandValueAdjustmentModal extends State<AddLandValueAdjustmentModal> {
|
||||||
bottom: 0),
|
bottom: 0),
|
||||||
child: Expanded(
|
child: Expanded(
|
||||||
flex: 1,
|
flex: 1,
|
||||||
child:
|
child: FormBuilderDropdown<
|
||||||
FormBuilderDropdown<LandAppr?>(
|
LandAppr?>(
|
||||||
name: 'land_appr_item',
|
name: 'land_appr_item',
|
||||||
autofocus: false,
|
autofocus: false,
|
||||||
decoration: normalTextFieldStyle(
|
decoration:
|
||||||
"Land Appraisal Items", ""),
|
normalTextFieldStyle(
|
||||||
|
"Land Appraisal Items",
|
||||||
|
""),
|
||||||
items: land_appr
|
items: land_appr
|
||||||
.map((land_appr) =>
|
.map((land_appr) =>
|
||||||
DropdownMenuItem<
|
DropdownMenuItem<
|
||||||
|
@ -168,8 +181,10 @@ class _AddLandValueAdjustmentModal extends State<AddLandValueAdjustmentModal> {
|
||||||
"")),
|
"")),
|
||||||
))
|
))
|
||||||
.toList(),
|
.toList(),
|
||||||
onChanged: (selectedLandAppr) {
|
onChanged:
|
||||||
if (selectedLandAppr != null) {
|
(selectedLandAppr) {
|
||||||
|
if (selectedLandAppr !=
|
||||||
|
null) {
|
||||||
setState(() {
|
setState(() {
|
||||||
_unitValue = double.parse(
|
_unitValue = double.parse(
|
||||||
selectedLandAppr
|
selectedLandAppr
|
||||||
|
@ -195,7 +210,8 @@ class _AddLandValueAdjustmentModal extends State<AddLandValueAdjustmentModal> {
|
||||||
TypeOfRoad?>(
|
TypeOfRoad?>(
|
||||||
name: 'road_type',
|
name: 'road_type',
|
||||||
autofocus: false,
|
autofocus: false,
|
||||||
decoration: normalTextFieldStyle(
|
decoration:
|
||||||
|
normalTextFieldStyle(
|
||||||
"Type of Road", ""),
|
"Type of Road", ""),
|
||||||
items: roadType
|
items: roadType
|
||||||
.map((roadType) =>
|
.map((roadType) =>
|
||||||
|
@ -214,8 +230,8 @@ class _AddLandValueAdjustmentModal extends State<AddLandValueAdjustmentModal> {
|
||||||
double.parse(
|
double.parse(
|
||||||
selectedRoad
|
selectedRoad
|
||||||
.deduction!);
|
.deduction!);
|
||||||
_roadType =
|
_roadType = selectedRoad
|
||||||
selectedRoad.roadType!;
|
.roadType!;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -237,8 +253,10 @@ class _AddLandValueAdjustmentModal extends State<AddLandValueAdjustmentModal> {
|
||||||
TypeOfLocation?>(
|
TypeOfLocation?>(
|
||||||
name: 'loc_type_road',
|
name: 'loc_type_road',
|
||||||
autofocus: false,
|
autofocus: false,
|
||||||
decoration: normalTextFieldStyle(
|
decoration:
|
||||||
"Distance to Road", ""),
|
normalTextFieldStyle(
|
||||||
|
"Distance to Road",
|
||||||
|
""),
|
||||||
items: state.loc_type
|
items: state.loc_type
|
||||||
.map((locTypeRoad) =>
|
.map((locTypeRoad) =>
|
||||||
DropdownMenuItem<
|
DropdownMenuItem<
|
||||||
|
@ -249,11 +267,13 @@ class _AddLandValueAdjustmentModal extends State<AddLandValueAdjustmentModal> {
|
||||||
"")),
|
"")),
|
||||||
))
|
))
|
||||||
.toList(),
|
.toList(),
|
||||||
onChanged: (selectedLoadRoad) {
|
onChanged:
|
||||||
if (selectedLoadRoad != null) {
|
(selectedLoadRoad) {
|
||||||
|
if (selectedLoadRoad !=
|
||||||
|
null) {
|
||||||
setState(() {
|
setState(() {
|
||||||
_locTypeRoad = double.parse(
|
_locTypeRoad = double
|
||||||
selectedLoadRoad
|
.parse(selectedLoadRoad
|
||||||
.allRoadTypes!);
|
.allRoadTypes!);
|
||||||
_locRdDistance =
|
_locRdDistance =
|
||||||
selectedLoadRoad
|
selectedLoadRoad
|
||||||
|
@ -275,8 +295,10 @@ class _AddLandValueAdjustmentModal extends State<AddLandValueAdjustmentModal> {
|
||||||
TypeOfLocation?>(
|
TypeOfLocation?>(
|
||||||
name: 'loc_type_pob',
|
name: 'loc_type_pob',
|
||||||
autofocus: false,
|
autofocus: false,
|
||||||
decoration: normalTextFieldStyle(
|
decoration:
|
||||||
"Distance to Poblacion", ""),
|
normalTextFieldStyle(
|
||||||
|
"Distance to Poblacion",
|
||||||
|
""),
|
||||||
items: state.loc_type
|
items: state.loc_type
|
||||||
.map((locTypePob) =>
|
.map((locTypePob) =>
|
||||||
DropdownMenuItem<
|
DropdownMenuItem<
|
||||||
|
@ -288,10 +310,11 @@ class _AddLandValueAdjustmentModal extends State<AddLandValueAdjustmentModal> {
|
||||||
))
|
))
|
||||||
.toList(),
|
.toList(),
|
||||||
onChanged: (selectedLocPob) {
|
onChanged: (selectedLocPob) {
|
||||||
if (selectedLocPob != null) {
|
if (selectedLocPob !=
|
||||||
|
null) {
|
||||||
setState(() {
|
setState(() {
|
||||||
_locTypePob = double.parse(
|
_locTypePob = double
|
||||||
selectedLocPob
|
.parse(selectedLocPob
|
||||||
.localTradingCenter!);
|
.localTradingCenter!);
|
||||||
|
|
||||||
_locPobDistance =
|
_locPobDistance =
|
||||||
|
@ -341,7 +364,8 @@ class _AddLandValueAdjustmentModal extends State<AddLandValueAdjustmentModal> {
|
||||||
child: Text(NumberFormat.currency(
|
child: Text(NumberFormat.currency(
|
||||||
locale: 'en-PH',
|
locale: 'en-PH',
|
||||||
symbol: "₱",
|
symbol: "₱",
|
||||||
).format(calculateValueAdjustment())),
|
).format(
|
||||||
|
calculateValueAdjustment())),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
|
@ -371,21 +395,24 @@ class _AddLandValueAdjustmentModal extends State<AddLandValueAdjustmentModal> {
|
||||||
Container(
|
Container(
|
||||||
width: 120,
|
width: 120,
|
||||||
height: 60,
|
height: 60,
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding:
|
||||||
|
const EdgeInsets.all(8.0),
|
||||||
child: ElevatedButton(
|
child: ElevatedButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
final tempID =
|
final tempID =
|
||||||
await SharedPreferences
|
await SharedPreferences
|
||||||
.getInstance();
|
.getInstance();
|
||||||
print(tempID.getInt('landid'));
|
print(tempID
|
||||||
|
.getInt('landid'));
|
||||||
var adjustments = ValueAdjustments(
|
var adjustments = ValueAdjustments(
|
||||||
landapprDetailsId: tempID
|
landapprDetailsId:
|
||||||
.getInt('landid')! -
|
tempID.getInt(
|
||||||
|
'landid')! -
|
||||||
1,
|
1,
|
||||||
baseMarketval:
|
baseMarketval:
|
||||||
_unitValue.toString(),
|
_unitValue
|
||||||
adjustmentFactors:
|
.toString(),
|
||||||
_roadType +
|
adjustmentFactors: _roadType +
|
||||||
' , ' +
|
' , ' +
|
||||||
_locPobDistance +
|
_locPobDistance +
|
||||||
' km from road , ' +
|
' km from road , ' +
|
||||||
|
@ -404,12 +431,12 @@ class _AddLandValueAdjustmentModal extends State<AddLandValueAdjustmentModal> {
|
||||||
context
|
context
|
||||||
.read<
|
.read<
|
||||||
LandValueAdjustmentsBloc>()
|
LandValueAdjustmentsBloc>()
|
||||||
.add(
|
.add(AddLandValueAdjustments(
|
||||||
AddLandValueAdjustments(
|
|
||||||
val_adj:
|
val_adj:
|
||||||
adjustments));
|
adjustments));
|
||||||
},
|
},
|
||||||
style: ElevatedButton.styleFrom(
|
style:
|
||||||
|
ElevatedButton.styleFrom(
|
||||||
primary: Colors.black,
|
primary: Colors.black,
|
||||||
),
|
),
|
||||||
child: const Text("Submit"),
|
child: const Text("Submit"),
|
||||||
|
@ -421,7 +448,8 @@ class _AddLandValueAdjustmentModal extends State<AddLandValueAdjustmentModal> {
|
||||||
Container(
|
Container(
|
||||||
width: 120,
|
width: 120,
|
||||||
height: 60,
|
height: 60,
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding:
|
||||||
|
const EdgeInsets.all(8.0),
|
||||||
child: ElevatedButton(
|
child: ElevatedButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
context
|
context
|
||||||
|
@ -430,7 +458,8 @@ class _AddLandValueAdjustmentModal extends State<AddLandValueAdjustmentModal> {
|
||||||
.add(
|
.add(
|
||||||
const LoadLandValueAdjustments());
|
const LoadLandValueAdjustments());
|
||||||
},
|
},
|
||||||
style: ElevatedButton.styleFrom(
|
style:
|
||||||
|
ElevatedButton.styleFrom(
|
||||||
primary: Colors.black,
|
primary: Colors.black,
|
||||||
),
|
),
|
||||||
child: const Text("Cancel"),
|
child: const Text("Cancel"),
|
||||||
|
@ -444,7 +473,13 @@ class _AddLandValueAdjustmentModal extends State<AddLandValueAdjustmentModal> {
|
||||||
),
|
),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
return Container();
|
if (state is TypeOfLocationErrorState) {
|
||||||
|
return SomethingWentWrong(
|
||||||
|
message: onError,
|
||||||
|
onpressed: () {
|
||||||
|
context
|
||||||
|
.read<TypeOfLocationBloc>()
|
||||||
|
.add(LoadTypeOfLocation());
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -452,7 +487,30 @@ class _AddLandValueAdjustmentModal extends State<AddLandValueAdjustmentModal> {
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
if (state is LandAppraisalErrorState) {
|
||||||
|
return SomethingWentWrong(
|
||||||
|
message: onError,
|
||||||
|
onpressed: () {
|
||||||
|
context
|
||||||
|
.read<LandAppraisalBloc>()
|
||||||
|
.add(LoadLandAppraisal());
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return Container();
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (state is LandValueAdjustmentsErrorState) {
|
||||||
|
return SomethingWentWrong(
|
||||||
|
message: onError,
|
||||||
|
onpressed: () {
|
||||||
|
context
|
||||||
|
.read<LandValueAdjustmentsBloc>()
|
||||||
|
.add(LoadLandValueAdjustments());
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
return Container();
|
return Container();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -462,6 +520,8 @@ class _AddLandValueAdjustmentModal extends State<AddLandValueAdjustmentModal> {
|
||||||
return Container(
|
return Container(
|
||||||
child: Text("Land Value Adjustment"),
|
child: Text("Land Value Adjustment"),
|
||||||
);
|
);
|
||||||
});
|
}),
|
||||||
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,23 +68,17 @@ class _AddPropertyAssessmentModal extends State<AddPropertyAssessmentModal> {
|
||||||
calculateAssessmentValue() {
|
calculateAssessmentValue() {
|
||||||
switch (_actualUse) {
|
switch (_actualUse) {
|
||||||
case "Residential":
|
case "Residential":
|
||||||
return _unitValue * 0.20;
|
return (_unitValue * 0.20).ceil();
|
||||||
break;
|
|
||||||
case "Agricultural":
|
case "Agricultural":
|
||||||
return _unitValue * 0.40;
|
return (_unitValue * 0.40).ceil();
|
||||||
break;
|
|
||||||
case "Commercial":
|
case "Commercial":
|
||||||
return _unitValue * 0.50;
|
return (_unitValue * 0.50).ceil();
|
||||||
break;
|
|
||||||
case "Industrial":
|
case "Industrial":
|
||||||
return _unitValue * 0.50;
|
return (_unitValue * 0.50).ceil();
|
||||||
break;
|
|
||||||
case "Mineral":
|
case "Mineral":
|
||||||
return _unitValue * 0.50;
|
return (_unitValue * 0.50).ceil();
|
||||||
break;
|
|
||||||
case "Timberland":
|
case "Timberland":
|
||||||
return _unitValue * 0.20;
|
return (_unitValue * 0.20).ceil();
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -335,7 +329,7 @@ class _AddPropertyAssessmentModal extends State<AddPropertyAssessmentModal> {
|
||||||
onpressed: () {
|
onpressed: () {
|
||||||
context
|
context
|
||||||
.read<LandValueAdjustmentsBloc>()
|
.read<LandValueAdjustmentsBloc>()
|
||||||
.add(LoadLandValueAdjustments());
|
.add(const LoadLandValueAdjustments());
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -348,7 +342,7 @@ class _AddPropertyAssessmentModal extends State<AddPropertyAssessmentModal> {
|
||||||
onpressed: () {
|
onpressed: () {
|
||||||
context
|
context
|
||||||
.read<LandPropertyAssessmentBloc>()
|
.read<LandPropertyAssessmentBloc>()
|
||||||
.add(LoadLandPropertyAssessment());
|
.add(const LoadLandPropertyAssessment());
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
|
import 'package:flutter_progress_hud/flutter_progress_hud.dart';
|
||||||
|
import 'package:flutter_spinkit/flutter_spinkit.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
import 'package:unit2/bloc/passo/land/land_appraisal/land_appraisal_bloc.dart';
|
import 'package:unit2/bloc/passo/land/land_appraisal/land_appraisal_bloc.dart';
|
||||||
import 'package:unit2/model/passo/land_appr.dart';
|
import 'package:unit2/model/passo/land_appr.dart';
|
||||||
|
@ -32,9 +34,25 @@ class _LandAppraisal extends State<LandAppraisal> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return BlocConsumer<LandAppraisalBloc, LandAppraisalState>(
|
return Scaffold(
|
||||||
|
body: ProgressHUD(
|
||||||
|
padding: const EdgeInsets.all(24),
|
||||||
|
backgroundColor: Colors.black87,
|
||||||
|
indicatorWidget: const SpinKitFadingCircle(color: Colors.white),
|
||||||
|
child: BlocConsumer<LandAppraisalBloc, LandAppraisalState>(
|
||||||
listener: (context, state) {
|
listener: (context, state) {
|
||||||
// TODO: implement listener
|
if (state is LandAppraisalLoading) {
|
||||||
|
final progress = ProgressHUD.of(context);
|
||||||
|
progress!.showWithText("Please wait...");
|
||||||
|
}
|
||||||
|
if (state is LandAppraisalLoaded) {
|
||||||
|
final progress = ProgressHUD.of(context);
|
||||||
|
progress?.dismiss();
|
||||||
|
}
|
||||||
|
if (state is LandAppraisalErrorState) {
|
||||||
|
final progress = ProgressHUD.of(context);
|
||||||
|
progress?.dismiss();
|
||||||
|
}
|
||||||
}, builder: (context, state) {
|
}, builder: (context, state) {
|
||||||
final state = context.watch<LandAppraisalBloc>().state;
|
final state = context.watch<LandAppraisalBloc>().state;
|
||||||
if (state is LandAppraisalLoaded) {
|
if (state is LandAppraisalLoaded) {
|
||||||
|
@ -114,8 +132,8 @@ class _LandAppraisal extends State<LandAppraisal> {
|
||||||
DataCell(Text(
|
DataCell(Text(
|
||||||
((double.parse(dataRow.unitValue!)))
|
((double.parse(dataRow.unitValue!)))
|
||||||
.toString())),
|
.toString())),
|
||||||
DataCell(Text(
|
DataCell(Text(((double.parse(
|
||||||
((double.parse(dataRow.baseMarketval!)))
|
dataRow.baseMarketval!)))
|
||||||
.toString())),
|
.toString())),
|
||||||
DataCell(Row(
|
DataCell(Row(
|
||||||
children: [
|
children: [
|
||||||
|
@ -219,7 +237,9 @@ class _LandAppraisal extends State<LandAppraisal> {
|
||||||
successAlert(context, "Deletion Successful",
|
successAlert(context, "Deletion Successful",
|
||||||
"Extra item has been deleted successfully", () {
|
"Extra item has been deleted successfully", () {
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
context.read<LandAppraisalBloc>().add(const LoadLandAppraisal());
|
context
|
||||||
|
.read<LandAppraisalBloc>()
|
||||||
|
.add(const LoadLandAppraisal());
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -255,6 +275,8 @@ class _LandAppraisal extends State<LandAppraisal> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return Container();
|
return Container();
|
||||||
});
|
}),
|
||||||
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
|
import 'package:flutter_progress_hud/flutter_progress_hud.dart';
|
||||||
|
import 'package:flutter_spinkit/flutter_spinkit.dart';
|
||||||
import 'package:unit2/bloc/passo/land/other_improvements/other_improvements_bloc.dart';
|
import 'package:unit2/bloc/passo/land/other_improvements/other_improvements_bloc.dart';
|
||||||
import 'package:unit2/screens/passo/Land/add_land/AddOtherImprovementModal.dart';
|
import 'package:unit2/screens/passo/Land/add_land/AddOtherImprovementModal.dart';
|
||||||
import 'package:unit2/utils/alerts.dart';
|
import 'package:unit2/utils/alerts.dart';
|
||||||
|
@ -30,9 +32,25 @@ class _OtherImprovementPage extends State<OtherImprovementPage> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return BlocConsumer<OtherImprovementsBloc, OtherImprovementsState>(
|
return Scaffold(
|
||||||
|
body: ProgressHUD(
|
||||||
|
padding: const EdgeInsets.all(24),
|
||||||
|
backgroundColor: Colors.black87,
|
||||||
|
indicatorWidget: const SpinKitFadingCircle(color: Colors.white),
|
||||||
|
child: BlocConsumer<OtherImprovementsBloc, OtherImprovementsState>(
|
||||||
listener: (context, state) {
|
listener: (context, state) {
|
||||||
// TODO: implement listener
|
if (state is OtherImprovementLoading) {
|
||||||
|
final progress = ProgressHUD.of(context);
|
||||||
|
progress!.showWithText("Please wait...");
|
||||||
|
}
|
||||||
|
if (state is OtherImprovementLoaded) {
|
||||||
|
final progress = ProgressHUD.of(context);
|
||||||
|
progress?.dismiss();
|
||||||
|
}
|
||||||
|
if (state is OtherImprovementErrorState) {
|
||||||
|
final progress = ProgressHUD.of(context);
|
||||||
|
progress?.dismiss();
|
||||||
|
}
|
||||||
}, builder: (context, state) {
|
}, builder: (context, state) {
|
||||||
final state = context.watch<OtherImprovementsBloc>().state;
|
final state = context.watch<OtherImprovementsBloc>().state;
|
||||||
if (state is OtherImprovementLoaded) {
|
if (state is OtherImprovementLoaded) {
|
||||||
|
@ -120,14 +138,16 @@ class _OtherImprovementPage extends State<OtherImprovementPage> {
|
||||||
DataCell(Text(dataRow.fruitBearing!
|
DataCell(Text(dataRow.fruitBearing!
|
||||||
? "Fruit Bearing"
|
? "Fruit Bearing"
|
||||||
: "Non-Fruit Bearing")),
|
: "Non-Fruit Bearing")),
|
||||||
DataCell(Text(dataRow.quantity.toString()!)),
|
|
||||||
DataCell(
|
DataCell(
|
||||||
Text(dataRow.noOfProductive.toString()!)),
|
Text(dataRow.quantity.toString()!)),
|
||||||
DataCell(Text(
|
DataCell(Text(
|
||||||
dataRow.noOfNonproductive.toString()!)),
|
dataRow.noOfProductive.toString()!)),
|
||||||
DataCell(Text(dataRow.unitValue.toString()!)),
|
DataCell(Text(dataRow.noOfNonproductive
|
||||||
|
.toString()!)),
|
||||||
DataCell(
|
DataCell(
|
||||||
Text(dataRow.baseMarketval.toString()!)),
|
Text(dataRow.unitValue.toString()!)),
|
||||||
|
DataCell(Text(
|
||||||
|
dataRow.baseMarketval.toString()!)),
|
||||||
DataCell(Row(
|
DataCell(Row(
|
||||||
children: [
|
children: [
|
||||||
InkWell(
|
InkWell(
|
||||||
|
@ -258,6 +278,8 @@ class _OtherImprovementPage extends State<OtherImprovementPage> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return Container();
|
return Container();
|
||||||
});
|
}),
|
||||||
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
|
import 'package:flutter_progress_hud/flutter_progress_hud.dart';
|
||||||
|
import 'package:flutter_spinkit/flutter_spinkit.dart';
|
||||||
import 'package:unit2/bloc/passo/land/land_property_assessment/land_property_assessment_bloc.dart';
|
import 'package:unit2/bloc/passo/land/land_property_assessment/land_property_assessment_bloc.dart';
|
||||||
import 'package:unit2/screens/passo/Land/add_land/AddPropertyAssessmentModal.dart';
|
import 'package:unit2/screens/passo/Land/add_land/AddPropertyAssessmentModal.dart';
|
||||||
import 'package:unit2/utils/alerts.dart';
|
import 'package:unit2/utils/alerts.dart';
|
||||||
|
@ -30,9 +32,25 @@ class _LandPropertyAssessmentPage extends State<LandPropertyAssessmentPage> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return BlocConsumer<LandPropertyAssessmentBloc,
|
return Scaffold(
|
||||||
|
body: ProgressHUD(
|
||||||
|
padding: const EdgeInsets.all(24),
|
||||||
|
backgroundColor: Colors.black87,
|
||||||
|
indicatorWidget: const SpinKitFadingCircle(color: Colors.white),
|
||||||
|
child: BlocConsumer<LandPropertyAssessmentBloc,
|
||||||
LandPropertyAssessmentState>(listener: (context, state) {
|
LandPropertyAssessmentState>(listener: (context, state) {
|
||||||
// TODO: implement listener
|
if (state is LandPropertyAssessmentLoading) {
|
||||||
|
final progress = ProgressHUD.of(context);
|
||||||
|
progress!.showWithText("Please wait...");
|
||||||
|
}
|
||||||
|
if (state is LandPropertyAssessmentLoaded) {
|
||||||
|
final progress = ProgressHUD.of(context);
|
||||||
|
progress?.dismiss();
|
||||||
|
}
|
||||||
|
if (state is LandPropertyAssessmentErrorState) {
|
||||||
|
final progress = ProgressHUD.of(context);
|
||||||
|
progress?.dismiss();
|
||||||
|
}
|
||||||
}, builder: (context, state) {
|
}, builder: (context, state) {
|
||||||
final state = context.watch<LandPropertyAssessmentBloc>().state;
|
final state = context.watch<LandPropertyAssessmentBloc>().state;
|
||||||
if (state is LandPropertyAssessmentLoaded) {
|
if (state is LandPropertyAssessmentLoaded) {
|
||||||
|
@ -238,6 +256,8 @@ class _LandPropertyAssessmentPage extends State<LandPropertyAssessmentPage> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return Container();
|
return Container();
|
||||||
});
|
}),
|
||||||
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:flutter_form_builder/flutter_form_builder.dart';
|
import 'package:flutter_form_builder/flutter_form_builder.dart';
|
||||||
|
import 'package:flutter_progress_hud/flutter_progress_hud.dart';
|
||||||
|
import 'package:flutter_spinkit/flutter_spinkit.dart';
|
||||||
import 'package:form_builder_validators/form_builder_validators.dart';
|
import 'package:form_builder_validators/form_builder_validators.dart';
|
||||||
import 'package:searchfield/searchfield.dart';
|
import 'package:searchfield/searchfield.dart';
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
|
@ -12,6 +14,8 @@ import 'package:unit2/model/passo/memoranda.dart';
|
||||||
import 'package:unit2/model/passo/signatories.dart';
|
import 'package:unit2/model/passo/signatories.dart';
|
||||||
import 'package:unit2/screens/passo/Land/add_land.dart';
|
import 'package:unit2/screens/passo/Land/add_land.dart';
|
||||||
import 'package:unit2/theme-data.dart/colors.dart';
|
import 'package:unit2/theme-data.dart/colors.dart';
|
||||||
|
import 'package:unit2/utils/text_container.dart';
|
||||||
|
import 'package:unit2/widgets/error_state.dart';
|
||||||
|
|
||||||
class LandSignatories extends StatefulWidget {
|
class LandSignatories extends StatefulWidget {
|
||||||
Function onSAve;
|
Function onSAve;
|
||||||
|
@ -28,22 +32,54 @@ class _LandSignatories extends State<LandSignatories> {
|
||||||
String _memoranda = "";
|
String _memoranda = "";
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return BlocConsumer<LandExtBloc, LandExtState>(
|
return Scaffold(
|
||||||
|
body: ProgressHUD(
|
||||||
|
padding: const EdgeInsets.all(24),
|
||||||
|
backgroundColor: Colors.black87,
|
||||||
|
indicatorWidget: const SpinKitFadingCircle(color: Colors.white),
|
||||||
|
child: BlocConsumer<LandExtBloc, LandExtState>(
|
||||||
listener: (context, state) {
|
listener: (context, state) {
|
||||||
// TODO: implement listener
|
if (state is LandExtLoading) {
|
||||||
|
final progress = ProgressHUD.of(context);
|
||||||
|
progress!.showWithText("Please wait...");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (state is LandExtErrorState) {
|
||||||
|
final progress = ProgressHUD.of(context);
|
||||||
|
progress?.dismiss();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
builder: (context, state) {
|
builder: (context, state) {
|
||||||
if (state is LandExtLoaded) {
|
if (state is LandExtLoaded) {
|
||||||
return BlocConsumer<SignatoriesBloc, SignatoriesState>(
|
return BlocConsumer<SignatoriesBloc, SignatoriesState>(
|
||||||
listener: (context, state) {
|
listener: (context, state) {
|
||||||
// TODO: implement listener
|
if (state is SignatoriesLoading) {
|
||||||
|
final progress = ProgressHUD.of(context);
|
||||||
|
progress!.showWithText("Please wait...");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (state is SignatoriesErrorState) {
|
||||||
|
final progress = ProgressHUD.of(context);
|
||||||
|
progress?.dismiss();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
builder: (context, state) {
|
builder: (context, state) {
|
||||||
if (state is SignatoriesLoaded) {
|
if (state is SignatoriesLoaded) {
|
||||||
final signatories = state.signatories;
|
final signatories = state.signatories;
|
||||||
return BlocConsumer<MemorandaBloc, MemorandaState>(
|
return BlocConsumer<MemorandaBloc, MemorandaState>(
|
||||||
listener: (context, state) {
|
listener: (context, state) {
|
||||||
// TODO: implement listener
|
if (state is MemorandaLoading) {
|
||||||
|
final progress = ProgressHUD.of(context);
|
||||||
|
progress!.showWithText("Please wait...");
|
||||||
|
}
|
||||||
|
if (state is MemorandaLoaded) {
|
||||||
|
final progress = ProgressHUD.of(context);
|
||||||
|
progress?.dismiss();
|
||||||
|
}
|
||||||
|
if (state is MemorandaErrorState) {
|
||||||
|
final progress = ProgressHUD.of(context);
|
||||||
|
progress?.dismiss();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
builder: (context, state) {
|
builder: (context, state) {
|
||||||
if (state is MemorandaLoaded) {
|
if (state is MemorandaLoaded) {
|
||||||
|
@ -55,11 +91,13 @@ class _LandSignatories extends State<LandSignatories> {
|
||||||
left: 0, top: 20, right: 0, bottom: 10),
|
left: 0, top: 20, right: 0, bottom: 10),
|
||||||
child: const Text('PROPERTY ASSESSMENT cont..',
|
child: const Text('PROPERTY ASSESSMENT cont..',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.bold, fontSize: 18),
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 18),
|
||||||
textAlign: TextAlign.left),
|
textAlign: TextAlign.left),
|
||||||
),
|
),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceAround,
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
|
@ -98,7 +136,8 @@ class _LandSignatories extends State<LandSignatories> {
|
||||||
),
|
),
|
||||||
const Text(
|
const Text(
|
||||||
'EFFECTIVITY OF ASSESSMENT / REASSESSMENT :',
|
'EFFECTIVITY OF ASSESSMENT / REASSESSMENT :',
|
||||||
style: TextStyle(fontWeight: FontWeight.bold),
|
style:
|
||||||
|
TextStyle(fontWeight: FontWeight.bold),
|
||||||
),
|
),
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 20,
|
height: 20,
|
||||||
|
@ -139,7 +178,8 @@ class _LandSignatories extends State<LandSignatories> {
|
||||||
left: 0, top: 40, right: 0, bottom: 10),
|
left: 0, top: 40, right: 0, bottom: 10),
|
||||||
child: const Text('SIGNATORIES',
|
child: const Text('SIGNATORIES',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.bold, fontSize: 18),
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 18),
|
||||||
textAlign: TextAlign.left),
|
textAlign: TextAlign.left),
|
||||||
),
|
),
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
|
@ -154,7 +194,8 @@ class _LandSignatories extends State<LandSignatories> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceAround,
|
||||||
children: [
|
children: [
|
||||||
Column(
|
Column(
|
||||||
children: [
|
children: [
|
||||||
|
@ -189,8 +230,8 @@ class _LandSignatories extends State<LandSignatories> {
|
||||||
initialValue: DateTime.now(),
|
initialValue: DateTime.now(),
|
||||||
inputType: InputType.date,
|
inputType: InputType.date,
|
||||||
|
|
||||||
initialTime:
|
initialTime: const TimeOfDay(
|
||||||
const TimeOfDay(hour: 8, minute: 0),
|
hour: 8, minute: 0),
|
||||||
// locale: const Locale.fromSubtags(languageCode: 'fr'),
|
// locale: const Locale.fromSubtags(languageCode: 'fr'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -206,10 +247,12 @@ class _LandSignatories extends State<LandSignatories> {
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
child: Text(
|
child: Text(
|
||||||
'RECOMMENDING APPROVAL:',
|
'RECOMMENDING APPROVAL:',
|
||||||
style: TextStyle(fontWeight: FontWeight.bold),
|
style:
|
||||||
|
TextStyle(fontWeight: FontWeight.bold),
|
||||||
)),
|
)),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceAround,
|
||||||
children: [
|
children: [
|
||||||
Column(
|
Column(
|
||||||
children: [
|
children: [
|
||||||
|
@ -244,8 +287,8 @@ class _LandSignatories extends State<LandSignatories> {
|
||||||
initialValue: DateTime.now(),
|
initialValue: DateTime.now(),
|
||||||
inputType: InputType.date,
|
inputType: InputType.date,
|
||||||
|
|
||||||
initialTime:
|
initialTime: const TimeOfDay(
|
||||||
const TimeOfDay(hour: 8, minute: 0),
|
hour: 8, minute: 0),
|
||||||
// locale: const Locale.fromSubtags(languageCode: 'fr'),
|
// locale: const Locale.fromSubtags(languageCode: 'fr'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -301,8 +344,8 @@ class _LandSignatories extends State<LandSignatories> {
|
||||||
initialValue: DateTime.now(),
|
initialValue: DateTime.now(),
|
||||||
inputType: InputType.date,
|
inputType: InputType.date,
|
||||||
|
|
||||||
initialTime:
|
initialTime: const TimeOfDay(
|
||||||
const TimeOfDay(hour: 8, minute: 0),
|
hour: 8, minute: 0),
|
||||||
// locale: const Locale.fromSubtags(languageCode: 'fr'),
|
// locale: const Locale.fromSubtags(languageCode: 'fr'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -338,7 +381,8 @@ class _LandSignatories extends State<LandSignatories> {
|
||||||
child: ListTile(
|
child: ListTile(
|
||||||
title: Text(
|
title: Text(
|
||||||
'${memoranda.memoranda}',
|
'${memoranda.memoranda}',
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow:
|
||||||
|
TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
))
|
))
|
||||||
|
@ -365,7 +409,8 @@ class _LandSignatories extends State<LandSignatories> {
|
||||||
height: 30,
|
height: 30,
|
||||||
),
|
),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text('Sworn Statement No. :'),
|
Text('Sworn Statement No. :'),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
|
@ -374,7 +419,8 @@ class _LandSignatories extends State<LandSignatories> {
|
||||||
child: FormBuilderTextField(
|
child: FormBuilderTextField(
|
||||||
name: 'sworn_statement_land',
|
name: 'sworn_statement_land',
|
||||||
decoration: InputDecoration(),
|
decoration: InputDecoration(),
|
||||||
validator: FormBuilderValidators.compose([]),
|
validator:
|
||||||
|
FormBuilderValidators.compose([]),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -383,7 +429,8 @@ class _LandSignatories extends State<LandSignatories> {
|
||||||
height: 30,
|
height: 30,
|
||||||
),
|
),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text('Date Received:'),
|
Text('Date Received:'),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
|
@ -407,7 +454,8 @@ class _LandSignatories extends State<LandSignatories> {
|
||||||
height: 30,
|
height: 30,
|
||||||
),
|
),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text('Date of Entry in the Rec. of Ass. :'),
|
Text('Date of Entry in the Rec. of Ass. :'),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
|
@ -431,7 +479,8 @@ class _LandSignatories extends State<LandSignatories> {
|
||||||
height: 30,
|
height: 30,
|
||||||
),
|
),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text('By:'),
|
Text('By:'),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
|
@ -440,7 +489,8 @@ class _LandSignatories extends State<LandSignatories> {
|
||||||
child: FormBuilderTextField(
|
child: FormBuilderTextField(
|
||||||
name: 'by_land',
|
name: 'by_land',
|
||||||
decoration: InputDecoration(),
|
decoration: InputDecoration(),
|
||||||
validator: FormBuilderValidators.compose([]),
|
validator:
|
||||||
|
FormBuilderValidators.compose([]),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -457,19 +507,24 @@ class _LandSignatories extends State<LandSignatories> {
|
||||||
tempID.getInt('landid')! - 1,
|
tempID.getInt('landid')! - 1,
|
||||||
taxable: isTaxable,
|
taxable: isTaxable,
|
||||||
exempt: isExempt,
|
exempt: isExempt,
|
||||||
qtr: int.parse(
|
qtr: int.parse(landKey
|
||||||
landKey.currentState!.value['land_qtr']),
|
.currentState!.value['land_qtr']),
|
||||||
yr: int.parse(
|
yr: int.parse(landKey
|
||||||
landKey.currentState!.value['land_yr']),
|
.currentState!.value['land_yr']),
|
||||||
appraisedbyName: landKey.currentState!.value['appraised_by_land'].firstname +
|
appraisedbyName: landKey
|
||||||
|
.currentState!
|
||||||
|
.value['appraised_by_land']
|
||||||
|
.firstname +
|
||||||
' ' +
|
' ' +
|
||||||
landKey
|
landKey
|
||||||
.currentState!
|
.currentState!
|
||||||
.value['appraised_by_land']
|
.value['appraised_by_land']
|
||||||
.middlename +
|
.middlename +
|
||||||
' ' +
|
' ' +
|
||||||
landKey.currentState!
|
landKey
|
||||||
.value['appraised_by_land'].lastname,
|
.currentState!
|
||||||
|
.value['appraised_by_land']
|
||||||
|
.lastname,
|
||||||
appraisedbyDate: landKey
|
appraisedbyDate: landKey
|
||||||
.currentState!.value['app_date_land'],
|
.currentState!.value['app_date_land'],
|
||||||
recommendapprName: landKey
|
recommendapprName: landKey
|
||||||
|
@ -477,20 +532,11 @@ class _LandSignatories extends State<LandSignatories> {
|
||||||
.value['rec_approval_land']
|
.value['rec_approval_land']
|
||||||
.firstname +
|
.firstname +
|
||||||
' ' +
|
' ' +
|
||||||
landKey
|
landKey.currentState!.value['rec_approval_land'].middlename +
|
||||||
.currentState!
|
|
||||||
.value['rec_approval_land']
|
|
||||||
.middlename +
|
|
||||||
' ' +
|
' ' +
|
||||||
landKey.currentState!
|
landKey.currentState!.value['rec_approval_land'].lastname,
|
||||||
.value['rec_approval_land'].lastname,
|
recommendapprDate: landKey.currentState!.value['rec_date_land'],
|
||||||
recommendapprDate: landKey
|
approvedbyName: landKey.currentState!.value['apprvd_by_land'].firstname + ' ' + landKey.currentState!.value['apprvd_by_land'].middlename + ' ' + landKey.currentState!.value['apprvd_by_land'].lastname,
|
||||||
.currentState!.value['rec_date_land'],
|
|
||||||
approvedbyName: landKey.currentState!.value['apprvd_by_land'].firstname +
|
|
||||||
' ' +
|
|
||||||
landKey.currentState!.value['apprvd_by_land'].middlename +
|
|
||||||
' ' +
|
|
||||||
landKey.currentState!.value['apprvd_by_land'].lastname,
|
|
||||||
approvedbyDate: landKey.currentState!.value['apprvd_by_date_land'],
|
approvedbyDate: landKey.currentState!.value['apprvd_by_date_land'],
|
||||||
memoranda: _memoranda,
|
memoranda: _memoranda,
|
||||||
swornstatementNo: landKey.currentState!.value['sworn_statement_land'],
|
swornstatementNo: landKey.currentState!.value['sworn_statement_land'],
|
||||||
|
@ -498,9 +544,10 @@ class _LandSignatories extends State<LandSignatories> {
|
||||||
entryDateAssessment: landKey.currentState!.value['date_of_entry_land'],
|
entryDateAssessment: landKey.currentState!.value['date_of_entry_land'],
|
||||||
entryDateBy: landKey.currentState!.value['by_land']);
|
entryDateBy: landKey.currentState!.value['by_land']);
|
||||||
|
|
||||||
|
print(ext.toJson());
|
||||||
context.read<LandExtBloc>()
|
context.read<LandExtBloc>()
|
||||||
..add(UpdateLandExt(landext: ext));
|
..add(UpdateLandExt(landext: ext));
|
||||||
widget.onSAve();
|
// widget.onSAve();
|
||||||
},
|
},
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
backgroundColor: primary,
|
backgroundColor: primary,
|
||||||
|
@ -526,7 +573,13 @@ class _LandSignatories extends State<LandSignatories> {
|
||||||
],
|
],
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
return Container();
|
if (state is MemorandaErrorState) {
|
||||||
|
return SomethingWentWrong(
|
||||||
|
message: onError,
|
||||||
|
onpressed: () {
|
||||||
|
context
|
||||||
|
.read<MemorandaBloc>()
|
||||||
|
.add(LoadMemoranda());
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -534,8 +587,30 @@ class _LandSignatories extends State<LandSignatories> {
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
if (state is SignatoriesErrorState) {
|
||||||
|
return SomethingWentWrong(
|
||||||
|
message: onError,
|
||||||
|
onpressed: () {
|
||||||
|
context.read<SignatoriesBloc>().add(LoadSignatories());
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
return Container();
|
return Container();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
if (state is LandExtErrorState) {
|
||||||
|
return SomethingWentWrong(
|
||||||
|
message: onError,
|
||||||
|
onpressed: () {
|
||||||
|
context.read<LandExtBloc>().add(LoadLandExt());
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return Container();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
|
import 'package:flutter_progress_hud/flutter_progress_hud.dart';
|
||||||
|
import 'package:flutter_spinkit/flutter_spinkit.dart';
|
||||||
import 'package:unit2/bloc/passo/land/land_value_adjustments/land_value_adjustments_bloc.dart';
|
import 'package:unit2/bloc/passo/land/land_value_adjustments/land_value_adjustments_bloc.dart';
|
||||||
import 'package:unit2/screens/passo/Land/add_land/AddLandValueAdjustmentModal.dart';
|
import 'package:unit2/screens/passo/Land/add_land/AddLandValueAdjustmentModal.dart';
|
||||||
import 'package:unit2/utils/alerts.dart';
|
import 'package:unit2/utils/alerts.dart';
|
||||||
|
@ -14,14 +16,6 @@ class ValueAdjustmentPage extends StatefulWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
class _ValueAdjustmentPage extends State<ValueAdjustmentPage> {
|
class _ValueAdjustmentPage extends State<ValueAdjustmentPage> {
|
||||||
// double _totalMarketValue(items) {
|
|
||||||
// double total = 0;
|
|
||||||
// items.forEach((row) {
|
|
||||||
// total += double.parse(row);
|
|
||||||
// });
|
|
||||||
// return total;
|
|
||||||
// }
|
|
||||||
|
|
||||||
void deleteItem(int itemId) {
|
void deleteItem(int itemId) {
|
||||||
context
|
context
|
||||||
.read<LandValueAdjustmentsBloc>()
|
.read<LandValueAdjustmentsBloc>()
|
||||||
|
@ -30,9 +24,26 @@ class _ValueAdjustmentPage extends State<ValueAdjustmentPage> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return BlocConsumer<LandValueAdjustmentsBloc, LandValueAdjustmentsState>(
|
return Scaffold(
|
||||||
|
body: ProgressHUD(
|
||||||
|
padding: const EdgeInsets.all(24),
|
||||||
|
backgroundColor: Colors.black87,
|
||||||
|
indicatorWidget: const SpinKitFadingCircle(color: Colors.white),
|
||||||
|
child:
|
||||||
|
BlocConsumer<LandValueAdjustmentsBloc, LandValueAdjustmentsState>(
|
||||||
listener: (context, state) {
|
listener: (context, state) {
|
||||||
// TODO: implement listener
|
if (state is LandValueAdjustmentsLoading) {
|
||||||
|
final progress = ProgressHUD.of(context);
|
||||||
|
progress!.showWithText("Please wait...");
|
||||||
|
}
|
||||||
|
if (state is LandValueAdjustmentsLoaded) {
|
||||||
|
final progress = ProgressHUD.of(context);
|
||||||
|
progress?.dismiss();
|
||||||
|
}
|
||||||
|
if (state is LandValueAdjustmentsErrorState) {
|
||||||
|
final progress = ProgressHUD.of(context);
|
||||||
|
progress?.dismiss();
|
||||||
|
}
|
||||||
}, builder: (context, state) {
|
}, builder: (context, state) {
|
||||||
final state = context.watch<LandValueAdjustmentsBloc>().state;
|
final state = context.watch<LandValueAdjustmentsBloc>().state;
|
||||||
if (state is LandValueAdjustmentsLoaded) {
|
if (state is LandValueAdjustmentsLoaded) {
|
||||||
|
@ -107,7 +118,8 @@ class _ValueAdjustmentPage extends State<ValueAdjustmentPage> {
|
||||||
return DataRow(
|
return DataRow(
|
||||||
cells: [
|
cells: [
|
||||||
DataCell(Text(dataRow.baseMarketval!)),
|
DataCell(Text(dataRow.baseMarketval!)),
|
||||||
DataCell(Text(dataRow.adjustmentFactors!)),
|
DataCell(
|
||||||
|
Text(dataRow.adjustmentFactors!)),
|
||||||
DataCell(Text(dataRow.adjustment!)),
|
DataCell(Text(dataRow.adjustment!)),
|
||||||
DataCell(Text(dataRow.valueAdjustment!)),
|
DataCell(Text(dataRow.valueAdjustment!)),
|
||||||
DataCell(Text(dataRow.marketValue!)),
|
DataCell(Text(dataRow.marketValue!)),
|
||||||
|
@ -241,6 +253,8 @@ class _ValueAdjustmentPage extends State<ValueAdjustmentPage> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return Container();
|
return Container();
|
||||||
});
|
}),
|
||||||
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,22 +70,22 @@ class _AddPropertyAssessmentEditModal
|
||||||
calculateAssessmentValue() {
|
calculateAssessmentValue() {
|
||||||
switch (_actualUse) {
|
switch (_actualUse) {
|
||||||
case "Residential":
|
case "Residential":
|
||||||
return _unitValue * 0.20;
|
return (_unitValue * 0.20).ceil();
|
||||||
break;
|
break;
|
||||||
case "Agricultural":
|
case "Agricultural":
|
||||||
return _unitValue * 0.40;
|
return (_unitValue * 0.40).ceil();
|
||||||
break;
|
break;
|
||||||
case "Commercial":
|
case "Commercial":
|
||||||
return _unitValue * 0.50;
|
return (_unitValue * 0.50).ceil();
|
||||||
break;
|
break;
|
||||||
case "Industrial":
|
case "Industrial":
|
||||||
return _unitValue * 0.50;
|
return (_unitValue * 0.50).ceil();
|
||||||
break;
|
break;
|
||||||
case "Mineral":
|
case "Mineral":
|
||||||
return _unitValue * 0.50;
|
return (_unitValue * 0.50).ceil();
|
||||||
break;
|
break;
|
||||||
case "Timberland":
|
case "Timberland":
|
||||||
return _unitValue * 0.20;
|
return (_unitValue * 0.20).ceil();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
|
@ -278,7 +278,7 @@ class _AddPropertyAssessmentEditModal
|
||||||
child: ElevatedButton(
|
child: ElevatedButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
var assessment = LandPropertyAssessment(
|
var assessment = LandPropertyAssessment(
|
||||||
landapprDetailsId: widget.tempId,
|
landapprDetailsId: 35,
|
||||||
actualUse: _actualUse,
|
actualUse: _actualUse,
|
||||||
marketval: _unitValue.toString(),
|
marketval: _unitValue.toString(),
|
||||||
assessmentLevel: _assessmentLevel,
|
assessmentLevel: _assessmentLevel,
|
||||||
|
@ -287,7 +287,7 @@ class _AddPropertyAssessmentEditModal
|
||||||
.toString(),
|
.toString(),
|
||||||
totalMarketval: '0',
|
totalMarketval: '0',
|
||||||
totalAssessedval: '0');
|
totalAssessedval: '0');
|
||||||
|
print(assessment.toJson());
|
||||||
context
|
context
|
||||||
.read<LandPropertyAssessmentBloc>()
|
.read<LandPropertyAssessmentBloc>()
|
||||||
.add(AddLandPropertyAssessment(
|
.add(AddLandPropertyAssessment(
|
||||||
|
|
|
@ -266,13 +266,11 @@ class _LandAppraisalEdit extends State<LandAppraisalEdit> {
|
||||||
alignment: Alignment.topCenter,
|
alignment: Alignment.topCenter,
|
||||||
child: Container(
|
child: Container(
|
||||||
child: ConstrainedBox(
|
child: ConstrainedBox(
|
||||||
constraints: BoxConstraints(maxHeight: 500),
|
constraints: const BoxConstraints(maxHeight: 500),
|
||||||
child: Container(
|
|
||||||
child: AddLandAppraisalEditModal(widget.faasId),
|
child: AddLandAppraisalEditModal(widget.faasId),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -283,7 +281,7 @@ class _LandAppraisalEdit extends State<LandAppraisalEdit> {
|
||||||
message: onError,
|
message: onError,
|
||||||
onpressed: () {
|
onpressed: () {
|
||||||
context.read<LandAppraisalBloc>().add(LoadLandAppraisalEdit(
|
context.read<LandAppraisalBloc>().add(LoadLandAppraisalEdit(
|
||||||
land_appr: <LandAppr>[], id: widget.faasId!));
|
land_appr: const <LandAppr>[], id: widget.faasId!));
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,6 +53,7 @@ import 'package:unit2/screens/passo/Test%20Envi/speed_dial.dart';
|
||||||
import 'package:unit2/theme-data.dart/colors.dart';
|
import 'package:unit2/theme-data.dart/colors.dart';
|
||||||
import 'package:unit2/utils/global_context.dart';
|
import 'package:unit2/utils/global_context.dart';
|
||||||
import 'package:unit2/utils/text_container.dart';
|
import 'package:unit2/utils/text_container.dart';
|
||||||
|
import 'package:unit2/widgets/empty_data.dart';
|
||||||
import 'package:unit2/widgets/error_state.dart';
|
import 'package:unit2/widgets/error_state.dart';
|
||||||
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
|
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
|
||||||
|
|
||||||
|
@ -72,6 +73,11 @@ class BuildingHome extends StatelessWidget {
|
||||||
context.read<PropertyInfoBloc>().add(DeleteBuildingFaas(id: itemId));
|
context.read<PropertyInfoBloc>().add(DeleteBuildingFaas(id: itemId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void triggerBlocEvent() {
|
||||||
|
final myBloc = BlocProvider.of<PropertyInfoBloc>(context);
|
||||||
|
myBloc.add(LoadPropertyInfo());
|
||||||
|
}
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: ProgressHUD(
|
body: ProgressHUD(
|
||||||
backgroundColor: Colors.black87,
|
backgroundColor: Colors.black87,
|
||||||
|
@ -101,6 +107,7 @@ class BuildingHome extends StatelessWidget {
|
||||||
},
|
},
|
||||||
builder: (context, state) {
|
builder: (context, state) {
|
||||||
if (state is PropertyInfoLoaded) {
|
if (state is PropertyInfoLoaded) {
|
||||||
|
if (state.property_info.isNotEmpty) {
|
||||||
List<PropertyInfo> propertyList = state.property_info;
|
List<PropertyInfo> propertyList = state.property_info;
|
||||||
return Container(
|
return Container(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 12),
|
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||||
|
@ -119,6 +126,11 @@ class BuildingHome extends StatelessWidget {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
return const EmptyData(
|
||||||
|
message:
|
||||||
|
"You don't have any building faas added. Please click + to add");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (state is PropertyInfoErrorState) {
|
if (state is PropertyInfoErrorState) {
|
||||||
return SomethingWentWrong(
|
return SomethingWentWrong(
|
||||||
|
@ -206,7 +218,7 @@ class BuildingHome extends StatelessWidget {
|
||||||
BlocProvider(
|
BlocProvider(
|
||||||
create: (context) =>
|
create: (context) =>
|
||||||
MemorandaBloc()..add(LoadMemoranda())),
|
MemorandaBloc()..add(LoadMemoranda())),
|
||||||
], child: AddBuilding());
|
], child: AddBuilding(triggerBlocEvent));
|
||||||
}));
|
}));
|
||||||
}),
|
}),
|
||||||
SpeedDialChild(
|
SpeedDialChild(
|
||||||
|
|
|
@ -5,17 +5,10 @@ import 'package:flutter_spinkit/flutter_spinkit.dart';
|
||||||
|
|
||||||
import 'package:unit2/bloc/passo/barangay/barangay_bloc.dart';
|
import 'package:unit2/bloc/passo/barangay/barangay_bloc.dart';
|
||||||
import 'package:unit2/bloc/passo/bulding/additional_item/additional_item_bloc.dart';
|
import 'package:unit2/bloc/passo/bulding/additional_item/additional_item_bloc.dart';
|
||||||
import 'package:unit2/bloc/passo/bulding/additional_items_edit/additional_items_edit_bloc.dart';
|
|
||||||
import 'package:unit2/bloc/passo/bulding/class_components/class_components_bloc.dart';
|
import 'package:unit2/bloc/passo/bulding/class_components/class_components_bloc.dart';
|
||||||
import 'package:unit2/bloc/passo/bulding/general_description/general_description_bloc.dart';
|
|
||||||
import 'package:unit2/bloc/passo/bulding/landref/landref_bloc.dart';
|
|
||||||
import 'package:unit2/bloc/passo/bulding/location/location_bloc.dart';
|
|
||||||
import 'package:unit2/bloc/passo/bulding/property_appraisal/property_appraisal_bloc.dart';
|
import 'package:unit2/bloc/passo/bulding/property_appraisal/property_appraisal_bloc.dart';
|
||||||
import 'package:unit2/bloc/passo/bulding/property_appraisal_edit/property_appraisal_edit_bloc.dart';
|
|
||||||
import 'package:unit2/bloc/passo/bulding/property_assessment/property_assessment_bloc.dart';
|
import 'package:unit2/bloc/passo/bulding/property_assessment/property_assessment_bloc.dart';
|
||||||
import 'package:unit2/bloc/passo/bulding/property_assessment_edit/property_assessment_edit_bloc.dart';
|
|
||||||
import 'package:unit2/bloc/passo/bulding/property_info/property_info_bloc.dart';
|
import 'package:unit2/bloc/passo/bulding/property_info/property_info_bloc.dart';
|
||||||
import 'package:unit2/bloc/passo/bulding/structural_material/structural_material_bloc.dart';
|
|
||||||
import 'package:unit2/bloc/passo/bulding/unit_construct/unit_construct_bloc.dart';
|
import 'package:unit2/bloc/passo/bulding/unit_construct/unit_construct_bloc.dart';
|
||||||
import 'package:unit2/bloc/passo/land/land_appraisal/land_appraisal_bloc.dart';
|
import 'package:unit2/bloc/passo/land/land_appraisal/land_appraisal_bloc.dart';
|
||||||
import 'package:unit2/bloc/passo/land/land_boundaries_edit/land_boundaries_edit_bloc.dart';
|
import 'package:unit2/bloc/passo/land/land_boundaries_edit/land_boundaries_edit_bloc.dart';
|
||||||
|
@ -38,42 +31,40 @@ import 'package:unit2/bloc/passo/municipality/municipality_bloc.dart';
|
||||||
import 'package:unit2/bloc/passo/signatories/signatories_bloc.dart';
|
import 'package:unit2/bloc/passo/signatories/signatories_bloc.dart';
|
||||||
|
|
||||||
import 'package:unit2/bloc/user/user_bloc.dart';
|
import 'package:unit2/bloc/user/user_bloc.dart';
|
||||||
import 'package:unit2/model/passo/additional_items.dart';
|
|
||||||
import 'package:unit2/model/passo/general_description.dart';
|
|
||||||
import 'package:unit2/model/passo/land_appr.dart';
|
import 'package:unit2/model/passo/land_appr.dart';
|
||||||
import 'package:unit2/model/passo/land_ext.dart';
|
import 'package:unit2/model/passo/land_ext.dart';
|
||||||
import 'package:unit2/model/passo/land_property_assessment.dart';
|
import 'package:unit2/model/passo/land_property_assessment.dart';
|
||||||
import 'package:unit2/model/passo/land_property_boundaries.dart';
|
import 'package:unit2/model/passo/land_property_boundaries.dart';
|
||||||
import 'package:unit2/model/passo/land_property_loc.dart';
|
import 'package:unit2/model/passo/land_property_loc.dart';
|
||||||
import 'package:unit2/model/passo/land_property_owner.dart';
|
import 'package:unit2/model/passo/land_property_owner.dart';
|
||||||
import 'package:unit2/model/passo/land_ref.dart';
|
|
||||||
import 'package:unit2/model/passo/land_value_adjustment.dart';
|
import 'package:unit2/model/passo/land_value_adjustment.dart';
|
||||||
import 'package:unit2/model/passo/other_improvements.dart';
|
import 'package:unit2/model/passo/other_improvements.dart';
|
||||||
import 'package:unit2/model/passo/property_appraisal.dart';
|
import 'package:unit2/model/passo/property_appraisal.dart';
|
||||||
import 'package:unit2/model/passo/property_appraisal_edit.dart';
|
|
||||||
import 'package:unit2/model/passo/property_assessment_edit.dart';
|
|
||||||
import 'package:unit2/model/passo/property_info.dart';
|
|
||||||
import 'package:unit2/model/passo/structural_materials_ii.dart';
|
|
||||||
import 'package:unit2/model/passo/structureMaterial.dart';
|
|
||||||
import 'package:unit2/model/profile/basic_information/primary-information.dart';
|
import 'package:unit2/model/profile/basic_information/primary-information.dart';
|
||||||
import 'package:unit2/screens/passo/Building/add_building.dart';
|
import 'package:unit2/screens/passo/Building/add_building.dart';
|
||||||
import 'package:unit2/screens/passo/Building/edit_building.dart';
|
|
||||||
import 'package:unit2/screens/passo/Land/add_land.dart';
|
import 'package:unit2/screens/passo/Land/add_land.dart';
|
||||||
import 'package:unit2/screens/passo/Land/edit_land.dart';
|
import 'package:unit2/screens/passo/Land/edit_land.dart';
|
||||||
import 'package:unit2/screens/passo/Test%20Envi/multi_dropdown.dart';
|
|
||||||
import 'package:unit2/screens/passo/Test%20Envi/speed_dial.dart';
|
|
||||||
import 'package:unit2/theme-data.dart/colors.dart';
|
import 'package:unit2/theme-data.dart/colors.dart';
|
||||||
|
import 'package:unit2/utils/alerts.dart';
|
||||||
import 'package:unit2/utils/text_container.dart';
|
import 'package:unit2/utils/text_container.dart';
|
||||||
|
import 'package:unit2/widgets/empty_data.dart';
|
||||||
import 'package:unit2/widgets/error_state.dart';
|
import 'package:unit2/widgets/error_state.dart';
|
||||||
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
|
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
|
||||||
|
|
||||||
import '../../model/passo/bldg_loc.dart';
|
|
||||||
|
|
||||||
class LandHome extends StatelessWidget {
|
class LandHome extends StatelessWidget {
|
||||||
const LandHome({super.key});
|
const LandHome({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
void deleteItem(int itemId) {
|
||||||
|
context.read<LandPropertyOwnerInfoBloc>().add(DeleteLandFaas(id: itemId));
|
||||||
|
}
|
||||||
|
|
||||||
|
void triggerBlocEvent() {
|
||||||
|
final myBloc = BlocProvider.of<PropertyInfoBloc>(context);
|
||||||
|
myBloc.add(LoadPropertyInfo());
|
||||||
|
}
|
||||||
|
|
||||||
int? profileId;
|
int? profileId;
|
||||||
String? token;
|
String? token;
|
||||||
Profile profile;
|
Profile profile;
|
||||||
|
@ -104,6 +95,7 @@ class LandHome extends StatelessWidget {
|
||||||
},
|
},
|
||||||
builder: (context, state) {
|
builder: (context, state) {
|
||||||
if (state is LandLoaded) {
|
if (state is LandLoaded) {
|
||||||
|
if (state.land.isNotEmpty) {
|
||||||
List<LandPropertyOwner> propertyList = state.land;
|
List<LandPropertyOwner> propertyList = state.land;
|
||||||
return Container(
|
return Container(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 12),
|
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||||
|
@ -114,14 +106,19 @@ class LandHome extends StatelessWidget {
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
itemCount: propertyList.length,
|
itemCount: propertyList.length,
|
||||||
itemBuilder: (BuildContext context, int index) {
|
itemBuilder: (BuildContext context, int index) {
|
||||||
return _listCard(
|
return _listCard(propertyList[index], context,
|
||||||
propertyList[index], context, index);
|
index, deleteItem);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
return const EmptyData(
|
||||||
|
message:
|
||||||
|
"You don't have any land faas added. Please click + to add");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (state is LandErrorState) {
|
if (state is LandErrorState) {
|
||||||
return SomethingWentWrong(
|
return SomethingWentWrong(
|
||||||
|
@ -133,6 +130,20 @@ class LandHome extends StatelessWidget {
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (state is LandFaasDeletedState) {
|
||||||
|
if (state.success) {
|
||||||
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
|
successAlert(context, "Deletion Successful",
|
||||||
|
"Land FAAS Data has been deleted successfully", () {
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
context
|
||||||
|
.read<LandPropertyOwnerInfoBloc>()
|
||||||
|
.add(const LoadLand());
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
return Container();
|
return Container();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
@ -195,7 +206,7 @@ class LandHome extends StatelessWidget {
|
||||||
BlocProvider(
|
BlocProvider(
|
||||||
create: (context) =>
|
create: (context) =>
|
||||||
MemorandaBloc()..add(LoadMemoranda())),
|
MemorandaBloc()..add(LoadMemoranda())),
|
||||||
], child: AddBuilding());
|
], child: AddBuilding(triggerBlocEvent));
|
||||||
}));
|
}));
|
||||||
}),
|
}),
|
||||||
SpeedDialChild(
|
SpeedDialChild(
|
||||||
|
@ -281,7 +292,7 @@ class LandHome extends StatelessWidget {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Card _listCard(LandPropertyOwner property_info, context, index) {
|
Card _listCard(LandPropertyOwner property_info, context, index, deleteItem) {
|
||||||
return Card(
|
return Card(
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(10),
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
@ -417,7 +428,13 @@ Card _listCard(LandPropertyOwner property_info, context, index) {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
IconButton(onPressed: () {}, icon: const Icon(Icons.chevron_right)),
|
IconButton(
|
||||||
|
onPressed: () {
|
||||||
|
deleteItem(property_info.id);
|
||||||
|
},
|
||||||
|
icon: const Icon(Icons.delete_rounded),
|
||||||
|
color: primary,
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -72,4 +72,29 @@ class LandServices {
|
||||||
}
|
}
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<http.Response> remove(id) async {
|
||||||
|
String path = Url.instance.getLandOwnerInfo();
|
||||||
|
Map<String, String> headers = {
|
||||||
|
'Content-Type': 'application/json; charset=UTF-8',
|
||||||
|
'X-Client-Key': xClientKey,
|
||||||
|
'X-Client-Secret': xClientKeySecret
|
||||||
|
};
|
||||||
|
Map<String, String> params = {
|
||||||
|
"id": id.toString(),
|
||||||
|
};
|
||||||
|
try {
|
||||||
|
http.Response response = await Request.instance
|
||||||
|
.deleteRequest(path: path, headers: headers, body: {}, param: params);
|
||||||
|
print(id);
|
||||||
|
if (response.statusCode == 200) {
|
||||||
|
print(response.body);
|
||||||
|
return response;
|
||||||
|
} else {
|
||||||
|
throw Exception(response.reasonPhrase);
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
throw e.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
import 'package:sqflite/sqflite.dart' as sql;
|
||||||
|
|
||||||
|
class SQLHeper {
|
||||||
|
static Future<void> createTables(sql.Database database) async {
|
||||||
|
await database.execute("""CREATE TABLE property_info (
|
||||||
|
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
|
||||||
|
assessed_by_id TEXT,
|
||||||
|
assessed_by_name TEXT,
|
||||||
|
date_created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
date_modified TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
trans_code TEXT,
|
||||||
|
tdn TEXT,
|
||||||
|
pin TEXT,
|
||||||
|
owner TEXT,
|
||||||
|
address TEXT,
|
||||||
|
telno TEXT,
|
||||||
|
tin TEXT,
|
||||||
|
admin_user TEXT,
|
||||||
|
admin_address TEXT,
|
||||||
|
admin_telno TEXT,
|
||||||
|
admin_tin TEXT,
|
||||||
|
faas_type TEXT
|
||||||
|
)
|
||||||
|
""");
|
||||||
|
}
|
||||||
|
}
|
|
@ -5,11 +5,11 @@ class Url {
|
||||||
|
|
||||||
String host() {
|
String host() {
|
||||||
// return '192.168.10.183:3000';
|
// return '192.168.10.183:3000';
|
||||||
return 'agusandelnorte.gov.ph';
|
// return 'agusandelnorte.gov.ph';
|
||||||
// return "192.168.10.219:3000";
|
// return "192.168.10.219:3000";
|
||||||
// return "192.168.10.241";
|
// return "192.168.10.241";
|
||||||
// return "192.168.10.221:3004";
|
// return "192.168.10.221:3004";
|
||||||
// return "playweb.agusandelnorte.gov.ph";
|
return "playweb.agusandelnorte.gov.ph";
|
||||||
// return 'devapi.agusandelnorte.gov.ph:3004';
|
// return 'devapi.agusandelnorte.gov.ph:3004';
|
||||||
// return "192.168.10.218:8000";
|
// return "192.168.10.218:8000";
|
||||||
}
|
}
|
||||||
|
@ -347,7 +347,8 @@ class Url {
|
||||||
String getBarangays() {
|
String getBarangays() {
|
||||||
return "/api/web_app/location/barangay/";
|
return "/api/web_app/location/barangay/";
|
||||||
}
|
}
|
||||||
String getPurok(){
|
|
||||||
|
String getPurok() {
|
||||||
return "/api/web_app/location/purok/";
|
return "/api/web_app/location/purok/";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
23
pubspec.lock
23
pubspec.lock
|
@ -989,6 +989,14 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.3"
|
version: "1.8.3"
|
||||||
|
path_drawing:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: path_drawing
|
||||||
|
sha256: bbb1934c0cbb03091af082a6389ca2080345291ef07a5fa6d6e078ba8682f977
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.0.1"
|
||||||
path_parsing:
|
path_parsing:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -1411,21 +1419,21 @@ packages:
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.10.0"
|
version: "1.10.0"
|
||||||
sqflite:
|
sqflite:
|
||||||
dependency: transitive
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: sqflite
|
name: sqflite
|
||||||
sha256: b4d6710e1200e96845747e37338ea8a819a12b51689a3bcf31eff0003b37a0b9
|
sha256: "591f1602816e9c31377d5f008c2d9ef7b8aca8941c3f89cc5fd9d84da0c38a9a"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.2.8+4"
|
version: "2.3.0"
|
||||||
sqflite_common:
|
sqflite_common:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: sqflite_common
|
name: sqflite_common
|
||||||
sha256: "8f7603f3f8f126740bc55c4ca2d1027aab4b74a1267a3e31ce51fe40e3b65b8f"
|
sha256: "1b92f368f44b0dee2425bb861cfa17b6f6cf3961f762ff6f941d20b33355660a"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.4.5+1"
|
version: "2.5.0"
|
||||||
stack_trace:
|
stack_trace:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -1755,5 +1763,10 @@ packages:
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.1.2"
|
version: "3.1.2"
|
||||||
sdks:
|
sdks:
|
||||||
|
<<<<<<< HEAD
|
||||||
|
dart: ">=3.1.0-185.0.dev <4.0.0"
|
||||||
|
flutter: ">=3.7.0"
|
||||||
|
=======
|
||||||
dart: ">=3.1.0 <4.0.0"
|
dart: ">=3.1.0 <4.0.0"
|
||||||
flutter: ">=3.10.0"
|
flutter: ">=3.10.0"
|
||||||
|
>>>>>>> develop
|
||||||
|
|
|
@ -96,6 +96,9 @@ dependencies:
|
||||||
syncfusion_flutter_pdfviewer: ^23.1.36
|
syncfusion_flutter_pdfviewer: ^23.1.36
|
||||||
url_launcher: ^6.1.14
|
url_launcher: ^6.1.14
|
||||||
share_plus: ^7.1.0
|
share_plus: ^7.1.0
|
||||||
|
animated_splash_screen: ^1.3.0
|
||||||
|
sqflite: ^2.3.0
|
||||||
|
|
||||||
device_info_plus: ^9.0.3
|
device_info_plus: ^9.0.3
|
||||||
better_open_file: ^3.6.4
|
better_open_file: ^3.6.4
|
||||||
dependency_overrides:
|
dependency_overrides:
|
||||||
|
|
Loading…
Reference in New Issue