Git Product home page Git Product logo

inikolas / admin-panel-for-bicycle-booking-service Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 1.0 720 KB

This application can be used as an admin panel for Bicycles Booking Service. It uses react, redux, react-final-form, react-redux, redux-thunk, localForage, and hooks frameworks, libraries, and technologies.

Home Page: https://inikolas.github.io/admin-panel-for-bicycle-booking-service/

HTML 6.62% JavaScript 77.10% CSS 16.28%

admin-panel-for-bicycle-booking-service's Introduction

ADMIN-PANEL FOR A BICYCLE BOOKING APPLICATION (FRONT-END)

Description

By means of this application you can manage bicycle accounting for your bicycle booking services.

You can test deployed application by the next link.

You can add bicycles with the next fields:

  • bicycle name;
  • bicycle type;
  • color of the bicycle;
  • bicycle price (by default in UAH);
  • bicycle unique id;
  • short description of the bicycle.

The bicycle data can only be submitted after all form inputs have valid content, namely:

  • all aforementioned fields are required;
  • minimum string length for name, type, color and description inputs is 5 characters;
  • bicycle id should be unique and don’t coincide with already added bicycles to the list;
  • if the price value has more than two symbols after the comma - it will be automatically truncated for a proper price representation.

All bicycles you have added will be displayed at the main application panel at the left side of its window with provided data.

By means of the main panel you can use the next application features as:

  • change bicycle status (available, busy, unavailable);
  • remove bicycle from the list (be careful with it, you can’t retrieve deleted data).

In addition admin-panel possesses simple statistic features, calculating for you the next data:

  • total amount of bikes;
  • available and booked bikes respectively;
  • average bike cost.

Installation

This project was bootstrapped with Create React App.

You can learn more in the Create React App documentation.

Usage

GitHub Logo

Form validation

For the form validation have been chosen react-final-form state management which is considered one of the better solutions in this field. To modify or add validators check /src/components/Fields/validators directory.

You can add composed validators directly to each Field component in the /src/components/BicycleAdd/BicycleAdd.jsx file in validate attribute.

Modification some UI elements

To modify header name simply provide a new “headerText” prop attribute for the Header component in the App.js.

To modify author name do almost the same: provide a new “developerName” prop attribute for the Footer component in the App.js.

Data storage and embedding backend API

By default the application stores data locally by means of the localForage library. It can be accessible after browser restart or OS reload. But this storage is bound to the origin (domain/protocol/port triplet). That is, different protocols or subdomains infer different storage objects, they can’t access data from each other.

To embed a proper backed solution just modify API methods in the /src/API/localForage.js file.

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.