BASE: Update Icons & Name Of The App.
This commit is contained in:
@@ -5,7 +5,7 @@ import 'package:customer/models/favourite_model.dart';
|
||||
import 'package:customer/models/product_model.dart';
|
||||
import 'package:customer/models/vendor_model.dart';
|
||||
import '../service/fire_store_utils.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
|
||||
class FavouriteController extends GetxController {
|
||||
RxBool favouriteRestaurant = true.obs;
|
||||
@@ -35,14 +35,22 @@ class FavouriteController extends GetxController {
|
||||
});
|
||||
|
||||
for (var element in favouriteList) {
|
||||
await FireStoreUtils.getVendorById(element.restaurantId.toString()).then((value) async {
|
||||
await FireStoreUtils.getVendorById(
|
||||
element.restaurantId.toString(),
|
||||
).then((value) async {
|
||||
if (value != null) {
|
||||
if ((Constant.isSubscriptionModelApplied == true || value.adminCommission?.isEnabled == true) && value.subscriptionPlan != null) {
|
||||
if ((Constant.isSubscriptionModelApplied == true ||
|
||||
value.adminCommission?.isEnabled == true) &&
|
||||
value.subscriptionPlan != null) {
|
||||
if (value.subscriptionTotalOrders == "-1") {
|
||||
favouriteVendorList.add(value);
|
||||
} else {
|
||||
print("Restaurant :: ${value.title.toString()}");
|
||||
if ((value.subscriptionExpiryDate != null && value.subscriptionExpiryDate!.toDate().isBefore(DateTime.now()) == false) ||
|
||||
if ((value.subscriptionExpiryDate != null &&
|
||||
value.subscriptionExpiryDate!.toDate().isBefore(
|
||||
DateTime.now(),
|
||||
) ==
|
||||
false) ||
|
||||
value.subscriptionPlan?.expiryDay == '-1') {
|
||||
if (value.subscriptionTotalOrders != '0') {
|
||||
favouriteVendorList.add(value);
|
||||
@@ -57,32 +65,45 @@ class FavouriteController extends GetxController {
|
||||
}
|
||||
|
||||
for (var element in favouriteItemList) {
|
||||
await FireStoreUtils.getProductById(element.productId.toString()).then((value) async {
|
||||
await FireStoreUtils.getProductById(element.productId.toString()).then((
|
||||
value,
|
||||
) async {
|
||||
if (value != null) {
|
||||
await FireStoreUtils.fireStore.collection(CollectionName.vendors).doc(value.vendorID.toString()).get().then((value1) async {
|
||||
if (value1.exists) {
|
||||
VendorModel vendorModel = VendorModel.fromJson(value1.data()!);
|
||||
if(value.publish == true){
|
||||
if (Constant.isSubscriptionModelApplied == true || vendorModel.adminCommission?.isEnabled == true) {
|
||||
if (vendorModel.subscriptionPlan != null) {
|
||||
if (vendorModel.subscriptionTotalOrders == "-1") {
|
||||
favouriteFoodList.add(value);
|
||||
} else {
|
||||
if ((vendorModel.subscriptionExpiryDate != null && vendorModel.subscriptionExpiryDate!.toDate().isBefore(DateTime.now()) == false) ||
|
||||
vendorModel.subscriptionPlan?.expiryDay == "-1") {
|
||||
if (vendorModel.subscriptionTotalOrders != '0') {
|
||||
await FireStoreUtils.fireStore
|
||||
.collection(CollectionName.vendors)
|
||||
.doc(value.vendorID.toString())
|
||||
.get()
|
||||
.then((value1) async {
|
||||
if (value1.exists) {
|
||||
VendorModel vendorModel = VendorModel.fromJson(
|
||||
value1.data()!,
|
||||
);
|
||||
if (value.publish == true) {
|
||||
if (Constant.isSubscriptionModelApplied == true ||
|
||||
vendorModel.adminCommission?.isEnabled == true) {
|
||||
if (vendorModel.subscriptionPlan != null) {
|
||||
if (vendorModel.subscriptionTotalOrders == "-1") {
|
||||
favouriteFoodList.add(value);
|
||||
} else {
|
||||
if ((vendorModel.subscriptionExpiryDate != null &&
|
||||
vendorModel.subscriptionExpiryDate!
|
||||
.toDate()
|
||||
.isBefore(DateTime.now()) ==
|
||||
false) ||
|
||||
vendorModel.subscriptionPlan?.expiryDay ==
|
||||
"-1") {
|
||||
if (vendorModel.subscriptionTotalOrders != '0') {
|
||||
favouriteFoodList.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
favouriteFoodList.add(value);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
favouriteFoodList.add(value);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user