improvements for demo request form

export_module_ui_ux_enhancement_signup
WaseemAbbasi22 1 week ago
parent 8d4b9f2f79
commit 2514fefb05

@ -5,10 +5,11 @@ class ApplicationDemoRequestModel {
final String emailAddress;
final String mobileNumber;
final String? companyName;
final int? companyId;
// final String? companyName;
final List<String> roleIds;
final List<String> roleNames;
final String status; // Pending, Approved, Rejected
final String? status; // Pending, Approved, Rejected
final DateTime requestDate;
ApplicationDemoRequestModel({
@ -17,10 +18,10 @@ class ApplicationDemoRequestModel {
required this.emailAddress,
required this.mobileNumber,
this.companyName,
this.companyId,
// this.companyId,
required this.roleIds,
required this.roleNames,
required this.status,
this.status,
required this.requestDate,
});
@ -31,8 +32,8 @@ class ApplicationDemoRequestModel {
'fullName': fullName,
'emailAddress': emailAddress,
'mobileNumber': mobileNumber,
// 'companyName': companyId ?? 88,
'companyId': 88,
'companyName': companyName,
// 'companyId': 88,
'demoRequestUserRoleIds': roleIds,
};
}
@ -45,7 +46,7 @@ class ApplicationDemoRequestModel {
emailAddress: json['emailAddress'] ?? json['email'] ?? '',
mobileNumber: json['mobileNumber'] ?? json['mobile'] ?? '',
companyName: json['companyName'] ?? json['company'] ?? '',
companyId: json['companyId'],
// companyId: json['companyId'],
roleIds: _parseList(json['roleIds'] ?? json['demoRequestUserRoleIds']),
roleNames: _parseList(json['roleNames'] ?? json['roles']),
status: json['status'] ?? 'Pending',
@ -107,7 +108,7 @@ class ApplicationDemoRequestModel {
emailAddress: emailAddress ?? this.emailAddress,
mobileNumber: mobileNumber ?? this.mobileNumber,
companyName: companyName ?? this.companyName,
companyId: companyId ?? this.companyId,
// companyId: companyId ?? this.companyId,
roleIds: roleIds ?? this.roleIds,
roleNames: roleNames ?? this.roleNames,
status: status ?? this.status,

@ -258,10 +258,10 @@ class _DemoRequestFormScreenState extends State<DemoRequestFormScreen> {
fullName: _fullNameController.text.trim(),
emailAddress: _emailController.text.trim(),
mobileNumber: _mobileController.text.trim(),
companyId: 0,
companyName: _companyNameController.text.trim(),
roleIds: _selectedRoles.map((role) => role.identifier ?? '').toList(),
roleNames: _selectedRoles.map((role) => role.name ?? '').toList(),
status: 'Pending',
// status: 'Pending',
requestDate: DateTime.now(),
);

Loading…
Cancel
Save