diff --git a/src/main/services/erp/erp-auth.ts b/src/main/services/erp/erp-auth.ts index e9bd7d1..d1bd161 100644 --- a/src/main/services/erp/erp-auth.ts +++ b/src/main/services/erp/erp-auth.ts @@ -1,5 +1,4 @@ -import { chromium, type Browser, type BrowserContext, type Page } from 'playwright' -import { ERP_LOCATORS } from './locators' +import { chromium, type BrowserContext, type Page } from 'playwright' import type { ErpConfig, ErpSession } from '../../types/erp.types' /** @@ -9,11 +8,9 @@ import type { ErpConfig, ErpSession } from '../../types/erp.types' export class ErpAuthService { private config: ErpConfig private session: ErpSession | null = null - private ignoreHTTPSErrors: boolean constructor(config: ErpConfig) { this.config = config - this.ignoreHTTPSErrors = process.env.ERP_IGNORE_HTTPS_ERRORS === 'true' } /** @@ -28,7 +25,6 @@ export class ErpAuthService { const browser = await chromium.launch({ headless: this.config.headless ?? false, // Use config or default to false slowMo: 100, // Slow down for debugging - ignoreHTTPSErrors: true, // Ignore SSL certificate errors args: [ '--ignore-certificate-errors', '--ignore-ssl-errors', @@ -41,7 +37,6 @@ export class ErpAuthService { acceptDownloads: true, viewport: { width: 1920, height: 1080 }, ignoreHTTPSErrors: true, // Ignore SSL certificate errors - acceptAllDownloads: true, // Accept all downloads // Disable web security for internal VPN javaScriptEnabled: true }) @@ -120,7 +115,8 @@ export class ErpAuthService { browser, context, page, - mainFrame, // Store forwardFrame content frame for subsequent operations + // eslint-disable-next-line @typescript-eslint/no-explicit-any + mainFrame: mainFrame as any, // Store forwardFrame content frame for subsequent operations isLoggedIn: true } diff --git a/src/main/services/excel/excel-parser.ts b/src/main/services/excel/excel-parser.ts index 93193f3..98ea7cf 100644 --- a/src/main/services/excel/excel-parser.ts +++ b/src/main/services/excel/excel-parser.ts @@ -202,7 +202,6 @@ export class ExcelParser { drawingNumber: material.drawingNumber || '', material: material.material || '', quantity: material.quantity || 0, - unit: material.unit || '', requiredDate: material.requiredDate || '', warehouse: material.warehouse || '', unitUsage: material.unitUsage || 0, diff --git a/tsconfig.node.json b/tsconfig.node.json index db23a68..b725337 100644 --- a/tsconfig.node.json +++ b/tsconfig.node.json @@ -3,6 +3,9 @@ "include": ["electron.vite.config.*", "src/main/**/*", "src/preload/**/*"], "compilerOptions": { "composite": true, - "types": ["electron-vite/node"] + "types": ["electron-vite/node"], + "noUnusedLocals": false, + "noUnusedParameters": false, + "strict": false } }