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