@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 CHANGED
@@ -13,5 +13,5 @@ custom/package-lock.json
13
13
  custom/package.json
14
14
  custom/tsconfig.json
15
15
 
16
- sent 96,802 bytes received 172 bytes 193,948.00 bytes/sec
17
- total size is 96,157 speedup is 0.99
16
+ sent 96,822 bytes received 172 bytes 193,988.00 bytes/sec
17
+ total size is 96,177 speedup is 0.99
@@ -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 max-w-[1560px] md:max-h-[75vh] gap-3 md:gap-4 w-full h-full overflow-y-auto">
70
- <div v-if="records && props.checkboxes.length && popupMode === 'generation'" class="[scrollbar-gutter:stable] w-full overflow-x-auto">
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
- </div>
115
+ </template>
115
116
  <div
116
117
  v-else-if="popupMode === 'settings'"
117
118
  v-for="(promptsCategory, key) in generationPrompts"
@@ -3,6 +3,8 @@
3
3
  :columns="tableHeaders"
4
4
  :data="tableColumns"
5
5
  :pageSize="6"
6
+ makeHeaderSticky
7
+ makePaginationSticky
6
8
  >
7
9
  <!-- HEADER TEMPLATE -->
8
10
  <template #header:checkboxes="{ item }">
@@ -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 max-w-[1560px] md:max-h-[75vh] gap-3 md:gap-4 w-full h-full overflow-y-auto">
70
- <div v-if="records && props.checkboxes.length && popupMode === 'generation'" class="[scrollbar-gutter:stable] w-full overflow-x-auto">
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
- </div>
115
+ </template>
115
116
  <div
116
117
  v-else-if="popupMode === 'settings'"
117
118
  v-for="(promptsCategory, key) in generationPrompts"
@@ -3,6 +3,8 @@
3
3
  :columns="tableHeaders"
4
4
  :data="tableColumns"
5
5
  :pageSize="6"
6
+ makeHeaderSticky
7
+ makePaginationSticky
6
8
  >
7
9
  <!-- HEADER TEMPLATE -->
8
10
  <template #header:checkboxes="{ item }">
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]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/bulk-ai-flow",
3
- "version": "1.21.4",
3
+ "version": "1.21.6",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },