aamir_dev
Aamir 3 weeks ago
parent f5a71aa15b
commit 36754b524d

@ -40,7 +40,7 @@
"forgetPass": "Forget Password ?",
"phoneNumberVerified": "Phone Number Verified",
"verifyNewPassword": "Verify New Password",
"EnterPass": "Enter Password ?",
"EnterPass": "Enter Password",
"alreadySigned": " Already Signed Up and Logged In",
"emailChangedSuccessfully": "Email is Changed Successfully",
"passwordIsUpdated": "Password is Updated",

@ -690,7 +690,7 @@ static const Map<String,dynamic> en_US = {
"forgetPass": "Forget Password ?",
"phoneNumberVerified": "Phone Number Verified",
"verifyNewPassword": "Verify New Password",
"EnterPass": "Enter Password ?",
"EnterPass": "Enter Password",
"alreadySigned": " Already Signed Up and Logged In",
"emailChangedSuccessfully": "Email is Changed Successfully",
"passwordIsUpdated": "Password is Updated",

@ -239,7 +239,9 @@ class AppointmentsVM extends BaseVM {
}
void removeServiceInCurrentAppointment(int index) {
int serviceId = servicesInCurrentAppointment.elementAt(index).serviceProviderServiceId ?? -1;
int serviceId = servicesInCurrentAppointment
.elementAt(index)
.serviceProviderServiceId ?? -1;
allSelectedItemsInAppointments.removeWhere((element) => element.serviceProviderServiceId == serviceId);
servicesInCurrentAppointment.removeAt(index);
notifyListeners();
@ -360,7 +362,8 @@ class AppointmentsVM extends BaseVM {
myAppointments = await appointmentRepo.getMyAppointmentsForCustomersByFilters();
// myFilteredAppointments = myAppointments;
myUpComingAppointments = myAppointments.where((element) => element.appointmentStatusEnum == AppointmentStatusEnum.booked || element.appointmentStatusEnum == AppointmentStatusEnum.confirmed).toList();
myUpComingAppointments =
myAppointments.where((element) => element.appointmentStatusEnum == AppointmentStatusEnum.booked || element.appointmentStatusEnum == AppointmentStatusEnum.confirmed).toList();
setState(ViewState.idle);
applyFilterOnAppointmentsVM(appointmentStatusEnum: AppointmentStatusEnum.allAppointments);
notifyListeners();
@ -431,7 +434,8 @@ class AppointmentsVM extends BaseVM {
bool inNeedToEnableMergeButton = false;
updateCheckBoxInMergeRequest(int currentIndex) {
myFilteredAppointments2[selectedAppointmentIndex].customerAppointmentList![currentIndex].isSelected = !(myFilteredAppointments2[selectedAppointmentIndex].customerAppointmentList?[currentIndex].isSelected ?? false);
myFilteredAppointments2[selectedAppointmentIndex].customerAppointmentList![currentIndex].isSelected =
!(myFilteredAppointments2[selectedAppointmentIndex].customerAppointmentList?[currentIndex].isSelected ?? false);
int count = countSelected(myFilteredAppointments2[selectedAppointmentIndex].customerAppointmentList ?? []);
if (count > 1)
@ -442,7 +446,10 @@ class AppointmentsVM extends BaseVM {
}
int countSelected(List<AppointmentListModel> appointments) {
return appointments.where((appointment) => appointment.isSelected == true).toList().length;
return appointments
.where((appointment) => appointment.isSelected == true)
.toList()
.length;
}
updateSelectedAppointmentDate({required int dateIndex, required int scheduleIndex}) {
@ -500,7 +507,8 @@ class AppointmentsVM extends BaseVM {
for (var element in allSelectedItemsInAppointments) {
if (!ifItemAlreadySelected(element.id!)) {
servicesInCurrentAppointment[serviceIndex].serviceItems!.add(serviceItemsFromApi[index]);
servicesInCurrentAppointment[serviceIndex].currentTotalServicePrice = servicesInCurrentAppointment[serviceIndex].currentTotalServicePrice + double.parse((serviceItemsFromApi[index].price) ?? "0.0");
servicesInCurrentAppointment[serviceIndex].currentTotalServicePrice =
servicesInCurrentAppointment[serviceIndex].currentTotalServicePrice + double.parse((serviceItemsFromApi[index].price) ?? "0.0");
}
}
}
@ -508,7 +516,8 @@ class AppointmentsVM extends BaseVM {
selectedSubServicesCounter = selectedSubServicesCounter - 1;
currentServiceSelection!.serviceItems!.removeWhere((element) => element.id == itemId);
allSelectedItemsInAppointments.removeWhere((element) => element.id == itemId);
servicesInCurrentAppointment[serviceIndex].currentTotalServicePrice = servicesInCurrentAppointment[serviceIndex].currentTotalServicePrice - double.parse((serviceItemsFromApi[index].price) ?? "0.0");
servicesInCurrentAppointment[serviceIndex].currentTotalServicePrice =
servicesInCurrentAppointment[serviceIndex].currentTotalServicePrice - double.parse((serviceItemsFromApi[index].price) ?? "0.0");
servicesInCurrentAppointment[serviceIndex].serviceItems!.removeWhere((element) => element.id == itemId);
}
notifyListeners();
@ -608,13 +617,14 @@ class AppointmentsVM extends BaseVM {
Column(
children: List.generate(
selectedService.serviceItems!.length,
(index) => Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"${selectedService.serviceItems![index].name}".toText(fontSize: 12, color: MyColors.lightTextColor, isBold: true),
"${selectedService.serviceItems![index].price} SAR".toText(fontSize: 12, isBold: true),
],
),
(index) =>
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"${selectedService.serviceItems![index].name}".toText(fontSize: 12, color: MyColors.lightTextColor, isBold: true),
"${selectedService.serviceItems![index].price} SAR".toText(fontSize: 12, isBold: true),
],
),
),
),
Row(
@ -649,7 +659,8 @@ class AppointmentsVM extends BaseVM {
Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
(selectedService.isHomeSelected ? "${(selectedService.currentTotalServicePrice) + (double.parse((selectedService.rangePricePerKm ?? "0.0")) * totalKms)}" : "${selectedService.currentTotalServicePrice}")
(selectedService.isHomeSelected ? "${(selectedService.currentTotalServicePrice) + (double.parse((selectedService.rangePricePerKm ?? "0.0")) * totalKms)}" : "${selectedService
.currentTotalServicePrice}")
.toText(fontSize: 29, isBold: true),
2.width,
LocaleKeys.sar.tr().toText(color: MyColors.lightTextColor, fontSize: 16, isBold: true).paddingOnly(bottom: 5),
@ -1073,10 +1084,10 @@ class AppointmentsVM extends BaseVM {
DropValue(
element.id ?? 0,
((element.categoryName!.isEmpty
? "N/A"
: countryCode == "SA"
? element.categoryNameN
: element.categoryName) ??
? "N/A"
: countryCode == "SA"
? element.categoryNameN
: element.categoryName) ??
"N/A"),
""),
);
@ -1491,4 +1502,11 @@ class AppointmentsVM extends BaseVM {
}
setState(ViewState.idle);
}
bool isShowMergeButton() {
return myFilteredAppointments2[selectedAppointmentIndex]
.customerAppointmentList!
.every((appointment) => appointment.appointmentStatusEnum == AppointmentStatusEnum.confirmed);
}
}

@ -29,13 +29,13 @@ class _ForgetPasswordPageState extends State<ForgetPasswordPage> {
ClassType type = ClassType.EMAIL;
Country? _country;
String countryCode = "";
DropValue? tempCountry;
late UserVM userVM;
@override
void initState() {
super.initState();
scheduleMicrotask(() {
userVM = Provider.of(context, listen: false);
getCountryList();
@ -142,8 +142,12 @@ class _ForgetPasswordPageState extends State<ForgetPasswordPage> {
);
return Padding(
padding: const EdgeInsets.all(2.0),
child: DropdownField((DropValue value) {
child: DropdownField( dropdownValue: tempCountry ,(DropValue value) {
countryCode = value.subValue;
tempCountry = value;
setState(() {
});
}, list: dropList, hint: LocaleKeys.selectCountryCode.tr()),
);
} else {

@ -35,7 +35,7 @@ class _LoginWithPasswordState extends State<LoginWithPassword> {
//TODO: ONLY FOR DEVELOPMENT PURPOSE
// String phoneNum = "966504278212", password = "Fa@1234";
// String phoneNum = "966504278213", password = "Fa@1234";
String phoneNum = "966504278213", password = "Fa@1234";
String phoneNum = "", password = "";
String email = "";
String countryCode = "";
Country? _country;
@ -48,23 +48,23 @@ class _LoginWithPasswordState extends State<LoginWithPassword> {
scheduleMicrotask(() {
userVM = Provider.of(context, listen: false);
context.read<UserVM>().getAvailBio();
if (AppState().currentAppType == AppType.provider) {
phoneNum = "966530896018";
password = "Amir@1234";
// phoneNum = "966569755630";
// password = "Amir12345@"; //AAmir Sal
// phoneNum = "966598646795";
// password = "Zahoor@123";
// User Details
// phoneNum = "966554870506";
// password = "Sikander123@"; // "lastName": "sik",
// "email": "sikander@gmail.com",
// phoneNum = "966569755630";
// password = "Amir12345@";
}
// if (AppState().currentAppType == AppType.provider) {
// phoneNum = "966530896018";
// password = "Amir@1234";
//
// // phoneNum = "966569755630";
// // password = "Amir12345@"; //AAmir Sal
//
// // phoneNum = "966598646795";
// // password = "Zahoor@123";
//
// // User Details
// // phoneNum = "966554870506";
// // password = "Sikander123@"; // "lastName": "sik",
// // "email": "sikander@gmail.com",
// // phoneNum = "966569755630";
// // password = "Amir12345@";
// }
getCountryList();
});
@ -78,7 +78,7 @@ class _LoginWithPasswordState extends State<LoginWithPassword> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: const CustomAppBar(isRemoveBackButton: true, title: ""),
appBar: const CustomAppBar(isRemoveBackButton: true, title: ""),
body: Container(
width: double.infinity,
height: double.infinity,

Loading…
Cancel
Save