iptdevs-design-system 2.6.27 → 2.6.28
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/esm2020/lib/core/models/attendance/attendance.interface.mjs +1 -1
- package/esm2020/lib/core/services/attendance-service/attendance.service.mjs +43 -1
- package/fesm2015/iptdevs-design-system.mjs +41 -0
- package/fesm2015/iptdevs-design-system.mjs.map +1 -1
- package/fesm2020/iptdevs-design-system.mjs +41 -0
- package/fesm2020/iptdevs-design-system.mjs.map +1 -1
- package/lib/core/models/attendance/attendance.interface.d.ts +53 -40
- package/lib/core/services/attendance-service/attendance.service.d.ts +13 -0
- package/package.json +1 -1
|
@@ -2021,6 +2021,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
2021
2021
|
class AttendanceService {
|
|
2022
2022
|
constructor(http) {
|
|
2023
2023
|
this.http = http;
|
|
2024
|
+
this.SERVICE_URL = 'https://iptdev.com.co/lab/academic/api';
|
|
2025
|
+
}
|
|
2026
|
+
addEventByCourseRq(params) {
|
|
2027
|
+
let serviceUrl = `${this.SERVICE_URL}/post/event/by/course`;
|
|
2028
|
+
this.generateRequestParams(params);
|
|
2029
|
+
return this.http.post(serviceUrl, this.httpOptions);
|
|
2030
|
+
}
|
|
2031
|
+
getEventsByCourseCode(params) {
|
|
2032
|
+
let serviceUrl = `${this.SERVICE_URL}/post/obtain/events/by/course_code`;
|
|
2033
|
+
this.generateRequestParams(params);
|
|
2034
|
+
return this.http.post(serviceUrl, this.httpOptions);
|
|
2035
|
+
}
|
|
2036
|
+
getEventByCode(params) {
|
|
2037
|
+
let serviceUrl = `${this.SERVICE_URL}/post/obtain/event/by/code`;
|
|
2038
|
+
this.generateRequestParams(params);
|
|
2039
|
+
return this.http.post(serviceUrl, this.httpOptions);
|
|
2040
|
+
}
|
|
2041
|
+
registerNewAttendanceByEvent(params) {
|
|
2042
|
+
let serviceUrl = `${this.SERVICE_URL}/register/attendance/by/event`;
|
|
2043
|
+
this.generateRequestParams(params);
|
|
2044
|
+
return this.http.post(serviceUrl, this.httpOptions);
|
|
2045
|
+
}
|
|
2046
|
+
getAttendaceByCourse(courseCode) {
|
|
2047
|
+
let serviceUrl = `${this.SERVICE_URL}/post/obtain/attendances/by/course/${courseCode}`;
|
|
2048
|
+
return this.http.get(serviceUrl);
|
|
2049
|
+
}
|
|
2050
|
+
getCODCodeByStudentCode(studentCode) {
|
|
2051
|
+
let serviceUrl = `${this.SERVICE_URL}/get/cod_code/by/student_code/${studentCode}`;
|
|
2052
|
+
return this.http.get(serviceUrl);
|
|
2053
|
+
}
|
|
2054
|
+
getAttendanceHistoryByStudent(token, cod_code) {
|
|
2055
|
+
let serviceUrl = `${this.SERVICE_URL}/post/obtain/attendance/history/by/student`;
|
|
2056
|
+
this.generateRequestParams({ token, cod_code });
|
|
2057
|
+
return this.http.post(serviceUrl, this.httpOptions);
|
|
2058
|
+
}
|
|
2059
|
+
// construye los headers y params
|
|
2060
|
+
generateRequestParams(param) {
|
|
2061
|
+
this.httpOptions = {
|
|
2062
|
+
header: new HttpHeaders(),
|
|
2063
|
+
params: param,
|
|
2064
|
+
};
|
|
2024
2065
|
}
|
|
2025
2066
|
}
|
|
2026
2067
|
AttendanceService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: AttendanceService, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|