chnages has been made and net salary is being displayed

This commit is contained in:
Daniah Ayad Al-sultani
2026-02-11 14:31:03 +03:00
parent 1002937045
commit a7930d19e5
23 changed files with 691 additions and 141 deletions

View File

@@ -0,0 +1,36 @@
class SalaryResponseDto {
final bool isSuccess;
final String message;
final SalaryDataDto? data;
SalaryResponseDto({
required this.isSuccess,
required this.message,
this.data,
});
factory SalaryResponseDto.fromJson(Map<String, dynamic> json) {
return SalaryResponseDto(
isSuccess: json['isSuccess'] ?? json['IsSuccess'] ?? false,
message: json['message'] ?? json['Message'] ?? '',
data:
json['data'] != null
? SalaryDataDto.fromJson(json['data'])
: json['Data'] != null
? SalaryDataDto.fromJson(json['Data'])
: null,
);
}
}
class SalaryDataDto {
final double netAmount;
SalaryDataDto({required this.netAmount});
factory SalaryDataDto.fromJson(Map<String, dynamic> json) {
return SalaryDataDto(
netAmount: (json['netAmount'] ?? json['NetAmount'] ?? 0.0).toDouble(),
);
}
}