From d0f1e4c4c9c25a18e388d895c7119ba771246703 Mon Sep 17 00:00:00 2001 From: Eleazar Resendez Date: Thu, 4 Jan 2024 11:53:08 -0600 Subject: [PATCH 1/9] Apply eslint in SettingDriverAuthorization component --- .../components/SettingDriverAuthorization.vue | 78 ++++++++++++------- 1 file changed, 50 insertions(+), 28 deletions(-) diff --git a/resources/js/admin/settings/components/SettingDriverAuthorization.vue b/resources/js/admin/settings/components/SettingDriverAuthorization.vue index a5772dddcf..d295e3509e 100644 --- a/resources/js/admin/settings/components/SettingDriverAuthorization.vue +++ b/resources/js/admin/settings/components/SettingDriverAuthorization.vue @@ -5,8 +5,8 @@ pill :variant="isAuthorized ? 'success' : 'warning'" > - {{ $t('Authorized') }} - {{ $t('Not Authorized') }} + {{ $t("Authorized") }} + {{ $t("Not Authorized") }}
@@ -24,34 +24,34 @@ class="d-block" >
-
- {{ $t(setting.name) }} +
+ {{ $t(setting.name) }} + {{ $t(setting.key) }}
-
- {{ setting.key }} -
- {{ $t('Configure the driver connection properties.') }} + {{ + $t("Configure the driver connection properties.") + }}
@@ -69,7 +69,13 @@ @@ -103,7 +109,13 @@ @@ -145,7 +157,7 @@ data-cy="cancel-button" @click="onCancel" > - {{ $t('Cancel') }} + {{ $t("Cancel") }}
@@ -169,7 +181,7 @@ no-fade >
-

{{ $t('Connecting Driver') }}

+

{{ $t("Connecting Driver") }}

@@ -259,11 +271,20 @@ export default { }, methods: { onCopy() { - navigator.clipboard.writeText(this.formData.callback_url).then(() => { - ProcessMaker.alert(this.$t("The setting was copied to your clipboard."), "success"); - }, () => { - ProcessMaker.alert(this.$t("The setting was not copied to your clipboard."), "danger"); - }); + navigator.clipboard.writeText(this.formData.callback_url).then( + () => { + ProcessMaker.alert( + this.$t("The setting was copied to your clipboard."), + "success", + ); + }, + () => { + ProcessMaker.alert( + this.$t("The setting was not copied to your clipboard."), + "danger", + ); + }, + ); }, togglePassword() { if (this.type === "text") { @@ -298,7 +319,8 @@ export default { this.showAuthorizingModal = true; this.showModal = false; this.resetData = false; - ProcessMaker.apiClient.post(`settings/${this.setting.id}/get-oauth-url`, this.formData) + ProcessMaker.apiClient + .post(`settings/${this.setting.id}/get-oauth-url`, this.formData) .then((response) => { window.location = response.data?.url; }) From 6fae3e86ca1fa0cbb403afbb4d472ef57204f3e1 Mon Sep 17 00:00:00 2001 From: Eleazar Resendez Date: Thu, 4 Jan 2024 17:06:43 -0600 Subject: [PATCH 2/9] Add AuthSchemes connection components --- .../components/SettingDriverAuthorization.vue | 146 +++-------------- .../cdata/NoneConnectionProperties.vue | 21 +++ .../cdata/OauthConnectionProperties.vue | 149 ++++++++++++++++++ 3 files changed, 193 insertions(+), 123 deletions(-) create mode 100644 resources/js/admin/settings/components/cdata/NoneConnectionProperties.vue create mode 100644 resources/js/admin/settings/components/cdata/OauthConnectionProperties.vue diff --git a/resources/js/admin/settings/components/SettingDriverAuthorization.vue b/resources/js/admin/settings/components/SettingDriverAuthorization.vue index d295e3509e..0389d3a5ee 100644 --- a/resources/js/admin/settings/components/SettingDriverAuthorization.vue +++ b/resources/js/admin/settings/components/SettingDriverAuthorization.vue @@ -10,7 +10,7 @@
- Empty + {{ $t("Empty") }}
{{ $t(setting.name) }} {{ $t(setting.key) }} - {{ - $t("Configure the driver connection properties.") - }} + + {{ $t("Configure the driver connection properties.") }} +