prettier'd
This commit is contained in:
parent
0307ab1c0a
commit
78ec13b7fe
2 changed files with 20 additions and 23 deletions
|
|
@ -2,12 +2,12 @@ import { storeActions } from "@/constants/store-actions";
|
||||||
import baseMixin from "@/mixins/base-mixin.js";
|
import baseMixin from "@/mixins/base-mixin.js";
|
||||||
|
|
||||||
export async function getAlertReasons(ctu) {
|
export async function getAlertReasons(ctu) {
|
||||||
const alertReasons = await baseMixin.methods.dispatchStoreAction(
|
const alertReasons = await baseMixin.methods.dispatchStoreAction(
|
||||||
storeActions.GET_ALERT_REASONS_BY_CTU,
|
storeActions.GET_ALERT_REASONS_BY_CTU,
|
||||||
{
|
{
|
||||||
ctu: ctu,
|
ctu: ctu,
|
||||||
}
|
}
|
||||||
)
|
);
|
||||||
|
|
||||||
return Promise.resolve(alertReasons);
|
return Promise.resolve(alertReasons);
|
||||||
}
|
}
|
||||||
|
|
@ -57,9 +57,7 @@ import datePicker from "@/digital-components/date-picker/date-picker";
|
||||||
import { fetchCmsContentForPage } from "@/helpers/cms-content-helper";
|
import { fetchCmsContentForPage } from "@/helpers/cms-content-helper";
|
||||||
import { settleAllPromises } from "@/helpers/layout-helper";
|
import { settleAllPromises } from "@/helpers/layout-helper";
|
||||||
import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper";
|
import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper";
|
||||||
import {
|
import { getAlertReasons } from "@/layouts/schedule/helpers/schedule-helper";
|
||||||
getAlertReasons,
|
|
||||||
} from "@/layouts/schedule/helpers/schedule-helper";
|
|
||||||
import {
|
import {
|
||||||
doesCopyContainRouterLink,
|
doesCopyContainRouterLink,
|
||||||
splitCopyOnCMSPlaceHolder,
|
splitCopyOnCMSPlaceHolder,
|
||||||
|
|
@ -145,7 +143,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
cmsHeadlineTextFound(widgetName) {
|
cmsHeadlineTextFound(widgetName) {
|
||||||
return this.getCmsContent(widgetName, "HeadlineText") !== ""
|
return this.getCmsContent(widgetName, "HeadlineText") !== "";
|
||||||
},
|
},
|
||||||
convertReasonsToCmsAlerts(data) {
|
convertReasonsToCmsAlerts(data) {
|
||||||
this.weatherAlerts = data.reduce((newObj, alert) => {
|
this.weatherAlerts = data.reduce((newObj, alert) => {
|
||||||
|
|
@ -158,14 +156,14 @@ export default {
|
||||||
},
|
},
|
||||||
async getWeatherAlertReasons(ctu) {
|
async getWeatherAlertReasons(ctu) {
|
||||||
await getAlertReasons(ctu)
|
await getAlertReasons(ctu)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
this.convertReasonsToCmsAlerts(response.data);
|
this.convertReasonsToCmsAlerts(response.data);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
console.log("error fetching alert reasons..");
|
console.log("error fetching alert reasons..");
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getAvailableDates(startDate, endDate) {
|
getAvailableDates(startDate, endDate) {
|
||||||
return this.mockSelectableDatesData;
|
return this.mockSelectableDatesData;
|
||||||
|
|
@ -189,8 +187,7 @@ export default {
|
||||||
loadingModal,
|
loadingModal,
|
||||||
datePicker,
|
datePicker,
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {},
|
||||||
},
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue