update
This commit is contained in:
@@ -42,9 +42,10 @@ export async function EditCompany(id, name, memberNumber, username, password) {
|
||||
* @param companyID {number}
|
||||
* @param month {number}
|
||||
* @param year {number}
|
||||
* @param devMode {boolean}
|
||||
* @returns {Promise<void>}
|
||||
**/
|
||||
export async function Rpa(companyID, month, year) {
|
||||
export async function Rpa(companyID, month, year, devMode) {
|
||||
return Call.ByName("srv.Srv.Rpa", ...Array.prototype.slice.call(arguments, 0));
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,11 @@
|
||||
@click="createCompany"
|
||||
no-caps
|
||||
/>
|
||||
<q-checkbox
|
||||
label="Tarayıcı Görünsün mü ?"
|
||||
v-model="ld.right"
|
||||
style="font-size : 15px"
|
||||
/>
|
||||
</template>
|
||||
</q-select>
|
||||
</div>
|
||||
@@ -67,6 +72,40 @@
|
||||
</q-card-section>
|
||||
|
||||
<q-card-section>
|
||||
<!-- <q-card>
|
||||
<q-tabs
|
||||
v-model="tab"
|
||||
dense
|
||||
class="text-grey"
|
||||
active-color="primary"
|
||||
indicator-color="primary"
|
||||
align="justify"
|
||||
narrow-indicator
|
||||
>
|
||||
<q-tab name="mails" label="Mails"></q-tab>
|
||||
<q-tab name="alarms" label="Alarms"></q-tab>
|
||||
<q-tab name="movies" label="Movies"></q-tab>
|
||||
</q-tabs>
|
||||
|
||||
<q-separator></q-separator>
|
||||
|
||||
<q-tab-panels v-model="tab" animated>
|
||||
<q-tab-panel name="mails">
|
||||
<div class="text-h6"></div>
|
||||
Lorem ipsum dolor sit amet consectetur adipisicing elit.
|
||||
</q-tab-panel>
|
||||
|
||||
<q-tab-panel name="alarms">
|
||||
<div class="text-h6">Alarms</div>
|
||||
Lorem ipsum dolor sit amet consectetur adipisicing elit.
|
||||
</q-tab-panel>
|
||||
|
||||
<q-tab-panel name="movies">
|
||||
<div class="text-h6">Movies</div>
|
||||
Lorem ipsum dolor sit amet consectetur adipisicing elit.
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
</q-card> -->
|
||||
<div style="max-height: 200px; overflow: scroll; border: 1px gray solid; display: grid;" class="q-pa-xs">
|
||||
<span v-for="(ln, ndx) in ld.logProcess" :key="ndx">
|
||||
{{ ndx }} {{ ln }}
|
||||
@@ -79,7 +118,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onMounted, reactive } from 'vue'
|
||||
import { onMounted, reactive,ref } from 'vue'
|
||||
import Company from 'components/dlg/Company.vue'
|
||||
import EditCompanyPage from 'components/dlg/EditCompany.vue'
|
||||
import { useQuasar } from 'quasar'
|
||||
@@ -95,7 +134,9 @@ const ld = reactive({
|
||||
logProcess: [],
|
||||
year: 2024,
|
||||
month: 1,
|
||||
right : true
|
||||
})
|
||||
// let tab = ref('mails')
|
||||
|
||||
onMounted(() => {
|
||||
getCompanies()
|
||||
@@ -155,7 +196,7 @@ const upload = function () {
|
||||
|
||||
const doRpa = function () {
|
||||
ld.logProcess = []
|
||||
Rpa(ld.companyID, ld.month, ld.year).catch(err => console.log(err))
|
||||
Rpa(ld.companyID, ld.month, ld.year,ld.right).catch(err => console.log(err))
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
@@ -122,9 +122,9 @@ func VerifyCaptcha(page *rod.Page) error {
|
||||
return nil
|
||||
|
||||
}
|
||||
func NewLucaBot() *Luca {
|
||||
func NewLucaBot(devMode bool) *Luca {
|
||||
l := launcher.New().
|
||||
Headless(true).
|
||||
Headless(devMode).
|
||||
Devtools(true)
|
||||
|
||||
//defer l.Cleanup()
|
||||
|
||||
@@ -62,7 +62,7 @@ type userInfo struct {
|
||||
accountNo string
|
||||
}
|
||||
|
||||
func (s *Srv) Rpa(companyID float64, month float64, year float64) error {
|
||||
func (s *Srv) Rpa(companyID float64, month float64, year float64, devMode bool) error {
|
||||
type CompanyInfo struct {
|
||||
company *company.Company // float64.Company türünü gömme
|
||||
month float64 // yeni bir alan ekliyoruz
|
||||
@@ -79,7 +79,7 @@ func (s *Srv) Rpa(companyID float64, month float64, year float64) error {
|
||||
// }
|
||||
|
||||
//todo: readb company details by name
|
||||
b := bot.NewLucaBot()
|
||||
b := bot.NewLucaBot(devMode)
|
||||
emitLog("Aktarım Başladı")
|
||||
err = b.Login(user, month, year)
|
||||
if err != nil {
|
||||
|
||||
@@ -5,8 +5,9 @@ import (
|
||||
"bordrobot/lib/run"
|
||||
"bordrobot/lib/srv"
|
||||
"embed"
|
||||
"github.com/wailsapp/wails/v3/pkg/application"
|
||||
"log"
|
||||
|
||||
"github.com/wailsapp/wails/v3/pkg/application"
|
||||
)
|
||||
|
||||
// Wails uses Go's `embed` package to embed the frontend files into the binary.
|
||||
|
||||
Reference in New Issue
Block a user