|
|
@@ -20,6 +20,7 @@ import kr.co.hanwha.hifive.base.BaseViewHolder;
|
|
|
import kr.co.hanwha.hifive.data.model.TaskDetailData;
|
|
|
import kr.co.hanwha.hifive.data.model.TaskDetailRoot;
|
|
|
import kr.co.hanwha.hifive.data.source.MemberDataRepository;
|
|
|
+import kr.co.hanwha.hifive.enums.TaskEvaluationType;
|
|
|
import kr.co.hanwha.hifive.enums.TaskFlagType;
|
|
|
import kr.co.hanwha.hifive.enums.TaskStatusType;
|
|
|
import kr.co.hanwha.hifive.util.HFCommonUtil;
|
|
|
@@ -106,25 +107,6 @@ public class TaskDetailHeaderViewHolder extends BaseViewHolder {
|
|
|
final TaskDetailData data = root.getTaskResult();
|
|
|
|
|
|
if (data != null) {
|
|
|
- //Log
|
|
|
- if (HFApplication.DEV_LOG) {
|
|
|
- mLayoutLog.setVisibility(View.VISIBLE);
|
|
|
- try {
|
|
|
-// mTextViewLog.setText(data.toString());
|
|
|
- mTextViewLog.setText(root.toString());
|
|
|
- mTextViewLog.setOnClickListener(new View.OnClickListener() {
|
|
|
- @Override
|
|
|
- public void onClick(View v) {
|
|
|
- HFCommonUtil.copyClipboard(getContext(), data.toString(), "클립보드에 복사되었습니다.");
|
|
|
- }
|
|
|
- });
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- } else {
|
|
|
- mLayoutLog.setVisibility(View.GONE);
|
|
|
- }
|
|
|
-
|
|
|
if (data.getAuthor_member_id() == data.getMember_id() &&
|
|
|
data.getMember_id() == MemberDataRepository.getInstance().getMemberId()) {
|
|
|
mTextViewAuthorName.setVisibility(View.GONE);
|
|
|
@@ -159,9 +141,14 @@ public class TaskDetailHeaderViewHolder extends BaseViewHolder {
|
|
|
mTextViewDueDate.setTextColor(HFTaskUtil.getDueDateFontColor(getContext(), data.getStatus()));
|
|
|
mTextViewDueDate.setText(HFDateUtil.getChangeDateFormat(data.getDue_to(), HFDateUtil.FORMAT_COMMON_SERVER, HFDateUtil.FORMAT_YYYY_MM_DD));
|
|
|
|
|
|
- mViewClosedLine.setVisibility(View.VISIBLE);
|
|
|
- mTextViewClosedDate.setText(HFStringUtil.getDisplayClosedDateTaskDetail(getContext(), data.getUpdated_at()));
|
|
|
- mTextViewClosedDate.setVisibility(View.VISIBLE);
|
|
|
+ if (data.getEvaluation() != TaskEvaluationType.CANCELED.getCode()) {
|
|
|
+ mViewClosedLine.setVisibility(View.VISIBLE);
|
|
|
+ mTextViewClosedDate.setText(HFStringUtil.getDisplayClosedDateTaskDetail(getContext(), data.getUpdated_at()));
|
|
|
+ mTextViewClosedDate.setVisibility(View.VISIBLE);
|
|
|
+ } else {
|
|
|
+ mViewClosedLine.setVisibility(View.GONE);
|
|
|
+ mTextViewClosedDate.setVisibility(View.GONE);
|
|
|
+ }
|
|
|
} else {
|
|
|
mImageViewDueDate.setImageDrawable(HFTaskUtil.getDueDateIconDrawable(getContext(), data.getDue_to(), root.getServer_time()));
|
|
|
|
|
|
@@ -196,6 +183,25 @@ public class TaskDetailHeaderViewHolder extends BaseViewHolder {
|
|
|
} else {
|
|
|
mLayoutAction.setVisibility(View.GONE);
|
|
|
}
|
|
|
+
|
|
|
+ //Log
|
|
|
+ if (HFApplication.DEV_LOG) {
|
|
|
+ mLayoutLog.setVisibility(View.VISIBLE);
|
|
|
+ try {
|
|
|
+// mTextViewLog.setText(data.toString());
|
|
|
+ mTextViewLog.setText(root.toString());
|
|
|
+ mTextViewLog.setOnClickListener(new View.OnClickListener() {
|
|
|
+ @Override
|
|
|
+ public void onClick(View v) {
|
|
|
+ HFCommonUtil.copyClipboard(getContext(), data.toString(), "클립보드에 복사되었습니다.");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ mLayoutLog.setVisibility(View.GONE);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|