diff --git a/src/pages/Organization/DetailPage/OrganizationCard.js b/src/pages/Organization/DetailPage/OrganizationCard.js
index 76fa33f..1bdf7fb 100644
--- a/src/pages/Organization/DetailPage/OrganizationCard.js
+++ b/src/pages/Organization/DetailPage/OrganizationCard.js
@@ -14,6 +14,7 @@ import { useEffect, useState, lazy } from "react";
import * as DateUtils from 'utils/DateUtils';
import * as HttpUtils from 'utils/HttpUtils';
import * as UrlUtils from "utils/ApiPathConst";
+import {checkMarkAsCreditClient} from 'utils/Utils';
import * as FieldUtils from "utils/FieldUtils";
import * as ComboData from "utils/ComboData";
const LoadingComponent = Loadable(lazy(() => import('../../extra-pages/LoadingComponent')));
@@ -312,30 +313,33 @@ const OrganizationCard = ({ userData, loadDataFun, id, setEditModeFun }) => {
{
currentUserData.creditor ?
-
-
-
-
-
- :
- <>
+ !checkMarkAsCreditClient()?
-
+ :null
+ :
+ <>
+ {!checkMarkAsCreditClient()?
+
+
+
+
+ :null
+ }
{ isGrantedAny("MAINTAIN_DEMANDNOTE")?
@@ -385,18 +389,20 @@ const OrganizationCard = ({ userData, loadDataFun, id, setEditModeFun }) => {
})}
-
- }
- label="is Credit Client"
- name="creditor"
- onChange={() => {
- formik.setFieldValue("creditor", !formik.values.creditor);
- }}
- disabled={true}
- //disabled={!editMode && !createMode}
- />
-
+ {!checkMarkAsCreditClient()?
+
+ }
+ label="is Credit Client"
+ name="creditor"
+ onChange={() => {
+ formik.setFieldValue("creditor", !formik.values.creditor);
+ }}
+ disabled={true}
+ //disabled={!editMode && !createMode}
+ />
+ :null
+ }
diff --git a/src/pages/Proof/Reply_Public/ProofForm.js b/src/pages/Proof/Reply_Public/ProofForm.js
index 9b22a44..7459d13 100644
--- a/src/pages/Proof/Reply_Public/ProofForm.js
+++ b/src/pages/Proof/Reply_Public/ProofForm.js
@@ -65,9 +65,11 @@ const FormPanel = ({ formData }) => {
React.useEffect(() => {
if (formData) {
setData(formData);
- setOnlyOnlinePayment(checkIsOnlyOnlinePayment(formData.issueDate))
+ setOnlyOnlinePayment(checkIsOnlyOnlinePayment())
if (isDummyLoggedIn()) {
set_paymentMethod("demandNote")
+ } else if (checkIsOnlyOnlinePayment()){
+ set_paymentMethod("online")
}
}
}, [formData]);
diff --git a/src/pages/PublicNotice/ApplyForm/index.js b/src/pages/PublicNotice/ApplyForm/index.js
index ba36ace..0286ad0 100644
--- a/src/pages/PublicNotice/ApplyForm/index.js
+++ b/src/pages/PublicNotice/ApplyForm/index.js
@@ -66,7 +66,7 @@ const ApplyForm = () => {
setGazetteIssueList(response?.gazetteIssueList);
setSelection(selection);
setUserData(response);
- setOnlyOnlinePayment(checkIsOnlyOnlinePayment(response?.gazetteIssueList[0].issueDate))
+ setOnlyOnlinePayment(checkIsOnlyOnlinePayment())
}
});
};
diff --git a/src/utils/Utils.js b/src/utils/Utils.js
index b14ee03..591aa92 100644
--- a/src/utils/Utils.js
+++ b/src/utils/Utils.js
@@ -183,9 +183,9 @@ export const isPasswordExpiry = () =>{
}
-export const checkIsOnlyOnlinePayment = (date) => {
- const targetDate = new Date("2026-01-28")
- const checkDate = DateUtils.convertToDate(date)
+export const checkIsOnlyOnlinePayment = () => {
+ const targetDate = new Date(2026, 0, 28, 8, 0, 0)
+ const checkDate = DateUtils.convertToDate(new Date())
if (isDummyLoggedIn()){
return false;
}
@@ -196,4 +196,16 @@ export const checkIsOnlyOnlinePayment = (date) => {
} else {
return false;
}
+}
+
+export const checkMarkAsCreditClient = () => {
+ const targetDate = new Date(2026, 0, 28, 8, 0, 0)
+ const checkDate = DateUtils.convertToDate(new Date())
+ // console.log(targetDate)
+ // console.log(checkDate >= targetDate)
+ if (checkDate >= targetDate) {
+ return true
+ } else {
+ return false;
+ }
}
\ No newline at end of file