Commit 4c4260d6 authored by Donald Cook's avatar Donald Cook Committed by Kushal Pandya

Updated service desk incoming email field

parent 433a839a
......@@ -118,7 +118,10 @@ export default {
this.isTemplateSaving = true;
this.service
.updateTemplate({ selectedTemplate, outgoingName, projectKey }, this.isEnabled)
.then(() => this.showAlert(__('Template was successfully saved.'), 'success'))
.then(({ data }) => {
this.incomingEmail = data?.service_desk_address;
this.showAlert(__('Changes were successfully made.'), 'success');
})
.catch(() =>
this.showAlert(
__('An error occurred while saving the template. Please check if the template exists.'),
......
......@@ -164,7 +164,7 @@ export default {
:disabled="isTemplateSaving"
@click="onSaveTemplate"
>
{{ __('Save template') }}
{{ __('Save changes') }}
</gl-button>
</div>
</div>
......
......@@ -10,7 +10,7 @@
- if ::Gitlab::ServiceDesk.supported?
.js-service-desk-setting-root{ data: { endpoint: project_service_desk_path(@project),
enabled: "#{@project.service_desk_enabled}",
incoming_email: (@project.service_desk_incoming_address if @project.service_desk_enabled),
incoming_email: (@project.service_desk_address if @project.service_desk_enabled),
custom_email: (@project.service_desk_custom_address if @project.service_desk_enabled),
selected_template: "#{@project.service_desk_setting&.issue_template_key}",
outgoing_name: "#{@project.service_desk_setting&.outgoing_name}",
......
......@@ -4633,6 +4633,9 @@ msgstr ""
msgid "Changes the title to \"%{title_param}\"."
msgstr ""
msgid "Changes were successfully made."
msgstr ""
msgid "Changes won't take place until the index is %{link_start}recreated%{link_end}."
msgstr ""
......@@ -21828,9 +21831,6 @@ msgstr ""
msgid "Save space and find tags in the Container Registry more easily. Enable the cleanup policy to remove stale tags and keep only the ones you need."
msgstr ""
msgid "Save template"
msgstr ""
msgid "Save variables"
msgstr ""
......@@ -24654,9 +24654,6 @@ msgstr ""
msgid "Template to append to all Service Desk issues"
msgstr ""
msgid "Template was successfully saved."
msgstr ""
msgid "Templates"
msgstr ""
......
......@@ -195,7 +195,7 @@ describe('ServiceDeskRoot', () => {
.$nextTick()
.then(waitForPromises)
.then(() => {
expect(wrapper.html()).toContain('Template was successfully saved.');
expect(wrapper.html()).toContain('Changes were successfully made.');
});
});
......
......@@ -163,7 +163,7 @@ describe('ServiceDeskSetting', () => {
},
});
expect(wrapper.find('button.btn-success').text()).toContain('Save template');
expect(wrapper.find('button.btn-success').text()).toContain('Save changes');
});
it('emits a save event with the chosen template when the save button is clicked', () => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment