eleven-solutions-common-website-unique-web 9.0.52 → 9.0.54
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.
|
@@ -152,7 +152,8 @@ const TaxonomyForm = () => {
|
|
|
152
152
|
yield addTaxonomyApi(inputType, Number(code), value);
|
|
153
153
|
alert("Taxonomy added successfully");
|
|
154
154
|
}
|
|
155
|
-
window.location.href = "/admin/taxinomies";
|
|
155
|
+
// window.location.href = "/admin/taxinomies";
|
|
156
|
+
window.history.pushState({}, "", "/admin/taxinomies");
|
|
156
157
|
}
|
|
157
158
|
catch (error) {
|
|
158
159
|
console.error("Error adding/updating Taxonomy:", error);
|
|
@@ -12,7 +12,7 @@ import Cookies from "universal-cookie";
|
|
|
12
12
|
const apiUrl = "http://localhost:5260";
|
|
13
13
|
const cookies = new Cookies();
|
|
14
14
|
export const addTaxonomyApi = (type, code, value) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
-
const token = cookies.get("
|
|
15
|
+
const token = cookies.get("authToken");
|
|
16
16
|
try {
|
|
17
17
|
const response = yield axios.post(`${apiUrl}/taxonomy/add`, {
|
|
18
18
|
Type: type,
|
|
@@ -31,7 +31,7 @@ export const addTaxonomyApi = (type, code, value) => __awaiter(void 0, void 0, v
|
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
33
|
export const fetchTaxonomiessApi = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
34
|
-
const token = cookies.get("
|
|
34
|
+
const token = cookies.get("authToken");
|
|
35
35
|
try {
|
|
36
36
|
const response = yield axios.get(`${apiUrl}/taxonomy/gettaxonomy`, {
|
|
37
37
|
headers: {
|
|
@@ -46,7 +46,7 @@ export const fetchTaxonomiessApi = () => __awaiter(void 0, void 0, void 0, funct
|
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
48
|
export const deleteTaxonomyApi = (id) => __awaiter(void 0, void 0, void 0, function* () {
|
|
49
|
-
const token = cookies.get("
|
|
49
|
+
const token = cookies.get("authToken");
|
|
50
50
|
try {
|
|
51
51
|
const response = yield axios.request({
|
|
52
52
|
method: "DELETE",
|
|
@@ -68,7 +68,7 @@ export const deleteTaxonomyApi = (id) => __awaiter(void 0, void 0, void 0, funct
|
|
|
68
68
|
});
|
|
69
69
|
export const fetchTaxonomyByIdApi = (taxonomyId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
70
70
|
const cookies = new Cookies();
|
|
71
|
-
const token = cookies.get("
|
|
71
|
+
const token = cookies.get("authToken");
|
|
72
72
|
try {
|
|
73
73
|
const response = yield axios.get(`${apiUrl}/taxonomy/gettaxonomybyid/${taxonomyId}`, {
|
|
74
74
|
headers: {
|
|
@@ -83,7 +83,7 @@ export const fetchTaxonomyByIdApi = (taxonomyId) => __awaiter(void 0, void 0, vo
|
|
|
83
83
|
}
|
|
84
84
|
});
|
|
85
85
|
export const updateTaxonomyApi = (id, type, code, value) => __awaiter(void 0, void 0, void 0, function* () {
|
|
86
|
-
const token = cookies.get("
|
|
86
|
+
const token = cookies.get("authToken");
|
|
87
87
|
try {
|
|
88
88
|
const response = yield axios.post(`${apiUrl}/taxonomy/updatetaxonomy`, {
|
|
89
89
|
Id: id,
|
|
@@ -103,7 +103,7 @@ export const updateTaxonomyApi = (id, type, code, value) => __awaiter(void 0, vo
|
|
|
103
103
|
});
|
|
104
104
|
export const addMultipleTaxonomiesApi = (taxonomies) => __awaiter(void 0, void 0, void 0, function* () {
|
|
105
105
|
var _a;
|
|
106
|
-
const token = cookies.get("
|
|
106
|
+
const token = cookies.get("authToken");
|
|
107
107
|
try {
|
|
108
108
|
const response = yield axios.post(`${apiUrl}/taxonomy/addmultipletaxonomies`, taxonomies, {
|
|
109
109
|
headers: {
|
|
@@ -119,7 +119,7 @@ export const addMultipleTaxonomiesApi = (taxonomies) => __awaiter(void 0, void 0
|
|
|
119
119
|
}
|
|
120
120
|
});
|
|
121
121
|
export const isMultipleApi = (type) => __awaiter(void 0, void 0, void 0, function* () {
|
|
122
|
-
const token = cookies.get("
|
|
122
|
+
const token = cookies.get("authToken");
|
|
123
123
|
try {
|
|
124
124
|
const response = yield axios.get(`${apiUrl}/taxonomy/IsTaxonomyMultipleByType/${type}`, {
|
|
125
125
|
headers: {
|
|
@@ -134,7 +134,7 @@ export const isMultipleApi = (type) => __awaiter(void 0, void 0, void 0, functio
|
|
|
134
134
|
}
|
|
135
135
|
});
|
|
136
136
|
export const addSubTypeApi = (parentid, type, code, value) => __awaiter(void 0, void 0, void 0, function* () {
|
|
137
|
-
const token = cookies.get("
|
|
137
|
+
const token = cookies.get("authToken");
|
|
138
138
|
try {
|
|
139
139
|
const response = yield axios.post(`${apiUrl}/taxonomy/addsubtype`, {
|
|
140
140
|
ParentId: parentid,
|
package/package.json
CHANGED
|
@@ -188,7 +188,8 @@ const TaxonomyForm = () => {
|
|
|
188
188
|
await addTaxonomyApi(inputType, Number(code), value);
|
|
189
189
|
alert("Taxonomy added successfully");
|
|
190
190
|
}
|
|
191
|
-
window.location.href = "/admin/taxinomies";
|
|
191
|
+
// window.location.href = "/admin/taxinomies";
|
|
192
|
+
window.history.pushState({}, "", "/admin/taxinomies");
|
|
192
193
|
} catch (error) {
|
|
193
194
|
console.error("Error adding/updating Taxonomy:", error);
|
|
194
195
|
alert("Failed to add/update Taxonomy");
|
|
@@ -8,7 +8,7 @@ export const addTaxonomyApi = async (
|
|
|
8
8
|
code: number,
|
|
9
9
|
value: string
|
|
10
10
|
) => {
|
|
11
|
-
const token = cookies.get("
|
|
11
|
+
const token = cookies.get("authToken");
|
|
12
12
|
|
|
13
13
|
try {
|
|
14
14
|
const response = await axios.post(
|
|
@@ -33,7 +33,7 @@ export const addTaxonomyApi = async (
|
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
export const fetchTaxonomiessApi = async () => {
|
|
36
|
-
const token = cookies.get("
|
|
36
|
+
const token = cookies.get("authToken");
|
|
37
37
|
|
|
38
38
|
try {
|
|
39
39
|
const response = await axios.get(`${apiUrl}/taxonomy/gettaxonomy`, {
|
|
@@ -49,7 +49,7 @@ export const fetchTaxonomiessApi = async () => {
|
|
|
49
49
|
};
|
|
50
50
|
|
|
51
51
|
export const deleteTaxonomyApi = async (id: string) => {
|
|
52
|
-
const token = cookies.get("
|
|
52
|
+
const token = cookies.get("authToken");
|
|
53
53
|
|
|
54
54
|
try {
|
|
55
55
|
const response = await axios.request({
|
|
@@ -72,7 +72,7 @@ export const deleteTaxonomyApi = async (id: string) => {
|
|
|
72
72
|
|
|
73
73
|
export const fetchTaxonomyByIdApi = async (taxonomyId: string) => {
|
|
74
74
|
const cookies = new Cookies();
|
|
75
|
-
const token = cookies.get("
|
|
75
|
+
const token = cookies.get("authToken");
|
|
76
76
|
|
|
77
77
|
try {
|
|
78
78
|
const response = await axios.get(
|
|
@@ -97,7 +97,7 @@ export const updateTaxonomyApi = async (
|
|
|
97
97
|
code: number,
|
|
98
98
|
value: string
|
|
99
99
|
) => {
|
|
100
|
-
const token = cookies.get("
|
|
100
|
+
const token = cookies.get("authToken");
|
|
101
101
|
|
|
102
102
|
try {
|
|
103
103
|
const response = await axios.post(
|
|
@@ -123,7 +123,7 @@ export const updateTaxonomyApi = async (
|
|
|
123
123
|
export const addMultipleTaxonomiesApi = async (
|
|
124
124
|
taxonomies: { type: string; code: number; value: string }[]
|
|
125
125
|
) => {
|
|
126
|
-
const token = cookies.get("
|
|
126
|
+
const token = cookies.get("authToken");
|
|
127
127
|
|
|
128
128
|
try {
|
|
129
129
|
const response = await axios.post(
|
|
@@ -147,7 +147,7 @@ export const addMultipleTaxonomiesApi = async (
|
|
|
147
147
|
};
|
|
148
148
|
|
|
149
149
|
export const isMultipleApi = async (type: string) => {
|
|
150
|
-
const token = cookies.get("
|
|
150
|
+
const token = cookies.get("authToken");
|
|
151
151
|
|
|
152
152
|
try {
|
|
153
153
|
const response = await axios.get(
|
|
@@ -171,7 +171,7 @@ export const addSubTypeApi = async (
|
|
|
171
171
|
code: number,
|
|
172
172
|
value: string
|
|
173
173
|
) => {
|
|
174
|
-
const token = cookies.get("
|
|
174
|
+
const token = cookies.get("authToken");
|
|
175
175
|
|
|
176
176
|
try {
|
|
177
177
|
const response = await axios.post(
|