2018-11-07 06:28:56 -05:00
|
|
|
/* eslint-disable
|
|
|
|
camelcase,
|
|
|
|
max-len,
|
|
|
|
no-return-assign,
|
|
|
|
*/
|
|
|
|
// TODO: This file was created by bulk-decaffeinate.
|
|
|
|
// Fix any style issues and re-enable lint.
|
|
|
|
/*
|
|
|
|
* decaffeinate suggestions:
|
|
|
|
* DS102: Remove unnecessary code created because of implicit returns
|
|
|
|
* DS207: Consider shorter variations of null checks
|
|
|
|
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
|
|
|
|
*/
|
2020-05-19 05:02:56 -04:00
|
|
|
import App from '../../base'
|
|
|
|
const _cobrandingData = window.brandVariation
|
2018-11-07 06:28:56 -05:00
|
|
|
|
2021-04-14 09:17:21 -04:00
|
|
|
export default App.factory('CobrandingDataService', function () {
|
2020-05-19 05:02:56 -04:00
|
|
|
const isProjectCobranded = () => _cobrandingData != null
|
2018-11-07 06:28:56 -05:00
|
|
|
|
2020-05-19 05:02:56 -04:00
|
|
|
const getLogoImgUrl = () =>
|
|
|
|
_cobrandingData != null ? _cobrandingData.logo_url : undefined
|
2018-11-07 06:28:56 -05:00
|
|
|
|
2020-05-19 05:02:56 -04:00
|
|
|
const getSubmitBtnHtml = () =>
|
|
|
|
_cobrandingData != null ? _cobrandingData.submit_button_html : undefined
|
2018-11-07 06:28:56 -05:00
|
|
|
|
2020-05-19 05:02:56 -04:00
|
|
|
const getBrandVariationName = () =>
|
|
|
|
_cobrandingData != null ? _cobrandingData.name : undefined
|
2018-11-07 06:28:56 -05:00
|
|
|
|
2020-05-19 05:02:56 -04:00
|
|
|
const getBrandVariationHomeUrl = () =>
|
|
|
|
_cobrandingData != null ? _cobrandingData.home_url : undefined
|
2018-11-07 06:28:56 -05:00
|
|
|
|
2020-05-19 05:02:56 -04:00
|
|
|
const getPublishGuideHtml = () =>
|
|
|
|
_cobrandingData != null ? _cobrandingData.publish_guide_html : undefined
|
2018-11-07 06:28:56 -05:00
|
|
|
|
2020-05-19 05:02:56 -04:00
|
|
|
const getPartner = () =>
|
|
|
|
_cobrandingData != null ? _cobrandingData.partner : undefined
|
2018-11-07 06:28:56 -05:00
|
|
|
|
2020-05-19 05:02:56 -04:00
|
|
|
const hasBrandedMenu = () =>
|
|
|
|
_cobrandingData != null ? _cobrandingData.branded_menu : undefined
|
2018-11-07 06:28:56 -05:00
|
|
|
|
2020-05-19 05:02:56 -04:00
|
|
|
const getBrandId = () =>
|
|
|
|
_cobrandingData != null ? _cobrandingData.brand_id : undefined
|
2018-11-07 06:28:56 -05:00
|
|
|
|
2020-05-19 05:02:56 -04:00
|
|
|
const getBrandVariationId = () =>
|
|
|
|
_cobrandingData != null ? _cobrandingData.id : undefined
|
2018-11-07 06:28:56 -05:00
|
|
|
|
2020-05-19 05:02:56 -04:00
|
|
|
return {
|
|
|
|
isProjectCobranded,
|
|
|
|
getLogoImgUrl,
|
|
|
|
getSubmitBtnHtml,
|
|
|
|
getBrandVariationName,
|
|
|
|
getBrandVariationHomeUrl,
|
|
|
|
getPublishGuideHtml,
|
|
|
|
getPartner,
|
|
|
|
hasBrandedMenu,
|
|
|
|
getBrandId,
|
|
|
|
getBrandVariationId
|
|
|
|
}
|
2018-11-07 06:28:56 -05:00
|
|
|
})
|