room model & gas refill request number added.

main_design2.0
Sikander Saleem 2 years ago
parent 2932796068
commit 4d0b18b5a8

@ -16,7 +16,7 @@ class AssetTransfer {
this.destBuildingId,
this.destFloorId,
this.destDepartmentId,
this.destRoom,
this.destRoomId,
this.senderSiteId,
this.senderBuildingId,
this.senderFloorId,
@ -80,7 +80,7 @@ class AssetTransfer {
destBuildingId = json['destBuildingId'];
destFloorId = json['destFloorId'];
destDepartmentId = json['destDepartmentId'];
destRoom = json['destRoom'];
destRoomId = json['destRoomId'];
senderSiteId = json['senderSiteId'];
senderBuildingId = json['senderBuildingId'];
senderFloorId = json['senderFloorId'];
@ -172,7 +172,7 @@ class AssetTransfer {
num destBuildingId;
num destFloorId;
num destDepartmentId;
num destRoom;
num destRoomId;
num senderSiteId;
num senderBuildingId;
num senderFloorId;
@ -228,7 +228,7 @@ class AssetTransfer {
num destBuildingId,
num destFloorId,
num destDepartmentId,
String destRoom,
String destRoomId,
num senderSiteId,
num senderBuildingId,
num senderFloorId,
@ -292,7 +292,7 @@ class AssetTransfer {
destBuildingId: destBuildingId ?? this.destBuildingId,
destFloorId: destFloorId ?? this.destFloorId,
destDepartmentId: destDepartmentId ?? this.destDepartmentId,
destRoom: destRoom ?? this.destRoom,
destRoomId: destRoomId ?? this.destRoomId,
senderSiteId: senderSiteId ?? this.senderSiteId,
senderBuildingId: senderBuildingId ?? this.senderBuildingId,
senderFloorId: senderFloorId ?? this.senderFloorId,
@ -356,7 +356,7 @@ class AssetTransfer {
map['destBuildingId'] = destBuildingId;
map['destFloorId'] = destFloorId;
map['destDepartmentId'] = destDepartmentId;
map['destRoom'] = destRoom;
map['destRoomId'] = destRoomId;
map['senderSiteId'] = senderSiteId;
map['senderBuildingId'] = senderBuildingId;
map['senderFloorId'] = senderFloorId;
@ -424,7 +424,7 @@ class AssetTransfer {
map['destBuildingId'] = destBuildingId;
map['destFloorId'] = destFloorId;
map['destDepartmentId'] = destDepartmentId;
map['destRoom'] = destRoom;
map['destRoomId'] = destRoomId;
map['senderSiteId'] = asset?.site?.id;
map['senderBuildingId'] = asset?.building?.id;
map['senderFloorId'] = asset?.floor?.id;
@ -466,7 +466,7 @@ class AssetTransfer {
destBuildingId = assetTransfer.destBuildingId;
destFloorId = assetTransfer.destFloorId;
destDepartmentId = assetTransfer.destDepartmentId;
destRoom = assetTransfer.destRoom;
destRoomId = assetTransfer.destRoomId;
senderSiteId = assetTransfer.senderSiteId;
senderBuildingId = assetTransfer.senderBuildingId;
senderFloorId = assetTransfer.senderFloorId;

@ -18,7 +18,7 @@ class AssetTransferSearch extends AssetTransfer {
map['destBuildingId'] = destBuildingId;
map['destFloorId'] = destFloorId;
map['destDepartmentId'] = destDepartmentId;
map['destRoom'] = destRoom;
map['destRoomId'] = destRoomId;
map['senderSiteId'] = senderSiteId;
map['senderBuildingId'] = senderBuildingId;
map['senderFloorId'] = senderFloorId;

@ -2,25 +2,47 @@ import 'package:test_sa/models/base.dart';
class Rooms extends Base {
int id;
int departmentId;
int clientRoomId;
String roomName;
String name;
int value;
Rooms({this.id, this.departmentId, this.clientRoomId, this.roomName});
Rooms({this.id, this.name, this.value});
Rooms.fromJson(Map<String, dynamic> json) {
id = json['id'];
departmentId = json['departmentId'];
clientRoomId = json['clientRoomId'];
roomName = json['roomName'];
name = json['name'];
value = json['value'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['departmentId'] = this.departmentId;
data['clientRoomId'] = this.clientRoomId;
data['roomName'] = this.roomName;
data['name'] = this.name;
data['value'] = this.value;
return data;
}
}
//
// class Rooms extends Base {
// int id;
// int departmentId;
// int clientRoomId;
// String roomName;
//
// Rooms({this.id, this.departmentId, this.clientRoomId, this.roomName});
//
// Rooms.fromJson(Map<String, dynamic> json) {
// id = json['id'];
// departmentId = json['departmentId'];
// clientRoomId = json['clientRoomId'];
// roomName = json['roomName'];
// }
//
// Map<String, dynamic> toJson() {
// final Map<String, dynamic> data = new Map<String, dynamic>();
// data['id'] = this.id;
// data['departmentId'] = this.departmentId;
// data['clientRoomId'] = this.clientRoomId;
// data['roomName'] = this.roomName;
// return data;
// }
// }

@ -56,7 +56,7 @@ class _RequestDeviceTransferState extends State<RequestDeviceTransfer> {
_transferModel.destBuildingId = _assetDestination.building?.id;
_transferModel.destFloorId = _assetDestination.floor?.id;
_transferModel.destDepartmentId = _assetDestination.department?.id;
_transferModel.destRoom = _assetDestination.room?.clientRoomId;
_transferModel.destRoomId = _assetDestination.room?.id;
if (!_formKey.currentState.validate() || !(await _transferModel.validate(context))) {
return;
}
@ -158,6 +158,8 @@ class _RequestDeviceTransferState extends State<RequestDeviceTransfer> {
staticData: _assetDestination?.floor?.departments ?? [],
onSelect: (value) {
_assetDestination?.department = value;
_assetDestination?.room = null;
setState(() {});
},
),
8.height,
@ -169,7 +171,7 @@ class _RequestDeviceTransferState extends State<RequestDeviceTransfer> {
staticData: _assetDestination?.department?.rooms ?? [],
onSelect: (value) {
_assetDestination?.room = value;
_transferModel.destRoom = value.clientRoomId;
setState(() {});
},
),
8.height,

@ -107,6 +107,7 @@ class _GasRefillDetailsPageState extends State<GasRefillDetailsPage> {
8.height,
context.translation.gasRefillRequest.heading5(context),
8.height,
'${context.translation.requestNo}: ${gasRefillModel.gazRefillNo}'.bodyText(context),
'${context.translation.gasRequest}: ${gasRefillModel.gazRefillDetails[0].gasType?.name}'.bodyText(context),
'${context.translation.cylinderSize}: ${gasRefillModel.gazRefillDetails[0].cylinderSize?.name}'.bodyText(context),
'${context.translation.site}: ${gasRefillModel.site?.name?.cleanupWhitespace?.capitalizeFirstOfEach}'.bodyText(context),

Loading…
Cancel
Save