|
@@ -1,11 +1,9 @@
|
|
|
import 'package:domain/generated/json/base/json_convert_content.dart';
|
|
|
import 'package:domain/entity/response/s_g_attendance_review_workflow_entity.dart';
|
|
|
|
|
|
-SGAttendanceReviewWorkflowEntity $SGAttendanceReviewWorkflowEntityFromJson(
|
|
|
- Map<String, dynamic> json) {
|
|
|
+SGAttendanceReviewWorkflowEntity $SGAttendanceReviewWorkflowEntityFromJson(Map<String, dynamic> json) {
|
|
|
final SGAttendanceReviewWorkflowEntity sGAttendanceReviewWorkflowEntity = SGAttendanceReviewWorkflowEntity();
|
|
|
- final SGAttendanceReviewWorkflowRow? row = jsonConvert.convert<
|
|
|
- SGAttendanceReviewWorkflowRow>(json['row']);
|
|
|
+ final SGAttendanceReviewWorkflowRow? row = jsonConvert.convert<SGAttendanceReviewWorkflowRow>(json['row']);
|
|
|
if (row != null) {
|
|
|
sGAttendanceReviewWorkflowEntity.row = row;
|
|
|
}
|
|
@@ -13,20 +11,15 @@ SGAttendanceReviewWorkflowEntity $SGAttendanceReviewWorkflowEntityFromJson(
|
|
|
if (outletId != null) {
|
|
|
sGAttendanceReviewWorkflowEntity.outletId = outletId;
|
|
|
}
|
|
|
- final List<
|
|
|
- SGAttendanceReviewWorkflowRecords>? records = (json['records'] as List<
|
|
|
- dynamic>?)?.map(
|
|
|
- (e) =>
|
|
|
- jsonConvert.convert<SGAttendanceReviewWorkflowRecords>(
|
|
|
- e) as SGAttendanceReviewWorkflowRecords).toList();
|
|
|
+ final List<SGAttendanceReviewWorkflowRecords>? records = (json['records'] as List<dynamic>?)?.map(
|
|
|
+ (e) => jsonConvert.convert<SGAttendanceReviewWorkflowRecords>(e) as SGAttendanceReviewWorkflowRecords).toList();
|
|
|
if (records != null) {
|
|
|
sGAttendanceReviewWorkflowEntity.records = records;
|
|
|
}
|
|
|
return sGAttendanceReviewWorkflowEntity;
|
|
|
}
|
|
|
|
|
|
-Map<String, dynamic> $SGAttendanceReviewWorkflowEntityToJson(
|
|
|
- SGAttendanceReviewWorkflowEntity entity) {
|
|
|
+Map<String, dynamic> $SGAttendanceReviewWorkflowEntityToJson(SGAttendanceReviewWorkflowEntity entity) {
|
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
data['row'] = entity.row?.toJson();
|
|
|
data['outlet_id'] = entity.outletId;
|
|
@@ -47,8 +40,7 @@ extension SGAttendanceReviewWorkflowEntityExtension on SGAttendanceReviewWorkflo
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-SGAttendanceReviewWorkflowRow $SGAttendanceReviewWorkflowRowFromJson(
|
|
|
- Map<String, dynamic> json) {
|
|
|
+SGAttendanceReviewWorkflowRow $SGAttendanceReviewWorkflowRowFromJson(Map<String, dynamic> json) {
|
|
|
final SGAttendanceReviewWorkflowRow sGAttendanceReviewWorkflowRow = SGAttendanceReviewWorkflowRow();
|
|
|
final String? id = jsonConvert.convert<String>(json['id']);
|
|
|
if (id != null) {
|
|
@@ -70,13 +62,11 @@ SGAttendanceReviewWorkflowRow $SGAttendanceReviewWorkflowRowFromJson(
|
|
|
if (labourerId != null) {
|
|
|
sGAttendanceReviewWorkflowRow.labourerId = labourerId;
|
|
|
}
|
|
|
- final String? labourerName = jsonConvert.convert<String>(
|
|
|
- json['labourer_name']);
|
|
|
+ final String? labourerName = jsonConvert.convert<String>(json['labourer_name']);
|
|
|
if (labourerName != null) {
|
|
|
sGAttendanceReviewWorkflowRow.labourerName = labourerName;
|
|
|
}
|
|
|
- final String? labourerNric = jsonConvert.convert<String>(
|
|
|
- json['labourer_nric']);
|
|
|
+ final String? labourerNric = jsonConvert.convert<String>(json['labourer_nric']);
|
|
|
if (labourerNric != null) {
|
|
|
sGAttendanceReviewWorkflowRow.labourerNric = labourerNric;
|
|
|
}
|
|
@@ -88,8 +78,7 @@ SGAttendanceReviewWorkflowRow $SGAttendanceReviewWorkflowRowFromJson(
|
|
|
if (employerId != null) {
|
|
|
sGAttendanceReviewWorkflowRow.employerId = employerId;
|
|
|
}
|
|
|
- final String? employerName = jsonConvert.convert<String>(
|
|
|
- json['employer_name']);
|
|
|
+ final String? employerName = jsonConvert.convert<String>(json['employer_name']);
|
|
|
if (employerName != null) {
|
|
|
sGAttendanceReviewWorkflowRow.employerName = employerName;
|
|
|
}
|
|
@@ -117,8 +106,7 @@ SGAttendanceReviewWorkflowRow $SGAttendanceReviewWorkflowRowFromJson(
|
|
|
if (ballroomId != null) {
|
|
|
sGAttendanceReviewWorkflowRow.ballroomId = ballroomId;
|
|
|
}
|
|
|
- final String? ballroomName = jsonConvert.convert<String>(
|
|
|
- json['ballroom_name']);
|
|
|
+ final String? ballroomName = jsonConvert.convert<String>(json['ballroom_name']);
|
|
|
if (ballroomName != null) {
|
|
|
sGAttendanceReviewWorkflowRow.ballroomName = ballroomName;
|
|
|
}
|
|
@@ -134,8 +122,7 @@ SGAttendanceReviewWorkflowRow $SGAttendanceReviewWorkflowRowFromJson(
|
|
|
if (endTime != null) {
|
|
|
sGAttendanceReviewWorkflowRow.endTime = endTime;
|
|
|
}
|
|
|
- final String? workingHours = jsonConvert.convert<String>(
|
|
|
- json['working_hours']);
|
|
|
+ final String? workingHours = jsonConvert.convert<String>(json['working_hours']);
|
|
|
if (workingHours != null) {
|
|
|
sGAttendanceReviewWorkflowRow.workingHours = workingHours;
|
|
|
}
|
|
@@ -155,13 +142,11 @@ SGAttendanceReviewWorkflowRow $SGAttendanceReviewWorkflowRowFromJson(
|
|
|
if (grossWage != null) {
|
|
|
sGAttendanceReviewWorkflowRow.grossWage = grossWage;
|
|
|
}
|
|
|
- final int? securityClockIn = jsonConvert.convert<int>(
|
|
|
- json['security_clock_in']);
|
|
|
+ final int? securityClockIn = jsonConvert.convert<int>(json['security_clock_in']);
|
|
|
if (securityClockIn != null) {
|
|
|
sGAttendanceReviewWorkflowRow.securityClockIn = securityClockIn;
|
|
|
}
|
|
|
- final int? securityClockOut = jsonConvert.convert<int>(
|
|
|
- json['security_clock_out']);
|
|
|
+ final int? securityClockOut = jsonConvert.convert<int>(json['security_clock_out']);
|
|
|
if (securityClockOut != null) {
|
|
|
sGAttendanceReviewWorkflowRow.securityClockOut = securityClockOut;
|
|
|
}
|
|
@@ -229,13 +214,11 @@ SGAttendanceReviewWorkflowRow $SGAttendanceReviewWorkflowRowFromJson(
|
|
|
if (reviseHours != null) {
|
|
|
sGAttendanceReviewWorkflowRow.reviseHours = reviseHours;
|
|
|
}
|
|
|
- final String? reviseGrossWage = jsonConvert.convert<String>(
|
|
|
- json['revise_gross_wage']);
|
|
|
+ final String? reviseGrossWage = jsonConvert.convert<String>(json['revise_gross_wage']);
|
|
|
if (reviseGrossWage != null) {
|
|
|
sGAttendanceReviewWorkflowRow.reviseGrossWage = reviseGrossWage;
|
|
|
}
|
|
|
- final String? reviseAgencyWage = jsonConvert.convert<String>(
|
|
|
- json['revise_agency_wage']);
|
|
|
+ final String? reviseAgencyWage = jsonConvert.convert<String>(json['revise_agency_wage']);
|
|
|
if (reviseAgencyWage != null) {
|
|
|
sGAttendanceReviewWorkflowRow.reviseAgencyWage = reviseAgencyWage;
|
|
|
}
|
|
@@ -247,16 +230,14 @@ SGAttendanceReviewWorkflowRow $SGAttendanceReviewWorkflowRowFromJson(
|
|
|
if (hotelStaff != null) {
|
|
|
sGAttendanceReviewWorkflowRow.hotelStaff = hotelStaff;
|
|
|
}
|
|
|
- final int? salaryStructure = jsonConvert.convert<int>(
|
|
|
- json['salary_structure']);
|
|
|
+ final int? salaryStructure = jsonConvert.convert<int>(json['salary_structure']);
|
|
|
if (salaryStructure != null) {
|
|
|
sGAttendanceReviewWorkflowRow.salaryStructure = salaryStructure;
|
|
|
}
|
|
|
return sGAttendanceReviewWorkflowRow;
|
|
|
}
|
|
|
|
|
|
-Map<String, dynamic> $SGAttendanceReviewWorkflowRowToJson(
|
|
|
- SGAttendanceReviewWorkflowRow entity) {
|
|
|
+Map<String, dynamic> $SGAttendanceReviewWorkflowRowToJson(SGAttendanceReviewWorkflowRow entity) {
|
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
data['id'] = entity.id;
|
|
|
data['job_id'] = entity.jobId;
|
|
@@ -412,11 +393,9 @@ extension SGAttendanceReviewWorkflowRowExtension on SGAttendanceReviewWorkflowRo
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-SGAttendanceReviewWorkflowRecords $SGAttendanceReviewWorkflowRecordsFromJson(
|
|
|
- Map<String, dynamic> json) {
|
|
|
+SGAttendanceReviewWorkflowRecords $SGAttendanceReviewWorkflowRecordsFromJson(Map<String, dynamic> json) {
|
|
|
final SGAttendanceReviewWorkflowRecords sGAttendanceReviewWorkflowRecords = SGAttendanceReviewWorkflowRecords();
|
|
|
- final String? serialNumber = jsonConvert.convert<String>(
|
|
|
- json['serial_number']);
|
|
|
+ final String? serialNumber = jsonConvert.convert<String>(json['serial_number']);
|
|
|
if (serialNumber != null) {
|
|
|
sGAttendanceReviewWorkflowRecords.serialNumber = serialNumber;
|
|
|
}
|
|
@@ -424,8 +403,7 @@ SGAttendanceReviewWorkflowRecords $SGAttendanceReviewWorkflowRecordsFromJson(
|
|
|
if (nodeName != null) {
|
|
|
sGAttendanceReviewWorkflowRecords.nodeName = nodeName;
|
|
|
}
|
|
|
- final String? nodeTypeShow = jsonConvert.convert<String>(
|
|
|
- json['node_type_show']);
|
|
|
+ final String? nodeTypeShow = jsonConvert.convert<String>(json['node_type_show']);
|
|
|
if (nodeTypeShow != null) {
|
|
|
sGAttendanceReviewWorkflowRecords.nodeTypeShow = nodeTypeShow;
|
|
|
}
|
|
@@ -449,21 +427,18 @@ SGAttendanceReviewWorkflowRecords $SGAttendanceReviewWorkflowRecordsFromJson(
|
|
|
if (createdAt != null) {
|
|
|
sGAttendanceReviewWorkflowRecords.createdAt = createdAt;
|
|
|
}
|
|
|
- final String? assigneeTypeShow = jsonConvert.convert<String>(
|
|
|
- json['assignee_type_show']);
|
|
|
+ final String? assigneeTypeShow = jsonConvert.convert<String>(json['assignee_type_show']);
|
|
|
if (assigneeTypeShow != null) {
|
|
|
sGAttendanceReviewWorkflowRecords.assigneeTypeShow = assigneeTypeShow;
|
|
|
}
|
|
|
- final String? designationShow = jsonConvert.convert<String>(
|
|
|
- json['designation_show']);
|
|
|
+ final String? designationShow = jsonConvert.convert<String>(json['designation_show']);
|
|
|
if (designationShow != null) {
|
|
|
sGAttendanceReviewWorkflowRecords.designationShow = designationShow;
|
|
|
}
|
|
|
return sGAttendanceReviewWorkflowRecords;
|
|
|
}
|
|
|
|
|
|
-Map<String, dynamic> $SGAttendanceReviewWorkflowRecordsToJson(
|
|
|
- SGAttendanceReviewWorkflowRecords entity) {
|
|
|
+Map<String, dynamic> $SGAttendanceReviewWorkflowRecordsToJson(SGAttendanceReviewWorkflowRecords entity) {
|
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
data['serial_number'] = entity.serialNumber;
|
|
|
data['node_name'] = entity.nodeName;
|