SubAccounts !
This commit is contained in:
@@ -71,6 +71,30 @@ export default class CGridTableRec extends Vue {
|
||||
|
||||
public selected = []
|
||||
|
||||
get isAdmin() {
|
||||
return UserStore.state.isAdmin
|
||||
}
|
||||
|
||||
get isManager() {
|
||||
return UserStore.state.isManager
|
||||
}
|
||||
|
||||
get isTutor() {
|
||||
return UserStore.state.isTutor
|
||||
}
|
||||
|
||||
get isTratuttrici() {
|
||||
return UserStore.state.isTratuttrici
|
||||
}
|
||||
|
||||
get disabilita() {
|
||||
if ((this.mytable === 'users') && (this.isTutor)) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
get lists() {
|
||||
return lists
|
||||
}
|
||||
@@ -374,6 +398,7 @@ export default class CGridTableRec extends Vue {
|
||||
this.canEdit = tools.getCookie(tools.CAN_EDIT, this.canEdit) === 'true'
|
||||
this.tablesel = tools.getCookie('tablesel', this.tablesel)
|
||||
}
|
||||
console.log('this.tablesel', this.tablesel)
|
||||
|
||||
if (this.tablesel === '') {
|
||||
if (!!this.tablesList)
|
||||
@@ -382,6 +407,8 @@ export default class CGridTableRec extends Vue {
|
||||
this.tablesel = this.mytable
|
||||
}
|
||||
|
||||
console.log('2) this.tablesel', this.tablesel)
|
||||
|
||||
this.changeTable(false)
|
||||
|
||||
}
|
||||
@@ -442,7 +469,10 @@ export default class CGridTableRec extends Vue {
|
||||
}
|
||||
|
||||
public changeCol(newval) {
|
||||
tools.setCookie(this.mytable, this.colVisib.join('|'))
|
||||
console.log('changecol', this.mytable)
|
||||
if (!!this.mytable) {
|
||||
tools.setCookie(this.mytable, this.colVisib.join('|'))
|
||||
}
|
||||
}
|
||||
|
||||
public changeTable(mysel) {
|
||||
@@ -489,7 +519,9 @@ export default class CGridTableRec extends Vue {
|
||||
this.mytable = mytab.value
|
||||
}
|
||||
|
||||
tools.setCookie('tablesel', this.tablesel)
|
||||
if (!!this.tablesList) {
|
||||
tools.setCookie('tablesel', this.tablesel)
|
||||
}
|
||||
|
||||
this.updatedcol()
|
||||
|
||||
@@ -521,7 +553,9 @@ export default class CGridTableRec extends Vue {
|
||||
}
|
||||
|
||||
public changefuncAct(newval) {
|
||||
tools.setCookie(tools.CAN_EDIT, newval)
|
||||
if (!this.disabilita) {
|
||||
tools.setCookie(tools.CAN_EDIT, newval)
|
||||
}
|
||||
}
|
||||
|
||||
public clickrowcol(row, col) {
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
<q-btn v-if="mytable" label="" color="primary" @click="refresh" icon="search"></q-btn>
|
||||
</template>
|
||||
</q-input>
|
||||
<q-toggle v-if="mytable" v-model="canEdit" :val="lists.MenuAction.CAN_EDIT_TABLE" class="q-mx-sm"
|
||||
<q-toggle v-if="mytable" v-model="canEdit" :disable="disabilita" :val="lists.MenuAction.CAN_EDIT_TABLE" class="q-mx-sm"
|
||||
:label="$t('grid.editvalues')" @input="changefuncAct"
|
||||
></q-toggle>
|
||||
|
||||
@@ -117,6 +117,7 @@
|
||||
v-if="colVisib.includes(col.field + col.subfield)">
|
||||
<div :class="getclrow(props.row)">
|
||||
<CMyPopupEdit :canEdit="canEdit"
|
||||
:disable="disabilita"
|
||||
:col="col"
|
||||
:row.sync="props.row"
|
||||
:field="col.field"
|
||||
@@ -172,6 +173,7 @@
|
||||
<div class="q-ma-sm q-pa-sm colmodif col-grow rounded-borders " style="border: 1px solid #bbb"
|
||||
@click="colclicksel = mycol">
|
||||
<CMyPopupEdit :canEdit="true"
|
||||
:disable="disabilita"
|
||||
view="field"
|
||||
:col="mycol"
|
||||
:showall="true"
|
||||
|
||||
Reference in New Issue
Block a user