refactor(CheckoutView): use salix for checkOrder
gitea/hedera-web/pipeline/pr-beta This commit looks good
Details
gitea/hedera-web/pipeline/pr-beta This commit looks good
Details
This commit is contained in:
parent
e7f4ece0a7
commit
978b728a19
|
@ -82,13 +82,35 @@ export const useAppStore = defineStore('hedera', {
|
|||
},
|
||||
|
||||
async checkOrder(orderId) {
|
||||
const resultSet = await jApi.execQuery(
|
||||
'CALL myOrder_checkConfig(#id)',
|
||||
{ id: orderId }
|
||||
);
|
||||
resultSet.fetchValue();
|
||||
const myOrder_checkConfig = await api.post('applications/myOrder_checkConfig/execute-proc', {
|
||||
schema: 'hedera',
|
||||
params: [orderId],
|
||||
// params: ['wat123'],
|
||||
}, {
|
||||
validateStatus: () => true,
|
||||
});
|
||||
console.log('myOrder_checkConfig', myOrder_checkConfig);
|
||||
|
||||
if (myOrder_checkConfig.data.error) {
|
||||
const { message, name } = myOrder_checkConfig.data.error;
|
||||
console.log('myOrder_checkConfig', { message, name });
|
||||
|
||||
if (name === 'UserError') {
|
||||
// TODO: extraer descripciones de la DB y guardarlas en el front
|
||||
// $sql = 'SELECT `description` FROM `message` WHERE `code` = #';
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// async checkOrder(orderId) {
|
||||
// const resultSet = await jApi.execQuery(
|
||||
// 'CALL myOrder_checkConfig(#id)',
|
||||
// // { id: orderId },
|
||||
// { id: 'wat123' },
|
||||
// );
|
||||
// resultSet.fetchValue();
|
||||
// },
|
||||
|
||||
async check(checkoutContinue) {
|
||||
if (this.basketOrderId) {
|
||||
return await this.checkRedirect(checkoutContinue);
|
||||
|
|
Loading…
Reference in New Issue