File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
build-a-rest-api-frontend/source_code_final/static/js Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 11import { sendForm } from "./request.js" ;
2+ import { NoteCreateForm } from "./notes.js" ;
23
4+ /**
5+ * Initializes the forms, state and display of person-related information
6+ * via other classes: {@link CreatePersonForm} and {@link PersonControl}
7+ */
38export class People {
49 constructor ( ) {
510 this . allPeopleCards = document . querySelectorAll ( ".person-card" ) ;
@@ -19,7 +24,14 @@ export class People {
1924 }
2025}
2126
27+ /**
28+ * Manages a form allowing the creation of a new person.
29+ * Manages the view, and the requests to the server
30+ */
2231class CreatePersonForm {
32+ /**
33+ * @param {@type {HTMLElement} } el
34+ */
2335 constructor ( el ) {
2436 this . form = el ;
2537 this . createButton = el . querySelector ( "button[data-action='create']" ) ;
You can’t perform that action at this time.
0 commit comments