|
|
@@ -78,7 +78,6 @@ import {useForm} from "~/composables/form/useForm";
|
|
|
import * as _ from 'lodash'
|
|
|
import Form from "~/services/store/form";
|
|
|
import Page from "~/services/store/page";
|
|
|
-import ApiError from "~/services/exception/apiError";
|
|
|
|
|
|
export default defineComponent({
|
|
|
props: {
|
|
|
@@ -134,7 +133,7 @@ export default defineComponent({
|
|
|
query: props.query
|
|
|
})
|
|
|
|
|
|
- page.addAlerts(TYPE_ALERT.SUCCESS, [i18n.t('saveSuccess') as string])
|
|
|
+ page.addAlerts(TYPE_ALERT.SUCCESS, ['saveSuccess'])
|
|
|
nextStep(next, response.data)
|
|
|
} catch (error: any) {
|
|
|
|
|
|
@@ -144,16 +143,16 @@ export default defineComponent({
|
|
|
let fields:AnyJson = {}
|
|
|
for(const violation of error.response.data['violations']){
|
|
|
violations.push(i18n.t(violation['message']) as string)
|
|
|
- fields = Object.assign({}, {[violation['propertyPath']] : violation['message']})
|
|
|
+ fields = Object.assign(fields, {[violation['propertyPath']] : violation['message']})
|
|
|
}
|
|
|
|
|
|
new Form(store).addViolations(fields)
|
|
|
- page.addAlerts(TYPE_ALERT.ALERT, [i18n.t('invalide_form') as string])
|
|
|
+ page.addAlerts(TYPE_ALERT.ALERT, ['invalide_form'])
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}else{
|
|
|
- page.addAlerts(TYPE_ALERT.ALERT, [i18n.t('invalide_form') as string])
|
|
|
+ page.addAlerts(TYPE_ALERT.ALERT, ['invalide_form'])
|
|
|
}
|
|
|
}
|
|
|
|