eleven-solutions-common-website-unique-web 10.0.10 → 10.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/admin/Taxionomies.d.ts +4 -1
- package/dist/components/admin/Taxionomies.js +3 -3
- package/dist/components/admin/TaxonomyForm.d.ts +4 -1
- package/dist/components/admin/TaxonomyForm.js +21 -25
- package/dist/components/admin/Template.d.ts +4 -1
- package/dist/components/admin/Template.js +3 -3
- package/dist/components/admin/TemplateForm.d.ts +4 -1
- package/dist/components/admin/TemplateForm.js +4 -4
- package/dist/components/admin/UserForm.d.ts +4 -1
- package/dist/components/admin/UserForm.js +4 -4
- package/dist/components/admin/Users.d.ts +4 -1
- package/dist/components/admin/Users.js +6 -6
- package/dist/components/api/taxonomy.d.ts +8 -8
- package/dist/components/api/taxonomy.js +16 -16
- package/dist/components/api/template.d.ts +5 -5
- package/dist/components/api/template.js +10 -10
- package/dist/components/api/user.d.ts +5 -5
- package/dist/components/api/user.js +10 -10
- package/package.json +1 -1
- package/src/components/admin/Taxionomies.tsx +7 -3
- package/src/components/admin/TaxonomyForm.tsx +24 -20
- package/src/components/admin/Template.tsx +7 -3
- package/src/components/admin/TemplateForm.tsx +8 -4
- package/src/components/admin/UserForm.tsx +8 -4
- package/src/components/admin/Users.tsx +9 -4
- package/src/components/api/taxonomy.ts +16 -12
- package/src/components/api/template.ts +18 -16
- package/src/components/api/user.ts +11 -8
@@ -4,6 +4,7 @@ const apiUrl = "http://localhost:5260";
|
|
4
4
|
const cookies = new Cookies();
|
5
5
|
|
6
6
|
export const addUserApi = async (
|
7
|
+
url: string,
|
7
8
|
name: string,
|
8
9
|
email: string,
|
9
10
|
mobile: string,
|
@@ -14,7 +15,7 @@ export const addUserApi = async (
|
|
14
15
|
|
15
16
|
try {
|
16
17
|
const response = await axios.post(
|
17
|
-
`${
|
18
|
+
`${url}/login/adduser`,
|
18
19
|
{
|
19
20
|
Name: name,
|
20
21
|
Email: email,
|
@@ -36,11 +37,11 @@ export const addUserApi = async (
|
|
36
37
|
}
|
37
38
|
};
|
38
39
|
|
39
|
-
export const fetchUsersApi = async () => {
|
40
|
+
export const fetchUsersApi = async (url: string) => {
|
40
41
|
const token = cookies.get("token");
|
41
42
|
|
42
43
|
try {
|
43
|
-
const response = await axios.get(`${
|
44
|
+
const response = await axios.get(`${url}/login/getuser`, {
|
44
45
|
headers: {
|
45
46
|
Authorization: `Bearer ${token}`,
|
46
47
|
},
|
@@ -52,12 +53,12 @@ export const fetchUsersApi = async () => {
|
|
52
53
|
}
|
53
54
|
};
|
54
55
|
|
55
|
-
export const fetchUserByIdApi = async (userId: string) => {
|
56
|
+
export const fetchUserByIdApi = async (url: string, userId: string) => {
|
56
57
|
const cookies = new Cookies();
|
57
58
|
const token = cookies.get("token");
|
58
59
|
|
59
60
|
try {
|
60
|
-
const response = await axios.get(`${
|
61
|
+
const response = await axios.get(`${url}/login/getuserbyid/${userId}`, {
|
61
62
|
headers: {
|
62
63
|
Authorization: `Bearer ${token}`,
|
63
64
|
},
|
@@ -70,13 +71,13 @@ export const fetchUserByIdApi = async (userId: string) => {
|
|
70
71
|
}
|
71
72
|
};
|
72
73
|
|
73
|
-
export const deleteUserApi = async (id: string) => {
|
74
|
+
export const deleteUserApi = async (url: string, id: string) => {
|
74
75
|
const token = cookies.get("token");
|
75
76
|
|
76
77
|
try {
|
77
78
|
const response = await axios.request({
|
78
79
|
method: "DELETE",
|
79
|
-
url: `${
|
80
|
+
url: `${url}/login/delete`,
|
80
81
|
headers: {
|
81
82
|
Authorization: `Bearer ${token}`,
|
82
83
|
"Content-Type": "application/json",
|
@@ -93,6 +94,8 @@ export const deleteUserApi = async (id: string) => {
|
|
93
94
|
};
|
94
95
|
|
95
96
|
export const updateUserApi = async (
|
97
|
+
url: string,
|
98
|
+
|
96
99
|
id: string,
|
97
100
|
name: string,
|
98
101
|
mobile: string,
|
@@ -103,7 +106,7 @@ export const updateUserApi = async (
|
|
103
106
|
|
104
107
|
try {
|
105
108
|
const response = await axios.post(
|
106
|
-
`${
|
109
|
+
`${url}/login/updateuser`,
|
107
110
|
{
|
108
111
|
id: id,
|
109
112
|
name: name,
|