- Aggiornato grafica Pagina Gruppi
- Lista Utenti appartenenti al gruppo - Lista richieste gruppo - Nome e Cognome tolti
This commit is contained in:
@@ -208,6 +208,7 @@ export default defineComponent({
|
||||
const newRecordBool = ref(false)
|
||||
const editRecordBool = ref(false)
|
||||
const newRecord: any = ref({})
|
||||
const recSaved: any = ref({})
|
||||
const recModif: any = ref({})
|
||||
|
||||
const mytable = ref('')
|
||||
@@ -945,6 +946,7 @@ export default defineComponent({
|
||||
console.log('Edit', item)
|
||||
selItem(item, col)
|
||||
recModif.value = item
|
||||
recSaved.value = {...item}
|
||||
editRecordBool.value = true
|
||||
} else {
|
||||
|
||||
@@ -1243,6 +1245,16 @@ export default defineComponent({
|
||||
})
|
||||
}
|
||||
|
||||
function cancelrecModif() {
|
||||
recModif.value = {...recSaved.value}
|
||||
if (recModif.value._id) {
|
||||
const indrec = serverData.value.findIndex((rec: any) => rec._id === recModif.value._id)
|
||||
if (indrec >= 0)
|
||||
serverData.value[indrec] = recModif.value
|
||||
editRecordBool.value = false
|
||||
}
|
||||
}
|
||||
|
||||
async function saverecModif() {
|
||||
console.log('saverecModif')
|
||||
const mydata = {
|
||||
@@ -1259,7 +1271,7 @@ export default defineComponent({
|
||||
// console.log('ris', ris)
|
||||
if (ris) {
|
||||
editRecordBool.value = false
|
||||
const indrec = serverData.value.findIndex((rec: IMySkill) => rec._id === ris._id)
|
||||
const indrec = serverData.value.findIndex((rec: any) => rec._id === ris._id)
|
||||
console.log('indrec', indrec, serverData.value[indrec])
|
||||
mycolumns.value.forEach((col: IColGridTable) => {
|
||||
if (!col.foredit) {
|
||||
@@ -1347,6 +1359,7 @@ export default defineComponent({
|
||||
getusernamesel,
|
||||
saveNewRecord,
|
||||
saverecModif,
|
||||
cancelrecModif,
|
||||
hidewindow,
|
||||
isfinishLoading,
|
||||
getlabelAddRow,
|
||||
@@ -1372,6 +1385,7 @@ export default defineComponent({
|
||||
editRecordBool,
|
||||
newRecord,
|
||||
recModif,
|
||||
recSaved,
|
||||
lists,
|
||||
refresh,
|
||||
spinner_visible,
|
||||
|
||||
@@ -120,6 +120,7 @@
|
||||
:optval="fieldsTable.getKeyByTable(item.table)"
|
||||
:optlab="fieldsTable.getLabelByTable(item.table)"
|
||||
:options="valoriopt(item, false)"
|
||||
:filter="item.filter"
|
||||
:useinput="item.useinput && item.type !== costanti.FieldType.select_by_server">
|
||||
</CMySelect>
|
||||
|
||||
@@ -144,6 +145,7 @@
|
||||
:icon_alternative="item.icon"
|
||||
:optval="fieldsTable.getKeyByTable(item.table)"
|
||||
:optlab="fieldsTable.getLabelByTable(item.table)"
|
||||
:filter="item.filter"
|
||||
:options="valoriopt(item, false)"
|
||||
:useinput="true">
|
||||
</CMySelect>
|
||||
@@ -164,6 +166,7 @@
|
||||
stack-label
|
||||
:useinput="item.useinput"
|
||||
:options="valoriopt(item, item.addall)"
|
||||
:filter="item.filter"
|
||||
class="combowidth"
|
||||
:option-value="fieldsTable.getKeyByTable(item.table)"
|
||||
>
|
||||
@@ -513,7 +516,7 @@
|
||||
</q-card-section>
|
||||
<q-card-actions align="center">
|
||||
<q-btn flat :label="$t('dialog.ok')" color="primary" @click="saverecModif"></q-btn>
|
||||
<q-btn flat :label="$t('dialog.cancel')" color="primary" v-close-popup></q-btn>
|
||||
<q-btn flat :label="$t('dialog.cancel')" color="primary" @click="cancelrecModif"></q-btn>
|
||||
</q-card-actions>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
|
||||
Reference in New Issue
Block a user