Code Monkey home page Code Monkey logo

5-days-calendar's Introduction

Calendar for the meeting room

GitHub repo size GitHub all releases

N|Solid Simple meeting planning calendar for a 5 working days from 10:00 to 18:00.


Opportunities

  • creation of events with a given day and time;
  • Creation of an event for one or several participants;
  • Removing an event;
  • Storing data about participants and events in localStorage, which allows you to save data even when the page is reloaded.

The use of object arrays made it possible to easily save and delete data, and automatically generate a new selection of participants in the table without changing the HTML code.

main.js

Data = {
  users: [
    { name: 'All', id: '0', activeEvents: [1, 2, 3] },
    { name: 'Alex', id: '1', activeEvents: [1, 3] },
    { name: 'Dmitri', id: '2', activeEvents: [1, 2, 3] },
    { name: 'Valeria', id: '3', activeEvents: [3] }
    ],
  events: [ 
    { eventName: 'First meeting', eventId: 1, day: 1, time: 10 },
    { eventName: 'Data Structures', eventId: 2, day: 5, time: 14 },
    { eventName: 'Second meeting', eventId: 3, day: 3, time: 12 }
    ]
}

Function to create select above the table:

onload.js

    const addMembers = (options) => {
         const choseMember = document.querySelector('select.members');
         for (let i = 0; i < options.length; i++) {
            const member = document.createElement('option');
            member.innerHTML = options[i].name;
            member.setAttribute('class', 'members_item');
            member.setAttribute('value', `${options[i].id}`);
            member.setAttribute('id', `member_${options[i].name}`);
            choseMember.appendChild(member);
        }
    };

Object with id: "0" is required to display all existing events.

N|Solid The select in modal window for creating an event works the same.


Getting Start

To install the project, please download it or clone, after load node modules of the project use command:

npm install

Aviable scripts

To start the server use the command:

npm run server

Open http://localhost:8080 for viewing in a browser.

To check if JavaScript code meets the airbnb styleguide requirements use command:

npm run lint

This project uses open-source technologies:

  • Babel - JavaScript transcompiler
  • Webpack - JavaScript module bundler
  • SCSS - preprocessor for CSS

5-days-calendar's People

Contributors

rydetery avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.