feat: add support for removing old SEP data and refactor remove function
This commit is contained in:
No files matched your search
@@ -14,7 +14,7 @@ import { getFormatDateId } from '~/lib/date'
|
||||
import { downloadCsv, downloadXls } from '~/lib/download'
|
||||
import { serviceTypes } from '~/lib/constants.vclaim'
|
||||
import { getList as geMonitoringVisitList } from '~/services/vclaim-monitoring-visit.service'
|
||||
import { remove as removeSepData, makeSepDataForRemove } from '~/services/vclaim-sep.service'
|
||||
import { remove as removeSepData, removeOld as removeSepDataOld, makeSepDataForRemove } from '~/services/vclaim-sep.service'
|
||||
|
||||
const headerKeys = [
|
||||
'letterDate',
|
||||
@@ -224,10 +224,11 @@ export function useIntegrationSepList() {
|
||||
}
|
||||
|
||||
const handleRemove = async () => {
|
||||
const isNew = true;
|
||||
try {
|
||||
const result = await removeSepData(
|
||||
const result = !isNew ? await removeSepDataOld(
|
||||
makeSepDataForRemove({ ...sepData.value, userName: userStore.user?.user_name }),
|
||||
)
|
||||
) : await removeSepData(sepData.value.sepNumber || '')
|
||||
const backendMessage = result?.body?.message || result?.message || null
|
||||
const backendStatus = result?.body?.status || result?.status || null
|
||||
|
||||
|
||||
Reference in New Issue
Block a user