Conceptual help for javascript tool

I am very new to the coding world but have a tool I am looking to build, any help with understanding the most efficient way to build this tool would be greatly appreciated!

What I am looking to accomplish is create a small database of employees to which I can assign certain properties and then on the load of the page a draggable element would be created displaying their name if these properties are true.

I understand the concept of creating an object for the employee-

let employee = {
firstName: “John”,
lastName: “Doe”,
number: 111,
title: “stocker”,
shift: “pm”,
};

I also get how using a boolean I could use ‘document.createElement’ and ‘window.onload’ features theoretically to accomplish this but am unable to see the forest through the trees.

The ultimate vision would look something like this:

Stockers:

el-1
el-2 … in which all employees with job title: stocker have an element that displays their first name, last name, and employee number

[John Doe 111] in this example

Cashiers: etc.

Each element would be able to be dragged and dropped to a separate div container for where they will be working that day.

I know there are multiple concepts going on here, what I am mainly asking help with is understanding the creation of divs on page load with relation to objects and booleans so that it would display textcontent of [firstName, lastName, number] and whether this is the most efficient way to achieve my desired outcome. Thanks in advance!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.