FixedThings Before QA

aamir_dev
Faiz Hashmi 1 year ago
parent e2f10aba52
commit fea3c806ec

@ -667,5 +667,9 @@
"itemPrice": "سعر العنصر",
"appointmentBookingOption": "سيسمح هذا الخيار للعميل بحجز موعد لهذه الخدمات.",
"workshopAvailabilityOption": "سيظهر هذا الخيار للعميل إذا كان يمكنه الحصول على هذه الخدمة في الورشة أم لا.",
"appointmentLocationOption": "سيسمح هذا الخيار للعميل بحجز موعد في الموقع الذي يختاره."
"appointmentLocationOption": "سيسمح هذا الخيار للعميل بحجز موعد في الموقع الذي يختاره.",
"deleteScheduleConfirmation": "هل أنت متأكد أنك تريد حذف هذا الجدول؟",
"deleteScheduleAdConfirmationMessage": "سيتم إزالة جميع فترات المواعيد ولن يتمكن العملاء من حجز مواعيد لهذا الجدول.",
"branchSchedules": "جداول الفرع",
"noSchedulesFound": "لم تقم بإضافة أي جدول لهذا الفرع."
}

@ -668,5 +668,9 @@
"itemPrice": "Item Price",
"bookAppointmentForServices": "This option will allow customer to book appointment for these services.",
"showServiceAvailability": "This option will show to customer that you can avail this service on workshop or not.",
"bookAppointmentAtLocation": "This option will allow customer to book appointment at their desired location."
"bookAppointmentAtLocation": "This option will allow customer to book appointment at their desired location.",
"deleteScheduleConfirmation": " Are you sure you want to delete this Schedule?",
"deleteScheduleAdConfirmationMessage": "All the appointment slots will be removed and customers will no longer be able to book appointments for this schedule.",
"branchSchedules": "Branch Schedules",
"noSchedulesFound": "You have not added any schedule for this branch."
}

@ -683,7 +683,11 @@ class CodegenLoader extends AssetLoader{
"itemPrice": "سعر العنصر",
"appointmentBookingOption": "سيسمح هذا الخيار للعميل بحجز موعد لهذه الخدمات.",
"workshopAvailabilityOption": "سيظهر هذا الخيار للعميل إذا كان يمكنه الحصول على هذه الخدمة في الورشة أم لا.",
"appointmentLocationOption": "سيسمح هذا الخيار للعميل بحجز موعد في الموقع الذي يختاره."
"appointmentLocationOption": "سيسمح هذا الخيار للعميل بحجز موعد في الموقع الذي يختاره.",
"deleteScheduleConfirmation": "هل أنت متأكد أنك تريد حذف هذا الجدول؟",
"deleteScheduleAdConfirmationMessage": "سيتم إزالة جميع فترات المواعيد ولن يتمكن العملاء من حجز مواعيد لهذا الجدول.",
"branchSchedules": "جداول الفرع",
"noSchedulesFound": "لم تقم بإضافة أي جدول لهذا الفرع."
};
static const Map<String,dynamic> en_US = {
"firstTimeLogIn": "First Time Log In",
@ -1355,7 +1359,11 @@ static const Map<String,dynamic> en_US = {
"itemPrice": "Item Price",
"bookAppointmentForServices": "This option will allow customer to book appointment for these services.",
"showServiceAvailability": "This option will show to customer that you can avail this service on workshop or not.",
"bookAppointmentAtLocation": "This option will allow customer to book appointment at their desired location."
"bookAppointmentAtLocation": "This option will allow customer to book appointment at their desired location.",
"deleteScheduleConfirmation": " Are you sure you want to delete this Schedule?",
"deleteScheduleAdConfirmationMessage": "All the appointment slots will be removed and customers will no longer be able to book appointments for this schedule.",
"branchSchedules": "Branch Schedules",
"noSchedulesFound": "You have not added any schedule for this branch."
};
static const Map<String, Map<String,dynamic>> mapLocales = {"ar_SA": ar_SA, "en_US": en_US};
}

