Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- searchBest() {
- if (this.selectedRtTariffs.length) {
- this.selectedRtTariffs.forEach((item) => {
- if (this.checkToDefined(item.price) && item.price < this.bestData.price) {
- this.bestData.price = item.price;
- }
- if (this.checkToDefined(item.shpd) && item.shpd.speed > this.bestData.shpd) {
- this.bestData.shpd = item.shpd.speed;
- }
- if (this.checkToDefined(item.tv) && item.tv.channelsCount > this.bestData.tv) {
- this.bestData.tv = item.tv.channelsCount;
- }
- if (this.checkToDefined(item.mvno) && item.mvno.gbCount > this.bestData.mvno) {
- this.bestData.mvno = item.mvno.gbCount;
- }
- });
- }
- if (this.selectedProviderTariffs.length) {
- this.selectedProviderTariffs.forEach((item) => {
- if (this.checkToDefined(item.price) && item.price < this.bestData.price) {
- this.bestData.price = item.price;
- }
- if (this.checkToDefined(item.shpd) && item.shpd.speed > this.bestData.shpd) {
- this.bestData.shpd = item.shpd.speed;
- }
- if (this.checkToDefined(item.tv) && item.tv.channelsCount > this.bestData.tv) {
- this.bestData.tv = item.tv.channelsCount;
- }
- if (this.checkToDefined(item.mvno) && item.mvno.gbCount > this.bestData.mvno) {
- this.bestData.mvno = item.mvno.gbCount;
- }
- });
- }
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement