diff --git a/lib/views/appoinments/appointment_page.dart b/lib/views/appoinments/appointment_page.dart index 4a99e70..8ac2f9c 100644 --- a/lib/views/appoinments/appointment_page.dart +++ b/lib/views/appoinments/appointment_page.dart @@ -123,7 +123,7 @@ class _AppointmentPageState extends State { const SizedBox(height: 25), EmptyWidget( spacerWidget: const SizedBox(height: 25), - text: appointmentsVM.appointmentFiltersCounter > 0 ? "No appointments that match your search" : LocaleKeys.noAppointmentFound.tr(), + text: appointmentsVM.appointmentFiltersCounter > 0 ? LocaleKeys.noAppointmentsMatchSearch.tr() : LocaleKeys.noAppointmentFound.tr(), ), if (appointmentsVM.appointmentFiltersCounter > 0) ...[ const SizedBox(height: 16), @@ -131,9 +131,9 @@ class _AppointmentPageState extends State { onTap: () { appointmentsVM.clearAppointmentFilters(); }, - child: const Text( - "Clear Filters", - style: TextStyle( + child: Text( + LocaleKeys.clearFilters.tr(), + style: const TextStyle( color: MyColors.darkPrimaryColor, fontSize: 16, fontWeight: FontWeight.w600, diff --git a/lib/views/branch_management/branch/branch_detail_page.dart b/lib/views/branch_management/branch/branch_detail_page.dart index 14c01d3..1edccbc 100644 --- a/lib/views/branch_management/branch/branch_detail_page.dart +++ b/lib/views/branch_management/branch/branch_detail_page.dart @@ -53,7 +53,7 @@ class _BranchDetailPageState extends State { "ServiceProviderID": AppState().getUser.data?.userInfo?.providerId.toString() ?? "", }, ); - + // await serviceVM.getBranchAndServices(); serviceVM.filterUserBranchCategories(); }); } @@ -123,9 +123,9 @@ class _BranchDetailPageState extends State { }, ); } else if (widget.branchData.branchStatus == BranchStatusEnum.pending) { - actionWidget = pendingApprovalAction(pendingText: "Approval Pending"); + actionWidget = pendingApprovalAction(pendingText: LocaleKeys.approvalPending.tr(),); } else if (widget.branchData.branchStatus == BranchStatusEnum.deactivated) { - actionWidget = pendingApprovalAction(pendingText: "Activate Now"); + actionWidget = pendingApprovalAction(pendingText: LocaleKeys.activateNow.tr(),); } else if (widget.branchData.branchStatus == BranchStatusEnum.rejected) { actionWidget = Column( children: [ @@ -180,9 +180,11 @@ class _BranchDetailPageState extends State { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - isArabic - ? serviceVM.categories[pIndex].categoryNameN.toString().toText(fontSize: 14, maxLines: 2) - : serviceVM.categories[pIndex].categoryName.toString().toText(fontSize: 14, maxLines: 2), + (isArabic ? (serviceVM.categories[pIndex].categoryNameN ?? serviceVM.categories[pIndex].categoryName) + : serviceVM.categories[pIndex].categoryName).toString().toText(fontSize: 16), + // isArabic + // ? serviceVM.categories[pIndex].categoryNameN.toString().toText(fontSize: 14, maxLines: 2) + // : serviceVM.categories[pIndex].categoryName.toString().toText(fontSize: 14, maxLines: 2), ], ), 8.height, @@ -390,6 +392,8 @@ class _BranchDetailPageState extends State { ] else ...[ ListView.separated( itemBuilder: (context, pIndex) { + print("Category English ===== ${serviceVM.categories[pIndex].categoryName}"); + print("Category Arabic ===== ${serviceVM.categories[pIndex].categoryNameN}"); return buildServiceTileWidget(pIndex, serviceVM).onPress(() { serviceVM.categories[pIndex].branchId = widget.branchData.id.toString(); serviceVM.categories[pIndex].branchName = widget.branchData.branchName.toString(); diff --git a/lib/views/branch_management/services/services_list_page.dart b/lib/views/branch_management/services/services_list_page.dart index 4dad1a7..a3f1a7b 100644 --- a/lib/views/branch_management/services/services_list_page.dart +++ b/lib/views/branch_management/services/services_list_page.dart @@ -32,12 +32,14 @@ class CreateBranchModel { final String? categoryName; final ServiceModel? serviceProviderService; final bool isForEdit; + final String? categoryNameN; CreateBranchModel({ required this.branchId, required this.branchName, this.categoryId, this.categoryName, + this.categoryNameN, this.serviceProviderService, required this.isForEdit, }); @@ -90,6 +92,8 @@ class _ServicesListPageState extends State { Widget buildCategoryTileWidget() { bool isArabic = AppState().isArabic(context); + + return Row( crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, @@ -113,7 +117,9 @@ class _ServicesListPageState extends State { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Flexible(child: isArabic ? categoryData.categoryNameN.toString().toText(fontSize: 16) : categoryData.categoryName.toString().toText(fontSize: 16)), + Flexible( + child: (isArabic ? (categoryData.categoryNameN ?? categoryData.categoryName) + : categoryData.categoryName).toString().toText(fontSize: 16)), ], ), // 5.height, @@ -312,6 +318,7 @@ class _ServicesListPageState extends State { branchName: categoryData.branchName ?? '', categoryId: categoryData.id.toString(), categoryName: categoryData.categoryName, + categoryNameN: categoryData.categoryNameN, serviceProviderService: filteredServices[index], isForEdit: true, ), diff --git a/lib/views/dashboard/widget/general_appointment_widget.dart b/lib/views/dashboard/widget/general_appointment_widget.dart index c2db3f0..6795b3a 100644 --- a/lib/views/dashboard/widget/general_appointment_widget.dart +++ b/lib/views/dashboard/widget/general_appointment_widget.dart @@ -247,7 +247,7 @@ class GeneralAppointmentWidget extends StatelessWidget { ), if (!isNeedTotalPayment) if (appointmentListModel.customerAppointmentList != null && appointmentListModel.customerAppointmentList!.length > 1) - "${appointmentListModel.customerAppointmentList!.length - 1}+ appts".toText(fontSize: 8).toContainer( + "${appointmentListModel.customerAppointmentList!.length - 1}+ ${LocaleKeys.appts.tr()}".toText(fontSize: 8).toContainer( borderRadius: 15, backgroundColor: MyColors.lightGreyEAColor, padding: const EdgeInsets.symmetric(