fix currentDate
This commit is contained in:
parent
86bdfe961e
commit
501c818119
@ -22,7 +22,7 @@ export default function reactions({ store, apolloClient }: ProcessContext) {
|
||||
|
||||
return;
|
||||
}
|
||||
const currentDate = dayjs().utc(false).format('YYYY-MM-DD');
|
||||
const currentDate = dayjs().utc(false).toISOString();
|
||||
|
||||
const {
|
||||
data: { evo_addproduct_types },
|
||||
@ -79,7 +79,7 @@ export default function reactions({ store, apolloClient }: ProcessContext) {
|
||||
reaction(
|
||||
() => $calculation.$values.getValues(['leasingPeriod', 'leaseObjectType']),
|
||||
async ({ leasingPeriod, leaseObjectType }) => {
|
||||
const currentDate = dayjs().utc(false).format('YYYY-MM-DD');
|
||||
const currentDate = dayjs().utc(false).toISOString();
|
||||
|
||||
const {
|
||||
data: { evo_addproduct_types },
|
||||
@ -163,7 +163,7 @@ export default function reactions({ store, apolloClient }: ProcessContext) {
|
||||
leasingPeriod,
|
||||
plPriceRub,
|
||||
}) => {
|
||||
const currentDate = dayjs().utc(false).format('YYYY-MM-DD');
|
||||
const currentDate = dayjs().utc(false).toISOString();
|
||||
|
||||
const {
|
||||
data: { evo_addproduct_types },
|
||||
@ -242,7 +242,7 @@ export default function reactions({ store, apolloClient }: ProcessContext) {
|
||||
reaction(
|
||||
() => $calculation.$values.getValues(['requirementTelematic', 'recalcWithRevision']),
|
||||
async ({ requirementTelematic, recalcWithRevision }) => {
|
||||
const currentDate = dayjs().utc(false).format('YYYY-MM-DD');
|
||||
const currentDate = dayjs().utc(false).toISOString();
|
||||
const {
|
||||
data: { evo_addproduct_types: trackerTypes },
|
||||
} = await apolloClient.query({
|
||||
|
||||
@ -25,7 +25,7 @@ export default function helper({ apolloClient, user }: ValidationContext) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const currentDate = dayjs().utc(false).format('YYYY-MM-DD');
|
||||
const currentDate = dayjs().utc(false).toISOString();
|
||||
|
||||
const {
|
||||
data: { evo_coefficients },
|
||||
|
||||
@ -337,7 +337,7 @@ export default function reactions({ store, apolloClient, user }: ProcessContext)
|
||||
reaction(
|
||||
() => $calculation.element('selectQuote').getValue(),
|
||||
async (quoteId) => {
|
||||
const currentDate = dayjs().utc(false).format('YYYY-MM-DD');
|
||||
const currentDate = dayjs().utc(false).toISOString();
|
||||
|
||||
let {
|
||||
data: { evo_baseproducts },
|
||||
|
||||
@ -33,7 +33,7 @@ export default function valuesReactions({ store, apolloClient }: ProcessContext)
|
||||
lastPaymentPerc,
|
||||
leaseObjectType: leaseObjectTypeId,
|
||||
}) => {
|
||||
const currentDate = dayjs().utc(false).format('YYYY-MM-DD');
|
||||
const currentDate = dayjs().utc(false).toISOString();
|
||||
|
||||
let {
|
||||
data: { evo_tarifs = [] },
|
||||
@ -137,7 +137,7 @@ export default function valuesReactions({ store, apolloClient }: ProcessContext)
|
||||
return;
|
||||
}
|
||||
|
||||
const currentDate = dayjs().utc(false).format('YYYY-MM-DD');
|
||||
const currentDate = dayjs().utc(false).toISOString();
|
||||
|
||||
const {
|
||||
data: { evo_rates },
|
||||
|
||||
@ -148,7 +148,7 @@ export default function reactions({ store, apolloClient, queryClient }: ProcessC
|
||||
>({
|
||||
query: QUERY_GET_FINGAP_ADDPRODUCT_TYPES,
|
||||
variables: {
|
||||
currentDate: dayjs().utc(false).format('YYYY-MM-DD'),
|
||||
currentDate: dayjs().utc(false).toISOString(),
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@ -241,7 +241,7 @@ export function common({ store, apolloClient, queryClient }: ProcessContext) {
|
||||
leaseObjectType,
|
||||
// eslint-disable-next-line sonarjs/cognitive-complexity
|
||||
}) => {
|
||||
const currentDate = dayjs().utc(false).format('YYYY-MM-DD');
|
||||
const currentDate = dayjs().utc(false).toISOString();
|
||||
|
||||
let evo_region: CRMTypes.GetRegionQuery['evo_region'];
|
||||
if (objectRegionRegistrationId) {
|
||||
|
||||
@ -9,7 +9,7 @@ import { useEffect } from 'react';
|
||||
|
||||
dayjs.extend(utc);
|
||||
|
||||
const currentDate = dayjs().utc(false).format('YYYY-MM-DD');
|
||||
const currentDate = dayjs().utc(false).toISOString();
|
||||
|
||||
/**
|
||||
*
|
||||
@ -19,9 +19,6 @@ const currentDate = dayjs().utc(false).format('YYYY-MM-DD');
|
||||
function getMainData({ query }, onCompleted) {
|
||||
query({
|
||||
query: CRMTypes.GetLeaseObjectTypesDocument,
|
||||
variables: {
|
||||
currentDate,
|
||||
},
|
||||
}).then(({ data }) => {
|
||||
onCompleted({
|
||||
selectLeaseObjectType: data?.evo_leasingobject_types,
|
||||
|
||||
@ -66,7 +66,7 @@ export function common({ store, apolloClient }: ProcessContext) {
|
||||
firstPaymentPerc,
|
||||
model: modelId,
|
||||
}) => {
|
||||
const currentDate = dayjs().utc(false).format('YYYY-MM-DD');
|
||||
const currentDate = dayjs().utc(false).toISOString();
|
||||
|
||||
const {
|
||||
data: { evo_addproduct_types },
|
||||
|
||||
@ -35,7 +35,7 @@ export function fillAgentRewardReaction(
|
||||
query: CRMTypes.GetRewardConditionsDocument,
|
||||
variables: {
|
||||
agentid,
|
||||
currentDate: dayjs().utc(false).format('YYYY-MM-DD'),
|
||||
currentDate: dayjs().utc(false).toISOString(),
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@ -32,7 +32,7 @@ function helper({ apolloClient, ctx }: ValidationContext & { ctx: RefinementCtx
|
||||
query: CRMTypes.GetRewardConditionsDocument,
|
||||
variables: {
|
||||
agentid,
|
||||
currentDate: dayjs().utc(false).format('YYYY-MM-DD'),
|
||||
currentDate: dayjs().utc(false).toISOString(),
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@ export function createCurrencyUtility({ apolloClient }: Context) {
|
||||
fetchPolicy: 'network-only',
|
||||
query: CRMTypes.GetCurrencyChangesDocument,
|
||||
variables: {
|
||||
currentDate: dayjs().utc(false).format('YYYY-MM-DD'),
|
||||
currentDate: dayjs().utc(false).toISOString(),
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user