Last change
on this file since efaa053 was e6c2521, checked in by darsov2 <62809499+darsov2@…>, 16 months ago |
images upload/download impl, other fixes
|
-
Property mode
set to
100644
|
File size:
747 bytes
|
Line | |
---|
1 | import React from "react";
|
---|
2 |
|
---|
3 | import axios from "../../../axios.js";
|
---|
4 | import { useNavigate } from "react-router-dom";
|
---|
5 |
|
---|
6 | const useCreateTableAvailability = () => {
|
---|
7 |
|
---|
8 | const createTableAvailability = async (restaurantTableAvailible, id) => {
|
---|
9 | console.log({restaurantTableAvailible})
|
---|
10 | console.log(restaurantTableAvailible)
|
---|
11 | await axios
|
---|
12 | .post(`/restaurant/table/${id}/available/add`, restaurantTableAvailible, {
|
---|
13 | })
|
---|
14 | .then((res) => {
|
---|
15 | //history.push('/hotel');
|
---|
16 | })
|
---|
17 | .catch((err) => {
|
---|
18 | console.log(err);
|
---|
19 | })
|
---|
20 | .finally(() => {
|
---|
21 | });
|
---|
22 | }
|
---|
23 |
|
---|
24 | return {
|
---|
25 | createTableAvailability
|
---|
26 | };
|
---|
27 |
|
---|
28 | }
|
---|
29 |
|
---|
30 | export default useCreateTableAvailability; |
---|
Note:
See
TracBrowser
for help on using the repository browser.