Updated main page
This commit is contained in:
parent
8f8114094a
commit
6b651b8958
1 changed files with 21 additions and 0 deletions
|
|
@ -107,6 +107,7 @@ export default () => {
|
||||||
if (updateOrderofpayment) {
|
if (updateOrderofpayment) {
|
||||||
setApprovedApplication(application)
|
setApprovedApplication(application)
|
||||||
setApproved(true)
|
setApproved(true)
|
||||||
|
postTransaction()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -191,6 +192,26 @@ export default () => {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const geteSignId = async () => {
|
||||||
|
try {
|
||||||
|
const response = await ofetch(API + 'get-esignid/' + ID, { parseResponse: JSON.parse })
|
||||||
|
const result = response.result
|
||||||
|
return result
|
||||||
|
} catch {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const postTransaction = async () => {
|
||||||
|
const id = await geteSignId()
|
||||||
|
const today = new Date()
|
||||||
|
const formatedDate = dayjs(today).format('YYYY-MM-DD HH:mm:ss')
|
||||||
|
await ofetch(API + 'post-esigntransaction', {
|
||||||
|
method: 'POST',
|
||||||
|
body: { data: parseInt(id), data2: approvedApplication(), data3: formatedDate },
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
const logout = async () => {
|
const logout = async () => {
|
||||||
removeEmployee()
|
removeEmployee()
|
||||||
navigate('/')
|
navigate('/')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue