This commit is contained in:
Hüseyin
2026-06-16 11:14:42 +03:00
parent bd08898bf1
commit d4545fb4d7
17 changed files with 778 additions and 875 deletions

View File

@@ -5,3 +5,4 @@
/node_modules
.eslintrc.cjs
/quasar.config.*.temporary.compiled*
/bindings

View File

@@ -0,0 +1,21 @@
// @ts-check
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import { Call as $Call, CancellablePromise as $CancellablePromise, Create as $Create } from "@wailsio/runtime";
/**
* @returns {$CancellablePromise<void>}
*/
export function Create() {
return $Call.ByID(3291066869);
}
/**
* @returns {$CancellablePromise<void>}
*/
export function Edit() {
return $Call.ByID(3331081401);
}

View File

@@ -0,0 +1,12 @@
// @ts-check
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import * as Company from "./company.js";
export {
Company
};
export {
Company
} from "./models.js";

View File

@@ -0,0 +1,63 @@
// @ts-check
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import { Create as $Create } from "@wailsio/runtime";
export class Company {
/**
* Creates a new Company instance.
* @param {Partial<Company>} [$$source = {}] - The source object to create the Company.
*/
constructor($$source = {}) {
if (!("Id" in $$source)) {
/**
* @member
* @type {number}
*/
this["Id"] = 0;
}
if (!("Name" in $$source)) {
/**
* @member
* @type {string}
*/
this["Name"] = "";
}
if (!("MemberNumber" in $$source)) {
/**
* @member
* @type {string}
*/
this["MemberNumber"] = "";
}
if (!("Username" in $$source)) {
/**
* @member
* @type {string}
*/
this["Username"] = "";
}
if (!("Password" in $$source)) {
/**
* @member
* @type {string}
*/
this["Password"] = "";
}
Object.assign(this, $$source);
}
/**
* Creates a new Company instance from a string or object.
* @param {any} [$$source = {}]
* @returns {Company}
*/
static createFrom($$source = {}) {
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
return new Company(/** @type {Partial<Company>} */($$parsedSource));
}
}

View File

@@ -0,0 +1,8 @@
// @ts-check
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import * as Srv from "./srv.js";
export {
Srv
};

View File

@@ -0,0 +1,65 @@
// @ts-check
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import { Call as $Call, CancellablePromise as $CancellablePromise, Create as $Create } from "@wailsio/runtime";
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import * as company$0 from "../company/models.js";
/**
* @returns {$CancellablePromise<company$0.Company[]>}
*/
export function Companies() {
return $Call.ByID(3083458084).then(/** @type {($result: any) => any} */(($result) => {
return $$createType1($result);
}));
}
/**
* @param {string} name
* @param {string} memberNumber
* @param {string} username
* @param {string} password
* @returns {$CancellablePromise<void>}
*/
export function CreateCompany(name, memberNumber, username, password) {
return $Call.ByID(1901112960, name, memberNumber, username, password);
}
/**
* @param {number} id
* @param {string} name
* @param {string} memberNumber
* @param {string} username
* @param {string} password
* @returns {$CancellablePromise<void>}
*/
export function EditCompany(id, name, memberNumber, username, password) {
return $Call.ByID(2617513428, id, name, memberNumber, username, password);
}
/**
* @param {number} companyID
* @param {number} month
* @param {number} year
* @param {boolean} devMode
* @returns {$CancellablePromise<void>}
*/
export function Rpa(companyID, month, year, devMode) {
return $Call.ByID(202161926, companyID, month, year, devMode);
}
/**
* @returns {$CancellablePromise<string>}
*/
export function UploadExcel() {
return $Call.ByID(3720689099);
}
// Private type creation functions
const $$createType0 = company$0.Company.createFrom;
const $$createType1 = $Create.Array($$createType0);

View File

@@ -0,0 +1,9 @@
//@ts-check
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import { Create as $Create } from "@wailsio/runtime";
Object.freeze($Create.Events);

View File

@@ -0,0 +1,2 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT

View File

@@ -1,21 +0,0 @@
// @ts-check
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import {Call} from '@wailsio/runtime';
/**
* @function Create
* @returns {Promise<void>}
**/
export async function Create() {
return Call.ByName("company.Company.Create", ...Array.prototype.slice.call(arguments, 0));
}
/**
* @function Edit
* @returns {Promise<void>}
**/
export async function Edit() {
return Call.ByName("company.Company.Edit", ...Array.prototype.slice.call(arguments, 0));
}

