Code Monkey home page Code Monkey logo

reservation's Introduction

Reservation

simple reservation invoice maker

Rate Calculation Logic

When calculating the total rental cost:

  1. We first calculate the cost using the weekly rate.

  2. We then calculate the cost using the daily rate for the remaining days, ensuring that if multiple days exceed the weekly rate, we charge the weekly rate.

  3. For the remaining hours, we compare the total hourly cost with the daily rate and choose the lesser amount.

  4. This ensures the customer is always charged the lesser of the hourly rate for up to a day or the daily rate.

Example

  • If a customer rents a Tesla for six hours:

    • Hourly cost: 6 hours * $10 = $60

    • Daily cost: $50

    • Since $60 > $50, the system will charge $50.

To Run locally

git pull https://github.com/434huzaifa/Reservation
cd Reservation

If You have docker

docker build -t reservation
docker run -d -p 5000:5000 reservation

NB: If you use the live link of the backend then change that from Dockerfile VITE_BACKEND variable.

No docker I got you convert

npm i

create a .env.local file. then add

VITE_BACKEND=http://localhost:3030

NB: If you use the live link of the backend then change live to live link.

npm run dev

NB: To run locally make sure to download the Backend Repo and Follow the instruction. Backend Repo

backend live: https://reservation-server-gzs9.onrender.com

REST API Swagger Doc: https://reservation-server-gzs9.onrender.com/docs

reservation's People

Contributors

434huzaifa 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.