debian-mirror-gitlab/app/assets/javascripts/projects/settings_service_desk/index.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

44 lines
1 KiB
JavaScript
Raw Normal View History

2020-07-28 23:09:34 +05:30
import Vue from 'vue';
import { parseBoolean } from '~/lib/utils/common_utils';
import ServiceDeskRoot from './components/service_desk_root.vue';
export default () => {
2021-03-11 19:13:27 +05:30
const el = document.querySelector('.js-service-desk-setting-root');
if (!el) {
return false;
2020-07-28 23:09:34 +05:30
}
2021-03-11 19:13:27 +05:30
const {
customEmail,
customEmailEnabled,
enabled,
endpoint,
incomingEmail,
outgoingName,
projectKey,
selectedTemplate,
2021-12-11 22:18:48 +05:30
selectedFileTemplateProjectId,
2021-03-11 19:13:27 +05:30
templates,
2022-10-11 01:57:18 +05:30
publicProject,
2021-03-11 19:13:27 +05:30
} = el.dataset;
return new Vue({
el,
provide: {
customEmail,
customEmailEnabled: parseBoolean(customEmailEnabled),
endpoint,
initialIncomingEmail: incomingEmail,
initialIsEnabled: parseBoolean(enabled),
outgoingName,
projectKey,
selectedTemplate,
2021-12-11 22:18:48 +05:30
selectedFileTemplateProjectId: parseInt(selectedFileTemplateProjectId, 10) || null,
2021-03-11 19:13:27 +05:30
templates: JSON.parse(templates),
2022-10-11 01:57:18 +05:30
publicProject: parseBoolean(publicProject),
2021-03-11 19:13:27 +05:30
},
render: (createElement) => createElement(ServiceDeskRoot),
});
2020-07-28 23:09:34 +05:30
};