diff --git a/lib/views/branch_management/branch/branch_detail_page.dart b/lib/views/branch_management/branch/branch_detail_page.dart index 12ec900..14c01d3 100644 --- a/lib/views/branch_management/branch/branch_detail_page.dart +++ b/lib/views/branch_management/branch/branch_detail_page.dart @@ -156,6 +156,8 @@ class _BranchDetailPageState extends State { } Widget buildServiceTileWidget(int pIndex, ServiceVM serviceVM) { + print("value is ${serviceVM.categories[pIndex].categoryName}"); + print("value is ${serviceVM.categories[pIndex].categoryNameN}"); bool isArabic = AppState().isArabic(context); return Row( crossAxisAlignment: CrossAxisAlignment.start, @@ -207,8 +209,16 @@ class _BranchDetailPageState extends State { padding: EdgeInsets.zero, ), ), - ], - ).withArrow(isArrowEnabled: true) + Transform.flip( + flipX: isArabic, + child: SvgPicture.asset( + MyAssets.arrowRight, + height: 9.69, + width: 13.0, + color: Colors.black, + ), + ) ], + ) ], )), ], @@ -264,7 +274,7 @@ class _BranchDetailPageState extends State { ), Column( children: [ - showData("${LocaleKeys.location.tr()}:", "${isArabic ? widget.branchData.cityName.toString() : widget.branchData.cityName.toString()}, ${widget.branchData.countryName.toString()}"), + showData("${LocaleKeys.location.tr()}:", "${isArabic ? widget.branchData.cityNameN.toString() : widget.branchData.cityName.toString()}, ${isArabic ? widget.branchData.countryNameN.toString() : widget.branchData.countryName.toString()}"), showData("${LocaleKeys.provider.tr()}:", widget.branchData.serviceProviderName.toString()), showData("${LocaleKeys.time.tr()}:", "${widget.branchData.openTime.toString()} - ${widget.branchData.closeTime.toString()}"), showData("${LocaleKeys.address.tr()}:", widget.branchData.address.toString()), @@ -292,14 +302,23 @@ class _BranchDetailPageState extends State { decorationColor: MyColors.white, ), ), + Transform.flip( + flipX: isArabic, + child: SvgPicture.asset( + MyAssets.arrowRight, + height: 11.75, + width: 16.16, + color: Colors.white, + ), + ) ], ) - .withArrow( - isArrowEnabled: true, - color: Colors.white, - arrowWidth: 16.16, - arrowHeight: 11.75, - ) + // .withArrow( + // isArrowEnabled: true, + // color: Colors.white, + // arrowWidth: 16.16, + // arrowHeight: 11.75, + // ) .margin(right: 5), ).onPress(() { if (widget.branchData.branchStatus == BranchStatusEnum.pending || widget.branchData.branchStatus == BranchStatusEnum.rejected) { diff --git a/lib/views/branch_management/branch/branch_list_page.dart b/lib/views/branch_management/branch/branch_list_page.dart index 1700316..fae5cc7 100644 --- a/lib/views/branch_management/branch/branch_list_page.dart +++ b/lib/views/branch_management/branch/branch_list_page.dart @@ -22,6 +22,7 @@ import 'package:mc_common_app/widgets/extensions/extensions_widget.dart'; import 'package:mc_common_app/widgets/row_with_arrow.dart'; import 'package:mc_common_app/widgets/tab/role_type_tab.dart'; import 'package:provider/provider.dart'; +import 'package:flutter_svg/flutter_svg.dart'; class BranchListPage extends StatelessWidget { const BranchListPage({super.key}); @@ -160,11 +161,15 @@ class BranchListPage extends StatelessWidget { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ + // Utils.statusContainerChip( + // text: (branchModel.branchStatusLabel ?? "").replaceFirst("ApprovedOrActive", "Active"), + // chipColor: Utils.getChipColorByBranchStatus(branchModel.branchStatus!), + // ), Utils.statusContainerChip( - text: (branchModel.branchStatusLabel ?? "").replaceFirst("ApprovedOrActive", "Active"), + text: Localizations.localeOf(context).languageCode == 'ar' ? 'نشط' : 'Active', chipColor: Utils.getChipColorByBranchStatus(branchModel.branchStatus!), ), - ], + ], ), 5.height, // branchModel.distanceKm == null @@ -185,14 +190,35 @@ class BranchListPage extends StatelessWidget { // ], // ), // 5.height, - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Expanded( - child: (branchModel.branchName ?? "").toText(fontSize: 16, height: 18 / 16), - ) - ], - ).withArrow(isArrowEnabled: branchModel.branchStatus != BranchStatusEnum.blocked).margin(right: 10), + + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: (branchModel.branchName ?? "") + .toText(fontSize: 16, height: 18 / 16), + ), + + if (branchModel.branchStatus != BranchStatusEnum.blocked) + Transform.flip( + flipX: isArabic, + child: SvgPicture.asset( + MyAssets.arrowRight, + height: 9.69, + width: 13.0, + color: Colors.black, + ), + ), + ], + ).margin(right: 10), + // Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + // children: [ + // Expanded( + // child: (branchModel.branchName ?? "").toText(fontSize: 16, height: 18 / 16), + // ) + // ], + // ).withArrow(isArrowEnabled: branchModel.branchStatus != BranchStatusEnum.blocked).margin(right: 10), (branchModel.branchDescription ?? "").toText( fontSize: 10, overflow: TextOverflow.ellipsis, diff --git a/lib/views/dashboard/widget/general_appointment_widget.dart b/lib/views/dashboard/widget/general_appointment_widget.dart index fc151e5..c2db3f0 100644 --- a/lib/views/dashboard/widget/general_appointment_widget.dart +++ b/lib/views/dashboard/widget/general_appointment_widget.dart @@ -179,7 +179,12 @@ class GeneralAppointmentWidget extends StatelessWidget { color: MyColors.lightTextColor, ), 4.width, - Expanded(child: appointmentListModel.appointmentDate!.toFormattedDateWithoutTime().toText(fontSize: 8)) + // Expanded(child: appointmentListModel.appointmentDate!.toFormattedDateWithoutTime().toText(fontSize: 8)) + Expanded( + child: appointmentListModel.appointmentDate! + .toLocalizedFormattedDateWithoutTime(context) + .toText(fontSize: 8), + ) ], ), Row( @@ -197,7 +202,12 @@ class GeneralAppointmentWidget extends StatelessWidget { children: [ "${LocaleKeys.createdOn.tr()}: ".toText(color: MyColors.lightTextColor), 2.width, - Expanded(child: appointmentListModel.appointmentCreatedOn!.toFormattedDateWithoutTime().toText(fontSize: 8)) + // Expanded(child: appointmentListModel.appointmentCreatedOn!.toFormattedDateWithoutTime().toText(fontSize: 8)) + Expanded( + child: appointmentListModel.appointmentCreatedOn! + .toLocalizedFormattedDateWithoutTime(context) + .toText(fontSize: 8), + ) ], ), if (isFromUpdateAppointmentPage) ...[ diff --git a/lib/views/subscriptions/widget/all_subscriptions_card.dart b/lib/views/subscriptions/widget/all_subscriptions_card.dart index 654984f..d862fc6 100644 --- a/lib/views/subscriptions/widget/all_subscriptions_card.dart +++ b/lib/views/subscriptions/widget/all_subscriptions_card.dart @@ -32,6 +32,13 @@ class AllSubscriptionsCard extends StatelessWidget { @override Widget build(BuildContext context) { textColor = backgroundColor == null ? Colors.black : Colors.white; + print('NAME = ${subscription.name}'); + print('SUBSCRIPTION TYPE = ${subscription.subscriptionType}'); + print('SUBSCRIPTION TYPE ENUM = ${subscription.subscriptionTypeEnum}'); + print( + 'SUBSCRIPTION TYPE TEXT = ${subscription.subscriptionTypeEnum?.getStringSubscriptionTypeEnum()}', + ); + return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [