diff --git a/app/apis/elpApi.js b/app/apis/elpApi.js
index 4fb03f8..c5dcd85 100755
--- a/app/apis/elpApi.js
+++ b/app/apis/elpApi.js
@@ -23,5 +23,8 @@ export default {
},
data_entry:{
getSchema:"elp/schema/get"
+ },
+ conflict:{
+ get:"elp/conflict/{{type_name}}/get/text/{{doc_id}}"
}
};
diff --git a/app/components/auto-import/TiptapEditor.vue b/app/components/auto-import/TiptapEditor.vue
index d664a0b..c09ab31 100755
--- a/app/components/auto-import/TiptapEditor.vue
+++ b/app/components/auto-import/TiptapEditor.vue
@@ -26,7 +26,7 @@
diff --git a/app/composables/useElpService.js b/app/composables/useElpService.js
index 7e9240a..2fe5265 100755
--- a/app/composables/useElpService.js
+++ b/app/composables/useElpService.js
@@ -69,10 +69,37 @@ export function useElpService(props, emit) {
});
}
+ ///-----------------------------------------------------
+ ///--- با توجه به یک فیلد، مقدار محاسبه شده ای بر میگردند مثلا : بیشترین مقدار یا مجموع یا ...
+ ///-----------------------------------------------------
+ async function uepGetConflictDoc(
+ doc_id,
+ key = "qaconflict"
+ ) {
+ let url = elpApi.conflict.get;
+ url = url.replace("{{type_name}}", key);
+ url = url.replace("{{doc_id}}", doc_id);
+
+ return await httpService
+ .getRequest(url)
+ .then((res) => {
+ return res;
+ })
+ .catch(() => {
+ toast.add({
+ title: "خطا",
+ description: "خطا در انجام عملیات، دوباره تلاش کنید",
+ color: "red",
+ });
+ return undefined;
+ });
+ }
+
///-----------------------------------------------------
///-----------------------------------------------------
return {
uepUpdateField,
uepGetComputeField,
+ uepGetConflictDoc,
};
}
diff --git a/app/manuals/utilities.js b/app/manuals/utilities.js
index 367df63..4c8b016 100755
--- a/app/manuals/utilities.js
+++ b/app/manuals/utilities.js
@@ -6,16 +6,16 @@ export const isLoginRemoved = () => process.env.VUE_APP_LOGIN_REMOVE == 1;
// util to export to excel file using plugin
// https://github.com/zheeeng/export-from-json
-export const convertJsonToExcelUsingPlugin = async (
- data,
- fileName = "download"
-) => {
- // 'txt'(default), 'css', 'html', 'json', 'csv', 'xls', 'xml'
- const exportType = exportFromJSON.types.xls;
- const withBOM = true;
+// export const convertJsonToExcelUsingPlugin = async (
+// data,
+// fileName = "download"
+// ) => {
+// // 'txt'(default), 'css', 'html', 'json', 'csv', 'xls', 'xml'
+// const exportType = exportFromJSON.types.xls;
+// const withBOM = true;
- return await exportFromJSON({ data, fileName, exportType, withBOM });
-};
+// return await exportFromJSON({ data, fileName, exportType, withBOM });
+// };
// util to export to excel file manually
export const exportJsonToExcelManually = (JSONData, FileTitle, ShowLabel) => {
diff --git a/app/pages/index.vue b/app/pages/index.vue
index 9ea8349..4c669bf 100755
--- a/app/pages/index.vue
+++ b/app/pages/index.vue
@@ -16,6 +16,7 @@
:listConflicts="listConflicts"
:conflictSelected="conflictSelected"
:pagination="pagination"
+ :conflict_id="conflictSelected?._id"
@conflict-details="conflictDetails"
@my-content-action="myContentAction"
@my-header-tools-search="myHeaderToolsSearch"
@@ -145,7 +146,7 @@ const getListConflict = async (textSearch = "", filterExtended = "") => {
}
};
function conflictDetails(event) {
- conflictSelected.value = event;
+ conflictSelected.value = event.item;
activeTabKey.value = "RelationEdit";
console.log("event", event);
}