Skip to content
This repository has been archived by the owner on Feb 4, 2025. It is now read-only.

Commit

Permalink
Merge pull request #229 from CampusDual/BFS42024-291-V2
Browse files Browse the repository at this point in the history
Tarea 291
  • Loading branch information
Sararey11 authored Jan 10, 2025
2 parents 577b6d1 + fff48f2 commit f24f917
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 3 additions & 1 deletion cd2024bfs4g1-frontend/src/main/ngx/src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -333,5 +333,7 @@
"Cancelar" : "Cancel",
"Registrar Asistencia" : "Register Attendance",
"Attendance_Warning" : "This action will overwrite all attendance records in that day range.",
"Attendance_Range" : "Select date range"
"Attendance_Range" : "Select date range",
"NOT_DELETABLE_TUTOR_TYPE_IS_IN_USE": "The mentor type you want to delete is in use",
"TUTOR_TYPE_CANNOT_BE_EMPTY": "The mentor type cannot be empty"
}
4 changes: 3 additions & 1 deletion cd2024bfs4g1-frontend/src/main/ngx/src/assets/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -331,5 +331,7 @@
"Cancelar" : "Cancelar",
"Registrar Asistencia" : "Registrar Asistencia",
"Attendance_Warning": "Esta acción sobreescribirá todos los registros de asistencia en ese rango de días.",
"Attendance_Range": "Seleccionar Rango de Fechas"
"Attendance_Range": "Seleccionar Rango de Fechas",
"NOT_DELETABLE_TUTOR_TYPE_IS_IN_USE": "El tipo de tutor que quieres eliminar esta ya en uso",
"TUTOR_TYPE_CANNOT_BE_EMPTY": "El tipo de tutor no puede estar vacio"
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public EntityResult tutorTypeQuery(Map<String, Object> keyMap, List<String> attr
public EntityResult tutorTypeInsert(Map<String, Object> attrMap) throws OntimizeJEERuntimeException {

if (isEmptyField(attrMap, TutorTypeDao.ATTR_TYPE)) {
return createErrorResult("EMPLOYMENT_STATUS_CANNOT_BE_EMPTY");
return createErrorResult("TUTOR_TYPE_CANNOT_BE_EMPTY");
}
return this.daoHelper.insert(this.tutorTypeDao, attrMap);
}
Expand All @@ -55,7 +55,7 @@ public EntityResult tutorTypeInsert(Map<String, Object> attrMap) throws Ontimize
public EntityResult tutorTypeUpdate(Map<String, Object> attrMap, Map<String, Object> keyMap) throws OntimizeJEERuntimeException {

if (isEmptyField(attrMap, TutorTypeDao.ATTR_TYPE)) {
return createErrorResult("EMPLOYMENT_STATUS_CANNOT_BE_EMPTY");
return createErrorResult("TUTOR_TYPE_CANNOT_BE_EMPTY");
}
return this.daoHelper.update(this.tutorTypeDao, attrMap, keyMap);
}
Expand All @@ -66,7 +66,7 @@ public EntityResult tutorTypeDelete(Map<String, Object> keyMap) throws OntimizeJ
return this.daoHelper.delete(this.tutorTypeDao, keyMap);
} catch (DataIntegrityViolationException e) {
EntityResult error = new EntityResultMapImpl();
error.setMessage("NOT_DELETABLE_EMPLOYMENT_STATUS_IS_IN_USE");
error.setMessage("NOT_DELETABLE_TUTOR_TYPE_IS_IN_USE");
error.setCode(EntityResult.OPERATION_WRONG);
return error;
}
Expand Down

0 comments on commit f24f917

Please sign in to comment.