HairSalon.Solution

Hair Salon website for Epicodus, 3.10.2019

By Young Liu

Description

This website allows you to manage stylists and clients in a hair salon.

Specifications

  • Website will allow user to hire a stylist.
    • Example input: Click "Add a stylist" button, enter in details.
    • Example output: Stylist will be added to the hair salon.
  • Website will allow user to add a client to a stylist.
    • Example input: Click on a stylist, click "Add a new client to this stylist" and enter details.
    • Example output: Client will be added to that stylist.
  • Website will show all stylists.
    • Example input: Click on "view all stylists" link or "See all stylists" button.
    • Example output: All stylists are displayed.
  • Website will show all clients belonging to a stylist, and the stylist's details.
    • Example input: Click on a stylist's name.
    • Example output: Page is displayed showing the stylist's details and clients.
  • Website will show the details of a client.
    • Example input: Click on a client's name.
    • Example output: Page is displayed showing the details of the client.
  • Website will allow you to edit the details of a client.
    • Example input: Click on a client's name, then click on "Edit this client".
    • Example output: Page is displayed with a form allowing you to edit the details of a client.
  • Website will allow you to clear all stylists.
    • Example input: Click on the "Clear all stylists" button.
    • Example output: All the stylists will be cleared.
  • Website will allow you to clear a specific stylist.
    • Example input: Click on a stylist in the home page, and then click delete this stylist.
    • Example output: The stylist will be deleted.
  • Website will allow you to clear all clients.
    • Example input: Click on see all clients in main page, and then click on delete all clients.
    • Example output: All clients will be deleted.
  • Website will allow you to clear a specific client.
    • Example input: Click on a clients name in either the client overview, or when listed under a stylist. Then click delete this client.
    • Example output: The specified client will be deleted.
  • Website will allow you to view all clients.
    • Example input: Click on see all clients in the main page.
    • Example output: All clients will be displayed.
  • Website will allow you to edit the details of a stylist.
    • Example input: Click on a stylists name, then click on edit this stylist.
    • Example output: The specified stylist will have their details edited.
  • Website will allow you to edit the details of a stylist.
    • Example input: Click on a stylists name, then click on edit this stylist.
    • Example output: The specified stylist will have their details edited.
  • Website will allow you to view all specialties.
    • Example input: Click on see all specialties in the main page.
    • Example output: All specialties will be displayed.
  • Website will allow you to add a specialty.
    • Example input: Click on see all specialties in the main page, then click add a specialty.
    • Example output: Gives a form allowing you to create a specialty.
  • Website will allow you see stylists who have a certain specialty.
    • Example input: Click on a specialty in the specialty overview page or when listed under a stylist.
    • Example output: The website will display a page showing which stylists have that specialty.
  • Website will allow you see the specialties of a specific stylist.
    • Example input: Click on a stylist.
    • Example output: The website will display their info page, which includes what specialties they have.
  • Website will allow you see stylists who have a certain specialty.
    • Example input: Click on a specialty in the specialty overview page or when listed under a stylist.
    • Example output: The website will display a page showing which stylists have that specialty.
  • Website will allow you to add a specialty to a stylist.
    • Example input: Click on a stylist, then select a specialty in the dropdown menu.
    • Example output: The specified specialty will be added to the stylist.
  • Website will allow you to add a stylist to a specialty.
    • Example input: Click on a specialty in the specialty overview page or when listed under a stylist, then select a stylist in the dropdown menu.
    • Example output: The specified stylist will be added to the specialty.

Setup/Installation Requirements

  • Download .NET Core 1.1.4 SDK, .NET Core Runtime 1.1.2 and MAMP and install them.
  • Clone this Repository ($ git clone https://github.com/youngzliu/HairSalon.Solution name)
  • Import young_liu.sql and young_liu_test.sql
    • Navigate to you phpMyAdmin page from the Open Webstart page of MAMP.
    • Select the Import tab.
    • Select both of the above databases.
  • Change into the work directory ($ cd HairSalon.Solution)
  • To edit the project, open the project in your preferred text editor.
  • To run the website, navigate to the directory of HairSalon, and then build and run ($ cd HairSalon; $ dotnet restore; $ dotnet build; $ dotnet run)
  • To run the tests, use these commands: $ cd HairSalon.Tests $ dotnet restore $ dotnet test
  • To recreate the database, run these commands:
    • CREATE DATABASE young_liu;

    • USE young_liu;

    • CREATE TABLE clients ID serial PRIMARY KEY, firstName VARCHAR(255), lastName VARCHAR(255), phoneNumber VARCHAR(255), email VARCHAR(255), stylistID int;

    • CREATE TABLE stylists ID serial PRIMARY KEY, firstName VARCHAR(255), lastName VARCHAR(255) phoneNumber VARCHAR(255), email VARCHAR(255);

    • CREATE TABLE specialties ID serial PRIMARY KEY, description VARCHAR(255);

    • CREATE TABLE stylists_specialties ID serial PRIMARY KEY, stylist_ID VARCHAR(255), specialty_ID VARCHAR(255);

Support and contact details

For support find me at Epicodus.

Technologies Used

This website was created using C#, .NET Core, MSTest, ASP.NET Core MVC, SQL, and MAMP.

License

MIT License

Copyright (c) 2019 Young Liu

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.