FIX_new master Endrs type master 2nd
This commit is contained in:
parent
39fb3a5c02
commit
885062a5d3
@ -45,11 +45,11 @@ class EndorsementTypeState extends ConsumerState<EndorsementType> {
|
|||||||
final GlobalKey<DropdownSearchState<Map<String, dynamic>>>
|
final GlobalKey<DropdownSearchState<Map<String, dynamic>>>
|
||||||
dropDownKeyHandler = GlobalKey<DropdownSearchState<Map<String, dynamic>>>();
|
dropDownKeyHandler = GlobalKey<DropdownSearchState<Map<String, dynamic>>>();
|
||||||
|
|
||||||
List<String> tabHeader = ['name', 'email', 'mobile', 'code'];
|
List<String> tabHeader = ['endorsement_type'];
|
||||||
late String isActive = "1";
|
late String isActive = "1";
|
||||||
html.File? passportFile;
|
|
||||||
String? selectedFileNames;
|
String? selectedFileNames;
|
||||||
String? passportFileUrlFromApi;
|
|
||||||
dynamic selectedId;
|
dynamic selectedId;
|
||||||
String? _token;
|
String? _token;
|
||||||
bool isLoading = false;
|
bool isLoading = false;
|
||||||
@ -71,8 +71,7 @@ class EndorsementTypeState extends ConsumerState<EndorsementType> {
|
|||||||
|
|
||||||
Map<String, dynamic> dataDetails() {
|
Map<String, dynamic> dataDetails() {
|
||||||
final data = {
|
final data = {
|
||||||
"name": controllers["name"]?.text,
|
"endorsement_type": controllers["endorsement_type"]?.text,
|
||||||
"short_name": controllers["code"]?.text,
|
|
||||||
"is_active": isActive,
|
"is_active": isActive,
|
||||||
};
|
};
|
||||||
return data;
|
return data;
|
||||||
@ -112,8 +111,7 @@ class EndorsementTypeState extends ConsumerState<EndorsementType> {
|
|||||||
if (data == null) return;
|
if (data == null) return;
|
||||||
setState(() {
|
setState(() {
|
||||||
selectedId = id;
|
selectedId = id;
|
||||||
controllers['name']?.text = data['name'] ?? '';
|
controllers['endorsement_type']?.text = data['endorsement_type'] ?? '';
|
||||||
controllers['code']?.text = data['short_name'] ?? '';
|
|
||||||
controllers["is_active"]?.text = data['is_active'].toString();
|
controllers["is_active"]?.text = data['is_active'].toString();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -147,7 +145,7 @@ class EndorsementTypeState extends ConsumerState<EndorsementType> {
|
|||||||
for (var controller in controllers.values) {
|
for (var controller in controllers.values) {
|
||||||
controller.clear();
|
controller.clear();
|
||||||
} // 👈 clear selected agent
|
} // 👈 clear selected agent
|
||||||
controllers['name']?.clear();
|
controllers['endorsement_type']?.clear();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -299,8 +297,8 @@ class EndorsementTypeState extends ConsumerState<EndorsementType> {
|
|||||||
SizedBox(width: 10),
|
SizedBox(width: 10),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
child: ThemedFormInlineField(
|
child: ThemedFormInlineField(
|
||||||
controller: controllers['name']!,
|
controller: controllers['endorsement_type']!,
|
||||||
validator: (value) => Validators.requiredField(value, "name"),
|
validator: (value) => Validators.requiredField(value, "endorsement_typegigi"),
|
||||||
txtwidth: MediaQuery.of(context).size.width * 0.15,
|
txtwidth: MediaQuery.of(context).size.width * 0.15,
|
||||||
borderColor: Color(0xFFE2E8F0),
|
borderColor: Color(0xFFE2E8F0),
|
||||||
highlightColor: Color(0xFF50A398),
|
highlightColor: Color(0xFF50A398),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user