All checks were successful
Create Release / build (push) Successful in 4s
- Fix queue queries in mobile API and SSE to use twp_group_members (matching browser phone) instead of twp_queue_assignments - Auto-create personal queues if user has no extension - Make all model JSON parsing null-safe (handle null, string ints, bools) - Add AutofillGroup and autofill hints to login form - Add outbound calling with dialpad bottom sheet on dashboard Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
29 lines
630 B
Dart
29 lines
630 B
Dart
class User {
|
|
final int id;
|
|
final String login;
|
|
final String displayName;
|
|
final String? email;
|
|
|
|
User({
|
|
required this.id,
|
|
required this.login,
|
|
required this.displayName,
|
|
this.email,
|
|
});
|
|
|
|
factory User.fromJson(Map<String, dynamic> json) {
|
|
return User(
|
|
id: _toInt(json['user_id']),
|
|
login: (json['user_login'] ?? '') as String,
|
|
displayName: (json['display_name'] ?? '') as String,
|
|
email: json['email'] as String?,
|
|
);
|
|
}
|
|
|
|
static int _toInt(dynamic value) {
|
|
if (value is int) return value;
|
|
if (value is String) return int.tryParse(value) ?? 0;
|
|
return 0;
|
|
}
|
|
}
|