|
|
|
@ -177,119 +177,6 @@
|
|
|
|
|
@change="onCellValueChange(col, row, columnObj)" |
|
|
|
|
/> |
|
|
|
|
|
|
|
|
|
<!-- |
|
|
|
|
<div v-else-if="columnObj.cn in hasMany" class="hasmany-col d-flex "> |
|
|
|
|
{{ rowObj[columnObj._cn] }} |
|
|
|
|
<v-spacer></v-spacer> |
|
|
|
|
<v-menu open-on-hover> |
|
|
|
|
<template v-slot:activator="{on}"> |
|
|
|
|
<v-icon v-on="on" class=" hasmany-col-menu-icon">mdi-menu-down</v-icon> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<v-list dense> |
|
|
|
|
<v-list-item v-for="(rel,i) in hasMany[columnObj.cn]" |
|
|
|
|
@click="addNewRelationTab( |
|
|
|
|
rel, |
|
|
|
|
table, |
|
|
|
|
meta._tn, |
|
|
|
|
rel.tn, |
|
|
|
|
rel._tn, |
|
|
|
|
rowObj[columnObj._cn], |
|
|
|
|
'hm', |
|
|
|
|
rowObj, |
|
|
|
|
rowObj[primaryValueColumn] |
|
|
|
|
)" |
|
|
|
|
:key="i" |
|
|
|
|
> |
|
|
|
|
<v-chip small :color="colors[i % colors.length]"> |
|
|
|
|
<span class="caption text-capitalize"> {{ rel._tn }}</span> |
|
|
|
|
</v-chip> |
|
|
|
|
</v-list-item> |
|
|
|
|
</v-list> |
|
|
|
|
</v-menu> |
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
<span v-else-if="columnObj._cn in belongsTo" |
|
|
|
|
@click="addNewRelationTab( |
|
|
|
|
belongsTo[columnObj._cn], |
|
|
|
|
table, |
|
|
|
|
meta._tn, |
|
|
|
|
belongsTo[columnObj._cn].rtn, |
|
|
|
|
belongsTo[columnObj._cn]._rtn, |
|
|
|
|
rowObj[columnObj._cn], |
|
|
|
|
'bt', |
|
|
|
|
rowObj, |
|
|
|
|
rowObj[primaryValueColumn] |
|
|
|
|
)" |
|
|
|
|
class="belongsto-col">{{ rowObj[columnObj._cn] }}</span> |
|
|
|
|
|
|
|
|
|
<template v-else-if="primaryValueColumn === columnObj._cn"> |
|
|
|
|
<v-menu open-on-hover offset-y bottom> |
|
|
|
|
<template v-slot:activator="{on}"> |
|
|
|
|
<!– <v-chip v-on="on" |
|
|
|
|
small |
|
|
|
|
class="caption xc-bt-chip" |
|
|
|
|
outlined |
|
|
|
|
color="success"> |
|
|
|
|
{{ rowObj[columnObj.cn] }} |
|
|
|
|
<v-icon v-on="on" class="hasmany-col-menu-icon pv">mdi-menu-down</v-icon> |
|
|
|
|
</v-chip> –> |
|
|
|
|
|
|
|
|
|
<span v-on="on" |
|
|
|
|
class="caption xc-bt-chip primary--text"> |
|
|
|
|
{{ rowObj[columnObj._cn] }} |
|
|
|
|
<v-icon v-on="on" class="hasmany-col-menu-icon pv">mdi-menu-down</v-icon> |
|
|
|
|
</span> |
|
|
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<v-list dense> |
|
|
|
|
<v-list-item dense v-if="haveHasManyrelation"><span class="grey--text caption text-center mt-n2">Has Many</span> |
|
|
|
|
</v-list-item> |
|
|
|
|
<template v-if="haveHasManyrelation"> |
|
|
|
|
<template v-for="(hm,idCol) in hasMany"> |
|
|
|
|
<template v-for="(rel,i) in hm"> |
|
|
|
|
|
|
|
|
|
<v-divider |
|
|
|
|
:key="i + '_' + idCol + '_div'"></v-divider> |
|
|
|
|
<v-list-item |
|
|
|
|
class="py-1" |
|
|
|
|
@click="addNewRelationTab( |
|
|
|
|
rel, |
|
|
|
|
table, |
|
|
|
|
meta._tn, |
|
|
|
|
rel.tn, |
|
|
|
|
rel._tn, |
|
|
|
|
rowObj[idCol], |
|
|
|
|
'hm', |
|
|
|
|
rowObj, |
|
|
|
|
rowObj[primaryValueColumn] |
|
|
|
|
)" |
|
|
|
|
:key="i + '_' + idCol" |
|
|
|
|
dense |
|
|
|
|
> |
|
|
|
|
<v-list-item-icon class="mx-1"> |
|
|
|
|
<v-icon class="has-many-icon mr-1" small :color="textColors[i % colors.length]"> |
|
|
|
|
mdi-source-fork |
|
|
|
|
</v-icon> |
|
|
|
|
</v-list-item-icon> |
|
|
|
|
<!– <v-chip small >–> |
|
|
|
|
<!– <v-list-item-title> –> |
|
|
|
|
<span class="caption text-capitalize"> {{ rel._tn }}</span> |
|
|
|
|
<!– </v-list-item-title>–> |
|
|
|
|
<!– </v-chip>–> |
|
|
|
|
</v-list-item> |
|
|
|
|
</template> |
|
|
|
|
</template> |
|
|
|
|
</template> |
|
|
|
|
<v-list-item v-else> |
|
|
|
|
<span class="caption text-capitalize grey--text font-weight-light"> No relation found</span> |
|
|
|
|
</v-list-item> |
|
|
|
|
</v-list> |
|
|
|
|
</v-menu> |
|
|
|
|
</template> |
|
|
|
|
--> |
|
|
|
|
|
|
|
|
|
<table-cell |
|
|
|
|
v-else |
|
|
|
|
:class="{'primary--text' : primaryValueColumn === columnObj._cn}" |
|
|
|
|