File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6565 :tableColumnsIndexes =" tableColumnsIndexes "
6666 :selected =" selected "
6767 :oldData =" oldData "
68+ :isError =" isError "
69+ :errorMessage =" errorMessage "
6870 :isAiResponseReceivedAnalizeImage =" isAiResponseReceivedAnalizeImage "
6971 :isAiResponseReceivedAnalizeNoImage =" isAiResponseReceivedAnalizeNoImage "
7072 :isAiResponseReceivedImage =" isAiResponseReceivedImage "
@@ -147,13 +149,8 @@ const props = defineProps<{
147149 meta: any ,
148150 resource: AdminForthResourceCommon ,
149151 adminUser: AdminUser ,
150- updateList: {
151- type: Function ,
152- required: true
153- },
154- clearCheckboxes: {
155- type: Function
156- }
152+ updateList: () => any ,
153+ clearCheckboxes? : () => any ,
157154}>();
158155
159156defineExpose ({
@@ -326,6 +323,13 @@ function fillCarouselSaveImages() {
326323
327324
328325function formatLabel(str ) {
326+ const labelsMap = props .meta ?.columnLabels || {};
327+ let labelFromMeta = labelsMap [str ];
328+ if (! labelFromMeta ) {
329+ const match = Object .keys (labelsMap ).find (k => k .toLowerCase () === String (str ).toLowerCase ());
330+ if (match ) labelFromMeta = labelsMap [match ];
331+ }
332+ if (labelFromMeta ) return labelFromMeta ;
329333 return str
330334 .split (' _' )
331335 .map (word => word .charAt (0 ).toUpperCase () + word .slice (1 ))
Original file line number Diff line number Diff line change @@ -533,6 +533,10 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
533533 } ;
534534
535535 const primaryKeyColumn = this . resourceConfig . columns . find ( ( col ) => col . primaryKey ) ;
536+ // Map of column technical names to their display labels from resource config
537+ const columnLabels : Record < string , string > = Object . fromEntries (
538+ ( this . resourceConfig . columns || [ ] ) . map ( ( c : any ) => [ c . name , c . label || c . name ] )
539+ ) ;
536540
537541 const pageInjection = {
538542 file : this . componentPath ( 'VisionAction.vue' ) ,
@@ -541,6 +545,7 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
541545 outputFields : outputFields ,
542546 actionName : this . options . actionName ,
543547 columnEnums : columnEnums ,
548+ columnLabels : columnLabels ,
544549 outputImageFields : outputImageFields ,
545550 outputFieldsForAnalizeFromImages : outputFieldsForAnalizeFromImages ,
546551 outputPlainFields : outputPlainFields ,
You can’t perform that action at this time.
0 commit comments