service type added.

main_design2.0
Sikander Saleem 2 years ago
parent c25862b98d
commit 5d706d89b4

@ -28,6 +28,7 @@ class URLs {
static get updateProfileImage => "$_baseUrl/Account/ChangeImageEmployee"; // post
static get getSites => "$_baseUrl/Customer/GetCustomers"; // get
static get getSitesAutoComplete => "$_baseUrl/Customer/GetCustomersAutoComplete"; // get
static get getSiteAutoCompleteWithoutConditionSites => "$_baseUrl/Customer/GetCustomersAutoCompleteWithoutConditionSites"; // get
static get getDepartments => "$_baseUrl/Customer/GetDepartmentLookup"; // get
static get getAssets => "$_baseUrl/Asset/GetAssets"; // get
@ -79,6 +80,7 @@ class URLs {
static get getServiceReportReasons => "$_baseUrl/Lookups/GetLookup?lookupEnum=522"; // get
static get getServiceReportTypes => "$_baseUrl/Lookups/GetLookup?lookupEnum=501"; // get
static get getServiceReportTypesForWO => "$_baseUrl/Lookups/GetLookup?lookupEnum=34"; // get
static get getServiceReportStatus => "$_baseUrl/Lookups/GetLookup?lookupEnum=521"; // get
static get getServiceReportLastCalls => "$_baseUrl/WorkOrder/GetLookupCallLastSituationBasedOnCase"; // get
static get getAssetTypes => "$_baseUrl/Lookups/GetLookup?lookupEnum=500"; // get

@ -38,6 +38,7 @@ class ServiceReport {
this.currentSituation,
this.repairLocation,
this.reason,
this.serviceType,
this.startofWorkTime,
this.endofWorkTime,
this.workingHours,
@ -87,6 +88,7 @@ class ServiceReport {
currentSituation = json['currentSituation'] != null ? Lookup.fromJson(json['currentSituation']) : null;
repairLocation = json['repairLocation'] != null ? Lookup.fromJson(json['repairLocation']) : null;
reason = json['reason'] != null ? Lookup.fromJson(json['reason']) : null;
serviceType = json['serviceType'] != null ? Lookup.fromJson(json['serviceType']) : null;
startofWorkTime = json['startofWorkTime'];
endofWorkTime = json['endofWorkTime'];
workingHours = json['workingHours'];
@ -148,6 +150,7 @@ class ServiceReport {
Lookup currentSituation;
Lookup repairLocation;
Lookup reason;
Lookup serviceType;
String startofWorkTime;
String endofWorkTime;
num workingHours;
@ -188,6 +191,7 @@ class ServiceReport {
Lookup currentSituation,
Lookup repairLocation,
Lookup reason,
Lookup serviceType,
String startofWorkTime,
String endofWorkTime,
num workingHours,
@ -226,6 +230,7 @@ class ServiceReport {
currentSituation: currentSituation ?? this.currentSituation,
repairLocation: repairLocation ?? this.repairLocation,
reason: reason ?? this.reason,
serviceType: serviceType ?? this.serviceType,
startofWorkTime: startofWorkTime ?? this.startofWorkTime,
endofWorkTime: endofWorkTime ?? this.endofWorkTime,
workingHours: workingHours ?? this.workingHours,
@ -286,6 +291,9 @@ class ServiceReport {
if (reason != null) {
map['reason'] = reason.toJson();
}
if (serviceType != null) {
map['serviceType'] = serviceType.toJson();
}
map['startofWorkTime'] = timer.startAt.toString();
map['endofWorkTime'] = timer.endAt.toString();
map['workingHours'] = workingHours;

@ -14,7 +14,7 @@ class SiteProvider extends LoadingListNotifier<Site> {
loading = true;
notifyListeners();
try {
Response response = await ApiManager.instance.get(URLs.getSitesAutoComplete);
Response response = await ApiManager.instance.get(URLs.getSiteAutoCompleteWithoutConditionSites);
stateCode = response.statusCode;
if (response.statusCode >= 200 && response.statusCode < 300) {
// client's request was successfully received

@ -16,7 +16,7 @@ class ServiceTypeProvider extends LoadingListNotifier<Lookup> {
loading = true;
notifyListeners();
try {
Response response = await ApiManager.instance.get(URLs.getServiceReportTypes);
Response response = await ApiManager.instance.get(URLs.getServiceReportTypesForWO);
stateCode = response.statusCode;
if (response.statusCode >= 200 && response.statusCode < 300) {
// client's request was successfully received

@ -204,7 +204,10 @@ class _CreateServiceReportState extends State<CreateServiceReport> with TickerPr
SingleItemDropDownMenu<Lookup, ServiceTypeProvider>(
context: context,
title: context.translation.serviceType,
onSelect: (value) {},
initialValue: _serviceReport.serviceType,
onSelect: (value) {
_serviceReport.serviceType = value;
},
),
8.height,
ServiceReportLastCallsMenu(

@ -189,8 +189,9 @@ class _EditServiceReportState extends State<EditServiceReport> with TickerProvid
SingleItemDropDownMenu<Lookup, ServiceTypeProvider>(
context: context,
title: context.translation.serviceType,
initialValue: _serviceReport.serviceType,
onSelect: (value) {
_serviceReport.serviceType = value;
},
),
8.height,

Loading…
Cancel
Save