diff --git a/assets/locale/ru-RU.json b/assets/locale/ru-RU.json index 15bf430..6d2505e 100644 --- a/assets/locale/ru-RU.json +++ b/assets/locale/ru-RU.json @@ -26,7 +26,7 @@ "order": "Заказ", "order_info": "Информация о заказе", "route": "Маршруте", - "order_status": "Груз", + "order_status": "Статус", "order_carrier": "Автомашина №", "order_shop": "Магазин №", "order_from": "Откуда", @@ -50,5 +50,6 @@ "image_preview": "Предварительный просмотр", "error_message": "Что-то пошло не так. Пожалуйста, попробуйте еще раз.", "follow_orders_banner": "Отслеживайте ваш груз 24/7", - "order_empty": "У вас пока нет заказов" + "order_empty": "У вас пока нет заказов", + "deliver_all": "Довезём всё!" } diff --git a/assets/locale/tr-TR.json b/assets/locale/tr-TR.json index a9be830..f46f1b5 100644 --- a/assets/locale/tr-TR.json +++ b/assets/locale/tr-TR.json @@ -26,7 +26,7 @@ "order": "Sargyt", "order_info": "Sargyt barada maglumat", "route": "Gatnaw ýoly", - "order_status": "Ýük", + "order_status": "Ýagdaýy", "order_carrier": "Awtoulag №", "order_shop": "Dükan №", "order_from": "Nireden ugradyldy", @@ -50,5 +50,6 @@ "image_preview": "Surat", "error_message": "Näsazlyk ýüze çykdy. Täzeden synanşyp görmegiňizi haýyş edýäris.", "follow_orders_banner": "Ýükiňizi 24 sagadyň dowamynda yzarlamak indi elýeterli", - "order_empty": "Siziň entäk sargydyňyz ýok" + "order_empty": "Siziň entäk sargydyňyz ýok", + "deliver_all": "Ähli zady eltip bereris!" } diff --git a/assets/logo/logo_login.png b/assets/logo/logo_login.png new file mode 100644 index 0000000..6283625 Binary files /dev/null and b/assets/logo/logo_login.png differ diff --git a/lib/core/constants/api.dart b/lib/core/constants/api.dart index bb6b4dd..a7be013 100644 --- a/lib/core/constants/api.dart +++ b/lib/core/constants/api.dart @@ -1,5 +1,6 @@ -// const String baseUrl = 'https://192.168.99.64:5001/api'; -const String baseUrl = 'https://cargo.tpsadvertising.com/api'; -const String imageUrl = 'https://cargo.tpsadvertising.com'; +const String baseUrl = 'https://192.168.99.64:5001/api'; +// const String baseUrl = 'https://cargo.tpsadvertising.com/api'; +// const String imageUrl = 'https://cargo.tpsadvertising.com'; +const String imageUrl = 'https://192.168.99.64:5001'; const String defaultApiKey = ''; const String defaultSources = ''; diff --git a/lib/core/constants/assets.dart b/lib/core/constants/assets.dart index 906eaea..8907fa3 100644 --- a/lib/core/constants/assets.dart +++ b/lib/core/constants/assets.dart @@ -7,6 +7,7 @@ sealed class AppAssets { ///png static const String logoPng = 'assets/logo/logo.png'; static const String logoTransparent = 'assets/logo/logo_transparent.png'; + static const String logoLogin = 'assets/logo/logo_login.png'; static const String boxesPng = 'assets/images/boxes.png'; static const String trucksPng = 'assets/images/trucks.png'; static const String header = 'assets/images/header.png'; diff --git a/lib/data/models/order/order_model.dart b/lib/data/models/order/order_model.dart index 33ab80f..98bf376 100644 --- a/lib/data/models/order/order_model.dart +++ b/lib/data/models/order/order_model.dart @@ -17,18 +17,21 @@ class OrderModel extends OrderEntity { required super.from, required super.to, required super.departedAt, - required super.arrivedAt, - required super.depth, - required super.width, - required super.height, - required super.image1, - required super.image2, - required super.image3, + // required super.arrivedAt, + // required super.depth, + // required super.width, + // required super.height, + // required super.image1, + // required super.image2, + // required super.image3, + required super.cargoState, + required super.invoice, + required super.image, }); // Factory method to create an instance of CargoEntity from JSON factory OrderModel.fromJson(Map json) { DateTime? departedAt = json['DepartedAt'] != null ? DateTime.parse(json['DepartedAt']) : null; - DateTime? arrivedAt = json['ArrivedAt'] != null ? DateTime.parse(json['ArrivedAt']) : null; + // DateTime? arrivedAt = json['ArrivedAt'] != null ? DateTime.parse(json['ArrivedAt']) : null; return OrderModel( oid: json['Oid'], clientId: json['ClientId'], @@ -43,13 +46,16 @@ class OrderModel extends OrderEntity { from: json['From'] ?? '', to: json['To'] ?? '', departedAt: DateUtil.formatDateTimeToDDMMYYYY(departedAt), - arrivedAt: DateUtil.formatDateTimeToDDMMYYYY(arrivedAt), - depth: json['Depth'].toDouble(), - width: json['Width'].toDouble(), - height: json['Height'].toDouble(), - image1: json['Image1'] ?? '', - image2: json['Image2'] ?? '', - image3: json['Image3'] ?? '', + // arrivedAt: DateUtil.formatDateTimeToDDMMYYYY(arrivedAt), + // depth: json['Depth'].toDouble(), + // width: json['Width'].toDouble(), + // height: json['Height'].toDouble(), + // image1: json['Image1'] ?? '', + // image2: json['Image2'] ?? '', + // image3: json['Image3'] ?? '', + cargoState: json['CargoState'], + invoice: json['Invoice'], + image: json['Image'], ); } diff --git a/lib/domain/entities/order/order.dart b/lib/domain/entities/order/order.dart index 6d328a0..715ff50 100644 --- a/lib/domain/entities/order/order.dart +++ b/lib/domain/entities/order/order.dart @@ -5,6 +5,7 @@ class OrderEntity extends Equatable { final String clientId; final String cargoId; final String state; + final String cargoState; final String no; final String name; final String shopNo; @@ -14,19 +15,22 @@ class OrderEntity extends Equatable { final String from; final String to; final String departedAt; - final String arrivedAt; - final double depth; - final double width; - final double height; - final String image1; - final String image2; - final String image3; + // final String arrivedAt; + // final double depth; + // final double width; + // final double height; + // final String image1; + // final String image2; + // final String image3; + final String invoice; + final String image; const OrderEntity({ required this.oid, required this.clientId, required this.cargoId, required this.state, + required this.cargoState, required this.no, required this.name, required this.shopNo, @@ -36,13 +40,15 @@ class OrderEntity extends Equatable { required this.from, required this.to, required this.departedAt, - required this.arrivedAt, - required this.depth, - required this.width, - required this.height, - required this.image1, - required this.image2, - required this.image3, + // required this.arrivedAt, + // required this.depth, + // required this.width, + // required this.height, + // required this.image1, + // required this.image2, + // required this.image3, + required this.invoice, + required this.image, }); @override diff --git a/lib/presentation/screens/login.dart b/lib/presentation/screens/login.dart index 7a9a5ca..137f393 100644 --- a/lib/presentation/screens/login.dart +++ b/lib/presentation/screens/login.dart @@ -58,18 +58,19 @@ class _LoginScreenState extends State { crossAxisAlignment: CrossAxisAlignment.stretch, children: [ Container( - padding: const EdgeInsets.only(top: 60, bottom: 20), + padding: const EdgeInsets.only(top: 20, bottom: 20), child: Column( children: [ // SvgPicture.asset( // AppAssets.logo, // height: AppDimensions.normalize(30), // ), + Space.yf(4), + Image.asset( - AppAssets.logoTransparent, - height: AppDimensions.normalize(50), + AppAssets.logoLogin, ), - Space.yf(0.80), + Space.yf(0.50), Text( appTitle, style: AppText.h1b?.copyWith( @@ -78,7 +79,7 @@ class _LoginScreenState extends State { ), Space.yf(0.30), Text( - 'Довезём всё!', + 'deliver_all'.tr(), style: AppText.b1?.copyWith( color: AppColors.yellow, ), diff --git a/lib/presentation/screens/order_details.dart b/lib/presentation/screens/order_details.dart index 7b7733e..2aa573b 100644 --- a/lib/presentation/screens/order_details.dart +++ b/lib/presentation/screens/order_details.dart @@ -20,7 +20,7 @@ class OrderDetailsScreen extends StatefulWidget { } class _OrderDetailsScreenState extends State { - bool _isFullScreen = false; // Track fullscreen mode + bool _isFullScreen = false; // Track fullScreen mode bool _showLocation = true; final List _images = []; @@ -40,14 +40,11 @@ class _OrderDetailsScreenState extends State { } void _setImages() { - if (widget.order.image1.isNotEmpty) { - _images.add(widget.order.image1); + if (widget.order.invoice.isNotEmpty) { + _images.add(widget.order.invoice); } - if (widget.order.image2.isNotEmpty) { - _images.add(widget.order.image2); - } - if (widget.order.image3.isNotEmpty) { - _images.add(widget.order.image3); + if (widget.order.image.isNotEmpty) { + _images.add(widget.order.image); } } @@ -56,10 +53,10 @@ class _OrderDetailsScreenState extends State { _isFullScreen = !_isFullScreen; if (_isFullScreen) { - // Enter fullscreen mode + // Enter fullScreen mode SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky); } else { - // Exit fullscreen mode + // Exit fullScreen mode SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge); } }); @@ -71,7 +68,7 @@ class _OrderDetailsScreenState extends State { return Scaffold( backgroundColor: AppColors.surface, appBar: _isFullScreen - ? null // Hide the app bar in fullscreen mode + ? null // Hide the app bar in fullScreen mode : AppBar( iconTheme: const IconThemeData( color: Colors.white, @@ -116,7 +113,7 @@ class _OrderDetailsScreenState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - '${'order_info'.tr()} №${widget.order.no}', + '${'order_info'.tr()} № ${widget.order.no}', style: AppText.h2b, ), diff --git a/lib/presentation/widgets/info_card.dart b/lib/presentation/widgets/info_card.dart index efbdc55..0288500 100644 --- a/lib/presentation/widgets/info_card.dart +++ b/lib/presentation/widgets/info_card.dart @@ -33,10 +33,10 @@ class InfoCard extends StatelessWidget { Space.y!, RowTextWidget(title: '${'order_volume'.tr()}:', info: order.volume.toString()), Space.y!, - RowTextWidget( + /* RowTextWidget( title: '${'order_dimensions'.tr()}:', info: '${order.width}x${order.depth}x${order.height} ${'order_dimensions_desc'.tr()}'), - Space.y!, + Space.y!, */ RowTextWidget(title: '${'order_product_name'.tr()}:', info: order.name), // Space.y!, // RowTextWidget(title: 'Sargydyň bahasy:', info: order.price), diff --git a/lib/presentation/widgets/order_card.dart b/lib/presentation/widgets/order_card.dart index 0b766e6..1a761cb 100644 --- a/lib/presentation/widgets/order_card.dart +++ b/lib/presentation/widgets/order_card.dart @@ -31,7 +31,7 @@ class OrderCard extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( - '№${order.no}', + '№ ${order.no}', style: AppText.b1b, ), GestureDetector( diff --git a/lib/presentation/widgets/order_header.dart b/lib/presentation/widgets/order_header.dart index 2bdb4c0..b44e515 100644 --- a/lib/presentation/widgets/order_header.dart +++ b/lib/presentation/widgets/order_header.dart @@ -10,7 +10,7 @@ class OrderHeader extends StatelessWidget { @override Widget build(BuildContext context) { return SizedBox( - height: AppDimensions.normalize(80), + height: AppDimensions.normalize(95), child: Stack( children: [ Image.asset( @@ -22,27 +22,28 @@ class OrderHeader extends StatelessWidget { top: 0, bottom: 0, left: AppDimensions.normalize(12), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - SizedBox( - width: MediaQuery.of(context).size.width * 0.50, - child: Text( + child: SizedBox( + width: MediaQuery.of(context).size.width * 0.50, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( 'cargo_app'.tr(), style: AppText.h1b?.copyWith( color: Colors.white, ), textAlign: TextAlign.center, ), - ), - Space.yf(0.30), - Text( - 'follow_orders_banner'.tr(), - style: AppText.b1?.copyWith( - color: AppColors.yellow, + Space.yf(0.30), + Text( + 'follow_orders_banner'.tr(), + style: AppText.b1?.copyWith( + color: AppColors.yellow, + ), + textAlign: TextAlign.center, ), - ), - ], + ], + ), ), ), ],