fix mutation not working
This commit is contained in:
parent
368103b733
commit
48220d3266
@ -158,9 +158,7 @@ const actions: TAction = {
|
||||
|
||||
createKP: async () => {
|
||||
const { values } = CalculationStore;
|
||||
console.log('values', values);
|
||||
const calculationRes = await actions.calculate();
|
||||
console.log('calculationRes', calculationRes);
|
||||
|
||||
const {
|
||||
columns,
|
||||
@ -169,8 +167,14 @@ const actions: TAction = {
|
||||
preparedPayments,
|
||||
} = calculationRes;
|
||||
|
||||
console.log('columns', columns);
|
||||
console.log('postValues', postValues);
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
console.log('values', values);
|
||||
console.log('calculationRes', calculationRes);
|
||||
console.log('columns', columns);
|
||||
console.log('postValues', postValues);
|
||||
}
|
||||
|
||||
const domainName = await getUser().FullName;
|
||||
|
||||
CalculationService.crmgqlmutaion({
|
||||
mutation: gql`
|
||||
@ -203,11 +207,17 @@ const actions: TAction = {
|
||||
postValues,
|
||||
preparedValues,
|
||||
preparedPayments,
|
||||
domainName: (await getUser()).FullName,
|
||||
domainName,
|
||||
},
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
message.success({
|
||||
content: 'КП создано!',
|
||||
duration: 5,
|
||||
style: {
|
||||
marginTop: '7vh',
|
||||
},
|
||||
});
|
||||
})
|
||||
.catch(err => {
|
||||
throw err;
|
||||
|
||||
Reference in New Issue
Block a user