Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dashboard
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
red-giant
dashboard
Commits
4b86a283
Verified
Commit
4b86a283
authored
3 years ago
by
Defendi Alberto
Browse files
Options
Downloads
Patches
Plain Diff
Remove deadcode and navbar.
parent
10569759
No related branches found
No related tags found
2 merge requests
!60
New component to search senior (see #12). Enhance responsiveness and solve #10 and #11
,
!57
Replace context with api.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/components/Dashboard/ReservationPage/ReservationDialog.tsx
+46
-69
46 additions, 69 deletions
...omponents/Dashboard/ReservationPage/ReservationDialog.tsx
with
46 additions
and
69 deletions
src/components/Dashboard/ReservationPage/ReservationDialog.tsx
+
46
−
69
View file @
4b86a283
import
React
,
{
FC
}
from
'
react
'
;
import
React
,
{
FC
}
from
'
react
'
;
import
{
import
{
Grid
,
Typography
,
Dialog
,
Dialog
,
DialogActions
,
DialogActions
,
DialogContent
,
DialogContent
,
...
@@ -9,15 +7,10 @@ import {
...
@@ -9,15 +7,10 @@ import {
DialogTitle
,
DialogTitle
,
Button
,
Button
,
}
from
'
@material-ui/core
'
;
}
from
'
@material-ui/core
'
;
import
AddIcon
from
'
@material-ui/icons/Add
'
;
import
Fab
from
'
@material-ui/core/Fab
'
;
import
{
NavBar
}
from
'
components/Dashboard/HomePage/NavBar
'
;
import
{
Reservation
}
from
'
components/Dashboard/ReservationPage/Reservation/Reservation
'
;
import
{
useReservations
}
from
'
hooks/useReservations
'
;
import
{
useReservations
}
from
'
hooks/useReservations
'
;
import
{
ReservationProps
}
from
'
components/Dashboard/ReservationPage/Reservation/ReservationProps
'
;
import
{
ReservationProps
}
from
'
components/Dashboard/ReservationPage/Reservation/ReservationProps
'
;
import
{
SubmitHandler
,
useForm
}
from
'
react-hook-form
'
;
import
{
SubmitHandler
,
useForm
}
from
'
react-hook-form
'
;
import
{
InputField
}
from
'
components/Auth/InputField/InputField
'
;
import
{
InputField
}
from
'
components/Auth/InputField/InputField
'
;
import
{
useStyles
}
from
'
./ReservationPage.style
'
;
type
ReservationDialogProps
=
{
type
ReservationDialogProps
=
{
handleClose
:
()
=>
void
;
handleClose
:
()
=>
void
;
...
@@ -27,7 +20,6 @@ export const ReservationDialog: FC<ReservationDialogProps> = ({
...
@@ -27,7 +20,6 @@ export const ReservationDialog: FC<ReservationDialogProps> = ({
handleClose
,
handleClose
,
isOpen
,
isOpen
,
}:
ReservationDialogProps
)
=>
{
}:
ReservationDialogProps
)
=>
{
const
classes
=
useStyles
();
const
{
control
,
handleSubmit
}
=
useForm
<
ReservationProps
>
();
const
{
control
,
handleSubmit
}
=
useForm
<
ReservationProps
>
();
const
reservation
=
useReservations
();
const
reservation
=
useReservations
();
...
@@ -41,68 +33,53 @@ export const ReservationDialog: FC<ReservationDialogProps> = ({
...
@@ -41,68 +33,53 @@ export const ReservationDialog: FC<ReservationDialogProps> = ({
return
(
return
(
<
div
data-testid
=
"ReservationDialog"
>
<
div
data-testid
=
"ReservationDialog"
>
<
Grid
container
direction
=
"column"
className
=
{
classes
.
paddingBottom
}
>
<
Dialog
<
div
className
=
{
classes
.
root
}
>
open
=
{
isOpen
}
<
Grid
item
>
onClose
=
{
handleClose
}
<
NavBar
/>
aria-labelledby
=
"form-dialog-title"
</
Grid
>
>
<
form
onSubmit
=
{
handleSubmit
(
onSubmit
)
}
data-testid
=
"Form"
>
<
DialogTitle
id
=
"form-dialog-title"
>
Book New Reservation
</
DialogTitle
>
<
DialogContent
>
<
DialogContentText
>
Write here below the details of your next reservation
</
DialogContentText
>
<
Dialog
<
InputField
open
=
{
isOpen
}
name
=
"name"
onClose
=
{
handleClose
}
label
=
"Name Reservation"
aria-labelledby
=
"form-dialog-title"
type
=
"text"
>
control
=
{
control
}
<
form
onSubmit
=
{
handleSubmit
(
onSubmit
)
}
data-testid
=
"Form"
>
/>
<
DialogTitle
id
=
"form-dialog-title"
>
<
InputField
Book New Reservation
name
=
"date"
</
DialogTitle
>
label
=
"Reservation date"
<
DialogContent
>
type
=
"date"
<
DialogContentText
>
control
=
{
control
}
Write here below the details of your next reservation
/>
</
DialogContentText
>
<
InputField
name
=
"time"
<
InputField
label
=
"Department Time"
name
=
"name"
type
=
"time"
label
=
"Name Reservation"
control
=
{
control
}
type
=
"text"
/>
control
=
{
control
}
<
InputField
/>
name
=
"destination"
<
InputField
label
=
"Destination"
name
=
"date"
type
=
"text"
label
=
"Reservation date"
control
=
{
control
}
type
=
"date"
/>
control
=
{
control
}
</
DialogContent
>
/>
<
DialogActions
>
<
InputField
<
Button
onClick
=
{
handleClose
}
color
=
"primary"
>
name
=
"time"
Cancel
label
=
"Department Time"
</
Button
>
type
=
"time"
<
Button
type
=
"submit"
fullWidth
variant
=
"contained"
color
=
"primary"
>
control
=
{
control
}
Insert
/>
</
Button
>
<
InputField
</
DialogActions
>
name
=
"destination"
</
form
>
label
=
"Destination"
</
Dialog
>
type
=
"text"
control
=
{
control
}
/>
</
DialogContent
>
<
DialogActions
>
<
Button
onClick
=
{
handleClose
}
color
=
"primary"
>
Cancel
</
Button
>
<
Button
type
=
"submit"
fullWidth
variant
=
"contained"
color
=
"primary"
>
Insert
</
Button
>
</
DialogActions
>
</
form
>
</
Dialog
>
</
div
>
</
Grid
>
</
div
>
</
div
>
);
);
};
};
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment