@adminforth/bulk-ai-flow 1.21.4 → 1.21.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build.log +2 -2
- package/custom/VisionAction.vue +4 -3
- package/custom/VisionTable.vue +2 -0
- package/dist/custom/VisionAction.vue +4 -3
- package/dist/custom/VisionTable.vue +2 -0
- package/dist/index.js +9 -0
- package/index.ts +10 -0
- package/package.json +1 -1
package/build.log
CHANGED
|
@@ -13,5 +13,5 @@ custom/package-lock.json
|
|
|
13
13
|
custom/package.json
|
|
14
14
|
custom/tsconfig.json
|
|
15
15
|
|
|
16
|
-
sent 96,
|
|
17
|
-
total size is 96,
|
|
16
|
+
sent 96,822 bytes received 172 bytes 193,988.00 bytes/sec
|
|
17
|
+
total size is 96,177 speedup is 0.99
|
package/custom/VisionAction.vue
CHANGED
|
@@ -66,9 +66,10 @@
|
|
|
66
66
|
]"
|
|
67
67
|
:click-to-close-outside="false"
|
|
68
68
|
>
|
|
69
|
-
<div class="bulk-vision-table flex flex-col items-center
|
|
70
|
-
<
|
|
69
|
+
<div class="bulk-vision-table flex flex-col items-center gap-3 md:gap-4 overflow-y-auto">
|
|
70
|
+
<template v-if="records && props.checkboxes.length && popupMode === 'generation'" >
|
|
71
71
|
<VisionTable
|
|
72
|
+
class="md:max-h-[75vh] max-w-[1560px] w-full h-full"
|
|
72
73
|
:checkbox="props.checkboxes"
|
|
73
74
|
:records="records"
|
|
74
75
|
:meta="props.meta"
|
|
@@ -111,7 +112,7 @@
|
|
|
111
112
|
<div class="text-red-600 flex items-center w-full">
|
|
112
113
|
<p v-if="isError === true">{{ errorMessage }}</p>
|
|
113
114
|
</div>
|
|
114
|
-
</
|
|
115
|
+
</template>
|
|
115
116
|
<div
|
|
116
117
|
v-else-if="popupMode === 'settings'"
|
|
117
118
|
v-for="(promptsCategory, key) in generationPrompts"
|
package/custom/VisionTable.vue
CHANGED
|
@@ -66,9 +66,10 @@
|
|
|
66
66
|
]"
|
|
67
67
|
:click-to-close-outside="false"
|
|
68
68
|
>
|
|
69
|
-
<div class="bulk-vision-table flex flex-col items-center
|
|
70
|
-
<
|
|
69
|
+
<div class="bulk-vision-table flex flex-col items-center gap-3 md:gap-4 overflow-y-auto">
|
|
70
|
+
<template v-if="records && props.checkboxes.length && popupMode === 'generation'" >
|
|
71
71
|
<VisionTable
|
|
72
|
+
class="md:max-h-[75vh] max-w-[1560px] w-full h-full"
|
|
72
73
|
:checkbox="props.checkboxes"
|
|
73
74
|
:records="records"
|
|
74
75
|
:meta="props.meta"
|
|
@@ -111,7 +112,7 @@
|
|
|
111
112
|
<div class="text-red-600 flex items-center w-full">
|
|
112
113
|
<p v-if="isError === true">{{ errorMessage }}</p>
|
|
113
114
|
</div>
|
|
114
|
-
</
|
|
115
|
+
</template>
|
|
115
116
|
<div
|
|
116
117
|
v-else-if="popupMode === 'settings'"
|
|
117
118
|
v-for="(promptsCategory, key) in generationPrompts"
|
package/dist/index.js
CHANGED
|
@@ -786,6 +786,7 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
|
|
|
786
786
|
}
|
|
787
787
|
}
|
|
788
788
|
const primaryKeyColumn = this.resourceConfig.columns.find((col) => col.primaryKey);
|
|
789
|
+
const decimalFieldsArray = this.resourceConfig.columns.filter(c => c.type === 'decimal').map(c => c.name);
|
|
789
790
|
const updates = selectedIds.map((ID, idx) => __awaiter(this, void 0, void 0, function* () {
|
|
790
791
|
const oldRecord = yield this.adminforth.resource(this.resourceConfig.resourceId).get([Filters.EQ(primaryKeyColumn.name, ID)]);
|
|
791
792
|
for (const [key, value] of Object.entries(outputImageFields)) {
|
|
@@ -821,6 +822,14 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
|
|
|
821
822
|
}
|
|
822
823
|
}
|
|
823
824
|
}
|
|
825
|
+
// Convert decimal fields to numbers
|
|
826
|
+
if (decimalFieldsArray.length > 0) {
|
|
827
|
+
for (const fieldName of decimalFieldsArray) {
|
|
828
|
+
if (fieldsToUpdate[idx].hasOwnProperty(fieldName)) {
|
|
829
|
+
fieldsToUpdate[idx][fieldName] = `${fieldsToUpdate[idx][fieldName]}`;
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
}
|
|
824
833
|
const newRecord = Object.assign(Object.assign({}, oldRecord), fieldsToUpdate[idx]);
|
|
825
834
|
return this.adminforth.updateResourceRecord({
|
|
826
835
|
resource: this.resourceConfig,
|
package/index.ts
CHANGED
|
@@ -803,6 +803,7 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
|
|
|
803
803
|
}
|
|
804
804
|
}
|
|
805
805
|
const primaryKeyColumn = this.resourceConfig.columns.find((col) => col.primaryKey);
|
|
806
|
+
const decimalFieldsArray = this.resourceConfig.columns.filter(c => c.type === 'decimal').map(c => c.name);
|
|
806
807
|
const updates = selectedIds.map(async (ID, idx) => {
|
|
807
808
|
const oldRecord = await this.adminforth.resource(this.resourceConfig.resourceId).get( [Filters.EQ(primaryKeyColumn.name, ID)] );
|
|
808
809
|
for (const [key, value] of Object.entries(outputImageFields)) {
|
|
@@ -837,6 +838,15 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
|
|
|
837
838
|
}
|
|
838
839
|
}
|
|
839
840
|
}
|
|
841
|
+
|
|
842
|
+
// Convert decimal fields to numbers
|
|
843
|
+
if (decimalFieldsArray.length > 0) {
|
|
844
|
+
for (const fieldName of decimalFieldsArray) {
|
|
845
|
+
if (fieldsToUpdate[idx].hasOwnProperty(fieldName)) {
|
|
846
|
+
fieldsToUpdate[idx][fieldName] = `${fieldsToUpdate[idx][fieldName]}`;
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
}
|
|
840
850
|
const newRecord = {
|
|
841
851
|
...oldRecord,
|
|
842
852
|
...fieldsToUpdate[idx]
|