edit dialog added
This commit is contained in:
@@ -34,6 +34,13 @@
|
||||
color="secondary"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-shrink">
|
||||
<q-btn label="Düzenle"
|
||||
@click="editCompany"
|
||||
no-caps
|
||||
color="secondary"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-11 text-right">
|
||||
{{ ld.xlsFile }}
|
||||
</div>
|
||||
@@ -75,6 +82,7 @@
|
||||
<script setup>
|
||||
import { onMounted, reactive } from 'vue'
|
||||
import Company from 'components/dlg/Company.vue'
|
||||
import EditCompany from 'components/dlg/EditCompany.vue'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { Companies, CreateCompany, Rpa, UploadExcel } from 'app/bindings/lib/srv/Srv'
|
||||
import * as wails from '@wailsio/runtime'
|
||||
@@ -98,6 +106,25 @@ onMounted(() => {
|
||||
})
|
||||
})
|
||||
|
||||
const editCompany = function () {
|
||||
console.log(ld.companyID)
|
||||
$q.dialog({
|
||||
component: EditCompany,
|
||||
parent: this,
|
||||
componentProps: {
|
||||
name: ld.companyID.Name,
|
||||
memberNumber: ld.companyID.MemberNumber,
|
||||
userName : ld.companyID.Username,
|
||||
password : ld.companyID.Password,
|
||||
},
|
||||
// ----------------------
|
||||
// props that are passed to component instance
|
||||
}).onOk(data => {
|
||||
CreateCompany(data.name, initialMemberNumber, data.username, data.password).then(()=>{
|
||||
getCompanies()
|
||||
})
|
||||
})
|
||||
}
|
||||
const createCompany = function () {
|
||||
$q.dialog({
|
||||
component: Company,
|
||||
@@ -115,6 +142,7 @@ const getCompanies = function () {
|
||||
ld.companies.splice(0)
|
||||
Companies().then(res => {
|
||||
ld.companies.push(...res)
|
||||
console.log(ld.companies)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user