@@ -22,7 +22,9 @@ import { Observable } from '/js/src/index.js';
2222 */
2323export default class Overview extends Observable {
2424 /**
25- * @param {Object } model
25+ * The constructor of the Overview model object
26+ * @param {Object } model Pass the model to access the defined functions
27+ * @returns {Object } Constructs the Overview model
2628 */
2729 constructor ( model ) {
2830 super ( ) ;
@@ -54,14 +56,16 @@ export default class Overview extends Observable {
5456 }
5557
5658 /**
57- * @returns {Array } headers
59+ * Get the headers from the Overview class
60+ * @returns {Array } Returns the headers
5861 */
5962 getHeaders ( ) {
6063 return this . headers ;
6164 }
6265
6366 /**
64- * @returns {Array } subentries
67+ * Get the table data
68+ * @returns {Array } The data without the tags to be rendered in a table
6569 */
6670 getTableData ( ) {
6771 const subentries = this . filtered . map ( ( entry ) => {
@@ -79,7 +83,8 @@ export default class Overview extends Observable {
7983
8084 /**
8185 * Add filter to the selection
82- * @param {string } tag
86+ * @param {string } tag The tag to be added to the filter criteria
87+ * @returns {Array } Sets the data according to the filters applied
8388 */
8489 addFilter ( tag ) {
8590 this . filterCriteria = [ ...this . filterCriteria , tag ] ;
@@ -88,7 +93,8 @@ export default class Overview extends Observable {
8893
8994 /**
9095 * Remove filter from the selection
91- * @param {string } condition
96+ * @param {string } condition The ocondition to filter the array on
97+ * @returns {Array } Sets the array with the new filter criteria
9298 */
9399 removeFilter ( condition ) {
94100 this . filterCriteria = this . filterCriteria . filter ( ( tag ) => tag !== condition ) ;
@@ -97,6 +103,7 @@ export default class Overview extends Observable {
97103
98104 /**
99105 * Filter the data
106+ * @returns {Array } Sets the data according to the amount of applied filters
100107 */
101108 getFilteredData ( ) {
102109 this . filterCriteria . length !== 0
@@ -108,6 +115,7 @@ export default class Overview extends Observable {
108115
109116 /**
110117 * Filter data by tags if applicable
118+ * @returns {Array } Sets the filtered data on the criterium applied by the user
111119 */
112120 filterByTags ( ) {
113121 this . filtered = this . data
@@ -125,8 +133,8 @@ export default class Overview extends Observable {
125133
126134 /**
127135 * Check for an existing tag
128- * @param {object } entry
129- * @return {bool }
136+ * @param {Object } entry The entry in the total array of the data
137+ * @return {Boolean } Returns the status of the existence of a tag in the data entry
130138 */
131139 checkExistingTag ( entry ) {
132140 const check = this . filterCriteria . map ( ( tag ) => {
@@ -142,7 +150,7 @@ export default class Overview extends Observable {
142150
143151 /**
144152 * Counts the tags with their total appearances
145- * @return {object }
153+ * @return {Object } Returns the count of each tag
146154 */
147155 getTagCounts ( ) {
148156 return this . data . reduce ( ( accumulator , currentValue ) => {
0 commit comments