|
|
@ -12,7 +12,7 @@ import QrCodeScan from '~icons/mdi/qrcode-scan' |
|
|
|
import RollupIcon from '~icons/mdi/movie-roll' |
|
|
|
import RollupIcon from '~icons/mdi/movie-roll' |
|
|
|
import CountIcon from '~icons/mdi/counter' |
|
|
|
import CountIcon from '~icons/mdi/counter' |
|
|
|
import SpecificDBTypeIcon from '~icons/mdi/database-settings' |
|
|
|
import SpecificDBTypeIcon from '~icons/mdi/database-settings' |
|
|
|
import TableColumnPlusBefore from '~icons/mdi/table-column-plus-before' |
|
|
|
import MdiTextSearchVariant from '~icons/mdi/text-search-variant' |
|
|
|
|
|
|
|
|
|
|
|
const renderIcon = (column: ColumnType, relationColumn?: ColumnType) => { |
|
|
|
const renderIcon = (column: ColumnType, relationColumn?: ColumnType) => { |
|
|
|
switch (column.uidt) { |
|
|
|
switch (column.uidt) { |
|
|
@ -35,13 +35,13 @@ const renderIcon = (column: ColumnType, relationColumn?: ColumnType) => { |
|
|
|
case UITypes.Lookup: |
|
|
|
case UITypes.Lookup: |
|
|
|
switch ((relationColumn?.colOptions as LinkToAnotherRecordType)?.type) { |
|
|
|
switch ((relationColumn?.colOptions as LinkToAnotherRecordType)?.type) { |
|
|
|
case RelationTypes.MANY_TO_MANY: |
|
|
|
case RelationTypes.MANY_TO_MANY: |
|
|
|
return { icon: TableColumnPlusBefore, color: 'text-accent' } |
|
|
|
return { icon: MdiTextSearchVariant, color: 'text-accent' } |
|
|
|
case RelationTypes.HAS_MANY: |
|
|
|
case RelationTypes.HAS_MANY: |
|
|
|
return { icon: TableColumnPlusBefore, color: 'text-yellow-500' } |
|
|
|
return { icon: MdiTextSearchVariant, color: 'text-yellow-500' } |
|
|
|
case RelationTypes.BELONGS_TO: |
|
|
|
case RelationTypes.BELONGS_TO: |
|
|
|
return { icon: TableColumnPlusBefore, color: 'text-sky-500' } |
|
|
|
return { icon: MdiTextSearchVariant, color: 'text-sky-500' } |
|
|
|
} |
|
|
|
} |
|
|
|
return { icon: TableColumnPlusBefore, color: 'text-grey' } |
|
|
|
return { icon: MdiTextSearchVariant, color: 'text-grey' } |
|
|
|
case UITypes.Rollup: |
|
|
|
case UITypes.Rollup: |
|
|
|
switch ((relationColumn?.colOptions as LinkToAnotherRecordType)?.type) { |
|
|
|
switch ((relationColumn?.colOptions as LinkToAnotherRecordType)?.type) { |
|
|
|
case RelationTypes.MANY_TO_MANY: |
|
|
|
case RelationTypes.MANY_TO_MANY: |
|
|
|