@longvansoftware/storefront-js-client 3.6.3 → 3.6.5
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.
|
@@ -119,6 +119,15 @@ exports.GET_PRODUCT_BY_ID_QUERY = (0, graphql_tag_1.gql) `
|
|
|
119
119
|
compareAtPrice
|
|
120
120
|
featuredImage
|
|
121
121
|
images
|
|
122
|
+
tags
|
|
123
|
+
brand {
|
|
124
|
+
id
|
|
125
|
+
createStamp
|
|
126
|
+
createdBy
|
|
127
|
+
name
|
|
128
|
+
image
|
|
129
|
+
imageIcon
|
|
130
|
+
}
|
|
122
131
|
productAttributes {
|
|
123
132
|
attributeName
|
|
124
133
|
attributeValue
|
|
@@ -20,4 +20,6 @@ export declare class PortalService extends Service {
|
|
|
20
20
|
completeCancelFFMOrder(orderId: string, note: string, reason: string): Promise<any>;
|
|
21
21
|
saveTextEditor(saveTextEditor: any): Promise<any>;
|
|
22
22
|
getContent(type: string, relativeId: string): Promise<any>;
|
|
23
|
+
getCalendarStudent(studentId?: string, classId?: string, startDate?: number, endDate?: number): Promise<any>;
|
|
24
|
+
getClass(): Promise<any>;
|
|
23
25
|
}
|
|
@@ -251,5 +251,43 @@ class PortalService extends serviceSDK_1.Service {
|
|
|
251
251
|
}
|
|
252
252
|
});
|
|
253
253
|
}
|
|
254
|
+
getCalendarStudent(studentId, classId, startDate, endDate) {
|
|
255
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
256
|
+
const method = "GET";
|
|
257
|
+
// Gom tất cả tham số vào object
|
|
258
|
+
const params = {
|
|
259
|
+
studentId,
|
|
260
|
+
classId,
|
|
261
|
+
startDate,
|
|
262
|
+
endDate,
|
|
263
|
+
};
|
|
264
|
+
// Lọc ra những tham số có giá trị
|
|
265
|
+
const query = Object.entries(params)
|
|
266
|
+
.filter(([_, value]) => value !== undefined && value !== null && value !== "")
|
|
267
|
+
.map(([key, value]) => `${key}=${encodeURIComponent(value)}`)
|
|
268
|
+
.join("&");
|
|
269
|
+
const endpoint = `/dynamic-collection/public/v2/schedule/lesson/${this.orgId}${query ? `?${query}` : ""}`;
|
|
270
|
+
try {
|
|
271
|
+
const response = yield this.restApiCallWithNoToken(endpoint, method);
|
|
272
|
+
return response;
|
|
273
|
+
}
|
|
274
|
+
catch (error) {
|
|
275
|
+
throw error;
|
|
276
|
+
}
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
getClass() {
|
|
280
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
281
|
+
const method = "GET";
|
|
282
|
+
const endpoint = `/dynamic-collection/public/v2/schedule/classSection/${this.orgId}`;
|
|
283
|
+
try {
|
|
284
|
+
const response = yield this.restApiCallWithNoToken(endpoint, method);
|
|
285
|
+
return response;
|
|
286
|
+
}
|
|
287
|
+
catch (error) {
|
|
288
|
+
throw error;
|
|
289
|
+
}
|
|
290
|
+
});
|
|
291
|
+
}
|
|
254
292
|
}
|
|
255
293
|
exports.PortalService = PortalService;
|