some changes

main_design2.0
nextwo 3 years ago
parent b40727b920
commit c393f29829

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

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

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

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

@ -74,6 +74,7 @@ class VisitDetailsPage extends StatelessWidget {
MaterialButton( MaterialButton(
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
onPressed: () { onPressed: () {
if(visit.images.first != null)
Navigator.of(context).push(MaterialPageRoute( Navigator.of(context).push(MaterialPageRoute(
builder: (_) => Scaffold( builder: (_) => Scaffold(
body: InteractiveViewer( body: InteractiveViewer(
@ -115,6 +116,10 @@ class VisitDetailsPage extends StatelessWidget {
title: "Asset Number", title: "Asset Number",
info: visit.deviceNumber, info: visit.deviceNumber,
), ),
RequestInfoRow(
title: _subtitle.deviceName,
content: visit.deviceEnglishName,
),
RequestInfoRow( RequestInfoRow(
title: _subtitle.deviceSN, title: _subtitle.deviceSN,
info: visit.deviceSerialNumber, info: visit.deviceSerialNumber,
@ -156,10 +161,6 @@ class VisitDetailsPage extends StatelessWidget {
title: _subtitle.hospital, title: _subtitle.hospital,
content: visit.hospitalName, 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 { class DeviceTransferInfoSection extends StatelessWidget {
final DeviceTransferInfo info; final DeviceTransferInfo info;
final bool isSender;
final VoidCallback onEdit; 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 @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -25,7 +26,7 @@ class DeviceTransferInfoSection extends StatelessWidget {
info: info.department.name, info: info.department.name,
), ),
RequestInfoRow( RequestInfoRow(
title: subtitle.engineerName, title: isSender? "Sender Name " : "Receiver Name",
info: info.userName, info: info.userName,
), ),
RequestInfoRow( RequestInfoRow(
@ -41,7 +42,7 @@ class DeviceTransferInfoSection extends StatelessWidget {
info: info.comment, info: info.comment,
), ),
RequestInfoRow( RequestInfoRow(
title: "Assigned FE", title: "Assigned Engineer",
info: info.assignedEmployeeName, info: info.assignedEmployeeName,
), ),
RequestInfoRow( RequestInfoRow(

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

@ -90,6 +90,25 @@ class _ServiceRequestsSearchDialogState extends State<ServiceRequestsSearchDialo
SizedBox( SizedBox(
height: 8.0 * AppStyle.getScaleFactor(context), 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( ATextFormField(
initialValue: _search.deviceSerialNumber, initialValue: _search.deviceSerialNumber,
hintText: _subtitle.serialNumber, 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( ATextFormField(
initialValue: _search.deviceSerialNumber, initialValue: _search.deviceSerialNumber,
hintText: _subtitle.serialNumber, hintText: _subtitle.serialNumber,

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

Loading…
Cancel
Save