Skip to content

Commit 58cb6e8

Browse files
committed
adding some JSDoc and fixing a dependency
1 parent 5581825 commit 58cb6e8

File tree

1 file changed

+12
-0
lines changed
  • build-a-rest-api-frontend/source_code_final/static/js

1 file changed

+12
-0
lines changed

build-a-rest-api-frontend/source_code_final/static/js/people.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
import { 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+
*/
38
export 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+
*/
2231
class CreatePersonForm {
32+
/**
33+
* @param {@type {HTMLElement}} el
34+
*/
2335
constructor(el) {
2436
this.form = el;
2537
this.createButton = el.querySelector("button[data-action='create']");

0 commit comments

Comments
 (0)