forked from jsnbuchanan/crowd-funder-for-time-pwa
Extract literal strings from complex modals to notification constants
Replace hardcoded text in raw $notify calls with centralized constants: - MembersList.vue: 2 complex modals (contact admission workflow) - ContactsView.vue: 2 complex modals (registration, onboarding meeting) - ProjectViewView.vue: 1 complex modal (claim confirmation) Preserves advanced modal features (promptToStopAsking, custom buttons, nested workflows) while standardizing text through constants for maintainability and future localization support.
This commit is contained in:
@@ -309,6 +309,8 @@ import {
|
||||
NOTIFY_REGISTER_PERSON_ERROR,
|
||||
NOTIFY_VISIBILITY_ERROR,
|
||||
NOTIFY_UNCONFIRMED_HOURS,
|
||||
NOTIFY_REGISTER_CONTACT,
|
||||
NOTIFY_ONBOARDING_MEETING,
|
||||
} from "@/constants/notifications";
|
||||
|
||||
@Component({
|
||||
@@ -636,10 +638,8 @@ export default class ContactsView extends Vue {
|
||||
resp.status,
|
||||
resp.data,
|
||||
);
|
||||
this.notify.error(
|
||||
`Got an error retrieving your ${useRecipient ? "given" : "received"} data from the server.`,
|
||||
TIMEOUTS.STANDARD,
|
||||
);
|
||||
const message = `Got an error retrieving your ${useRecipient ? "given" : "received"} data from the server.`;
|
||||
this.notify.error(message, TIMEOUTS.STANDARD);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -882,8 +882,8 @@ export default class ContactsView extends Vue {
|
||||
{
|
||||
group: "modal",
|
||||
type: "confirm",
|
||||
title: "Register",
|
||||
text: "Do you want to register them?",
|
||||
title: NOTIFY_REGISTER_CONTACT.title,
|
||||
text: NOTIFY_REGISTER_CONTACT.text,
|
||||
onCancel: async (stopAsking?: boolean) => {
|
||||
if (stopAsking) {
|
||||
await this.$updateSettings({
|
||||
@@ -1237,16 +1237,16 @@ export default class ContactsView extends Vue {
|
||||
{
|
||||
group: "modal",
|
||||
type: "confirm",
|
||||
title: "Onboarding Meeting",
|
||||
text: "Would you like to start a new meeting?",
|
||||
title: NOTIFY_ONBOARDING_MEETING.title,
|
||||
text: NOTIFY_ONBOARDING_MEETING.text,
|
||||
onYes: async () => {
|
||||
this.$router.push({ name: "onboard-meeting-setup" });
|
||||
},
|
||||
yesText: "Start New Meeting",
|
||||
yesText: NOTIFY_ONBOARDING_MEETING.yesText,
|
||||
onNo: async () => {
|
||||
this.$router.push({ name: "onboard-meeting-list" });
|
||||
},
|
||||
noText: "Join Existing Meeting",
|
||||
noText: NOTIFY_ONBOARDING_MEETING.noText,
|
||||
},
|
||||
TIMEOUTS.MODAL,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user