123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311 |
- import React from 'react';
- import Main from "../components/main/Main";
- import Doctors from "../components/specialists/Doctors";
- import Services from "../components/services/Services";
- import MoreInfo from "../components/specialists/MoreInfo";
- import Reviews from "../components/Reviews";
- import Admin from "../components/Admin/Admin";
- import Appointment from "../components/appointment/Appointment";
- import Auth from "../containers/auth";
- import User from "../containers/user";
- const PAGENOTFOUND = () => <div>PAGE 404 NOT FOUND</div>;
- export const logInForm = {
- form: {
- email: {
- id: 1,
- name: "email",
- type: "email",
- label: "Email",
- validation: {
- requred: {
- cb: v => v.trim() === ""
- }
- },
- fail: false,
- touch: false,
- value: ""
- },
- password: {
- id: 2,
- name: "password",
- type: "password",
- label: "Пароль",
- validation: {
- requred: {
- cb: v => v.trim() === ""
- },
- minL: {
- cb: v => v.trim().length < 6
- }
- },
- fail: false,
- touch: false,
- value: ""
- }
- },
- validForm: false
- };
- export const signUpForm = {
- form: {
- email: {
- id: 1,
- name: "email",
- type: "email",
- label: "Email",
- validation: {
- requred: {
- cb: v => v.trim() === ""
- }
- },
- fail: false,
- touch: false,
- value: ""
- },
- firstName: {
- id: 2,
- type: "text",
- name: "firstName",
- label: "Имя",
- validation: {
- requred: {
- cb: v => v.trim() === ""
- },
- regExp: {
- cb: v => !/^\w/.test(v)
- }
- },
- fail: false,
- touch: false,
- value: ""
- },
- lastName: {
- id: 3,
- type: "text",
- name: "lastName",
- label: "Фамилия",
- validation: {
- requred: {
- cb: v => v.trim() === ""
- }
- },
- fail: false,
- touch: false,
- value: ""
- },
- phone: {
- id: 4,
- type: "number",
- name: "phone",
- label: "Телефон",
- validation: {
- requred: {
- cb: v => v.trim() === ""
- }
- },
- fail: false,
- touch: false,
- value: ""
- },
- password: {
- id: 5,
- name: "password",
- type: "password",
- label: "Пароль",
- validation: {
- requred: {
- cb: v => v.trim() === ""
- },
- minL: {
- cb: v => v.trim().length < 6
- }
- },
- fail: false,
- touch: false,
- value: ""
- },
- confirmPassword: {
- id: 6,
- name: "confirmPassword",
- type: "password",
- label: "Повторите пароль",
- validation: {
- requred: {
- cb: v => v.trim() === ""
- },
- minL: {
- cb: v => v.trim().length < 6
- },
- match: {
- match: "password",
- cb: (v, m) => v !== m
- }
- },
- fail: false,
- touch: false,
- value: ""
- }
- },
- validForm: false
- };
- export const postNewDoctorForm =[
- {
- id:1,
- type:'text',
- value:"",
- name:'name',
- placeholder:'Введите ФИО сотрудника',
- required:true
- },
- {
- id:2,
- type:'text',
- value:"",
- name:'experience',
- placeholder:'Введите дату начала практики',
- required:true
- },
- {
- id:3,
- type:'text',
- value:"",
- name:'photo',
- placeholder:'Добавьте фотографию',
- required:true
- },
- {
- id:4,
- type:'text',
- value:"",
- name:'profession',
- placeholder:'Добавьте специализацию',
- required:true
- },
- {
- id:5,
- type:'text',
- value:"",
- name:'skillsDescription',
- placeholder:'Введите описание навыков здесь',
- required:true
- }
- ];
- export const postNewServiceForm =[
- {
- id:1,
- type:'text',
- value:"",
- name:'name',
- placeholder:'Введите название сервиса',
- required:true
- },
- {
- id:2,
- type:'text',
- value:"",
- name:'description',
- placeholder:'Введите описание сервиса',
- required:true
- },
- {
- id:3,
- type:'number',
- value:"",
- name:'duration',
- placeholder:'Введите длительность (часы)',
- required:true
- },
- {
- id:4,
- type:'number',
- value:"",
- name:'price',
- placeholder:'Введите стоимость сервиса',
- required:true
- }
- ];
- export const route = [
- {
- id: 1,
- exact: true,
- path: "/",
- protected: false,
-
- component: Main
- },
- {
- id: 2,
- exact: true,
- path: "/doctors",
- protected: false,
- component: Doctors
- },
- {
- id: 3,
- exact: true,
- path: "/services",
- protected: false,
- component: Services
- },
- {
- id: 3,
- exact: true,
- path: "/doctors/:doctor",
- protected: false,
- component: MoreInfo
- },
- {
- id: 4,
- exact: true,
- path: "/services/:service",
- protected: false,
- component: MoreInfo
- },
- {
- id: 5,
- exact: true,
- path: "/reviews",
- protected: false,
- component: Reviews
- },
- {
- id: 6,
- exact: false,
- path: "/admin",
- protected: true,
- component: Admin
- },
- {
- id: 7,
- exact: true,
- path: "/appointment/:doctorId",
- protected: false,
- component: Appointment
- },
- {
- id: 8,
- exact: true,
- path: "/auth",
- protected: false,
- component: Auth
- },
- {
- id: 9,
- exact: false,
- path: "/user",
- protected: true,
- component: User
- },
- {
- id: 10,
- component: PAGENOTFOUND
- },
- ];
|