Commit 70efb05f authored by Kushal Pandya's avatar Kushal Pandya

Merge branch...

Merge branch '223692-show-the-final-service-desk-custom-address-in-service-desk-settings' into 'master'

Updated service desk incoming email field

See merge request gitlab-org/gitlab!36593
parents 8b5caa71 4c4260d6
...@@ -118,7 +118,10 @@ export default { ...@@ -118,7 +118,10 @@ export default {
this.isTemplateSaving = true; this.isTemplateSaving = true;
this.service this.service
.updateTemplate({ selectedTemplate, outgoingName, projectKey }, this.isEnabled) .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(() => .catch(() =>
this.showAlert( this.showAlert(
__('An error occurred while saving the template. Please check if the template exists.'), __('An error occurred while saving the template. Please check if the template exists.'),
......
...@@ -164,7 +164,7 @@ export default { ...@@ -164,7 +164,7 @@ export default {
:disabled="isTemplateSaving" :disabled="isTemplateSaving"
@click="onSaveTemplate" @click="onSaveTemplate"
> >
{{ __('Save template') }} {{ __('Save changes') }}
</gl-button> </gl-button>
</div> </div>
</div> </div>
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
- if ::Gitlab::ServiceDesk.supported? - if ::Gitlab::ServiceDesk.supported?
.js-service-desk-setting-root{ data: { endpoint: project_service_desk_path(@project), .js-service-desk-setting-root{ data: { endpoint: project_service_desk_path(@project),
enabled: "#{@project.service_desk_enabled}", 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), custom_email: (@project.service_desk_custom_address if @project.service_desk_enabled),
selected_template: "#{@project.service_desk_setting&.issue_template_key}", selected_template: "#{@project.service_desk_setting&.issue_template_key}",
outgoing_name: "#{@project.service_desk_setting&.outgoing_name}", outgoing_name: "#{@project.service_desk_setting&.outgoing_name}",
......
...@@ -4633,6 +4633,9 @@ msgstr "" ...@@ -4633,6 +4633,9 @@ msgstr ""
msgid "Changes the title to \"%{title_param}\"." msgid "Changes the title to \"%{title_param}\"."
msgstr "" msgstr ""
msgid "Changes were successfully made."
msgstr ""
msgid "Changes won't take place until the index is %{link_start}recreated%{link_end}." msgid "Changes won't take place until the index is %{link_start}recreated%{link_end}."
msgstr "" msgstr ""
...@@ -21840,9 +21843,6 @@ msgstr "" ...@@ -21840,9 +21843,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." 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 "" msgstr ""
msgid "Save template"
msgstr ""
msgid "Save variables" msgid "Save variables"
msgstr "" msgstr ""
...@@ -24666,9 +24666,6 @@ msgstr "" ...@@ -24666,9 +24666,6 @@ msgstr ""
msgid "Template to append to all Service Desk issues" msgid "Template to append to all Service Desk issues"
msgstr "" msgstr ""
msgid "Template was successfully saved."
msgstr ""
msgid "Templates" msgid "Templates"
msgstr "" msgstr ""
......
...@@ -195,7 +195,7 @@ describe('ServiceDeskRoot', () => { ...@@ -195,7 +195,7 @@ describe('ServiceDeskRoot', () => {
.$nextTick() .$nextTick()
.then(waitForPromises) .then(waitForPromises)
.then(() => { .then(() => {
expect(wrapper.html()).toContain('Template was successfully saved.'); expect(wrapper.html()).toContain('Changes were successfully made.');
}); });
}); });
......
...@@ -163,7 +163,7 @@ describe('ServiceDeskSetting', () => { ...@@ -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', () => { 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