Skip to content

Commit

Permalink
Merge branch 'main' into feat/forms-1240-external-api
Browse files Browse the repository at this point in the history
  • Loading branch information
usingtechnology authored Jun 21, 2024
2 parents 1f0703e + 152cf2d commit 1749b91
Show file tree
Hide file tree
Showing 9 changed files with 399 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ defineExpose({
<v-checkbox
v-model="form.enableStatusUpdates"
data-test="canUpdateStatusOfFormCheckbox"
hide-details="auto"
class="my-0"
>
Expand All @@ -96,6 +97,7 @@ defineExpose({
<v-checkbox
v-model="form.allowSubmitterToUploadFile"
data-test="canUploadDraftCheckbox"
hide-details="auto"
class="my-0"
:disabled="form.userType === ID_MODE.PUBLIC"
Expand Down Expand Up @@ -140,6 +142,7 @@ defineExpose({
v-model="form.schedule.enabled"
disabled
hide-details="auto"
data-test="canScheduleFormSubmissionCheckbox"
class="my-0"
>
<template #label>
Expand All @@ -153,6 +156,7 @@ defineExpose({
v-if="formStore.isFormPublished"
v-model="form.schedule.enabled"
hide-details="auto"
data-test="canScheduleFormSubmissionCheckbox"
class="my-0"
>
<template #label>
Expand Down Expand Up @@ -191,6 +195,7 @@ defineExpose({
<v-checkbox
v-model="form.enableCopyExistingSubmission"
hide-details="auto"
data-test="canCopyExistingSubmissionCheckbox"
class="my-0"
:disabled="form.userType === ID_MODE.PUBLIC"
>
Expand Down Expand Up @@ -231,6 +236,7 @@ defineExpose({
<v-checkbox
v-model="form.subscribe.enabled"
hide-details="auto"
data-test="canAllowEventSubscriptionCheckbox"
class="my-0"
:disabled="primaryIdpUser === false || !formStore.isFormPublished"
>
Expand Down Expand Up @@ -268,7 +274,12 @@ defineExpose({
</div>
</template>
</v-checkbox>
<v-checkbox v-model="form.wideFormLayout" hide-details="auto" class="my-0">
<v-checkbox
v-model="form.wideFormLayout"
hide-details="auto"
data-test="canAllowWideFormLayoutCheckbox"
class="my-0"
>
<template #label>
<div :class="{ 'mr-2': isRTL }">
<span
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const emailArrayRules = ref([
<v-checkbox
v-model="form.showSubmissionConfirmation"
hide-details="auto"
data-test="canAllowSubmissionConfirmationCheckbox"
class="my-0"
:class="{ 'dir-rtl': isRTL }"
>
Expand Down
5 changes: 5 additions & 0 deletions app/frontend/src/components/forms/manage/ApiKey.vue
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ export default {
? $t('trans.apiKey.regenerate')
: $t('trans.apiKey.generate')
}${$t('trans.apiKey.apiKey')}`"
data-test="canGenerateAPIKey"
@click="showConfirmationDialog = true"
>
<span :lang="lang"
Expand Down Expand Up @@ -163,6 +164,7 @@ export default {
size="x-small"
density="default"
:icon="showSecret ? 'mdi:mdi-eye-off' : 'mdi:mdi-eye'"
data-test="canReadAPIKey"
:title="$t('trans.apiKey.hideSecret')"
@click="showHideKey"
/>
Expand All @@ -175,6 +177,7 @@ export default {
<BaseCopyToClipboard
:disabled="!canReadSecret || !showSecret"
data-test="canAllowCopyAPIKey"
class="mx-2"
:text-to-copy="secret"
:snack-bar-text="$t('trans.apiKey.sCTC')"
Expand All @@ -191,6 +194,7 @@ export default {
size="x-small"
density="default"
icon="mdi:mdi-delete"
data-test="canDeleteApiKey"
:title="$t('trans.apiKey.deleteKey')"
@click="showDeleteDialog = true"
/>
Expand Down Expand Up @@ -261,6 +265,7 @@ export default {
v-model="filesApiAccess"
:disabled="!apiKey"
:label="$t('trans.apiKey.filesAPIAccess')"
data-test="canAllowFileAccess"
@update:model-value="updateKey"
></v-checkbox>
</v-col>
Expand Down
23 changes: 19 additions & 4 deletions app/frontend/src/components/forms/manage/ManageForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,11 @@ export default {
<v-expansion-panel flat>
<!-- Form Settings -->
<v-expansion-panel-title>
<div class="header" :lang="lang">
<div
class="header"
:lang="lang"
data-test="canExpandFormSettingsPanel"
>
<strong>{{ $t('trans.manageForm.formSettings') }}</strong>
<span :lang="lang">
<small>
Expand All @@ -163,6 +167,7 @@ export default {
color="primary"
style="font-size: 14px"
:title="$t('trans.generalLayout.edit')"
data-test="canAllowEditFormSettings"
@click.stop="enableSettingsEdit"
>
<v-icon icon="mdi:mdi-pencil"></v-icon>
Expand All @@ -189,13 +194,15 @@ export default {
:class="isRTL ? 'ml-5' : 'mr-5'"
color="primary"
:title="$t('trans.manageForm.update')"
data-test="canEditForm"
@click="updateSettings"
>
<span :lang="lang">{{ $t('trans.manageForm.update') }}</span>
</v-btn>
<v-btn
variant="outlined"
:title="$t('trans.manageForm.cancel')"
data-test="canCancelEdit"
@click="cancelSettingsEdit"
>
<span :lang="lang">{{ $t('trans.manageForm.cancel') }}</span>
Expand Down Expand Up @@ -245,7 +252,11 @@ export default {
>
<v-expansion-panel flat>
<v-expansion-panel-title>
<div class="header" :lang="lang">
<div
class="header"
:lang="lang"
data-test="canExpandApiKeySettingsPanel"
>
<strong>{{ $t('trans.manageForm.apiKey') }}</strong>
<span v-if="apiKey" :lang="lang">
<small v-if="apiKey.updatedBy">
Expand Down Expand Up @@ -277,7 +288,7 @@ export default {
>
<v-expansion-panel flat>
<v-expansion-panel-title>
<div class="header" :lang="lang">
<div class="header" :lang="lang" data-test="canExpandCDOGSPanel">
<strong>{{ $t('trans.manageForm.cdogsTemplate') }}</strong>
</div>
</v-expansion-panel-title>
Expand Down Expand Up @@ -309,7 +320,11 @@ export default {
<v-expansion-panels v-model="versionsPanel" class="nrmc-expand-collapse">
<v-expansion-panel flat>
<v-expansion-panel-title>
<div class="header" :lang="lang">
<div
class="header"
:lang="lang"
data-test="canExpandFormDesignHistoryPanel"
>
<strong style="flex: 1">{{
$t('trans.manageForm.formDesignHistory')
}}</strong>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export default {
size="x-small"
density="default"
icon="mdi:mdi-list-box-outline"
data-test="canViewFormSubmissions"
:title="$t('trans.manageFormActions.viewSubmissions')"
/>
</router-link>
Expand All @@ -91,6 +92,7 @@ export default {
size="x-small"
density="default"
icon="mdi:mdi-account-multiple"
data-test="canManageTeammembers"
:title="$t('trans.manageFormActions.teamManagement')"
/>
</router-link>
Expand All @@ -112,6 +114,7 @@ export default {
size="x-small"
density="default"
icon="mdi:mdi-email"
data-test="canUpdateEmail"
:title="$t('trans.manageFormActions.emailManagement')"
/>
</router-link>
Expand All @@ -133,6 +136,7 @@ export default {
size="x-small"
density="default"
icon="mdi:mdi-delete"
data-test="canRemoveForm"
:title="$t('trans.manageFormActions.deleteForm')"
@click="showDeleteDialog = true"
/>
Expand Down
6 changes: 6 additions & 0 deletions app/frontend/src/components/forms/manage/TeamManagement.vue
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,7 @@ export default {
v-model="item.form_designer"
v-ripple
:disabled="updating"
data-test="FormDesignerRoleCheckbox"
@update:modelValue="toggleRole(item)"
></v-checkbox-btn>
</template>
Expand All @@ -581,6 +582,7 @@ export default {
v-model="item.owner"
v-ripple
:disabled="updating"
data-test="OwnerRoleCheckbox"
@update:modelValue="toggleRole(item)"
></v-checkbox-btn>
</template>
Expand All @@ -591,6 +593,7 @@ export default {
v-model="item.submission_approver"
v-ripple
:disabled="updating"
data-test="ApproverRoleCheckbox"
@update:modelValue="toggleRole(item)"
></v-checkbox-btn>
</template>
Expand All @@ -601,6 +604,7 @@ export default {
v-model="item.submission_reviewer"
v-ripple
:disabled="updating"
data-test="ReviewerRoleCheckbox"
@update:modelValue="toggleRole(item)"
></v-checkbox-btn>
</template>
Expand All @@ -611,6 +615,7 @@ export default {
v-model="item.form_submitter"
v-ripple
:disabled="updating"
data-test="SubmitterRoleCheckbox"
@update:modelValue="toggleRole(item)"
></v-checkbox-btn>
</template>
Expand All @@ -621,6 +626,7 @@ export default {
v-model="item.team_manager"
v-ripple
:disabled="updating"
data-test="TeamManagerRoleCheckbox"
@update:modelValue="toggleRole(item)"
></v-checkbox-btn>
</template>
Expand Down
4 changes: 4 additions & 0 deletions app/frontend/src/components/forms/submission/NotesPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export default {
>
<div
class="d-flex flex-md-row justify-space-between"
data-test="showNotesPanel"
@click="showNotesContent = !showNotesContent"
>
<div cols="12" sm="6">
Expand Down Expand Up @@ -115,6 +116,7 @@ export default {
size="x-small"
v-bind="props"
:title="$t('trans.notesPanel.addNewNote')"
data-test="canAddNewNote"
@click.stop="showNoteField = true"
@click="showNotesContent = true"
>
Expand All @@ -135,6 +137,7 @@ export default {
auto-grow
density="compact"
variant="outlined"
data-test="canAddNotes"
solid
:lang="lang"
/>
Expand All @@ -145,6 +148,7 @@ export default {
color="primary"
variant="outlined"
:title="$t('trans.notesPanel.cancel')"
data-test="canCancelNote"
@click="showNoteField = false"
>
<span :lang="lang">{{ $t('trans.notesPanel.cancel') }}</span>
Expand Down
Loading

0 comments on commit 1749b91

Please sign in to comment.