mirror of
https://github.com/Nezumi-2711/react-training.git
synced 2026-09-23 04:19:48 +00:00
Fix comments
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
const USER_PAGE = {
|
||||
SORTBY_OPTIONS: [
|
||||
{
|
||||
value: 'id',
|
||||
label: 'Sort by id',
|
||||
},
|
||||
{
|
||||
value: 'name',
|
||||
label: 'Sort by name',
|
||||
},
|
||||
{
|
||||
value: 'identifiedCode',
|
||||
label: 'Sort by identified code',
|
||||
},
|
||||
{
|
||||
value: 'phone',
|
||||
label: 'Sort by phone',
|
||||
},
|
||||
{
|
||||
value: 'roomId',
|
||||
label: 'Sort by room',
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const ORDERBY_OPTIONS = [
|
||||
{
|
||||
value: 'asc',
|
||||
label: 'Ascending',
|
||||
},
|
||||
{
|
||||
value: 'desc',
|
||||
label: 'Descending',
|
||||
},
|
||||
];
|
||||
|
||||
const ROOM_PAGE = {
|
||||
SORTBY_OPTIONS: [
|
||||
{
|
||||
value: 'id',
|
||||
label: 'Sort by id',
|
||||
},
|
||||
{
|
||||
value: 'name',
|
||||
label: 'Sort by name',
|
||||
},
|
||||
{
|
||||
value: 'finalPrice',
|
||||
label: 'Sort by price',
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const INIT_VALUE_USER_FORM = {
|
||||
name: '',
|
||||
id: 0,
|
||||
identifiedCode: '',
|
||||
phone: '',
|
||||
};
|
||||
|
||||
const INIT_VALUE_ROOM_FORM = {
|
||||
name: '',
|
||||
id: 0,
|
||||
price: 0,
|
||||
discount: 0,
|
||||
};
|
||||
|
||||
const FORM = {
|
||||
EDIT: 'edit',
|
||||
USER: 'user-form',
|
||||
ROOM: 'room-form',
|
||||
};
|
||||
|
||||
const REGEX = {
|
||||
PHONE: /(84|0[3|5|7|8|9])+([0-9]{8})\b/g,
|
||||
NAME: /^[a-zA-Z]{2,}(?: [a-zA-Z]+){0,2}$/gm,
|
||||
NUMBER: /^[0-9]*$/,
|
||||
};
|
||||
|
||||
export {
|
||||
USER_PAGE,
|
||||
ROOM_PAGE,
|
||||
FORM,
|
||||
REGEX,
|
||||
ORDERBY_OPTIONS,
|
||||
INIT_VALUE_USER_FORM,
|
||||
INIT_VALUE_ROOM_FORM,
|
||||
};
|
||||
Reference in New Issue
Block a user