diff --git a/hesabixCore/src/Controller/Plugins/TaxSettingsController.php b/hesabixCore/src/Controller/Plugins/TaxSettingsController.php index 65f9a98f..b7fdd18b 100644 --- a/hesabixCore/src/Controller/Plugins/TaxSettingsController.php +++ b/hesabixCore/src/Controller/Plugins/TaxSettingsController.php @@ -23,7 +23,7 @@ class TaxSettingsController extends AbstractController private function getMoadianBaseUrl(registryMGR $registryMGR): string { $sandboxMode = filter_var($registryMGR->get('system_settings', 'tax_system_sandbox_mode'), FILTER_VALIDATE_BOOLEAN); - return $sandboxMode ? 'https://sandboxrc.tax.gov.ir/' : 'https://rc.tax.gov.ir/'; + return $sandboxMode ? 'https://sandboxrc.tax.gov.ir/' : 'https://tp.tax.gov.ir/'; } #[Route('/api/plugins/tax/settings/get', name: 'plugin_tax_settings_get', methods: ['GET'])] diff --git a/webUI/src/router/index.ts b/webUI/src/router/index.ts index fd4d23d4..f2750dde 100755 --- a/webUI/src/router/index.ts +++ b/webUI/src/router/index.ts @@ -528,6 +528,12 @@ const router = createRouter({ component: () => import('../views/acc/plugins/taxsettings/intro.vue'), }, + { + path: 'plugins/taxsettings/doc', + name: 'taxsettings_doc', + component: () => + import('../views/acc/plugins/taxsettings/doc.vue'), + }, { path: 'business/logs', name: 'business_logs', diff --git a/webUI/src/views/acc/plugins/tax/settings.vue b/webUI/src/views/acc/plugins/tax/settings.vue index 10324a81..cb61cf4b 100755 --- a/webUI/src/views/acc/plugins/tax/settings.vue +++ b/webUI/src/views/acc/plugins/tax/settings.vue @@ -10,6 +10,9 @@ + + راهنمای کامل + @@ -32,7 +35,7 @@ - + mdi-key کلید خصوصی @@ -59,25 +62,18 @@ mdi-upload - بارگذاری فایل + بارگذاری + فایل - + @@ -88,32 +84,16 @@ - + الصاق از کلیپ بورد - + ساخت کلید جدید @@ -123,20 +103,17 @@ mdi-check-circle - + - کلید خصوصی بارگذاری شده + کلید خصوصی بارگذاری + شده فایل آماده استفاده است - + حذف @@ -150,26 +127,24 @@ mdi-file-document - محتوای فایل کلید خصوصی + محتوای + فایل + کلید خصوصی - + - mdi-file-document-outline + mdi-file-document-outline فایل کلید خصوصی بارگذاری نشده - برای مشاهده محتوای فایل، ابتدا فایل کلید خصوصی را بارگذاری کنید + برای مشاهده محتوای فایل، ابتدا فایل کلید خصوصی را + بارگذاری کنید @@ -181,10 +156,10 @@ - + - - ساخت کلید و CSR + + ساخت کلید جدید @@ -192,7 +167,8 @@ شخص - + @@ -224,9 +200,9 @@ - + - ساخت کلید و CSR + ساخت کلید جدید توجه: لطفا این اطلاعات را دانلود کنید و در یک جای امن نگهداری کنید. به @@ -240,11 +216,11 @@ - mdi-content-copyکپی - mdi-downloadدانلود @@ -254,11 +230,11 @@ - mdi-content-copyکپی - mdi-downloadدانلود @@ -268,11 +244,11 @@ - mdi-content-copyکپی - mdi-downloadدانلود @@ -304,11 +280,11 @@ import Swal from 'sweetalert2'; export default { name: 'TaxSettings', data: () => ({ - loading: false, - csrLoading: false, - pastingFromClipboard: false, - showCSRDialog: false, - showResultDialog: false, + loading: false, + csrLoading: false, + pastingFromClipboard: false, + showCSRDialog: false, + showResultDialog: false, settings: { taxMemoryId: '', economicCode: '', @@ -532,7 +508,7 @@ export default { validateAllFields() { this.validatePersonType(); this.validateNationalId(); - + if (this.csrData.personType === 'legal') { this.validateNameFa(); this.validateNameEn(); @@ -568,39 +544,39 @@ export default { reader.readAsText(this.privateKeyFile); }, - clearFiles() { - this.privateKeyFile = null; - this.settings.privateKey = ''; - this.fileErrors = { - privateKey: [], - }; - }, - async pasteFromClipboard() { - this.pastingFromClipboard = true; - try { - const clipboardText = await navigator.clipboard.readText(); - - if (!clipboardText || clipboardText.trim() === '') { - this.showSnackbar('کلیپ بورد خالی است', 'warning'); - return; - } + clearFiles() { + this.privateKeyFile = null; + this.settings.privateKey = ''; + this.fileErrors = { + privateKey: [], + }; + }, + async pasteFromClipboard() { + this.pastingFromClipboard = true; + try { + const clipboardText = await navigator.clipboard.readText(); - if (clipboardText.includes('-----BEGIN PRIVATE KEY-----') || - clipboardText.includes('-----BEGIN RSA PRIVATE KEY-----') || - clipboardText.includes('-----BEGIN OPENSSH PRIVATE KEY-----')) { - - this.settings.privateKey = clipboardText.trim(); - this.showSnackbar('کلید خصوصی با موفقیت از کلیپ بورد الصاق شد', 'success'); - } else { - this.showSnackbar('متن کلیپ بورد شامل کلید خصوصی معتبر نیست', 'error'); - } - } catch (error) { - console.error('خطا در خواندن کلیپبورد:', error); - this.showSnackbar('خطا در دسترسی به کلیپ بورد. لطفا مجدداً تلاش کنید', 'error'); - } finally { - this.pastingFromClipboard = false; - } - }, + if (!clipboardText || clipboardText.trim() === '') { + this.showSnackbar('کلیپ بورد خالی است', 'warning'); + return; + } + + if (clipboardText.includes('-----BEGIN PRIVATE KEY-----') || + clipboardText.includes('-----BEGIN RSA PRIVATE KEY-----') || + clipboardText.includes('-----BEGIN OPENSSH PRIVATE KEY-----')) { + + this.settings.privateKey = clipboardText.trim(); + this.showSnackbar('کلید خصوصی با موفقیت از کلیپ بورد الصاق شد', 'success'); + } else { + this.showSnackbar('متن کلیپ بورد شامل کلید خصوصی معتبر نیست', 'error'); + } + } catch (error) { + console.error('خطا در خواندن کلیپبورد:', error); + this.showSnackbar('خطا در دسترسی به کلیپ بورد. لطفا مجدداً تلاش کنید', 'error'); + } finally { + this.pastingFromClipboard = false; + } + }, getPrivateKeyPreview() { if (!this.settings.privateKey) return ''; return this.settings.privateKey; @@ -622,4 +598,14 @@ export default { text-align: left !important; direction: ltr !important; } + +.btn-info { + background: #17a2b8; + color: white; +} + +.btn-info:hover { + background: #138496; + transform: translateY(-2px); +} \ No newline at end of file diff --git a/webUI/src/views/acc/plugins/taxsettings/intro.vue b/webUI/src/views/acc/plugins/taxsettings/intro.vue index dc29fec6..758e23de 100644 --- a/webUI/src/views/acc/plugins/taxsettings/intro.vue +++ b/webUI/src/views/acc/plugins/taxsettings/intro.vue @@ -207,6 +207,10 @@