add ExcelImport

This commit is contained in:
arc-alex
2024-01-06 18:21:22 +01:00
parent 341d554bc5
commit 08a32a7265
6 changed files with 215 additions and 148 deletions
+5 -10
View File
@@ -306,21 +306,16 @@ export const postWorksheet = async (id: string, worksheet: string) => {
/**
* @description STEP 5
*/
export const postPreviewSheet = async (id: string, worksheet: string) => {
const response = await axios.post(`${ontimeURL}/sheet-preview`, {
id,
worksheet,
});
export const postPreviewSheet = async (id: string, options: ExcelImportMap) => {
console.log(options);
const response = await axios.post(`${ontimeURL}/sheet/pull`, { id, options });
return response.data.data;
};
/**
* @description STEP 5
*/
export const postPushSheet = async (id: string, worksheet: string) => {
const response = await axios.post(`${ontimeURL}/sheet-push`, {
id,
worksheet,
});
export const postPushSheet = async (id: string, options: ExcelImportMap) => {
const response = await axios.post(`${ontimeURL}/sheet-push`, { id, options });
return response.data.data;
};