Conversation
write_csv
List boards
implement slide
…pt with conflicts.
Userboards
| users.append(user_data) | ||
| else: | ||
| users = [user_data] | ||
| print(users) |
| }, | ||
| getBoards: function (callback) { | ||
| // the boards are retrieved and then the callback function is called with the boards | ||
| if(this._data.hasOwnProperty('boards')){ |
| let template = document.querySelector('#board_header'); | ||
| let clone = document.importNode(template.content, true); | ||
| let section = document.createElement(`section`); | ||
| section.id = `board${board.id}`; |
There was a problem hiding this comment.
It is not a best practice to put ids on everything in the dom. Why do you need it at all?
| for (let board of boards) { | ||
| if ((board['userid'] === '0' && !board['userid']) || board['userid'] === userid) { | ||
| let template = document.querySelector('#board_header'); | ||
| let clone = document.importNode(template.content, true); |
There was a problem hiding this comment.
Clone is a very vague term. Please use something which is more intentional. It is not easy to understand what it really is. You put it in a section, where the section had a board class. 😕
| // shows the cards of a board | ||
| // it adds necessary event listeners also | ||
| const board = document.querySelector(`#board${boardId}`); | ||
| let template_column = document.querySelector('#board_columns'); |
There was a problem hiding this comment.
Please use camelCase variable names: templateColumn
| let clone_columns = document.importNode(template_column.content, true); | ||
| clone_columns.querySelector('.board-columns').id = `box${boardId}`; | ||
| for (let card of cards) { | ||
| let card_template = document.querySelector('#card_sample'); |
There was a problem hiding this comment.
Creating a new card could be extracted to a function, e.g. createCard.
| }); | ||
| }, | ||
| showLoggedIn: function () { | ||
| let username = sessionStorage.getItem("username"); |
There was a problem hiding this comment.
I'd suggest using const for variables you don't want to redefine.
| }, | ||
|
|
||
| logout: function () { | ||
| if (sessionStorage.getItem("username")) |
There was a problem hiding this comment.
You don't need to check that getItem gives back a truthy value, you can go ahead and removeItem
|
|
||
|
|
||
| def get_max_id(data): | ||
| print(len(data)) |
No description provided.