perbaikan custom message resource untuk memperbaharui data cuti

This commit is contained in:
salmanoe 2021-01-08 10:42:11 +07:00
parent 5ec6f57009
commit cc3ea1ff80
3 changed files with 8 additions and 3 deletions

View File

@ -7,6 +7,8 @@ label.success.ok = OK
label.error = TERJADI KESALAHANR
label.try_again = SILAHKAN COBA KEMBALI
label.update.data.cuti = Memperbaharui Data Cuti
# Data Validation Message
NotEmpty = Tidak boleh kosong
NotNull = {0} Tidak boleh kosong

View File

@ -7,9 +7,12 @@ package com.jasamedika.medifirst2000.constants;
* @author Roberto
*/
public final class MessageResource {
public static final String LABEL_SUCCESS = "label.success";
public static final String LABEL_ERROR = "label.error";
public static final String LABEL_TRY_AGAIN = "label.try_again";
public static final String LABEL_SUCCESS_CREATED = "label.success.created";
public static final String LABEL_SUCCESS_OK = "label.success.ok";
public static final String LABEL_UPDATE_DATA_CUTI = "label.update.data.cuti";
}

View File

@ -3279,8 +3279,8 @@ public class SdmController extends LocaleController<AkunVO> {
try {
Map<String, Object> result = servicePermohonanStatus.getDataCuti(pegawaiId, year, statusPegawaiId);
if (null != result) {
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS_OK,
getMessage(MessageResource.LABEL_SUCCESS_OK, request));
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS,
getMessage(MessageResource.LABEL_SUCCESS, request));
return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage);
} else {
return RestUtil.getJsonResponse(result, HttpStatus.NOT_FOUND, mapHeaderMessage);
@ -4338,7 +4338,7 @@ public class SdmController extends LocaleController<AkunVO> {
Map<String, Object> result = servicePermohonanStatus.setJatahCutiPegawaiRecursive(vo);
if (null != result)
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS,
getMessage(MessageResource.LABEL_SUCCESS, request));
getMessage(MessageResource.LABEL_UPDATE_DATA_CUTI, request));
return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage);
} catch (ServiceVOException e) {
LOGGER.error("Got exception {} when add jatahCuti pegawai", e.getMessage());