@james_jayaraj/test-npm 1.3.2 → 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.
@@ -3720,6 +3720,7 @@ class RxComponent {
3720
3720
  try {
3721
3721
  this.commonServices.selectedFormulation = med;
3722
3722
  this.commonServices.clearMedicalPrescriptionDataOnchangeofMedicine(med);
3723
+ this.changedetect.detectChanges();
3723
3724
  if (!this.commonServices.isMedicineRestrict) {
3724
3725
  this.commonServices.isS8WarningNext = true;
3725
3726
  this.restrictions = med.Restrictions && med.Restrictions.length != 0 ? med.Restrictions[0] : null;
@@ -6395,16 +6396,20 @@ class RxComponent {
6395
6396
  }
6396
6397
  }
6397
6398
  isCurrentMedicineInFavourites() {
6398
- 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) {
6399
6401
  return false;
6400
6402
  }
6401
- return this.commonServices.favouriteMedicineList.some((favMed) => {
6402
- var _a;
6403
+ if (this.showFavouriteMed) {
6404
+ return true;
6405
+ }
6406
+ return favouritesList.some((favMed) => {
6407
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
6403
6408
  return favMed.productId.toString() === this.commonServices.selectedFormulation.productId.toString() &&
6404
6409
  (!this.commonServices.IsNullOrEmpty(favMed.pbsCode) ? favMed.pbsCode : "") === (!this.commonServices.IsNullOrEmpty((_a = this.commonServices.selectedFormulation) === null || _a === void 0 ? void 0 : _a.pbsCode) ? this.commonServices.selectedFormulation.pbsCode : "") &&
6405
- favMed.productName === this.commonServices.selectedFormulation.productName && favMed.quantity === this.commonServices.quantityVal && favMed.repeats === this.commonServices.repeatsVal &&
6406
- favMed.dose === this.commonServices.doseSearchValue && favMed.frequency === this.commonServices.freqSearchValue && favMed.food === this.commonServices.foodSearchValue &&
6407
- favMed.instruction === this.commonServices.InstructionSearchValue && favMed.route === this.commonServices.routeSearchValue;
6410
+ favMed.productName === this.commonServices.selectedFormulation.productName && ((_b = favMed.quantity) === null || _b === void 0 ? void 0 : _b.toString()) === ((_c = this.commonServices.quantityVal) === null || _c === void 0 ? void 0 : _c.toString()) && ((_d = favMed.repeats) === null || _d === void 0 ? void 0 : _d.toString()) === ((_e = this.commonServices.repeatsVal) === null || _e === void 0 ? void 0 : _e.toString()) &&
6411
+ ((_f = favMed.dose) === null || _f === void 0 ? void 0 : _f.toString()) === ((_g = this.commonServices.doseSearchValue) === null || _g === void 0 ? void 0 : _g.toString()) && ((_h = favMed.frequency) === null || _h === void 0 ? void 0 : _h.toString()) === ((_j = this.commonServices.freqSearchValue) === null || _j === void 0 ? void 0 : _j.toString()) && ((_k = favMed.food) === null || _k === void 0 ? void 0 : _k.toString()) === ((_l = this.commonServices.foodSearchValue) === null || _l === void 0 ? void 0 : _l.toString()) &&
6412
+ ((_m = favMed.instruction) === null || _m === void 0 ? void 0 : _m.toString()) === ((_o = this.commonServices.InstructionSearchValue) === null || _o === void 0 ? void 0 : _o.toString()) && ((_p = favMed.route) === null || _p === void 0 ? void 0 : _p.toString()) === ((_q = this.commonServices.routeSearchValue) === null || _q === void 0 ? void 0 : _q.toString());
6408
6413
  });
6409
6414
  }
6410
6415
  isPbsTypeMatch(itemPbsType, pbsTypeFilter) {