|
|
|
|
@ -12,8 +12,6 @@ import 'package:test_sa/controllers/providers/api/status_drop_down/report/servic
|
|
|
|
|
import 'package:test_sa/controllers/providers/api/user_provider.dart';
|
|
|
|
|
import 'package:test_sa/controllers/providers/settings/setting_provider.dart';
|
|
|
|
|
import 'package:test_sa/controllers/validator/validator.dart';
|
|
|
|
|
import 'package:test_sa/models/device/device.dart';
|
|
|
|
|
import 'package:test_sa/models/lookup.dart';
|
|
|
|
|
import 'package:test_sa/models/part.dart';
|
|
|
|
|
import 'package:test_sa/models/service_report.dart';
|
|
|
|
|
import 'package:test_sa/models/service_request/service_request.dart';
|
|
|
|
|
@ -24,15 +22,17 @@ import 'package:test_sa/views/widgets/app_text_form_field.dart';
|
|
|
|
|
import 'package:test_sa/views/widgets/buttons/app_back_button.dart';
|
|
|
|
|
import 'package:test_sa/views/widgets/buttons/app_button.dart';
|
|
|
|
|
import 'package:test_sa/views/widgets/date_and_time/date_picker.dart';
|
|
|
|
|
import 'package:test_sa/views/widgets/e_signature/e_signature.dart';
|
|
|
|
|
import 'package:test_sa/views/widgets/equipment/auto_complete_devices_field.dart';
|
|
|
|
|
import 'package:test_sa/views/widgets/images/mini_one_image_picker.dart';
|
|
|
|
|
import 'package:test_sa/views/widgets/loaders/loading_manager.dart';
|
|
|
|
|
import 'package:test_sa/views/widgets/parts/auto_complete_parts_field.dart';
|
|
|
|
|
import 'package:test_sa/views/widgets/parts/part_item.dart';
|
|
|
|
|
import 'package:test_sa/views/widgets/speech_to_text/speech_to_text.dart';
|
|
|
|
|
import 'package:test_sa/views/widgets/status/employee/engineers_mune.dart';
|
|
|
|
|
import 'package:test_sa/views/widgets/status/report/service_report_last_call.dart';
|
|
|
|
|
import 'package:test_sa/views/widgets/status/report/service_report_reasons.dart';
|
|
|
|
|
import 'package:test_sa/views/widgets/status/report/service_report_status.dart';
|
|
|
|
|
import 'package:test_sa/views/widgets/status/report/service_report_type.dart';
|
|
|
|
|
import 'package:test_sa/views/widgets/status/report/service_status.dart';
|
|
|
|
|
import 'package:test_sa/views/widgets/timer/app_timer.dart';
|
|
|
|
|
import 'package:test_sa/views/widgets/titles/app_sub_title.dart';
|
|
|
|
|
@ -67,11 +67,8 @@ class _CreateServiceReportState extends State<CreateServiceReport> with TickerPr
|
|
|
|
|
void initState() {
|
|
|
|
|
_serviceReport = ServiceReport(
|
|
|
|
|
visitDate: DateTime.now(),
|
|
|
|
|
type: const Lookup(id: 2),
|
|
|
|
|
device: Device(
|
|
|
|
|
id: widget.request.deviceId,
|
|
|
|
|
serialNumber: widget.request.deviceSerialNumber,
|
|
|
|
|
),
|
|
|
|
|
//type: const Lookup(value: 2),
|
|
|
|
|
device: widget.request.device,
|
|
|
|
|
parts: []
|
|
|
|
|
);
|
|
|
|
|
super.initState();
|
|
|
|
|
@ -158,25 +155,25 @@ class _CreateServiceReportState extends State<CreateServiceReport> with TickerPr
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
// Report Status
|
|
|
|
|
// Expanded(
|
|
|
|
|
// child: Column(
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
// children: [
|
|
|
|
|
// ASubTitle(_subtitle.reportType),
|
|
|
|
|
// _validate && _serviceReport.type == null ?
|
|
|
|
|
// ASubTitle(_subtitle.requiredWord,color: Colors.red,):
|
|
|
|
|
// const SizedBox.shrink(),
|
|
|
|
|
// const SizedBox(height: 4,),
|
|
|
|
|
// ServiceReportTypeMenu(
|
|
|
|
|
// initialValue: _serviceReport.type,
|
|
|
|
|
// onSelect: (status){
|
|
|
|
|
// _serviceReport.type = status;
|
|
|
|
|
// },
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// const SizedBox(width: 8,),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
ASubTitle(_subtitle.reportType),
|
|
|
|
|
_validate && _serviceReport.type == null ?
|
|
|
|
|
ASubTitle(_subtitle.requiredWord,color: Colors.red,):
|
|
|
|
|
const SizedBox.shrink(),
|
|
|
|
|
const SizedBox(height: 4,),
|
|
|
|
|
ServiceReportTypeMenu(
|
|
|
|
|
initialValue: _serviceReport.type,
|
|
|
|
|
onSelect: (status){
|
|
|
|
|
_serviceReport.type = status;
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
const SizedBox(width: 8,),
|
|
|
|
|
// visit date
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
@ -231,14 +228,14 @@ class _CreateServiceReportState extends State<CreateServiceReport> with TickerPr
|
|
|
|
|
),
|
|
|
|
|
const SizedBox(height: 8,),
|
|
|
|
|
ASubTitle(_subtitle.serviceType),
|
|
|
|
|
_validate && _serviceReport.serviceType == null ?
|
|
|
|
|
_validate && _serviceReport.assetType == null ?
|
|
|
|
|
ASubTitle(_subtitle.requiredWord,color: Colors.red,):
|
|
|
|
|
const SizedBox.shrink(),
|
|
|
|
|
const SizedBox(height: 4,),
|
|
|
|
|
ServiceStatusMenu(
|
|
|
|
|
initialValue: _serviceReport.serviceType,
|
|
|
|
|
ServiceAssetTypeMenu(
|
|
|
|
|
initialValue: _serviceReport.assetType,
|
|
|
|
|
onSelect: (status){
|
|
|
|
|
_serviceReport.serviceType = status;
|
|
|
|
|
_serviceReport.assetType = status;
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
const SizedBox(height: 8,),
|
|
|
|
|
@ -265,36 +262,53 @@ class _CreateServiceReportState extends State<CreateServiceReport> with TickerPr
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
const SizedBox(width: 8,),
|
|
|
|
|
Provider.of<ServiceReportLastCallsProvider>(context).isLoading == null
|
|
|
|
|
? const SizedBox.shrink():
|
|
|
|
|
// Provider.of<ServiceReportLastCallsProvider>(context).isLoading == null
|
|
|
|
|
// ? const SizedBox.shrink():
|
|
|
|
|
// Call's last Situation
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
|
|
ASubTitle(_subtitle.callLastSituation),
|
|
|
|
|
_validate && _serviceReport.callLastSituation == null ?
|
|
|
|
|
ASubTitle(_subtitle.requiredWord,color: Colors.red,):
|
|
|
|
|
const SizedBox.shrink(),
|
|
|
|
|
const SizedBox(height: 4,),
|
|
|
|
|
ServiceReportLastCallsMenu(
|
|
|
|
|
report: _serviceReport,
|
|
|
|
|
onSelect: (status){
|
|
|
|
|
if(status?.id == 12
|
|
|
|
|
|| _serviceReport.callLastSituation?.id == 12){
|
|
|
|
|
_serviceReport.callLastSituation = status;
|
|
|
|
|
setState(() {});
|
|
|
|
|
} else {
|
|
|
|
|
_serviceReport.callLastSituation = status;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
Consumer<ServiceReportLastCallsProvider>(
|
|
|
|
|
builder: (_, provider, __) {
|
|
|
|
|
if(provider.isLoading == null) return const SizedBox.shrink();
|
|
|
|
|
return Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
ASubTitle(_subtitle.callLastSituation),
|
|
|
|
|
_validate && _serviceReport.callLastSituation == null ?
|
|
|
|
|
ASubTitle(_subtitle.requiredWord,color: Colors.red,):
|
|
|
|
|
const SizedBox.shrink(),
|
|
|
|
|
const SizedBox(height: 4,),
|
|
|
|
|
ServiceReportLastCallsMenu(
|
|
|
|
|
report: _serviceReport,
|
|
|
|
|
onSelect: (status){
|
|
|
|
|
if(status?.value == 12
|
|
|
|
|
|| _serviceReport.callLastSituation?.value == 12){
|
|
|
|
|
_serviceReport.callLastSituation = status;
|
|
|
|
|
setState(() {});
|
|
|
|
|
} else {
|
|
|
|
|
_serviceReport.callLastSituation = status;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 8 * AppStyle.getScaleFactor(context),),
|
|
|
|
|
const ASubTitle("Assign Employee"),
|
|
|
|
|
const SizedBox(height: 8,),
|
|
|
|
|
_validate && _serviceReport.engineer == null ?
|
|
|
|
|
ASubTitle(_subtitle.requiredWord,color: Colors.red,):
|
|
|
|
|
const SizedBox.shrink(),
|
|
|
|
|
const SizedBox(height: 4,),
|
|
|
|
|
EngineersMenu(
|
|
|
|
|
initialValue: _serviceReport.engineer,
|
|
|
|
|
onSelect: (engineer){
|
|
|
|
|
_serviceReport.engineer = engineer;
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
const SizedBox(height: 8,),
|
|
|
|
|
// invoice number & code
|
|
|
|
|
_serviceReport.callLastSituation?.id != 12 ? const SizedBox.shrink():
|
|
|
|
|
@ -346,65 +360,65 @@ class _CreateServiceReportState extends State<CreateServiceReport> with TickerPr
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
const SizedBox(height: 8,),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
ASubTitle(_subtitle.faultDescription),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: SizedBox(
|
|
|
|
|
height: 32 * AppStyle.getScaleFactor(context),
|
|
|
|
|
child: SpeechToTextButton(
|
|
|
|
|
controller: _faultController,
|
|
|
|
|
mini: true,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
const SizedBox(height: 4,),
|
|
|
|
|
ATextFormField(
|
|
|
|
|
initialValue: _serviceReport?.faultDescription,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
controller: _faultController,
|
|
|
|
|
style: Theme.of(context).textTheme.subtitle1,
|
|
|
|
|
validator: (value) =>
|
|
|
|
|
Validator.hasValue(value)
|
|
|
|
|
? null : _subtitle.requiredWord,
|
|
|
|
|
textInputType: TextInputType.multiline,
|
|
|
|
|
onSaved: (value){
|
|
|
|
|
_serviceReport.faultDescription = value;
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
const SizedBox(height: 8,),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
ASubTitle(_subtitle.workPreformed),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: SizedBox(
|
|
|
|
|
height: 32 * AppStyle.getScaleFactor(context),
|
|
|
|
|
child: SpeechToTextButton(
|
|
|
|
|
controller: _workPreformedController,
|
|
|
|
|
mini: true,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
const SizedBox(height: 4,),
|
|
|
|
|
ATextFormField(
|
|
|
|
|
initialValue: _serviceReport?.workPreformed,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
controller: _workPreformedController,
|
|
|
|
|
style: Theme.of(context).textTheme.subtitle1,
|
|
|
|
|
validator: (value) =>
|
|
|
|
|
Validator.hasValue(value)
|
|
|
|
|
? null : _subtitle.requiredWord,
|
|
|
|
|
textInputType: TextInputType.multiline,
|
|
|
|
|
onSaved: (value){
|
|
|
|
|
_serviceReport.workPreformed = value;
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
const SizedBox(height: 8,),
|
|
|
|
|
// const SizedBox(height: 8,),
|
|
|
|
|
// Row(
|
|
|
|
|
// children: [
|
|
|
|
|
// ASubTitle(_subtitle.faultDescription),
|
|
|
|
|
// Expanded(
|
|
|
|
|
// child: SizedBox(
|
|
|
|
|
// height: 32 * AppStyle.getScaleFactor(context),
|
|
|
|
|
// child: SpeechToTextButton(
|
|
|
|
|
// controller: _faultController,
|
|
|
|
|
// mini: true,
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// const SizedBox(height: 4,),
|
|
|
|
|
// ATextFormField(
|
|
|
|
|
// initialValue: _serviceReport?.faultDescriptionId,
|
|
|
|
|
// textAlign: TextAlign.center,
|
|
|
|
|
// controller: _faultController,
|
|
|
|
|
// style: Theme.of(context).textTheme.subtitle1,
|
|
|
|
|
// validator: (value) =>
|
|
|
|
|
// Validator.hasValue(value)
|
|
|
|
|
// ? null : _subtitle.requiredWord,
|
|
|
|
|
// textInputType: TextInputType.multiline,
|
|
|
|
|
// onSaved: (value){
|
|
|
|
|
// _serviceReport.faultDescriptionId = value;
|
|
|
|
|
// },
|
|
|
|
|
// ),
|
|
|
|
|
// const SizedBox(height: 8,),
|
|
|
|
|
// Row(
|
|
|
|
|
// children: [
|
|
|
|
|
// ASubTitle(_subtitle.workPreformed),
|
|
|
|
|
// Expanded(
|
|
|
|
|
// child: SizedBox(
|
|
|
|
|
// height: 32 * AppStyle.getScaleFactor(context),
|
|
|
|
|
// child: SpeechToTextButton(
|
|
|
|
|
// controller: _workPreformedController,
|
|
|
|
|
// mini: true,
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// const SizedBox(height: 4,),
|
|
|
|
|
// ATextFormField(
|
|
|
|
|
// initialValue: _serviceReport?.workPreformed,
|
|
|
|
|
// textAlign: TextAlign.center,
|
|
|
|
|
// controller: _workPreformedController,
|
|
|
|
|
// style: Theme.of(context).textTheme.subtitle1,
|
|
|
|
|
// validator: (value) =>
|
|
|
|
|
// Validator.hasValue(value)
|
|
|
|
|
// ? null : _subtitle.requiredWord,
|
|
|
|
|
// textInputType: TextInputType.multiline,
|
|
|
|
|
// onSaved: (value){
|
|
|
|
|
// _serviceReport.workPreformed = value;
|
|
|
|
|
// },
|
|
|
|
|
// ),
|
|
|
|
|
// const SizedBox(height: 8,),
|
|
|
|
|
|
|
|
|
|
const SizedBox(height: 8,),
|
|
|
|
|
Row(
|
|
|
|
|
@ -436,7 +450,7 @@ class _CreateServiceReportState extends State<CreateServiceReport> with TickerPr
|
|
|
|
|
image: _image,
|
|
|
|
|
onPick: (image){
|
|
|
|
|
_image =image;
|
|
|
|
|
_serviceReport.image = base64Encode(image.readAsBytesSync());
|
|
|
|
|
_serviceReport.image = "${image.path.split("/").last}|${base64Encode(image.readAsBytesSync())}";
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
@ -454,12 +468,18 @@ class _CreateServiceReportState extends State<CreateServiceReport> with TickerPr
|
|
|
|
|
children: [
|
|
|
|
|
ASubTitle(_subtitle.workingHours),
|
|
|
|
|
const SizedBox(height: 8,),
|
|
|
|
|
AppTimer(
|
|
|
|
|
timer: _serviceReport.timer,
|
|
|
|
|
onChange: (timer) async{
|
|
|
|
|
_serviceReport.timer = timer;
|
|
|
|
|
return true;
|
|
|
|
|
},
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: AppTimer(
|
|
|
|
|
timer: _serviceReport.timer,
|
|
|
|
|
onChange: (timer) async{
|
|
|
|
|
_serviceReport.timer = timer;
|
|
|
|
|
return true;
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
// ATextFormField(
|
|
|
|
|
// initialValue: _serviceReport?.workHours,
|
|
|
|
|
@ -477,79 +497,102 @@ class _CreateServiceReportState extends State<CreateServiceReport> with TickerPr
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
const SizedBox(width: 8,),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
ASubTitle(_subtitle.travelingHours),
|
|
|
|
|
const SizedBox(height: 4,),
|
|
|
|
|
ATextFormField(
|
|
|
|
|
initialValue: _serviceReport?.travelingHours,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
hintText: "i.e 3, 3.5, 4",
|
|
|
|
|
style: Theme.of(context).textTheme.subtitle1,
|
|
|
|
|
// validator: (value) =>
|
|
|
|
|
// Validator.isNumeric(value)
|
|
|
|
|
// ? null : _subtitle.requiredWord,
|
|
|
|
|
textInputType: TextInputType.number,
|
|
|
|
|
onSaved: (value){
|
|
|
|
|
_serviceReport.travelingHours = value;
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
const SizedBox(height: 8,),
|
|
|
|
|
// Operating Hours and Job Sheet Number
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
// const SizedBox(width: 8,),
|
|
|
|
|
// Expanded(
|
|
|
|
|
// child: Column(
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
// children: [
|
|
|
|
|
// ASubTitle(_subtitle.operatingHours),
|
|
|
|
|
// ASubTitle(_subtitle.travelingHours),
|
|
|
|
|
// const SizedBox(height: 4,),
|
|
|
|
|
// ATextFormField(
|
|
|
|
|
// initialValue: _serviceReport?.operatingHours,
|
|
|
|
|
// initialValue: _serviceReport?.travelingHours,
|
|
|
|
|
// textAlign: TextAlign.center,
|
|
|
|
|
// hintText: "i.e 3, 3.5, 4",
|
|
|
|
|
// style: Theme.of(context).textTheme.subtitle1,
|
|
|
|
|
// validator: (value) =>
|
|
|
|
|
// Validator.isNumeric(value)
|
|
|
|
|
// ? null : _subtitle.requiredWord,
|
|
|
|
|
// // validator: (value) =>
|
|
|
|
|
// // Validator.isNumeric(value)
|
|
|
|
|
// // ? null : _subtitle.requiredWord,
|
|
|
|
|
// textInputType: TextInputType.number,
|
|
|
|
|
// onSaved: (value){
|
|
|
|
|
// _serviceReport.operatingHours = value;
|
|
|
|
|
// _serviceReport.travelingHours = value;
|
|
|
|
|
// },
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// const SizedBox(width: 8,),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
ASubTitle(_subtitle.jobSheetNumber),
|
|
|
|
|
const SizedBox(height: 4,),
|
|
|
|
|
ATextFormField(
|
|
|
|
|
initialValue: _serviceReport?.jobSheetNumber,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
style: Theme.of(context).textTheme.subtitle1,
|
|
|
|
|
textInputType: TextInputType.name,
|
|
|
|
|
onSaved: (value){
|
|
|
|
|
_serviceReport.jobSheetNumber = value;
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
const SizedBox(height: 8,),
|
|
|
|
|
// Operating Hours and Job Sheet Number
|
|
|
|
|
// Row(
|
|
|
|
|
// children: [
|
|
|
|
|
// Expanded(
|
|
|
|
|
// child: Column(
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
// children: [
|
|
|
|
|
// ASubTitle(_subtitle.operatingHours),
|
|
|
|
|
// const SizedBox(height: 4,),
|
|
|
|
|
// ATextFormField(
|
|
|
|
|
// initialValue: _serviceReport?.operatingHours,
|
|
|
|
|
// textAlign: TextAlign.center,
|
|
|
|
|
// hintText: "i.e 3, 3.5, 4",
|
|
|
|
|
// style: Theme.of(context).textTheme.subtitle1,
|
|
|
|
|
// validator: (value) =>
|
|
|
|
|
// Validator.isNumeric(value)
|
|
|
|
|
// ? null : _subtitle.requiredWord,
|
|
|
|
|
// textInputType: TextInputType.number,
|
|
|
|
|
// onSaved: (value){
|
|
|
|
|
// _serviceReport.operatingHours = value;
|
|
|
|
|
// },
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// const SizedBox(width: 8,),
|
|
|
|
|
// Expanded(
|
|
|
|
|
// child: Column(
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
// children: [
|
|
|
|
|
// ASubTitle(_subtitle.jobSheetNumber),
|
|
|
|
|
// const SizedBox(height: 4,),
|
|
|
|
|
// ATextFormField(
|
|
|
|
|
// initialValue: _serviceReport?.jobSheetNumber,
|
|
|
|
|
// textAlign: TextAlign.center,
|
|
|
|
|
// style: Theme.of(context).textTheme.subtitle1,
|
|
|
|
|
// textInputType: TextInputType.name,
|
|
|
|
|
// onSaved: (value){
|
|
|
|
|
// _serviceReport.jobSheetNumber = value;
|
|
|
|
|
// },
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
//const SizedBox(height: 8,),
|
|
|
|
|
const SizedBox(height: 8,),
|
|
|
|
|
const ASubTitle("Nurse Signature"),
|
|
|
|
|
ESignature(
|
|
|
|
|
oldSignature: _serviceReport.signatureNurse,
|
|
|
|
|
newSignature: _serviceReport.localNurseSignature,
|
|
|
|
|
onChange: (signature){
|
|
|
|
|
if(signature == null || signature.isEmpty) {return;}
|
|
|
|
|
_serviceReport.localNurseSignature = signature;
|
|
|
|
|
_serviceReport.signatureNurse = "${DateTime.now().toIso8601String()}.png|${base64Encode(signature)}";
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
const SizedBox(height: 8,),
|
|
|
|
|
const ASubTitle("Engineer Signature"),
|
|
|
|
|
ESignature(
|
|
|
|
|
oldSignature: _serviceReport.signatureEngineer,
|
|
|
|
|
newSignature: _serviceReport.localNurseSignature,
|
|
|
|
|
onChange: (signature){
|
|
|
|
|
if(signature == null || signature.isEmpty) {return;}
|
|
|
|
|
_serviceReport.localNurseSignature = signature;
|
|
|
|
|
_serviceReport.signatureEngineer = "${DateTime.now().toIso8601String()}.png|${base64Encode(signature)}";
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
const SizedBox(height: 8,),
|
|
|
|
|
// Part Number and Quantity
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
@ -596,7 +639,6 @@ class _CreateServiceReportState extends State<CreateServiceReport> with TickerPr
|
|
|
|
|
}
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
const SizedBox(height: 16,),
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|