From c95d91b52e07d5129a225c4a9f8926d3840c3c6d Mon Sep 17 00:00:00 2001 From: hiteshkumar87 Date: Tue, 24 Jun 2025 20:45:22 +0530 Subject: [PATCH] CASH-813 constant file state options added --- src/constants/state-options.js | 54 +++++++++++++++++ .../mobile-address-questions.vue | 59 +------------------ 2 files changed, 57 insertions(+), 56 deletions(-) create mode 100644 src/constants/state-options.js diff --git a/src/constants/state-options.js b/src/constants/state-options.js new file mode 100644 index 000000000..19eb348d5 --- /dev/null +++ b/src/constants/state-options.js @@ -0,0 +1,54 @@ +const stateOptions = { + AL: "Alabama", + AK: "Alaska", + AZ: "Arizona", + AR: "Arkansas", + CA: "California", + CO: "Colorado", + CT: "Connecticut", + DE: "Delaware", + DC: "District Of Columbia", + FL: "Florida", + GA: "Georgia", + HI: "Hawaii", + ID: "Idaho", + IL: "Illinois", + IN: "Indiana", + IA: "Iowa", + KS: "Kansas", + KY: "Kentucky", + LA: "Louisiana", + ME: "Maine", + MD: "Maryland", + MA: "Massachusetts", + MI: "Michigan", + MN: "Minnesota", + MS: "Mississippi", + MO: "Missouri", + MT: "Montana", + NE: "Nebraska", + NV: "Nevada", + NH: "New Hampshire", + NJ: "New Jersey", + NM: "New Mexico", + NY: "New York", + NC: "North Carolina", + ND: "North Dakota", + OH: "Ohio", + OK: "Oklahoma", + OR: "Oregon", + PA: "Pennsylvania", + RI: "Rhode Island", + SC: "South Carolina", + SD: "South Dakota", + TN: "Tennessee", + TX: "Texas", + UT: "Utah", + VT: "Vermont", + VA: "Virginia", + WA: "Washington", + WV: "West Virginia", + WI: "Wisconsin", + WY: "Wyoming", +}; +export { stateOptions }; diff --git a/src/layouts/mobile-details/mobile-address-questions/mobile-address-questions.vue b/src/layouts/mobile-details/mobile-address-questions/mobile-address-questions.vue index 40a50d47e..2e5dd8324 100644 --- a/src/layouts/mobile-details/mobile-address-questions/mobile-address-questions.vue +++ b/src/layouts/mobile-details/mobile-address-questions/mobile-address-questions.vue @@ -79,6 +79,7 @@ import dropdownQuestion from "@/digital-components/dropdown-question/dropdown-qu import { defineRule } from "vee-validate"; import { required, regex } from "@/helpers/validation-rules"; import { errorMessages } from "@/constants/error-messages"; +import { stateOptions } from "@/constants/state-options"; // DEFINE VALIDATION RULES defineRule("street-address-required", required(errorMessages.STREET_ADDRESS_REQUIRED)); @@ -128,62 +129,8 @@ export default { }, }, computed: { - stateOptions: { - get: function () { - return { - AL: "Alabama", - AK: "Alaska", - AZ: "Arizona", - AR: "Arkansas", - CA: "California", - CO: "Colorado", - CT: "Connecticut", - DE: "Delaware", - DC: "District Of Columbia", - FL: "Florida", - GA: "Georgia", - HI: "Hawaii", - ID: "Idaho", - IL: "Illinois", - IN: "Indiana", - IA: "Iowa", - KS: "Kansas", - KY: "Kentucky", - LA: "Louisiana", - ME: "Maine", - MD: "Maryland", - MA: "Massachusetts", - MI: "Michigan", - MN: "Minnesota", - MS: "Mississippi", - MO: "Missouri", - MT: "Montana", - NE: "Nebraska", - NV: "Nevada", - NH: "New Hampshire", - NJ: "New Jersey", - NM: "New Mexico", - NY: "New York", - NC: "North Carolina", - ND: "North Dakota", - OH: "Ohio", - OK: "Oklahoma", - OR: "Oregon", - PA: "Pennsylvania", - RI: "Rhode Island", - SC: "South Carolina", - SD: "South Dakota", - TN: "Tennessee", - TX: "Texas", - UT: "Utah", - VT: "Vermont", - VA: "Virginia", - WA: "Washington", - WV: "West Virginia", - WI: "Wisconsin", - WY: "Wyoming", - }; - }, + stateOptions() { + return stateOptions; }, addressModel: { get: function () {