diff --git a/ppr-ui/.eslintrc.js b/ppr-ui/.eslintrc.js index eaa05ba6e..9d33799b3 100644 --- a/ppr-ui/.eslintrc.js +++ b/ppr-ui/.eslintrc.js @@ -12,6 +12,8 @@ module.exports = { ], rules: { '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/ban-ts-comment': 'off', + '@typescript-eslint/no-duplicate-enum-values': 'off', 'object-curly-spacing': ['error', 'always'], 'standard/computed-property-even-spacing': 'off', 'vue/multi-word-component-names': 'off', @@ -23,11 +25,12 @@ module.exports = { 'vue/require-explicit-emits': 'error', 'vue/require-default-prop': 'error', 'vue/require-prop-types': 'error', - 'vue/no-template-shadow': 'error', + 'vue/no-template-shadow': 'off', 'vue/attribute-hyphenation': 'off', 'vue/v-on-event-hyphenation': 'off', 'vue/prop-name-casing': ['error', 'camelCase'], - 'vue/custom-event-name-casing': ['error', 'camelCase'] + 'vue/custom-event-name-casing': ['error', 'camelCase'], + 'vue/no-v-html': 'off' }, parser: 'vue-eslint-parser', parserOptions: { diff --git a/ppr-ui/src/components/collateral/Collateral.vue b/ppr-ui/src/components/collateral/Collateral.vue index 7a4151906..904d7f487 100644 --- a/ppr-ui/src/components/collateral/Collateral.vue +++ b/ppr-ui/src/components/collateral/Collateral.vue @@ -3,7 +3,7 @@ v-if="summaryView || registrationFlowType == RegistrationFlowType.AMENDMENT" id="collateral-component" fluid - class="bg-white pa-0 rounded-bottom no-gutters" + class="bg-white pa-0 rounded-bottom noGutters" :class="!valid && registrationFlowType !== RegistrationFlowType.AMENDMENT ? '' : 'pb-10'" > @@ -121,16 +121,12 @@ import { } from 'vue' import { useStore } from '@/store/store' import { useRouter } from 'vue-router' - -// local components import { GeneralCollateral } from './generalCollateral' import { VehicleCollateral } from './vehicleCollateral' -// local types/resources/etc. -import { ActionTypes, APIRegistrationTypes, RegistrationFlowType } from '@/enums' // eslint-disable-line no-unused-vars +import { ActionTypes, APIRegistrationTypes, RegistrationFlowType } from '@/enums' import { - AddCollateralIF, // eslint-disable-line no-unused-vars - GeneralCollateralIF, // eslint-disable-line no-unused-vars - VehicleCollateralIF // eslint-disable-line no-unused-vars + AddCollateralIF, + GeneralCollateralIF, } from '@/interfaces' import { useGeneralCollateral } from './generalCollateral/factories' import { useVehicle } from './vehicleCollateral/factories' @@ -152,6 +148,10 @@ export default defineComponent({ default: false } }, + emits: [ + 'setCollateralValid', + 'collateralOpen' + ], setup (props, context) { const router = useRouter() const { @@ -291,7 +291,7 @@ export default defineComponent({ localState.summaryView = val }) - watch(() => localState.collateral.vehicleCollateral, (val: VehicleCollateralIF[]) => { + watch(() => localState.collateral.vehicleCollateral, () => { if ((vehiclesValid() || localState.collateral?.generalCollateral?.length > 0 || registrationType === APIRegistrationTypes.TRANSITION_TAX_LIEN) && // vehicle collateral is optional for Income Tax registration type diff --git a/ppr-ui/src/components/collateral/generalCollateral/GenColAmend.vue b/ppr-ui/src/components/collateral/generalCollateral/GenColAmend.vue index 02e93bc4b..7755f497a 100644 --- a/ppr-ui/src/components/collateral/generalCollateral/GenColAmend.vue +++ b/ppr-ui/src/components/collateral/generalCollateral/GenColAmend.vue @@ -121,6 +121,9 @@ export default defineComponent({ default: false } }, + emits: [ + 'closeGenColAmend' + ], setup (props, { emit }) { const { setGeneralCollateral } = useStore() const { getGeneralCollateral, isTiptapEnabled } = storeToRefs(useStore()) diff --git a/ppr-ui/src/components/collateral/generalCollateral/GenColEdit.vue b/ppr-ui/src/components/collateral/generalCollateral/GenColEdit.vue index 536eb0a17..ba6e5e0f7 100644 --- a/ppr-ui/src/components/collateral/generalCollateral/GenColEdit.vue +++ b/ppr-ui/src/components/collateral/generalCollateral/GenColEdit.vue @@ -49,8 +49,8 @@ import { } from 'vue' import { useStore } from '@/store/store' // local -import { APIRegistrationTypes, RegistrationFlowType } from '@/enums' // eslint-disable-line no-unused-vars -import { GeneralCollateralIF } from '@/interfaces' // eslint-disable-line no-unused-vars +import { APIRegistrationTypes, RegistrationFlowType } from '@/enums' +import { GeneralCollateralIF } from '@/interfaces' import { storeToRefs } from 'pinia' import { WysiwygEditor } from '@/components/common' diff --git a/ppr-ui/src/components/collateral/generalCollateral/GenColSummary.vue b/ppr-ui/src/components/collateral/generalCollateral/GenColSummary.vue index 174677f54..dd7619237 100644 --- a/ppr-ui/src/components/collateral/generalCollateral/GenColSummary.vue +++ b/ppr-ui/src/components/collateral/generalCollateral/GenColSummary.vue @@ -258,9 +258,8 @@ import { computed } from 'vue' import { useStore } from '@/store/store' -// local -import { RegistrationFlowType } from '@/enums' // eslint-disable-line no-unused-vars -import { GeneralCollateralIF } from '@/interfaces' // eslint-disable-line no-unused-vars +import { RegistrationFlowType } from '@/enums' +import { GeneralCollateralIF } from '@/interfaces' import { pacificDate } from '@/utils' import { cloneDeep } from 'lodash' import { storeToRefs } from 'pinia' @@ -285,6 +284,9 @@ export default defineComponent({ default: false } }, + emits: [ + 'initGenColAmend' + ], setup (props, { emit }) { const { setGeneralCollateral } = useStore() const { getGeneralCollateral, getOriginalAddCollateral, getRegistrationFlowType } = storeToRefs(useStore()) diff --git a/ppr-ui/src/components/collateral/generalCollateral/GeneralCollateral.vue b/ppr-ui/src/components/collateral/generalCollateral/GeneralCollateral.vue index c507c712a..e63cfb61c 100644 --- a/ppr-ui/src/components/collateral/generalCollateral/GeneralCollateral.vue +++ b/ppr-ui/src/components/collateral/generalCollateral/GeneralCollateral.vue @@ -37,7 +37,7 @@ import { // local components import { GenColEdit, GenColSummary, GenColAmend } from '.' // local types/helpers/etc. -import { APIRegistrationTypes, RegistrationFlowType } from '@/enums' // eslint-disable-line no-unused-vars +import { APIRegistrationTypes, RegistrationFlowType } from '@/enums' import { useStore } from '@/store/store' import { storeToRefs } from 'pinia' diff --git a/ppr-ui/src/components/collateral/vehicleCollateral/VehicleCollateral.vue b/ppr-ui/src/components/collateral/vehicleCollateral/VehicleCollateral.vue index eab217bb9..b0554eee3 100644 --- a/ppr-ui/src/components/collateral/vehicleCollateral/VehicleCollateral.vue +++ b/ppr-ui/src/components/collateral/vehicleCollateral/VehicleCollateral.vue @@ -102,7 +102,7 @@ @@ -415,11 +415,9 @@ import { toRefs } from 'vue' import { useStore } from '@/store/store' -// local components import { EditCollateral } from '.' -// local types/etc. import { ActionTypes, APIVehicleTypes, RegistrationFlowType, APIRegistrationTypes } from '@/enums' -import { VehicleCollateralIF } from '@/interfaces' // eslint-disable-line no-unused-vars +import { VehicleCollateralIF } from '@/interfaces' import { vehicleTableHeaders, VehicleTypes } from '@/resources' import { useVehicle } from './factories/useVehicle' import { cloneDeep } from 'lodash' @@ -443,6 +441,9 @@ export default defineComponent({ default: false } }, + emits: [ + 'collateralOpen' + ], setup (props, context) { const { setVehicleCollateral } = useStore() const { diff --git a/ppr-ui/src/components/collateral/vehicleCollateral/factories/collateralFormValidator.ts b/ppr-ui/src/components/collateral/vehicleCollateral/factories/collateralFormValidator.ts index 344186588..a821bb6ff 100644 --- a/ppr-ui/src/components/collateral/vehicleCollateral/factories/collateralFormValidator.ts +++ b/ppr-ui/src/components/collateral/vehicleCollateral/factories/collateralFormValidator.ts @@ -68,5 +68,5 @@ const validationSchema = { ] } } -// @ts-ignore - there is a type mismatch in the structure above, but it still works +// @ts-ignore export const formValidation = createFormValidation(validationSchema) diff --git a/ppr-ui/src/components/collateral/vehicleCollateral/factories/useVehicle.ts b/ppr-ui/src/components/collateral/vehicleCollateral/factories/useVehicle.ts index 96e56adb6..072965b65 100644 --- a/ppr-ui/src/components/collateral/vehicleCollateral/factories/useVehicle.ts +++ b/ppr-ui/src/components/collateral/vehicleCollateral/factories/useVehicle.ts @@ -1,6 +1,6 @@ import { reactive, toRefs, computed } from 'vue' import { VehicleTypes, VehicleTypesNoMH } from '@/resources' -import { VehicleCollateralIF } from '@/interfaces' // eslint-disable-line no-unused-vars +import { VehicleCollateralIF } from '@/interfaces' import { useStore } from '@/store/store' import { ActionTypes, APIRegistrationTypes, RegistrationFlowType } from '@/enums' import { cloneDeep, isEqual } from 'lodash' diff --git a/ppr-ui/src/components/common/AccountInfo.vue b/ppr-ui/src/components/common/AccountInfo.vue index 61fcb3540..ee8d0adb9 100644 --- a/ppr-ui/src/components/common/AccountInfo.vue +++ b/ppr-ui/src/components/common/AccountInfo.vue @@ -5,7 +5,6 @@ props.forceSave, (val: boolean) => { + watch(() => props.forceSave, () => { // on change (T/F doesn't matter), save and go back to dash submitSaveResume() }) diff --git a/ppr-ui/src/components/common/CautionBox.vue b/ppr-ui/src/components/common/CautionBox.vue index de824010f..81d0fa560 100644 --- a/ppr-ui/src/components/common/CautionBox.vue +++ b/ppr-ui/src/components/common/CautionBox.vue @@ -15,7 +15,10 @@ import { defineComponent } from 'vue' export default defineComponent({ name: 'CautionBox', props: { - setMsg: String, + setMsg: { + type: String, + default: '' + }, setImportantWord: { type: String, default: 'Important' diff --git a/ppr-ui/src/components/common/CertifyInformation.vue b/ppr-ui/src/components/common/CertifyInformation.vue index 54cf454ce..5a9a3bdbd 100644 --- a/ppr-ui/src/components/common/CertifyInformation.vue +++ b/ppr-ui/src/components/common/CertifyInformation.vue @@ -156,7 +156,7 @@ import { useStore } from '@/store/store' import { convertDate, getRegisteringPartyFromAuth } from '@/utils' import { BaseAddress } from '@/composables/address' import { DefaultSchema } from '@/composables/address/resources' -import { CertifyIF, ContentIF, PartyIF } from '@/interfaces' // eslint-disable-line no-unused-vars +import { CertifyIF, ContentIF, PartyIF } from '@/interfaces' import { SessionStorageKeys } from 'sbc-common-components/src/util/constants' import { storeToRefs } from 'pinia' import { authorizedTableHeaders } from '@/resources' diff --git a/ppr-ui/src/components/common/CourtOrder.vue b/ppr-ui/src/components/common/CourtOrder.vue index 50ab0a994..6f5891842 100644 --- a/ppr-ui/src/components/common/CourtOrder.vue +++ b/ppr-ui/src/components/common/CourtOrder.vue @@ -183,7 +183,7 @@ ContentIF, diff --git a/ppr-ui/src/components/common/FolioNumber.vue b/ppr-ui/src/components/common/FolioNumber.vue index 04976cb6f..209422ef5 100644 --- a/ppr-ui/src/components/common/FolioNumber.vue +++ b/ppr-ui/src/components/common/FolioNumber.vue @@ -22,7 +22,7 @@ export default defineComponent({ default: '' } }, - emits: ['folio-number', 'folio-error'], + emits: ['folioNumber', 'folioError'], setup (props, { emit }) { const localState = reactive({ folioEdit: false, @@ -35,16 +35,16 @@ export default defineComponent({ watch(() => localState.folioEditNumber, (val: string) => { if (val?.length > 15) { localState.folioEditError = 'Maximum 15 characters reached' - emit('folio-error', true) + emit('folioError', true) } else { localState.folioEditError = '' localState.folioEditHint = `${15 - val?.length}` localState.folioNumber = localState.folioEditNumber - emit('folio-error', false) + emit('folioError', false) } }) watch(() => localState.folioNumber, (val: string) => { - emit('folio-number', val) + emit('folioNumber', val) }) // when enter pressed on the folio number, either focus on the input or the button if the input is disabled diff --git a/ppr-ui/src/components/common/FolioOrReferenceNumber.vue b/ppr-ui/src/components/common/FolioOrReferenceNumber.vue index 706fd4c6f..b4113e1b1 100644 --- a/ppr-ui/src/components/common/FolioOrReferenceNumber.vue +++ b/ppr-ui/src/components/common/FolioOrReferenceNumber.vue @@ -62,7 +62,7 @@ export default defineComponent({ }, sectionNumber: { type: Number, - required: false + default: null }, validate: { type: Boolean, diff --git a/ppr-ui/src/components/common/FormField.vue b/ppr-ui/src/components/common/FormField.vue index bbc29ad7a..348375089 100644 --- a/ppr-ui/src/components/common/FormField.vue +++ b/ppr-ui/src/components/common/FormField.vue @@ -46,7 +46,7 @@ export default defineComponent({ }, initialValue: { type: String, - required: false + default: '' }, inputTitle: { type: String, diff --git a/ppr-ui/src/components/common/HomeLocationInfo.vue b/ppr-ui/src/components/common/HomeLocationInfo.vue index 4cda9ec3d..2c4b99c50 100644 --- a/ppr-ui/src/components/common/HomeLocationInfo.vue +++ b/ppr-ui/src/components/common/HomeLocationInfo.vue @@ -220,7 +220,6 @@ v-model="locationInfo.exceptionPlan" variant="filled" label="Except Plan" - height="100" :rules="maxLength(80)" persistentHint /> @@ -231,13 +230,13 @@ diff --git a/ppr-ui/src/components/dialogs/LargeSearchResultDialog.vue b/ppr-ui/src/components/dialogs/LargeSearchResultDialog.vue index 85e7e4dc1..29b14a69a 100644 --- a/ppr-ui/src/components/dialogs/LargeSearchResultDialog.vue +++ b/ppr-ui/src/components/dialogs/LargeSearchResultDialog.vue @@ -1,12 +1,12 @@