Skip to content

Commit

Permalink
Merge pull request bcgov#1269 from bcgov/fix/forms-982
Browse files Browse the repository at this point in the history
Fix Save button stop working issue
  • Loading branch information
usingtechnology committed Feb 12, 2024
2 parents 8a927a7 + 217a8e8 commit 7f2b547
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
15 changes: 8 additions & 7 deletions app/frontend/src/components/designer/FormDesigner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { formService } from '~/services';
import { useAuthStore } from '~/store/auth';
import { useFormStore } from '~/store/form';
import { useNotificationStore } from '~/store/notification';
import { IdentityMode, NotificationTypes } from '~/utils/constants';
import { IdentityMode } from '~/utils/constants';
import { generateIdps } from '~/utils/transformUtils';
import { userService } from '../../services';
Expand Down Expand Up @@ -227,7 +227,6 @@ export default {
'setDirtyFlag',
'getFCProactiveHelpImageUrl',
]),
...mapActions(useNotificationStore, ['addNotification']),
async getFormSchema() {
try {
Expand Down Expand Up @@ -431,11 +430,13 @@ export default {
this.canSave = true;
modified?.components?.map((comp) => {
if (comp.key === 'form') {
this.addNotification({
...NotificationTypes.ERROR,
message: this.$t('trans.formDesigner.fieldnameError', {
label: comp.label,
}),
const notificationStore = useNotificationStore();
const msg = i18n.t('trans.formDesigner.fieldnameError', {
label: comp.label,
});
notificationStore.addNotification({
text: msg,
consoleError: msg,
});
this.canSave = false;
}
Expand Down
2 changes: 1 addition & 1 deletion app/frontend/src/components/forms/manage/EmailTemplate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default {
this.formChanged = false;
} catch (error) {
this.addNotification({
message: i18n.t('trans.emailTemplate.saveEmailTemplateErrMsg'),
text: i18n.t('trans.emailTemplate.saveEmailTemplateErrMsg'),
consoleError: i18n.t(
'trans.emailTemplate.saveEmailTemplateConsoleErrMsg',
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@ export default {
s: this.formSubmission?.id,
},
});
this.addNotification({
...NotificationTypes.WARNING,
message: this.$t('trans.formViewer.formDraftAccessErrMsg'),
text: this.$t('trans.formViewer.formDraftAccessErrMsg'),
});
}
this.loading = false;
Expand Down

0 comments on commit 7f2b547

Please sign in to comment.