file transfer occurred #1

Open
huseyindervis wants to merge 19 commits from bordorBot into main
5 changed files with 57 additions and 14 deletions
Showing only changes of commit 9a801bbb18 - Show all commits

View File

@@ -42,9 +42,10 @@ export async function EditCompany(id, name, memberNumber, username, password) {
* @param companyID {number} * @param companyID {number}
* @param month {number} * @param month {number}
* @param year {number} * @param year {number}
* @param devMode {boolean}
* @returns {Promise<void>} * @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)); return Call.ByName("srv.Srv.Rpa", ...Array.prototype.slice.call(arguments, 0));
} }

View File

@@ -25,6 +25,11 @@
@click="createCompany" @click="createCompany"
no-caps no-caps
/> />
<q-checkbox
label="Tarayıcı Görünsün mü ?"
v-model="ld.right"
style="font-size : 15px"
/>
</template> </template>
</q-select> </q-select>
</div> </div>
@@ -67,6 +72,40 @@
</q-card-section> </q-card-section>
<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"> <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"> <span v-for="(ln, ndx) in ld.logProcess" :key="ndx">
{{ ndx }} {{ ln }} {{ ndx }} {{ ln }}
@@ -79,7 +118,7 @@
</template> </template>
<script setup> <script setup>
import { onMounted, reactive } from 'vue' import { onMounted, reactive,ref } from 'vue'
import Company from 'components/dlg/Company.vue' import Company from 'components/dlg/Company.vue'
import EditCompanyPage from 'components/dlg/EditCompany.vue' import EditCompanyPage from 'components/dlg/EditCompany.vue'
import { useQuasar } from 'quasar' import { useQuasar } from 'quasar'
@@ -95,7 +134,9 @@ const ld = reactive({
logProcess: [], logProcess: [],
year: 2024, year: 2024,
month: 1, month: 1,
right : true
}) })
// let tab = ref('mails')
onMounted(() => { onMounted(() => {
getCompanies() getCompanies()
@@ -155,7 +196,7 @@ const upload = function () {
const doRpa = function () { const doRpa = function () {
ld.logProcess = [] 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> </script>

View File

@@ -122,9 +122,9 @@ func VerifyCaptcha(page *rod.Page) error {
return nil return nil
} }
func NewLucaBot() *Luca { func NewLucaBot(devMode bool) *Luca {
l := launcher.New(). l := launcher.New().
Headless(true). Headless(devMode).
Devtools(true) Devtools(true)
//defer l.Cleanup() //defer l.Cleanup()

View File

@@ -62,7 +62,7 @@ type userInfo struct {
accountNo string 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 { type CompanyInfo struct {
company *company.Company // float64.Company türünü gömme company *company.Company // float64.Company türünü gömme
month float64 // yeni bir alan ekliyoruz 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 //todo: readb company details by name
b := bot.NewLucaBot() b := bot.NewLucaBot(devMode)
emitLog("Aktarım Başladı") emitLog("Aktarım Başladı")
err = b.Login(user, month, year) err = b.Login(user, month, year)
if err != nil { if err != nil {

View File

@@ -5,8 +5,9 @@ import (
"bordrobot/lib/run" "bordrobot/lib/run"
"bordrobot/lib/srv" "bordrobot/lib/srv"
"embed" "embed"
"github.com/wailsapp/wails/v3/pkg/application"
"log" "log"
"github.com/wailsapp/wails/v3/pkg/application"
) )
// Wails uses Go's `embed` package to embed the frontend files into the binary. // Wails uses Go's `embed` package to embed the frontend files into the binary.