add shipment in processing, update package, processing and receiving
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
// ignore_for_file: deprecated_member_use
|
||||
|
||||
import 'package:fcs/domain/entities/user.dart';
|
||||
import 'package:fcs/helpers/theme.dart';
|
||||
import 'package:fcs/localization/app_translations.dart';
|
||||
import 'package:fcs/pages/main/model/language_model.dart';
|
||||
@@ -16,11 +19,11 @@ Future showMsgDialog(BuildContext context, String title, String msg) {
|
||||
context: context,
|
||||
builder: (_) {
|
||||
return AlertDialog(
|
||||
title: new Text(title),
|
||||
content: new Text(msg),
|
||||
title: Text(title),
|
||||
content: Text(msg),
|
||||
actions: <Widget>[
|
||||
new TextButton(
|
||||
child: new Text(
|
||||
TextButton(
|
||||
child: Text(
|
||||
"Close",
|
||||
style: TextStyle(color: primaryColor),
|
||||
),
|
||||
@@ -208,7 +211,7 @@ Widget getStatus(String status) {
|
||||
|
||||
call(BuildContext context, String phone) {
|
||||
showConfirmDialog(context, "contact.phone.confim", () => launch("tel:$phone"),
|
||||
translationVariables: ["$phone"]);
|
||||
translationVariables: [phone]);
|
||||
}
|
||||
|
||||
Widget nameWidget(String name) {
|
||||
@@ -297,7 +300,7 @@ Widget fcsDropDown(String label, IconData iconData,
|
||||
child: Icon(iconData),
|
||||
),
|
||||
Expanded(
|
||||
child: Container(
|
||||
child: SizedBox(
|
||||
height: 50.0,
|
||||
child: Row(children: <Widget>[
|
||||
Expanded(child: _dropDown()),
|
||||
@@ -393,7 +396,7 @@ bool hasUnicode(String text) {
|
||||
final int maxBits = 128;
|
||||
List<int> unicodeSymbols =
|
||||
text.codeUnits.where((ch) => ch > maxBits).toList();
|
||||
return unicodeSymbols.length > 0;
|
||||
return unicodeSymbols.isNotEmpty;
|
||||
}
|
||||
|
||||
String removeTrailingZeros(double number) {
|
||||
@@ -416,3 +419,94 @@ String capitalizeFirstLetter(String text) {
|
||||
if (text.isEmpty) return text;
|
||||
return text[0].toUpperCase() + text.substring(1);
|
||||
}
|
||||
|
||||
Widget userSearchBox(BuildContext context,
|
||||
{required String lableKey,
|
||||
IconData? icon,
|
||||
User? user,
|
||||
Function()? onSearch,
|
||||
MainAxisAlignment rowMainAxisAlignment = MainAxisAlignment.start}) {
|
||||
return Column(
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: rowMainAxisAlignment,
|
||||
children: <Widget>[
|
||||
Flexible(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(left: 2),
|
||||
child:
|
||||
LocalText(context, lableKey, color: labelColor, fontSize: 15),
|
||||
)),
|
||||
IconButton(
|
||||
icon: Icon(Icons.search, color: Colors.black),
|
||||
onPressed: onSearch),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
right: 15,
|
||||
),
|
||||
child: user != null && user.fcsID != ""
|
||||
? Icon(icon, color: primaryColor)
|
||||
: const SizedBox(),
|
||||
),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(user?.name ?? ''),
|
||||
Text(user?.fcsID ?? '',
|
||||
style: TextStyle(fontSize: 13, color: labelColor)),
|
||||
Text(user?.phoneNumber ?? '',
|
||||
style: TextStyle(fontSize: 13, color: labelColor))
|
||||
],
|
||||
))
|
||||
],
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget userDisplayBox(BuildContext context,
|
||||
{required String lableKey, IconData? icon, String? name, String? fcsID}) {
|
||||
return fcsID != null && fcsID != ""
|
||||
? Padding(
|
||||
padding: const EdgeInsets.only(top: 8.0, bottom: 8),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 15),
|
||||
child: Icon(icon, color: primaryColor)),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
LocalText(context, lableKey,
|
||||
color: Colors.black54, fontSize: 15),
|
||||
InkWell(
|
||||
onTap: null,
|
||||
child: Text(
|
||||
name ?? '',
|
||||
style: TextStyle(
|
||||
shadows: [
|
||||
Shadow(color: linkColor, offset: Offset(0, -2))
|
||||
],
|
||||
color: Colors.transparent,
|
||||
decoration: TextDecoration.underline,
|
||||
decorationColor: linkColor),
|
||||
),
|
||||
),
|
||||
Text(fcsID,
|
||||
style: TextStyle(fontSize: 13, color: labelColor))
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
: const SizedBox();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user