Merge branch 'master' of tzw/fcs into master

This commit is contained in:
2021-10-12 13:39:20 +00:00
committed by Gogs
5 changed files with 19 additions and 10 deletions

View File

@@ -25,6 +25,7 @@ class RateDataProvider {
.doc(rate_doc_id) .doc(rate_doc_id)
.snapshots(); .snapshots();
await for (var snap in snapshot) { await for (var snap in snapshot) {
print(snap.data());
Rate rate = Rate.fromMap(snap.data() as Map<String, dynamic>); Rate rate = Rate.fromMap(snap.data() as Map<String, dynamic>);
yield rate; yield rate;
} }

View File

@@ -44,7 +44,7 @@ class _DeliveryAddressEditorState extends State<DeliveryAddressEditor> {
_address2Controller.text = _deliveryAddress.addressLine2 ?? ""; _address2Controller.text = _deliveryAddress.addressLine2 ?? "";
_cityController.text = _deliveryAddress.city ?? ""; _cityController.text = _deliveryAddress.city ?? "";
_stateController.text = _deliveryAddress.state ?? ""; _stateController.text = _deliveryAddress.state ?? "";
_phoneController.text = _deliveryAddress.phoneNumber?? ""; _phoneController.text = _deliveryAddress.phoneNumber ?? "";
} else { } else {
_cityController.text = "Yangon"; _cityController.text = "Yangon";
_stateController.text = "Yangon"; _stateController.text = "Yangon";
@@ -123,7 +123,9 @@ class _DeliveryAddressEditorState extends State<DeliveryAddressEditor> {
title: LocalText(context, 'delivery_address', title: LocalText(context, 'delivery_address',
color: primaryColor, fontSize: 18), color: primaryColor, fontSize: 18),
actions: [ actions: [
IconButton( _isNew
? Container()
: IconButton(
icon: Icon( icon: Icon(
Icons.delete, Icons.delete,
color: primaryColor, color: primaryColor,

View File

@@ -43,7 +43,7 @@ class FcsShipmentModel extends BaseModel {
} }
Future<void> _loadFcsShipments() async { Future<void> _loadFcsShipments() async {
if (user == null || !user!.hasFcsShipments()) throw "No Privilege"; if (user == null || !user!.hasFcsShipments()) return;
String path = "/$fcs_shipment_collection/"; String path = "/$fcs_shipment_collection/";
if (listener != null) listener!.cancel(); if (listener != null) listener!.cancel();
_fcsShipments = []; _fcsShipments = [];

View File

@@ -33,7 +33,7 @@ class StaffModel extends BaseModel {
} }
Future<void> _loadEmployees() async { Future<void> _loadEmployees() async {
if (user == null || !user!.hasStaffs()) throw "No Privilege"; if (user == null || !user!.hasStaffs()) return;
try { try {
if (listener != null) listener!.cancel(); if (listener != null) listener!.cancel();

View File

@@ -90,7 +90,13 @@ class _TermEditState extends State<TermEdit> {
], ],
bottom: TabBar( bottom: TabBar(
onTap: (index) { onTap: (index) {
// Tab index when user select it, it start from zero if (index == 0) {
_focusNodeEng = new FocusNode();
FocusScope.of(context).requestFocus(_focusNodeEng);
} else {
_focusNodeMm = new FocusNode();
FocusScope.of(context).requestFocus(_focusNodeMm);
}
}, },
tabs: [ tabs: [
Tab( Tab(