some changes

main_design2.0
nextwo 2 years ago
parent b40727b920
commit c393f29829

@ -73,7 +73,7 @@
"deviceImages": "Asset Images",
"deviceModel": "Asset Model",
"deviceRequired": "Asset Required",
"deviceSN": "Asset SN",
"deviceSN": "Asset Serial Number",
"engineerName": "Engineer Name",
"engineerPhone": "Engineer Phone",
"facebook": "facebook",

@ -3,6 +3,8 @@ import 'package:test_sa/models/lookup.dart';
class VisitsSearch {
String deviceSerialNumber;
String deviceName;
String deviceNumber;
Hospital hospital;
String brand;
Lookup model;
@ -24,6 +26,8 @@ class VisitsSearch {
this.contactStatus,
this.expectedDateFrom,
this.expectedDateTo,
this.deviceNumber,
this.deviceName
});
fromSearch(VisitsSearch newSearch) {
@ -37,6 +41,8 @@ class VisitsSearch {
expectedDateFrom = newSearch.expectedDateFrom;
expectedDateTo = newSearch.expectedDateTo;
statusValue = newSearch.statusValue;
deviceNumber=newSearch.deviceNumber;
deviceName=newSearch.deviceName;
}
Map<String, dynamic> toMap() {

@ -149,6 +149,7 @@ class _DeviceTransferDetailsState extends State<DeviceTransferDetails> {
const SizedBox(height: 12),
DeviceTransferInfoSection(
info: widget.model.sender,
isSender: true,
),
const SizedBox(height: 8),
Row(
@ -173,6 +174,7 @@ class _DeviceTransferDetailsState extends State<DeviceTransferDetails> {
const SizedBox(height: 12),
DeviceTransferInfoSection(
info: widget.model.receiver,
isSender: false,
),
],
),

@ -186,7 +186,7 @@ class RequestDetailsPage extends StatelessWidget {
padding: EdgeInsets.symmetric(horizontal: 16),
children: [
RequestInfoRow(
title: _subtitle.code,
title: _subtitle.callId,
info: serviceRequest.requestCode,
),
RequestInfoRow(

@ -74,6 +74,7 @@ class VisitDetailsPage extends StatelessWidget {
MaterialButton(
padding: EdgeInsets.zero,
onPressed: () {
if(visit.images.first != null)
Navigator.of(context).push(MaterialPageRoute(
builder: (_) => Scaffold(
body: InteractiveViewer(
@ -115,6 +116,10 @@ class VisitDetailsPage extends StatelessWidget {
title: "Asset Number",
info: visit.deviceNumber,
),
RequestInfoRow(
title: _subtitle.deviceName,
content: visit.deviceEnglishName,
),
RequestInfoRow(
title: _subtitle.deviceSN,
info: visit.deviceSerialNumber,
@ -156,10 +161,6 @@ class VisitDetailsPage extends StatelessWidget {
title: _subtitle.hospital,
content: visit.hospitalName,
),
RequestInfoRow(
title: _subtitle.deviceName,
content: visit.deviceEnglishName,
),
],
),
),

@ -8,8 +8,9 @@ import 'package:test_sa/views/widgets/requests/request_status.dart';
class DeviceTransferInfoSection extends StatelessWidget {
final DeviceTransferInfo info;
final bool isSender;
final VoidCallback onEdit;
const DeviceTransferInfoSection({Key key, this.info, this.onEdit}) : super(key: key);
const DeviceTransferInfoSection({Key key, this.info, this.onEdit, this.isSender}) : super(key: key);
@override
Widget build(BuildContext context) {
@ -25,7 +26,7 @@ class DeviceTransferInfoSection extends StatelessWidget {
info: info.department.name,
),
RequestInfoRow(
title: subtitle.engineerName,
title: isSender? "Sender Name " : "Receiver Name",
info: info.userName,
),
RequestInfoRow(
@ -41,7 +42,7 @@ class DeviceTransferInfoSection extends StatelessWidget {
info: info.comment,
),
RequestInfoRow(
title: "Assigned FE",
title: "Assigned Engineer",
info: info.assignedEmployeeName,
),
RequestInfoRow(

@ -133,6 +133,13 @@ class ServiceRequestItem extends StatelessWidget {
Divider(
color: onItemColor,
),
Text(
request.deviceNumber,
style: Theme.of(context).textTheme.subtitle2.copyWith(color: onItemColor, fontSize: 12, fontWeight: FontWeight.normal),
),
Divider(
color: onItemColor,
),
Row(
children: [
Expanded(

@ -90,6 +90,25 @@ class _ServiceRequestsSearchDialogState extends State<ServiceRequestsSearchDialo
SizedBox(
height: 8.0 * AppStyle.getScaleFactor(context),
),
ATextFormField(
initialValue: _search.deviceNumber,
hintText: _subtitle.assetNumber,
style: Theme.of(context).textTheme.headline6,
textInputAction: TextInputAction.search,
onAction: () {
if (!_formKey.currentState.validate()) {
return;
}
_formKey.currentState.save();
Navigator.of(context).pop(_search);
},
onSaved: (value) {
_search.deviceNumber = value;
},
),
SizedBox(
height: 8.0 * AppStyle.getScaleFactor(context),
),
ATextFormField(
initialValue: _search.deviceSerialNumber,
hintText: _subtitle.serialNumber,

@ -90,6 +90,47 @@ class _VisitsSearchDialogState extends State<VisitsSearchDialog> with TickerProv
)
],
),
SizedBox(
height: 8.0 * AppStyle.getScaleFactor(context),
),
ATextFormField(
initialValue: _search.deviceNumber,
hintText: _subtitle.assetNumber,
style: Theme.of(context).textTheme.headline6,
textInputAction: TextInputAction.search,
onAction: () {
if (!_formKey.currentState.validate()) {
return;
}
_formKey.currentState.save();
Navigator.of(context).pop(_search);
},
onSaved: (value) {
_search.deviceNumber = value;
},
),
SizedBox(
height: 8.0 * AppStyle.getScaleFactor(context),
),
ATextFormField(
initialValue: _search.deviceName,
hintText: _subtitle.assetName,
style: Theme.of(context).textTheme.headline6,
textInputAction: TextInputAction.search,
onAction: () {
if (!_formKey.currentState.validate()) {
return;
}
_formKey.currentState.save();
Navigator.of(context).pop(_search);
},
onSaved: (value) {
_search.deviceName = value;
},
),
SizedBox(
height: 8.0 * AppStyle.getScaleFactor(context),
),
ATextFormField(
initialValue: _search.deviceSerialNumber,
hintText: _subtitle.serialNumber,

@ -82,6 +82,16 @@ class VisitItem extends StatelessWidget {
Divider(
color: onItemColor,
),
Text(
visit.deviceNumber ?? "",
style: Theme.of(context).textTheme.subtitle1.copyWith(
color: onItemColor,
fontSize: 14,
),
),
Divider(
color: onItemColor,
),
Row(
children: [
Expanded(

Loading…
Cancel
Save