@james_jayaraj/test-npm 1.3.8 → 1.4.0

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.
@@ -6178,7 +6178,7 @@ class RxComponent {
6178
6178
  food: this.commonServices.foodSearchValue,
6179
6179
  instruction: this.commonServices.InstructionSearchValue,
6180
6180
  route: this.commonServices.routeSearchValue,
6181
- ...(!isAdding && { encryptedId: this.showFavouriteMed ? this.commonServices.favouriteEncryptedId : this.getCurrentFavEncryptedId() }),
6181
+ ...(!isAdding && { encryptedId: this.getCurrentFavEncryptedId() }),
6182
6182
  productPackId: this.commonServices.selectedFormulation?.productPackId ? this.commonServices.selectedFormulation.productPackId : '',
6183
6183
  };
6184
6184
  this.apiService.Post(body, config.PHYSICIAN.ADD_FAVOURITE_MEDICINE).subscribe((res) => {
@@ -6406,7 +6406,7 @@ class RxComponent {
6406
6406
  if (!this.commonServices.selectedFormulation || !favouritesList || favouritesList.length === 0) {
6407
6407
  return false;
6408
6408
  }
6409
- return favouritesList.some((favMed) => favMed.productId.toString() === this.commonServices.selectedFormulation.productId.toString() &&
6409
+ return favouritesList.some((favMed) => favMed.productId.toString() === this.commonServices.selectedFormulation.productId.toString() && favMed.productPackId.toString() === this.commonServices.selectedFormulation.productPackId.toString() &&
6410
6410
  (!this.commonServices.IsNullOrEmpty(favMed.pbsCode) ? favMed.pbsCode : "") === (!this.commonServices.IsNullOrEmpty(this.commonServices.selectedFormulation?.pbsCode) ? this.commonServices.selectedFormulation.pbsCode : "") &&
6411
6411
  favMed.productName === this.commonServices.selectedFormulation.productName && favMed.quantity?.toString() === this.commonServices.quantityVal?.toString() && favMed.repeats?.toString() === this.commonServices.repeatsVal?.toString() &&
6412
6412
  favMed.dose?.toString() === this.commonServices.doseSearchValue?.toString() && favMed.frequency?.toString() === this.commonServices.freqSearchValue?.toString() && favMed.food?.toString() === this.commonServices.foodSearchValue?.toString() &&
@@ -6448,8 +6448,8 @@ class RxComponent {
6448
6448
  }, 200);
6449
6449
  }
6450
6450
  getCurrentFavEncryptedId() {
6451
- let favouritesList = this.showFavouriteMed ? this.commonServices.favouriteMedicineList : this.commonServices.originalFavouriteMedicineList;
6452
- return favouritesList.find((favMed) => favMed.productId.toString() === this.commonServices.selectedFormulation.productId.toString() &&
6451
+ let favouritesList = this.commonServices.originalFavouriteMedicineList;
6452
+ return favouritesList.find((favMed) => favMed.productId.toString() === this.commonServices.selectedFormulation.productId.toString() && favMed.productPackId.toString() === this.commonServices.selectedFormulation.productPackId.toString() &&
6453
6453
  (!this.commonServices.IsNullOrEmpty(favMed.pbsCode) ? favMed.pbsCode : "") === (!this.commonServices.IsNullOrEmpty(this.commonServices.selectedFormulation?.pbsCode) ? this.commonServices.selectedFormulation.pbsCode : "") &&
6454
6454
  favMed.productName === this.commonServices.selectedFormulation.productName && favMed.quantity?.toString() === this.commonServices.quantityVal?.toString() && favMed.repeats?.toString() === this.commonServices.repeatsVal?.toString() &&
6455
6455
  favMed.dose?.toString() === this.commonServices.doseSearchValue?.toString() && favMed.frequency?.toString() === this.commonServices.freqSearchValue?.toString() && favMed.food?.toString() === this.commonServices.foodSearchValue?.toString() &&