Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dashboard_ticket_list.dart #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 13 additions & 17 deletions lib/mobikul-uvdesk/models/dashboard/dashboard_ticket_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class DashboardTicketList {
final List<Type> type;
final Source? source;

DashboardTicketList({
DashboardTicketList({
required this.tickets,
this.pagination,
this.userDetails,
Expand Down Expand Up @@ -70,8 +70,8 @@ class Tickets {
final Priority? priority;
@JsonKey(defaultValue: '')
final String formatedCreatedAt;
@JsonKey(defaultValue: '')
final String totalThreads;
@JsonKey(defaultValue: 0) // Changed to int
final int totalThreads; // Changed to int
final Agent? agent;
final Customer? customer;

Expand Down Expand Up @@ -118,8 +118,7 @@ class Status {
required this.sortOrder,
});

factory Status.fromJson(Map<String, dynamic> json) =>
_$StatusFromJson(json);
factory Status.fromJson(Map<String, dynamic> json) => _$StatusFromJson(json);

Map<String, dynamic> toJson() => _$StatusToJson(this);
}
Expand All @@ -136,8 +135,7 @@ class Group {
required this.name,
});

factory Group.fromJson(Map<String, dynamic> json) =>
_$GroupFromJson(json);
factory Group.fromJson(Map<String, dynamic> json) => _$GroupFromJson(json);

Map<String, dynamic> toJson() => _$GroupToJson(this);
}
Expand Down Expand Up @@ -175,8 +173,7 @@ class Type {
required this.name,
});

factory Type.fromJson(Map<String, dynamic> json) =>
_$TypeFromJson(json);
factory Type.fromJson(Map<String, dynamic> json) => _$TypeFromJson(json);

Map<String, dynamic> toJson() => _$TypeToJson(this);
}
Expand Down Expand Up @@ -241,8 +238,7 @@ class Agent {
required this.isVerified,
});

factory Agent.fromJson(Map<String, dynamic> json) =>
_$AgentFromJson(json);
factory Agent.fromJson(Map<String, dynamic> json) => _$AgentFromJson(json);

Map<String, dynamic> toJson() => _$AgentToJson(this);
}
Expand All @@ -263,6 +259,8 @@ class Customer {
final String profileImagePath;
@JsonKey(defaultValue: '')
final String smallThumbnail;
@JsonKey(defaultValue: '')
final String contactNumber; // Ensure this is a string

const Customer({
required this.id,
Expand All @@ -272,6 +270,7 @@ class Customer {
required this.lastName,
required this.profileImagePath,
required this.smallThumbnail,
required this.contactNumber, // Ensure this is a string
});

factory Customer.fromJson(Map<String, dynamic> json) =>
Expand Down Expand Up @@ -385,8 +384,7 @@ class Agents {
required this.name,
});

factory Agents.fromJson(Map<String, dynamic> json) =>
_$AgentsFromJson(json);
factory Agents.fromJson(Map<String, dynamic> json) => _$AgentsFromJson(json);

Map<String, dynamic> toJson() => _$AgentsToJson(this);
}
Expand All @@ -403,8 +401,7 @@ class Team {
required this.name,
});

factory Team.fromJson(Map<String, dynamic> json) =>
_$TeamFromJson(json);
factory Team.fromJson(Map<String, dynamic> json) => _$TeamFromJson(json);

Map<String, dynamic> toJson() => _$TeamToJson(this);
}
Expand All @@ -421,8 +418,7 @@ class Source {
required this.website,
});

factory Source.fromJson(Map<String, dynamic> json) =>
_$SourceFromJson(json);
factory Source.fromJson(Map<String, dynamic> json) => _$SourceFromJson(json);

Map<String, dynamic> toJson() => _$SourceToJson(this);
}