@james_jayaraj/test-npm 1.3.3 → 1.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6396,10 +6396,14 @@ class RxComponent {
6396
6396
  }
6397
6397
  }
6398
6398
  isCurrentMedicineInFavourites() {
6399
- if (!this.commonServices.selectedFormulation || !this.commonServices.favouriteMedicineList || this.commonServices.favouriteMedicineList.length === 0) {
6399
+ let favouritesList = this.showFavouriteMed ? this.commonServices.favouriteMedicineList : this.commonServices.originalFavouriteMedicineList;
6400
+ if (!this.commonServices.selectedFormulation || !favouritesList || favouritesList.length === 0) {
6400
6401
  return false;
6401
6402
  }
6402
- return this.commonServices.favouriteMedicineList.some((favMed) => favMed.productId.toString() === this.commonServices.selectedFormulation.productId.toString() &&
6403
+ if (this.showFavouriteMed) {
6404
+ return true;
6405
+ }
6406
+ return favouritesList.some((favMed) => favMed.productId.toString() === this.commonServices.selectedFormulation.productId.toString() &&
6403
6407
  (!this.commonServices.IsNullOrEmpty(favMed.pbsCode) ? favMed.pbsCode : "") === (!this.commonServices.IsNullOrEmpty(this.commonServices.selectedFormulation?.pbsCode) ? this.commonServices.selectedFormulation.pbsCode : "") &&
6404
6408
  favMed.productName === this.commonServices.selectedFormulation.productName && favMed.quantity?.toString() === this.commonServices.quantityVal?.toString() && favMed.repeats?.toString() === this.commonServices.repeatsVal?.toString() &&
6405
6409
  favMed.dose?.toString() === this.commonServices.doseSearchValue?.toString() && favMed.frequency?.toString() === this.commonServices.freqSearchValue?.toString() && favMed.food?.toString() === this.commonServices.foodSearchValue?.toString() &&