2020-10-07 14:42:07 +06:30
|
|
|
import 'package:fcs/domain/entities/fcs_shipment.dart';
|
2024-09-25 21:49:09 +06:30
|
|
|
import 'package:fcs/domain/entities/shipment_consignee.dart';
|
|
|
|
|
import 'package:fcs/domain/entities/shipment_port.dart';
|
2020-10-07 02:33:06 +06:30
|
|
|
import 'package:fcs/helpers/theme.dart';
|
|
|
|
|
import 'package:fcs/localization/app_translations.dart';
|
|
|
|
|
import 'package:fcs/pages/fcs_shipment/model/fcs_shipment_model.dart';
|
2020-10-07 18:19:12 +06:30
|
|
|
import 'package:fcs/pages/main/model/language_model.dart';
|
2020-10-08 03:32:52 +06:30
|
|
|
import 'package:fcs/pages/widgets/input_date.dart';
|
2020-10-07 18:19:12 +06:30
|
|
|
import 'package:fcs/pages/widgets/input_text.dart';
|
2024-01-25 17:40:35 +06:30
|
|
|
import 'package:fcs/pages/widgets/local_app_bar.dart';
|
2020-10-13 07:50:25 +06:30
|
|
|
import 'package:fcs/pages/widgets/local_button.dart';
|
2020-10-07 02:33:06 +06:30
|
|
|
import 'package:fcs/pages/widgets/progress.dart';
|
2020-10-08 03:32:52 +06:30
|
|
|
import 'package:flutter/material.dart';
|
2021-09-10 12:00:08 +06:30
|
|
|
import 'package:flutter_vector_icons/flutter_vector_icons.dart';
|
2020-06-01 14:24:45 +06:30
|
|
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
|
|
|
|
import 'package:intl/intl.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
2024-03-01 17:27:56 +06:30
|
|
|
import '../../domain/entities/shipment_type.dart';
|
2020-10-07 02:33:06 +06:30
|
|
|
import '../main/util.dart';
|
2020-06-01 14:24:45 +06:30
|
|
|
|
2020-10-07 02:33:06 +06:30
|
|
|
class FcsShipmentEditor extends StatefulWidget {
|
2021-09-10 12:00:08 +06:30
|
|
|
final FcsShipment? shipment;
|
2020-10-07 02:33:06 +06:30
|
|
|
FcsShipmentEditor({this.shipment});
|
2020-06-01 14:24:45 +06:30
|
|
|
|
|
|
|
|
@override
|
2020-10-07 02:33:06 +06:30
|
|
|
_FcsShipmentEditorState createState() => _FcsShipmentEditorState();
|
2020-06-01 14:24:45 +06:30
|
|
|
}
|
|
|
|
|
|
2020-10-07 02:33:06 +06:30
|
|
|
class _FcsShipmentEditorState extends State<FcsShipmentEditor> {
|
2024-02-19 17:06:36 +06:30
|
|
|
final _formKey = GlobalKey<FormState>();
|
2020-06-01 14:24:45 +06:30
|
|
|
var dateFormatter = new DateFormat('dd MMM yyyy');
|
|
|
|
|
TextEditingController _shipmentNumberController = new TextEditingController();
|
|
|
|
|
TextEditingController _cutoffDateController = new TextEditingController();
|
2024-09-25 21:49:09 +06:30
|
|
|
TextEditingController _etaDateController = new TextEditingController();
|
|
|
|
|
|
2020-06-01 14:24:45 +06:30
|
|
|
TextEditingController _statusController = new TextEditingController();
|
|
|
|
|
|
2020-10-07 14:42:07 +06:30
|
|
|
FcsShipment _shipment = new FcsShipment();
|
2020-06-01 14:24:45 +06:30
|
|
|
bool _isLoading = false;
|
2024-03-01 17:27:56 +06:30
|
|
|
ShipmentType? _currentShipmentType;
|
2024-09-25 21:49:09 +06:30
|
|
|
ShipmentConsignee? _currentConsignee;
|
|
|
|
|
ShipmentPort? _currentLoadingPort;
|
|
|
|
|
ShipmentPort? _currentDestination;
|
2020-10-08 03:32:52 +06:30
|
|
|
bool _isNew = false;
|
2020-06-01 14:24:45 +06:30
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
void initState() {
|
|
|
|
|
super.initState();
|
2020-10-08 03:32:52 +06:30
|
|
|
_isNew = widget.shipment == null;
|
2024-03-01 17:27:56 +06:30
|
|
|
var model = Provider.of<FcsShipmentModel>(context, listen: false);
|
2020-06-01 14:24:45 +06:30
|
|
|
if (widget.shipment != null) {
|
2021-09-10 12:00:08 +06:30
|
|
|
_shipment = widget.shipment!;
|
2021-09-10 15:23:13 +06:30
|
|
|
_shipmentNumberController.text = _shipment.shipmentNumber ?? "";
|
2024-01-25 17:40:35 +06:30
|
|
|
if (_shipment.cutoffDate != null)
|
|
|
|
|
_cutoffDateController.text =
|
|
|
|
|
dateFormatter.format(_shipment.cutoffDate!);
|
2024-09-25 21:49:09 +06:30
|
|
|
if (_shipment.etaDate != null)
|
|
|
|
|
_etaDateController.text = dateFormatter.format(_shipment.etaDate!);
|
|
|
|
|
|
2021-09-10 15:23:13 +06:30
|
|
|
_statusController.text = _shipment.status ?? "";
|
2024-03-01 17:27:56 +06:30
|
|
|
|
2024-09-25 21:49:09 +06:30
|
|
|
List<ShipmentType> shipmentTypes = model.shipmentTypes
|
2024-03-02 18:15:05 +06:30
|
|
|
.where((e) => e.id == _shipment.shipmentTypeId)
|
|
|
|
|
.toList();
|
2024-09-25 21:49:09 +06:30
|
|
|
_currentShipmentType =
|
|
|
|
|
shipmentTypes.isNotEmpty ? shipmentTypes.first : null;
|
|
|
|
|
|
|
|
|
|
List<ShipmentConsignee> shipmentConsingees = model.shipmentConsingees
|
|
|
|
|
.where((e) => e.id == _shipment.consigneeId)
|
|
|
|
|
.toList();
|
|
|
|
|
_currentConsignee =
|
|
|
|
|
shipmentConsingees.isNotEmpty ? shipmentConsingees.first : null;
|
|
|
|
|
|
|
|
|
|
List<ShipmentPort> loadingPorts = model.shipmentPorts
|
|
|
|
|
.where((e) => e.id == _shipment.loadingPortId)
|
|
|
|
|
.toList();
|
|
|
|
|
_currentLoadingPort = loadingPorts.isNotEmpty ? loadingPorts.first : null;
|
2024-03-02 18:15:05 +06:30
|
|
|
|
2024-09-25 21:49:09 +06:30
|
|
|
List<ShipmentPort> loadingDestination = model.shipmentPorts
|
|
|
|
|
.where((e) => e.id == _shipment.destinationPortId)
|
|
|
|
|
.toList();
|
|
|
|
|
_currentDestination =
|
|
|
|
|
loadingDestination.isNotEmpty ? loadingDestination.first : null;
|
2020-12-04 17:28:21 +06:30
|
|
|
} else {
|
2024-09-25 21:49:09 +06:30
|
|
|
_currentShipmentType = model.shipmentTypes.first;
|
|
|
|
|
_currentConsignee = model.shipmentConsingees.first;
|
|
|
|
|
_currentLoadingPort = model.shipmentPorts.first;
|
|
|
|
|
_currentDestination = model.shipmentPorts.first;
|
2020-06-01 14:24:45 +06:30
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
void dispose() {
|
|
|
|
|
super.dispose();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
2020-10-07 18:19:12 +06:30
|
|
|
var languageModel = Provider.of<LanguageModel>(context);
|
2024-09-25 21:49:09 +06:30
|
|
|
var shipmentModel = context.watch<FcsShipmentModel>();
|
|
|
|
|
List<ShipmentType> shipmentTypes = shipmentModel.shipmentTypes;
|
|
|
|
|
List<ShipmentConsignee> shipmentConsingees =
|
|
|
|
|
shipmentModel.shipmentConsingees;
|
|
|
|
|
List<ShipmentPort> shipmentPorts = shipmentModel.shipmentPorts;
|
|
|
|
|
|
|
|
|
|
final shipmentTypeBox = DropdownButtonFormField(
|
|
|
|
|
value: _currentShipmentType == "" ? null : _currentShipmentType,
|
|
|
|
|
decoration: InputDecoration(
|
|
|
|
|
contentPadding: EdgeInsets.zero,
|
|
|
|
|
enabledBorder:
|
|
|
|
|
UnderlineInputBorder(borderSide: BorderSide(color: primaryColor)),
|
|
|
|
|
focusedBorder:
|
|
|
|
|
UnderlineInputBorder(borderSide: BorderSide(color: primaryColor)),
|
|
|
|
|
fillColor: Colors.white,
|
|
|
|
|
labelStyle: languageModel.isEng
|
|
|
|
|
? newLabelStyle(color: Colors.black54, fontSize: 20)
|
|
|
|
|
: newLabelStyleMM(color: Colors.black54, fontSize: 20),
|
|
|
|
|
labelText:
|
|
|
|
|
AppTranslations.of(context)!.text('FCSshipment.shipment_type'),
|
|
|
|
|
icon: Icon(Ionicons.ios_airplane, color: primaryColor)),
|
|
|
|
|
items: shipmentTypes
|
|
|
|
|
.map((e) => DropdownMenuItem(child: Text(e.name), value: e))
|
|
|
|
|
.toList(),
|
|
|
|
|
onChanged: (selected) => {
|
|
|
|
|
setState(() {
|
|
|
|
|
_currentShipmentType = selected;
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
final consigneeBox = DropdownButtonFormField(
|
|
|
|
|
value: _currentConsignee == "" ? null : _currentConsignee,
|
|
|
|
|
decoration: InputDecoration(
|
|
|
|
|
contentPadding: EdgeInsets.zero,
|
|
|
|
|
enabledBorder:
|
|
|
|
|
UnderlineInputBorder(borderSide: BorderSide(color: primaryColor)),
|
|
|
|
|
focusedBorder:
|
|
|
|
|
UnderlineInputBorder(borderSide: BorderSide(color: primaryColor)),
|
|
|
|
|
fillColor: Colors.white,
|
|
|
|
|
labelStyle: languageModel.isEng
|
|
|
|
|
? newLabelStyle(color: Colors.black54, fontSize: 20)
|
|
|
|
|
: newLabelStyleMM(color: Colors.black54, fontSize: 20),
|
|
|
|
|
labelText: AppTranslations.of(context)!.text('FCSshipment.consignee'),
|
|
|
|
|
icon: Icon(Icons.work, color: primaryColor)),
|
|
|
|
|
items: shipmentConsingees
|
|
|
|
|
.map((e) => DropdownMenuItem(child: Text(e.name), value: e))
|
|
|
|
|
.toList(),
|
|
|
|
|
onChanged: (selected) => {
|
|
|
|
|
setState(() {
|
|
|
|
|
_currentConsignee = selected;
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
final loadingPortBox = DropdownButtonFormField(
|
|
|
|
|
value: _currentLoadingPort == "" ? null : _currentLoadingPort,
|
|
|
|
|
decoration: InputDecoration(
|
|
|
|
|
contentPadding: EdgeInsets.zero,
|
|
|
|
|
enabledBorder:
|
|
|
|
|
UnderlineInputBorder(borderSide: BorderSide(color: primaryColor)),
|
|
|
|
|
focusedBorder:
|
|
|
|
|
UnderlineInputBorder(borderSide: BorderSide(color: primaryColor)),
|
|
|
|
|
fillColor: Colors.white,
|
|
|
|
|
labelStyle: languageModel.isEng
|
|
|
|
|
? newLabelStyle(color: Colors.black54, fontSize: 20)
|
|
|
|
|
: newLabelStyleMM(color: Colors.black54, fontSize: 20),
|
|
|
|
|
labelText:
|
|
|
|
|
AppTranslations.of(context)!.text('FCSshipment.port_of_loading'),
|
|
|
|
|
icon: Icon(FontAwesomeIcons.ship, color: primaryColor)),
|
|
|
|
|
items: shipmentPorts
|
|
|
|
|
.map((e) => DropdownMenuItem(child: Text(e.name), value: e))
|
|
|
|
|
.toList(),
|
|
|
|
|
onChanged: (selected) => {
|
|
|
|
|
setState(() {
|
|
|
|
|
_currentLoadingPort = selected;
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
final destinationBox = DropdownButtonFormField(
|
|
|
|
|
value: _currentDestination == "" ? null : _currentDestination,
|
|
|
|
|
decoration: InputDecoration(
|
|
|
|
|
contentPadding: EdgeInsets.zero,
|
|
|
|
|
enabledBorder:
|
|
|
|
|
UnderlineInputBorder(borderSide: BorderSide(color: primaryColor)),
|
|
|
|
|
focusedBorder:
|
|
|
|
|
UnderlineInputBorder(borderSide: BorderSide(color: primaryColor)),
|
|
|
|
|
fillColor: Colors.white,
|
|
|
|
|
labelStyle: languageModel.isEng
|
|
|
|
|
? newLabelStyle(color: Colors.black54, fontSize: 20)
|
|
|
|
|
: newLabelStyleMM(color: Colors.black54, fontSize: 20),
|
|
|
|
|
labelText: AppTranslations.of(context)!
|
|
|
|
|
.text('FCSshipment.final_destination'),
|
|
|
|
|
icon:
|
|
|
|
|
Icon(MaterialCommunityIcons.location_enter, color: primaryColor)),
|
|
|
|
|
items: shipmentPorts
|
|
|
|
|
.map((e) => DropdownMenuItem(child: Text(e.name), value: e))
|
|
|
|
|
.toList(),
|
|
|
|
|
onChanged: (selected) => {
|
|
|
|
|
setState(() {
|
|
|
|
|
_currentDestination = selected;
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
);
|
2020-06-01 14:24:45 +06:30
|
|
|
|
2024-01-30 17:24:28 +06:30
|
|
|
final createBtn = Padding(
|
|
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 30),
|
|
|
|
|
child: LocalButton(
|
|
|
|
|
textKey: "FCSshipment.create",
|
|
|
|
|
callBack: _create,
|
|
|
|
|
),
|
2020-06-01 14:24:45 +06:30
|
|
|
);
|
|
|
|
|
|
2024-01-30 17:24:28 +06:30
|
|
|
final updateBtn = Padding(
|
|
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 30),
|
|
|
|
|
child: LocalButton(
|
|
|
|
|
textKey: "FCSshipment.update",
|
|
|
|
|
callBack: _update,
|
|
|
|
|
),
|
2020-06-01 14:24:45 +06:30
|
|
|
);
|
|
|
|
|
|
|
|
|
|
return LocalProgress(
|
|
|
|
|
inAsyncCall: _isLoading,
|
|
|
|
|
child: Scaffold(
|
2024-01-25 17:40:35 +06:30
|
|
|
appBar: LocalAppBar(
|
2024-01-30 17:24:28 +06:30
|
|
|
labelKey: _isNew ? "FCSshipment.add" : "FCSshipment.form.title",
|
2024-01-25 17:40:35 +06:30
|
|
|
backgroundColor: Colors.white,
|
|
|
|
|
labelColor: primaryColor,
|
|
|
|
|
arrowColor: primaryColor,
|
|
|
|
|
onBack: () {
|
2020-12-08 20:24:15 +06:30
|
|
|
if (isDataChanged()) {
|
|
|
|
|
showConfirmDialog(context, "back.button_confirm", () {
|
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
|
});
|
|
|
|
|
} else {
|
2020-12-04 17:28:21 +06:30
|
|
|
Navigator.of(context).pop();
|
2020-12-08 20:24:15 +06:30
|
|
|
}
|
2024-01-25 17:40:35 +06:30
|
|
|
}),
|
2024-02-19 17:06:36 +06:30
|
|
|
body: Form(
|
|
|
|
|
key: _formKey,
|
|
|
|
|
child: ListView(
|
|
|
|
|
padding: const EdgeInsets.only(left: 10, right: 10),
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
InputText(
|
|
|
|
|
labelTextKey: "FCSshipment.number",
|
|
|
|
|
iconData: Ionicons.ios_airplane,
|
|
|
|
|
controller: _shipmentNumberController,
|
2024-02-28 17:07:23 +06:30
|
|
|
autovalidateMode: AutovalidateMode.onUserInteraction,
|
2024-02-19 17:06:36 +06:30
|
|
|
validator: (value) {
|
|
|
|
|
if (value!.isEmpty) {
|
|
|
|
|
return "Enter shipment number";
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
InputDate(
|
|
|
|
|
labelTextKey: "FCSshipment.cutoff_date",
|
|
|
|
|
iconData: Icons.date_range,
|
|
|
|
|
controller: _cutoffDateController,
|
2024-02-28 17:07:23 +06:30
|
|
|
autovalidateMode: AutovalidateMode.onUserInteraction,
|
2024-02-19 17:06:36 +06:30
|
|
|
validator: (value) {
|
|
|
|
|
if (value!.isEmpty) {
|
|
|
|
|
return "Select cutoff date";
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
InputDate(
|
|
|
|
|
labelTextKey: "FCSshipment.ETA",
|
|
|
|
|
iconData: Icons.date_range,
|
2024-09-25 21:49:09 +06:30
|
|
|
controller: _etaDateController,
|
2024-02-28 17:07:23 +06:30
|
|
|
autovalidateMode: AutovalidateMode.onUserInteraction,
|
2024-02-19 17:06:36 +06:30
|
|
|
validator: (value) {
|
|
|
|
|
if (value!.isEmpty) {
|
|
|
|
|
return "Select ETA date";
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
},
|
|
|
|
|
),
|
2024-02-21 17:05:20 +06:30
|
|
|
const SizedBox(height: 20),
|
2024-09-25 21:49:09 +06:30
|
|
|
shipmentTypeBox,
|
|
|
|
|
const SizedBox(height: 25),
|
|
|
|
|
consigneeBox,
|
|
|
|
|
const SizedBox(height: 25),
|
|
|
|
|
loadingPortBox,
|
|
|
|
|
const SizedBox(height: 25),
|
|
|
|
|
destinationBox,
|
|
|
|
|
SizedBox(height: 30),
|
2024-02-19 17:06:36 +06:30
|
|
|
_isNew ? createBtn : updateBtn,
|
|
|
|
|
SizedBox(height: 15)
|
|
|
|
|
]),
|
|
|
|
|
),
|
2020-06-01 14:24:45 +06:30
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
2020-10-07 18:19:12 +06:30
|
|
|
|
2020-10-08 03:32:52 +06:30
|
|
|
FcsShipment _getPayload() {
|
|
|
|
|
FcsShipment fcsShipment = FcsShipment();
|
|
|
|
|
fcsShipment.id = _shipment.id;
|
|
|
|
|
fcsShipment.shipmentNumber = _shipmentNumberController.text;
|
2024-03-02 18:15:05 +06:30
|
|
|
fcsShipment.shipmentTypeId = _currentShipmentType?.id ?? "";
|
2024-09-25 21:49:09 +06:30
|
|
|
fcsShipment.consigneeId = _currentConsignee?.id ?? "";
|
|
|
|
|
fcsShipment.loadingPortId = _currentLoadingPort?.id ?? "";
|
|
|
|
|
fcsShipment.destinationPortId = _currentDestination?.id ?? "";
|
2020-10-08 03:32:52 +06:30
|
|
|
|
2024-02-19 17:06:36 +06:30
|
|
|
var cutoffDate = _cutoffDateController.text;
|
2024-09-25 21:49:09 +06:30
|
|
|
var etaDate = _etaDateController.text;
|
2024-02-19 17:06:36 +06:30
|
|
|
fcsShipment.cutoffDate =
|
|
|
|
|
(cutoffDate == "" ? null : dateFormatter.parse(cutoffDate))!;
|
2024-09-25 21:49:09 +06:30
|
|
|
fcsShipment.etaDate = (etaDate == "" ? null : dateFormatter.parse(etaDate));
|
2024-02-19 17:06:36 +06:30
|
|
|
return fcsShipment;
|
2020-10-08 03:32:52 +06:30
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future<void> _create() async {
|
2024-02-19 17:06:36 +06:30
|
|
|
if (!_formKey.currentState!.validate()) return;
|
2020-10-08 03:32:52 +06:30
|
|
|
FcsShipment fcsShipment = _getPayload();
|
2024-02-19 17:06:36 +06:30
|
|
|
|
2020-10-08 03:32:52 +06:30
|
|
|
setState(() {
|
|
|
|
|
_isLoading = true;
|
|
|
|
|
});
|
|
|
|
|
try {
|
2024-03-02 18:15:05 +06:30
|
|
|
await context.read<FcsShipmentModel>().create(fcsShipment);
|
2020-10-08 03:32:52 +06:30
|
|
|
Navigator.pop(context);
|
|
|
|
|
} catch (e) {
|
|
|
|
|
showMsgDialog(context, "Error", e.toString());
|
|
|
|
|
} finally {
|
|
|
|
|
setState(() {
|
|
|
|
|
_isLoading = false;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future<void> _update() async {
|
2024-02-19 17:06:36 +06:30
|
|
|
if (!_formKey.currentState!.validate()) return;
|
2020-10-08 03:32:52 +06:30
|
|
|
FcsShipment fcsShipment = _getPayload();
|
2024-02-19 17:06:36 +06:30
|
|
|
|
2020-10-08 03:32:52 +06:30
|
|
|
setState(() {
|
|
|
|
|
_isLoading = true;
|
|
|
|
|
});
|
2024-03-02 18:15:05 +06:30
|
|
|
|
2020-10-08 03:32:52 +06:30
|
|
|
try {
|
2024-03-02 18:15:05 +06:30
|
|
|
await context.read<FcsShipmentModel>().update(fcsShipment);
|
2020-10-19 14:02:34 +06:30
|
|
|
Navigator.pop(context, true);
|
2020-10-08 03:32:52 +06:30
|
|
|
} catch (e) {
|
|
|
|
|
showMsgDialog(context, "Error", e.toString());
|
|
|
|
|
} finally {
|
|
|
|
|
setState(() {
|
|
|
|
|
_isLoading = false;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-12-08 20:24:15 +06:30
|
|
|
|
|
|
|
|
isDataChanged() {
|
|
|
|
|
if (_isNew) {
|
2024-03-01 17:27:56 +06:30
|
|
|
var shipmentModel = Provider.of<FcsShipmentModel>(context, listen: false);
|
2020-12-08 20:24:15 +06:30
|
|
|
return _shipmentNumberController.text != "" ||
|
|
|
|
|
_cutoffDateController.text != "" ||
|
2024-09-25 21:49:09 +06:30
|
|
|
_etaDateController.text != "" ||
|
|
|
|
|
_currentConsignee != shipmentModel.shipmentConsingees.first ||
|
|
|
|
|
_currentShipmentType != shipmentModel.shipmentTypes.first ||
|
|
|
|
|
_currentLoadingPort != shipmentModel.shipmentPorts.first ||
|
|
|
|
|
_currentDestination != shipmentModel.shipmentPorts.first;
|
2020-12-08 20:24:15 +06:30
|
|
|
} else {
|
|
|
|
|
FcsShipment fcsShipment = _getPayload();
|
2021-09-10 12:00:08 +06:30
|
|
|
return widget.shipment!.isChangedForEdit(fcsShipment);
|
2020-12-08 20:24:15 +06:30
|
|
|
}
|
|
|
|
|
}
|
2020-06-01 14:24:45 +06:30
|
|
|
}
|