Procházet zdrojové kódy

update proof payment method check

CR013B1
Alex Cheung před 1 měsícem
rodič
revize
cf09c0215d
2 změnil soubory, kde provedl 7 přidání a 7 odebrání
  1. +3
    -3
      src/pages/Proof/Reply_Public/ProofForm.js
  2. +4
    -4
      src/utils/Utils.js

+ 3
- 3
src/pages/Proof/Reply_Public/ProofForm.js Zobrazit soubor

@@ -28,7 +28,7 @@ import { ThemeProvider } from "@emotion/react";
import { FormattedMessage, useIntl } from "react-intl";
import {
isDummyLoggedIn,
checkIsOnlyOnlinePayment
checkIsOnlyOnlinePaymentByIssueDate
} from "utils/Utils"

const UploadFileTable = Loadable(React.lazy(() => import('./UploadFileTable')));
@@ -65,10 +65,10 @@ const FormPanel = ({ formData }) => {
React.useEffect(() => {
if (formData) {
setData(formData);
setOnlyOnlinePayment(checkIsOnlyOnlinePayment())
setOnlyOnlinePayment(checkIsOnlyOnlinePaymentByIssueDate(formData.issueDate))
if (isDummyLoggedIn()) {
set_paymentMethod("demandNote")
} else if (checkIsOnlyOnlinePayment()){
} else if (checkIsOnlyOnlinePaymentByIssueDate(formData.issueDate)){
set_paymentMethod("online")
}
}


+ 4
- 4
src/utils/Utils.js Zobrazit soubor

@@ -184,8 +184,8 @@ export const isPasswordExpiry = () =>{
}

export const checkIsOnlyOnlinePaymentByIssueDate = (date) => {
const targetDate = new Date(2026, 0, 28, 8, 0, 0) //2026-01-28T08:00:00.000Z
// const targetDate = new Date(2025, 6, 13, 8, 0, 0); //2025-07-13T08:00:00.000Z
const targetDate = new Date(2026, 1, 6, 0, 0, 0) //2026-02-06T00:00:00.000Z
// const targetDate = new Date(2025, 6, 18, 0, 0, 0); //2025-07-13T00:00:00.000Z
const checkDate = DateUtils.convertToDate(date)
if (isDummyLoggedIn()){
return false;
@@ -200,7 +200,7 @@ export const checkIsOnlyOnlinePaymentByIssueDate = (date) => {
}

export const checkIsOnlyOnlinePayment = () => {
const targetDate = new Date(2026, 0, 28, 8, 0, 0)
const targetDate = new Date(2026, 1, 6, 8, 0, 0)
const checkDate = DateUtils.convertToDate(new Date())
if (isDummyLoggedIn()){
return false;
@@ -215,7 +215,7 @@ export const checkIsOnlyOnlinePayment = () => {
}

export const checkMarkAsCreditClient = () => {
const targetDate = new Date(2026, 0, 28, 8, 0, 0)
const targetDate = new Date(2026, 1, 6, 8, 0, 0)
const checkDate = DateUtils.convertToDate(new Date())
// console.log(targetDate)
// console.log(checkDate >= targetDate)


Načítá se…
Zrušit
Uložit