mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-30 02:25:00 +00:00
Enhance validation in PersonEdit
: Introduce hasValidationError
and validationError
helpers for form inputs. Improve error feedback for fields such as firstName
, lastName
, gender
, and others. Refactor postPerson
to handle validation exceptions and map errors to specific fields. Update related methods, styles, and API error type definitions.
This commit is contained in:
@@ -37,7 +37,8 @@ import type {
|
||||
Suggestion,
|
||||
SearchOptions,
|
||||
CreatableEntityType,
|
||||
EntityType, Person,
|
||||
EntityType,
|
||||
Person,
|
||||
} from "ChillPersonAssets/types";
|
||||
import { marked } from "marked";
|
||||
import options = marked.options;
|
||||
@@ -113,8 +114,12 @@ function closeModalCreate() {
|
||||
function onPersonCreated(payload: { person: Person }) {
|
||||
console.log("onPersonCreated", payload);
|
||||
showModalCreate.value = false;
|
||||
const suggestion = {result: payload.person, relevance: 999999, key: "person"};
|
||||
emit("addNewPersons", {selected: [suggestion]});
|
||||
const suggestion = {
|
||||
result: payload.person,
|
||||
relevance: 999999,
|
||||
key: "person",
|
||||
};
|
||||
emit("addNewPersons", { selected: [suggestion] });
|
||||
}
|
||||
</script>
|
||||
|
||||
|
Reference in New Issue
Block a user