|
5 | 5 | </div> |
6 | 6 | <p class="text-justify max-h-[18px] truncate max-w-[60vw] md:max-w-none">{{ props.meta.actionName }}</p> |
7 | 7 | </div> |
8 | | - <Dialog ref="confirmDialog"> |
9 | | - <div |
10 | | - class="fixed inset-0 z-20 flex items-center justify-center bg-black/40" |
11 | | - > |
12 | | - <div |
13 | | - class="bulk-vision-dialog flex items-center justify-center relative w-[100vw] h-[100vh] max-h-[100vh] md:w-auto md:max-w-[95vw] md:min-w-[640px] md:h-auto md:max-h-[90vh] bg-white dark:bg-gray-900 rounded-none md:rounded-md shadow-2xl overflow-hidden" |
14 | | - > |
15 | | - <div class="bulk-vision-table flex flex-col items-center justify-evenly md:max-h-[90vh] gap-3 md:gap-4 w-full h-full p-4 md:p-6 overflow-y-auto overflow-x-auto"> |
16 | | - <button type="button" |
17 | | - @click="closeDialog" |
18 | | - class="text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm w-8 h-8 ms-auto inline-flex justify-center items-center dark:hover:bg-gray-600 dark:hover:text-white" > |
19 | | - <svg class="w-3 h-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14"> |
20 | | - <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"/> |
21 | | - </svg> |
22 | | - </button> |
23 | | - |
24 | | - <div v-if="records && props.checkboxes.length" class="w-full overflow-x-auto"> |
25 | | - <VisionTable |
26 | | - :checkbox="props.checkboxes" |
27 | | - :records="records" |
28 | | - :meta="props.meta" |
29 | | - :images="images" |
30 | | - :tableHeaders="tableHeaders" |
31 | | - :tableColumns="tableColumns" |
32 | | - :customFieldNames="customFieldNames" |
33 | | - :tableColumnsIndexes="tableColumnsIndexes" |
34 | | - :selected="selected" |
35 | | - :isAiResponseReceivedAnalize="isAiResponseReceivedAnalize" |
36 | | - :isAiResponseReceivedImage="isAiResponseReceivedImage" |
37 | | - :primaryKey="primaryKey" |
38 | | - :openGenerationCarousel="openGenerationCarousel" |
39 | | - @error="handleTableError" |
40 | | - /> |
41 | | - </div> |
42 | | - <div class="flex w-full flex-col md:flex-row items-stretch md:items-end justify-end gap-3 md:gap-4"> |
43 | | - <div class="h-full text-red-600 font-semibold flex items-center justify-center md:mb-2"> |
44 | | - <p v-if="isError === true">{{ errorMessage }}</p> |
45 | | - </div> |
46 | | - <button type="button" class="w-full md:w-auto py-2.5 px-5 text-sm font-medium text-gray-900 focus:outline-none bg-white rounded-lg border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-4 focus:ring-gray-100 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700" |
47 | | - @click="closeDialog" |
48 | | - > |
49 | | - {{'Cancel'}} |
50 | | - </button> |
51 | | - <Button |
52 | | - class="w-full md:w-64" |
53 | | - @click="saveData" |
54 | | - :disabled="isLoading || checkedCount < 1 || isCriticalError" |
55 | | - :loader="isLoading" |
56 | | - > |
57 | | - {{ checkedCount > 1 ? 'Save fields' : 'Save field' }} |
58 | | - </Button> |
59 | | - </div> |
60 | | - </div> |
| 8 | + <Dialog |
| 9 | + ref="confirmDialog" |
| 10 | + header="Bulk AI Flow" |
| 11 | + class="!max-w-full w-full lg:w-[1600px] !lg:max-w-[1600px]" |
| 12 | + :buttons="[ |
| 13 | + { label: checkedCount > 1 ? 'Save fields' : 'Save field', options: { disabled: isLoading || checkedCount < 1 || isCriticalError, loader: isLoading, class: 'w-fit sm:w-40' }, onclick: (dialog) => { saveData(); dialog.hide(); } }, |
| 14 | + { label: 'Cancel', onclick: (dialog) => dialog.hide() }, |
| 15 | + ]" |
| 16 | + > |
| 17 | + <div class="bulk-vision-table flex flex-col items-center max-w-[1560px] md:max-h-[90vh] gap-3 md:gap-4 w-full h-full overflow-y-auto"> |
| 18 | + <div v-if="records && props.checkboxes.length" class="w-full overflow-x-auto"> |
| 19 | + <VisionTable |
| 20 | + :checkbox="props.checkboxes" |
| 21 | + :records="records" |
| 22 | + :meta="props.meta" |
| 23 | + :images="images" |
| 24 | + :tableHeaders="tableHeaders" |
| 25 | + :tableColumns="tableColumns" |
| 26 | + :customFieldNames="customFieldNames" |
| 27 | + :tableColumnsIndexes="tableColumnsIndexes" |
| 28 | + :selected="selected" |
| 29 | + :isAiResponseReceivedAnalize="isAiResponseReceivedAnalize" |
| 30 | + :isAiResponseReceivedImage="isAiResponseReceivedImage" |
| 31 | + :primaryKey="primaryKey" |
| 32 | + :openGenerationCarousel="openGenerationCarousel" |
| 33 | + @error="handleTableError" |
| 34 | + /> |
| 35 | + </div> |
| 36 | + <div class="text-red-600 flex items-center w-full"> |
| 37 | + <p v-if="isError === true">{{ errorMessage }}</p> |
61 | 38 | </div> |
62 | 39 | </div> |
63 | 40 | </Dialog> |
@@ -157,21 +134,6 @@ watch(selected, (val) => { |
157 | 134 | checkedCount.value = val.filter(item => item.isChecked === true).length; |
158 | 135 | }, { deep: true }); |
159 | 136 |
|
160 | | -const closeDialog = () => { |
161 | | - confirmDialog.value.close(); |
162 | | - isAiResponseReceivedAnalize.value = []; |
163 | | - isAiResponseReceivedImage.value = []; |
164 | | -
|
165 | | - records.value = []; |
166 | | - images.value = []; |
167 | | - selected.value = []; |
168 | | - tableColumns.value = []; |
169 | | - tableColumnsIndexes.value = []; |
170 | | - isError.value = false; |
171 | | - isCriticalError.value = false; |
172 | | - isImageGenerationError.value = false; |
173 | | - errorMessage.value = ''; |
174 | | -} |
175 | 137 |
|
176 | 138 | function formatLabel(str) { |
177 | 139 | return str |
|
0 commit comments