@ -1,6 +1,6 @@
// DO NOT EDIT. This is code generated via package:easy_localization/generate.dart
abstract class LocaleKeys {
abstract class LocaleKeys {
static const firstTimeLogIn = 'firstTimeLogIn';
static const signUp = 'signUp';
static const changeMobile = 'changeMobile';
@ -47,7 +47,7 @@ abstract class LocaleKeys {
static const emailChangedSuccessfully = 'emailChangedSuccessfully';
static const passwordIsUpdated = 'passwordIsUpdated';
static const passwordShouldContains = 'passwordShouldContains';
static const successfullyRegistered = ' successfullyRegistered';
static const successfullyRegistered = ' successfullyRegistered';
static const pleaseEnterSamePassword = 'pleaseEnterSamePassword';
static const firstNameMandatory = 'firstNameMandatory';
static const surnameNameMandatory = 'surnameNameMandatory';
@ -647,5 +647,12 @@ abstract class LocaleKeys {
static const appointmentBookingOption = 'appointmentBookingOption';
static const workshopAvailabilityOption = 'workshopAvailabilityOption';
static const appointmentLocationOption = 'appointmentLocationOption';
static const deleteScheduleConfirmation = 'deleteScheduleConfirmation';
static const deleteScheduleAdConfirmationMessage = 'deleteScheduleAdConfirmationMessage';
static const branchSchedules = 'branchSchedules';
static const noSchedulesFound = 'noSchedulesFound';
static const bookAppointmentAtLocation = 'bookAppointmentAtLocation';
static const showServiceAvailability = 'showServiceAvailability';
static const bookAppointmentForServices = 'bookAppointmentForServices';
}

@ -79,7 +79,7 @@ class CommonServicesImp implements CommonAppServices {
final status = await AppPermissions.checkStoragePermissions(context);
if (status) {
result = await FilePicker.platform.pickFiles(allowMultiple: true, type: fileType, allowedExtensions: allowedExtensions);
result = await FilePicker.platform.pickFiles(allowMultiple: false, type: fileType, allowedExtensions: allowedExtensions);
}
List<File> pickedFiles = [];
@ -109,6 +109,4 @@ class CommonServicesImp implements CommonAppServices {
return 0.0;
}
}
}

@ -225,6 +225,8 @@ class AppointmentsVM extends BaseVM {
branchSelectedServiceId = id;
currentServiceSelection = branchServices.firstWhere((element) => element.serviceProviderServiceId == id.selectedId);
log("currentServiceSelection isAllowAppointmentHome: ${currentServiceSelection!.isAllowAppointmentHome}");
log("currentServiceSelection serviceDescription: ${currentServiceSelection!.serviceDescription}");
notifyListeners();
}

@ -122,7 +122,6 @@ class ServiceVM extends BaseVM {
filterUserBranchCategories() {
categories = [];
print("Filter Branch Executed");
List<BranchDetailModel>? localbranches;
if (branches!.data != null) {
if (selectedBranchStatus == 3) {
@ -416,6 +415,7 @@ class ServiceVM extends BaseVM {
Future<void> fetchServicesByCategoryId(int categoryId) async {
servicesDropList = [];
setState(ViewState.busy);
//TODO: here
services = await branchRepo.fetchServicesByCategoryId(serviceCategoryId: categoryId); // to get all the services
for (var element in services!.data!) {
servicesDropList.add(

@ -14,6 +14,7 @@ class PickedFilesContainer extends StatelessWidget {
final bool isReview;
final bool isPdf;
final bool isFromNetwork;
final bool allowAdButton;
final Function() onAddFilePressed;
const PickedFilesContainer({
@ -26,6 +27,7 @@ class PickedFilesContainer extends StatelessWidget {
this.isReview = false,
this.isPdf = false,
this.isFromNetwork = false,
this.allowAdButton = true,
}) : super(key: key);
@override
@ -37,9 +39,13 @@ class PickedFilesContainer extends StatelessWidget {
crossAxisSpacing: 4.0,
mainAxisSpacing: 8.0,
children: List.generate(
isReview ? pickedFiles.length : pickedFiles.length + 1,
!allowAdButton
? pickedFiles.length
: (isReview)
? pickedFiles.length
: pickedFiles.length + 1,
(index) {
if (index == pickedFiles.length && !isReview) {
if (index == pickedFiles.length && !isReview && allowAdButton) {
return Container(
decoration: BoxDecoration(color: MyColors.greyButtonColor, border: Border.all(width: 2, color: MyColors.greyAddBorderColor)),
margin: const EdgeInsets.all(8),
@ -121,22 +127,22 @@ class BuildFilesContainer extends StatelessWidget {
width: 70,
)
.paddingAll(8),
!isReview
? Align(
alignment: Alignment.topRight,
child: MyAssets.closeWithOrangeBg.buildSvg(
fit: BoxFit.fill,
height: 30,
width: 30,
),
).onPress(() {
if (onCrossPressedPrimary == null) {
onCrossPressedSecondary!(index!, image.filePath!);
return;
}
onCrossPressedPrimary!(image.filePath!);
})
: const SizedBox()
if (!isReview) ...[
Align(
alignment: Alignment.topRight,
child: MyAssets.closeWithOrangeBg.buildSvg(
fit: BoxFit.fill,
height: 30,
width: 30,
),
).onPress(() {
if (onCrossPressedPrimary == null) {
onCrossPressedSecondary!(index!, image.filePath!);
return;
}
onCrossPressedPrimary!(image.filePath!);
})
]
],
)),
],

@ -8,6 +8,7 @@ import 'package:mc_common_app/models/general_models/widgets_models.dart';
import 'package:mc_common_app/theme/colors.dart';
import 'package:mc_common_app/utils/enums.dart';
import 'package:mc_common_app/utils/navigator.dart';
import 'package:mc_common_app/utils/utils.dart';
import 'package:mc_common_app/view_models/appointments_view_model.dart';
import 'package:mc_common_app/views/location_views/pick_location_page.dart';
import 'package:mc_common_app/widgets/button/show_fill_button.dart';
@ -94,7 +95,13 @@ class AppointmentServicePickBottomSheet extends StatelessWidget {
maxHeight: 48,
title: LocaleKeys.home.tr(),
txtColor: appointmentsVM.isHomeTapped ? MyColors.white : MyColors.darkTextColor,
onPressed: () => appointmentsVM.updateIsHomeTapped(true),
onPressed: () {
if (appointmentsVM.currentServiceSelection != null && (appointmentsVM.currentServiceSelection!.isAllowAppointmentHome ?? false)) {
appointmentsVM.updateIsHomeTapped(true);
} else {
Utils.showToast("The Selected Service is not available at Home Location.");
}
},
),
),
12.width,
@ -116,8 +123,8 @@ class AppointmentServicePickBottomSheet extends StatelessWidget {
errorValue: appointmentsVM.pickHomeLocationError,
value: appointmentsVM.pickedHomeLocation,
isNeedClickAll: true,
postfixData: Icons.location_on,
postFixDataColor: MyColors.darkTextColor,
postfixData: Icons.add_location_outlined,
postFixDataColor: MyColors.darkPrimaryColor,
onTap: () {
navigateTo(
context,
@ -148,14 +155,14 @@ class AppointmentServicePickBottomSheet extends StatelessWidget {
width: double.infinity,
child: Column(
children: [
if (appointmentsVM.isHomeTapped && !appointmentsVM.isFetchingServices) ...[
if (appointmentsVM.isHomeTapped && !appointmentsVM.isFetchingServices && appointmentsVM.currentServiceSelection != null && (appointmentsVM.currentServiceSelection!.isAllowAppointmentHome ?? false)) ...[
const Divider(thickness: 1, height: 1),
Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
// TODO: This Price will be decided according to the service selected, We will calculate the KMs and multiple it with price per KMs
150.toString().toText(fontSize: 30, isBold: true),
LocaleKeys.sar.tr().toText(fontSize: 15, isBold: true, color: MyColors.lightTextColor).paddingOnly(bottom: 5),
appointmentsVM.currentServiceSelection!.rangePricePerKm.toString().toText(fontSize: 30, isBold: true),
"${LocaleKeys.sar.tr()}/km".toText(fontSize: 15, isBold: true, color: MyColors.lightTextColor).paddingOnly(bottom: 5),
],
),
LocaleKeys.additionalChargesNotice.tr().toText(fontSize: 12, color: MyColors.lightTextColor),

@ -1,10 +1,10 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:mc_common_app/classes/consts.dart';
import 'package:mc_common_app/extensions/string_extensions.dart';
import 'package:mc_common_app/theme/colors.dart';
import 'package:mc_common_app/utils/utils.dart';
import 'package:mc_common_app/widgets/extensions/extensions_widget.dart';
import 'package:sizer/sizer.dart';
class DropValue {
int id;
@ -55,40 +55,43 @@ class _DropdownFieldState extends State<DropdownField> {
dropdownValue = widget.dropdownValue;
return Column(
children: [
Container(
decoration: widget.showAppointmentPickerVariant ? null : Utils.containerColorRadiusBorderWidth(MyColors.white, 0, MyColors.darkPrimaryColor, 2),
margin: const EdgeInsets.all(0),
padding: const EdgeInsets.only(left: 8, right: 8),
width: widget.showAppointmentPickerVariant ? 170 : null,
child: DropdownButton<DropValue>(
value: dropdownValue,
icon: const Icon(Icons.keyboard_arrow_down_sharp),
elevation: 16,
iconSize: widget.showAppointmentPickerVariant ? 26 : 16,
iconEnabledColor: borderColor,
iconDisabledColor: borderColor,
isExpanded: true,
style: const TextStyle(
color: borderColor,
fontSize: 15,
),
hint: (widget.hint ?? "").toText(color: borderColor, fontSize: 15, fontWeight: MyFonts.Medium),
underline: Container(height: 0),
onChanged: (DropValue? newValue) {
setState(() {
dropdownValue = newValue!;
widget.onSelect(newValue);
});
},
items: (widget.list ?? defaultV).map<DropdownMenuItem<DropValue>>(
(DropValue value) {
return DropdownMenuItem<DropValue>(
value: value,
enabled: value.isEnabled ?? true,
child: value.value.toText(fontSize: 15, color: value.isEnabled == false ? MyColors.darkTextColor : null, fontWeight: MyFonts.Medium),
);
IgnorePointer(
ignoring: !widget.isSelectAble,
child: Container(
decoration: widget.showAppointmentPickerVariant ? null : Utils.containerColorRadiusBorderWidth(MyColors.white, 0, widget.isSelectAble ? MyColors.darkPrimaryColor : MyColors.greyACColor, 2),
margin: const EdgeInsets.all(0),
padding: const EdgeInsets.only(left: 8, right: 8),
width: widget.showAppointmentPickerVariant ? 170 : null,
child: DropdownButton<DropValue>(
value: dropdownValue,
icon: Icon(Icons.keyboard_arrow_down_sharp, color: !widget.isSelectAble ? Colors.transparent : null),
elevation: 16,
iconSize: widget.showAppointmentPickerVariant ? 26 : 16,
iconEnabledColor: borderColor,
iconDisabledColor: borderColor,
isExpanded: true,
style: const TextStyle(
color: borderColor,
fontSize: 15,
),
hint: (widget.hint ?? "").toText(color: borderColor, fontSize: 15, fontWeight: MyFonts.Medium),
underline: Container(height: 0),
onChanged: (DropValue? newValue) {
setState(() {
dropdownValue = newValue!;
widget.onSelect(newValue);
});
},
).toList(),
items: (widget.list ?? defaultV).map<DropdownMenuItem<DropValue>>(
(DropValue value) {
return DropdownMenuItem<DropValue>(
value: value,
enabled: value.isEnabled ?? true,
child: value.value.toText(fontSize: 15, color: value.isEnabled == false ? MyColors.darkTextColor : null, fontWeight: MyFonts.Medium),
);
},
).toList(),
),
),
),
if (widget.errorValue != "")

Loading…
Cancel
Save