use dayjs().utc(false).format('YYYY-MM-DD')
This commit is contained in:
parent
581410138c
commit
f93426767c
@ -14,7 +14,7 @@ export default function reactions({ store, apolloClient }: ProcessContext) {
|
||||
reaction(
|
||||
() => $calculation.$values.getValues(['leasingPeriod', 'leaseObjectType']),
|
||||
async ({ leasingPeriod, leaseObjectType }) => {
|
||||
const currentDate = dayjs().utc(false).toISOString();
|
||||
const currentDate = dayjs().utc(false).format('YYYY-MM-DD');
|
||||
|
||||
const {
|
||||
data: { evo_addproduct_types },
|
||||
@ -71,7 +71,7 @@ export default function reactions({ store, apolloClient }: ProcessContext) {
|
||||
reaction(
|
||||
() => $calculation.$values.getValues(['leasingPeriod', 'leaseObjectType']),
|
||||
async ({ leasingPeriod, leaseObjectType }) => {
|
||||
const currentDate = dayjs().utc(false).toISOString();
|
||||
const currentDate = dayjs().utc(false).format('YYYY-MM-DD');
|
||||
|
||||
const {
|
||||
data: { evo_addproduct_types },
|
||||
|
||||
@ -32,7 +32,7 @@ export default function helper({ apolloClient, queryClient }: ProcessContext) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const currentDate = dayjs().utc(false).toISOString();
|
||||
const currentDate = dayjs().utc(false).format('YYYY-MM-DD');
|
||||
|
||||
const {
|
||||
data: { evo_coefficients },
|
||||
|
||||
@ -306,7 +306,7 @@ export default function reactions({ store, apolloClient }: ProcessContext) {
|
||||
reaction(
|
||||
() => $calculation.element('selectQuote').getValue(),
|
||||
async (quoteId) => {
|
||||
const currentDate = dayjs().utc(false).toISOString();
|
||||
const currentDate = dayjs().utc(false).format('YYYY-MM-DD');
|
||||
|
||||
const {
|
||||
data: { evo_baseproducts },
|
||||
|
||||
@ -29,7 +29,7 @@ export default function valuesReactions({ store, apolloClient }: ProcessContext)
|
||||
firstPaymentPerc,
|
||||
lastPaymentPerc,
|
||||
}) => {
|
||||
const currentDate = dayjs().utc(false).toISOString();
|
||||
const currentDate = dayjs().utc(false).format('YYYY-MM-DD');
|
||||
|
||||
let {
|
||||
data: { evo_tarifs = [] },
|
||||
@ -124,7 +124,7 @@ export default function valuesReactions({ store, apolloClient }: ProcessContext)
|
||||
return;
|
||||
}
|
||||
|
||||
const currentDate = dayjs().utc(false).toISOString();
|
||||
const currentDate = dayjs().utc(false).format('YYYY-MM-DD');
|
||||
|
||||
const {
|
||||
data: { evo_rates },
|
||||
|
||||
@ -233,9 +233,13 @@ export function common({ store, apolloClient, queryClient }: ProcessContext) {
|
||||
},
|
||||
context
|
||||
);
|
||||
const { tax, error } = await queryClient.fetchQuery(['1c', 'trans-tax'], request, {
|
||||
staleTime: STALE_TIME,
|
||||
});
|
||||
const { tax, error } = await queryClient.fetchQuery(
|
||||
['1c', 'trans-tax', carCategory, leaseObjectMotorPower, leaseObjectYear],
|
||||
request,
|
||||
{
|
||||
staleTime: STALE_TIME,
|
||||
}
|
||||
);
|
||||
|
||||
if (!error && tax) {
|
||||
$calculation.element('tbxVehicleTaxInYear').setValue(tax);
|
||||
@ -273,7 +277,7 @@ export function common({ store, apolloClient, queryClient }: ProcessContext) {
|
||||
|
||||
return;
|
||||
}
|
||||
const currentDate = dayjs().utc(false).toISOString();
|
||||
const currentDate = dayjs().utc(false).format('YYYY-MM-DD');
|
||||
|
||||
const {
|
||||
data: { evo_region },
|
||||
|
||||
@ -9,7 +9,7 @@ import { normalizeOptions } from 'tools';
|
||||
|
||||
dayjs.extend(utc);
|
||||
|
||||
const currentDate = dayjs().utc(false).toISOString();
|
||||
const currentDate = dayjs().utc(false).format('YYYY-MM-DD');
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@ -66,7 +66,7 @@ export function common({ store, apolloClient }: ProcessContext) {
|
||||
firstPaymentPerc,
|
||||
model: modelId,
|
||||
}) => {
|
||||
const currentDate = dayjs().utc(false).toISOString();
|
||||
const currentDate = dayjs().utc(false).format('YYYY-MM-DD');
|
||||
|
||||
const {
|
||||
data: { evo_addproduct_types },
|
||||
|
||||
@ -37,7 +37,7 @@ export function fillAgentRewardReaction(
|
||||
query: CRMTypes.GetRewardConditionsDocument,
|
||||
variables: {
|
||||
agentid,
|
||||
currentDate: dayjs().toISOString(),
|
||||
currentDate: dayjs().utc(false).format('YYYY-MM-DD'),
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user