View File

@@ -1,58 +0,0 @@
// @ts-check
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import {Call} from '@wailsio/runtime';
/**
* @function Companies
* @returns {Promise<Company[], void>}
**/
export async function Companies() {
return Call.ByName("srv.Srv.Companies", ...Array.prototype.slice.call(arguments, 0));
}
/**
* @function CreateCompany
* @param name {string}
* @param memberNumber {string}
* @param username {string}
* @param password {string}
* @returns {Promise<void>}
**/
export async function CreateCompany(name, memberNumber, username, password) {
return Call.ByName("srv.Srv.CreateCompany", ...Array.prototype.slice.call(arguments, 0));
}
/**
* @function EditCompany
* @param id {number}
* @param name {string}
* @param memberNumber {string}
* @param username {string}
* @param password {string}
* @returns {Promise<void>}
**/
export async function EditCompany(id, name, memberNumber, username, password) {
return Call.ByName("srv.Srv.EditCompany", ...Array.prototype.slice.call(arguments, 0));
}
/**
* @function Rpa
* @param companyID {number}
* @param month {number}
* @param year {number}
* @param devMode {boolean}
* @returns {Promise<void>}
**/
export async function Rpa(companyID, month, year, devMode) {
return Call.ByName("srv.Srv.Rpa", ...Array.prototype.slice.call(arguments, 0));
}
/**
* @function UploadExcel
* @returns {Promise<string>}
**/
export async function UploadExcel() {
return Call.ByName("srv.Srv.UploadExcel", ...Array.prototype.slice.call(arguments, 0));
}

View File

@@ -17,6 +17,7 @@
label="Düzenle"
color="primary"
@click="editCompany"
:disable="!ld.companyID"
no-caps
/>
<q-btn
@@ -27,6 +28,14 @@
/>
</template>
</q-select>
<!-- Debug Info -->
<div class="q-mt-sm q-pa-sm bg-grey-2 text-black text-caption" style="border: 1px dashed gray;">
Durum: {{ ld.errorMessage }} <br/>
Şirket Sayısı: {{ ld.companies.length }}
<div v-for="(c, idx) in ld.companies" :key="idx">
#{{ idx }}: ID={{ c.Id }} (type: {{ typeof c.Id }}), Name={{ c.Name }} (type: {{ typeof c.Name }}), Raw: {{ JSON.stringify(c) }}
</div>
</div>
</div>
</div>
</q-card-section>
@@ -122,7 +131,7 @@ import { onMounted, reactive,ref } from 'vue'
import Company from 'components/dlg/Company.vue'
import EditCompanyPage from 'components/dlg/EditCompany.vue'
import { useQuasar } from 'quasar'
import { Companies, CreateCompany, Rpa, UploadExcel ,EditCompany} from 'app/bindings/lib/srv/Srv'
import { Companies, CreateCompany, Rpa, UploadExcel ,EditCompany} from 'app/bindings/bordrobot/lib/srv/srv'
import * as wails from '@wailsio/runtime'
const $q = useQuasar()
@@ -130,6 +139,7 @@ const $q = useQuasar()
const ld = reactive({
companyID: null,
companies: [],
errorMessage: '',
xlsFile: '',
logProcess: [],
year: 2024,
@@ -148,7 +158,9 @@ onMounted(() => {
const editCompany = function () {
const selectedCompanyID = ld.companyID;
if (!selectedCompanyID) return;
const selectedCompany = ld.companies.find(company => company.Id === selectedCompanyID);
if (!selectedCompany) return;
$q.dialog({
component: EditCompanyPage,
parent: this,
@@ -182,9 +194,17 @@ const createCompany = function () {
const getCompanies = function () {
ld.companies.splice(0)
ld.errorMessage = 'Yükleniyor...'
Companies().then(res => {
ld.companies.push(...res)
console.error("COMPANIES FETCHED:", JSON.stringify(res))
ld.errorMessage = 'Başarılı. Gelen şirket sayısı: ' + (res ? res.length : 0)
if (res) {
ld.companies.push(...res)
}
console.log(ld.companies)
}).catch(err => {
console.error("COMPANIES FETCH ERROR:", err)
ld.errorMessage = 'HATA OLUŞTU: ' + err.toString()
})
}

File diff suppressed because it is too large Load Diff