cartodb-4.42/lib/assets/javascripts/dashboard/components/trial-notification/trial-notification-view.js
2024-04-06 05:25:13 +00:00

31 lines
636 B
JavaScript

const CoreView = require('backbone/core-view');
const template = require('./trial-notification.tpl');
const checkAndBuildOpts = require('builder/helpers/required-opts');
const REQUIRED_OPTS = [
'userModel',
'upgradeUrl',
'trialDays'
];
module.exports = CoreView.extend({
initialize: function (options) {
checkAndBuildOpts(options, REQUIRED_OPTS, this);
this.userAccount = this._userModel.get('account_type');
},
render: function () {
this.clearSubViews();
this.$el.html(
template({
upgradeUrl: this._upgradeUrl,
trialDays: this._trialDays
})
);
return this;
}
});