0.1.2 • Published 3 years ago

@leodidier14/restaurant-form v0.1.2

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

ceseat_restaurant_form

This vuejs component is a form for creating or updating a restaurant with its related information.

Component setup

It is based on vuetify so it is necessary to install this plugin to your vuejs project.

vue add vuetify
npm i @leodidier14/restaurant-form

You can now implement it by importing it into your views or components with the corresponding style.

const RestaurantForm = require("@leodidier14/restaurant-form");
import "@leodidier14/restaurant-form/dist/restaurantForm.css";
components: {
    RestaurantForm,
  },
<RestaurantForm formType="profile" :restaurant="restaurant" />

Props :

formType : 'register' or 'profile' -> to specify the form type [required]
:restaurant -> to specify the loaded data for the profile form

restaurant used a TypeScript Interface.

{
 id: number,
    name: string,
    email: string,
    siret: string,
    phoneNumber: string,
    website: string,
    description: string,
    type: string,
    openingTime: string,
    closingTime: string,
    pictureLink: string,
    address: string,
    city: string,
    zipCode: string,
    country: string,
    sponsorshipLink: string,
}