diff --git a/hesabixCore/config/packages/mailer.yaml b/hesabixCore/config/packages/mailer.yaml
index 40f8322..e909546 100644
--- a/hesabixCore/config/packages/mailer.yaml
+++ b/hesabixCore/config/packages/mailer.yaml
@@ -3,4 +3,4 @@ framework:
dsn: '%env(MAILER_DSN)%'
message_bus: false
headers:
- From: 'Hesabix.ir '
+ From: 'Hesabix.ir '
diff --git a/hesabixCore/src/Controller/AdminController.php b/hesabixCore/src/Controller/AdminController.php
index bc834d3..1bc2acc 100644
--- a/hesabixCore/src/Controller/AdminController.php
+++ b/hesabixCore/src/Controller/AdminController.php
@@ -595,7 +595,7 @@ class AdminController extends AbstractController
$item->setAmount($params['amount']);
$item->setCardPan($params['card']);
$item->setDateSubmit(time());
- $item->setDes('واریز به حساب کسب و کار از طرف حسابیکس');
+ $item->setDes('تراکنش تسویه کیف پول');
$item->setRefID($params['refID']);
$item->setGatePay($params['bank']);
$item->setBank($bid->getWalletMatchBank()->getName());
@@ -679,43 +679,4 @@ class AdminController extends AbstractController
return $this->json($res);
}
-
- /**
- * @throws Exception
- */
- #[Route('/script', name: 'script')]
- public function script(EntityManagerInterface $entitymanager): JsonResponse
- {
- $items = $entitymanager->getRepository(\App\Entity\HesabdariDoc::class)->findAll();
- foreach ($items as $item) {
- $item->setDate(str_replace("-", "/", $item->getDate()));
- $entitymanager->persist($item);
- $entitymanager->flush();
-
- }
- echo str_replace("-", "/", "1403-02-06");
- }
- /**
- * @throws Exception
- */
- #[Route('/script2', name: 'script2')]
- public function script2(EntityManagerInterface $entitymanager): JsonResponse
- {
- $banks = $entitymanager->getRepository(BankAccount::class)->findAll();
- foreach ($banks as $bank) {
- if ($bank->getMoney() == null) {
- $bank->setMoney($bank->getBid()->getMoney());
- $entitymanager->persist($bank);
- }
- }
-
- $items = $entitymanager->getRepository(Cashdesk::class)->findAll();
- foreach ($items as $item) {
- if ($item->getMoney() == null) {
- $item->setMoney($item->getBid()->getMoney());
- $entitymanager->persist($bank);
- }
- }
- $entitymanager->flush();
- }
}
diff --git a/hesabixCore/src/Controller/BuyController.php b/hesabixCore/src/Controller/BuyController.php
index 99918fc..3914923 100644
--- a/hesabixCore/src/Controller/BuyController.php
+++ b/hesabixCore/src/Controller/BuyController.php
@@ -332,10 +332,10 @@ class BuyController extends AbstractController
$temp['commodities'] = [];
foreach ($item->getHesabdariRows() as $item) {
- if ($item->getRef()->getCode() == '104') {
- $temp['discountAll'] = $item->getBd();
+ if ($item->getRef()->getCode() == '51') {
+ $temp['discountAll'] = $item->getBs();
} elseif ($item->getRef()->getCode() == '90') {
- $temp['transferCost'] = $item->getBs();
+ $temp['transferCost'] = $item->getBd();
}
if ($item->getCommodity()) {
$temp['commodities'][] = Explore::ExploreCommodity($item->getCommodity(), $item->getCommdityCount());
@@ -442,9 +442,9 @@ class BuyController extends AbstractController
foreach ($doc->getHesabdariRows() as $item) {
if ($item->getPerson()) {
$person = $item->getPerson();
- } elseif ($item->getRef()->getCode() == 104) {
+ } elseif ($item->getRef()->getCode() == 90) {
$discount = $item->getBd();
- } elseif ($item->getRef()->getCode() == 61) {
+ } elseif ($item->getRef()->getCode() == 51) {
$transfer = $item->getBs();
}
}
diff --git a/hesabixCore/src/Controller/Front/PayController.php b/hesabixCore/src/Controller/Front/PayController.php
index ad7779d..497fd80 100644
--- a/hesabixCore/src/Controller/Front/PayController.php
+++ b/hesabixCore/src/Controller/Front/PayController.php
@@ -127,7 +127,7 @@ class PayController extends AbstractController
$doc->setSubmitter($walletUser);
else {
$wu = new User();
- $wu->setFullName('کیف پول حسابیکس');
+ $wu->setFullName('کیف پول');
$wu->setEmail('wallet@hesabix.ir');
$wu->setRoles([]);
$wu->setActive(true);
diff --git a/hesabixCore/src/Controller/Front/UiGeneralController.php b/hesabixCore/src/Controller/Front/UiGeneralController.php
index a2024d9..791e055 100644
--- a/hesabixCore/src/Controller/Front/UiGeneralController.php
+++ b/hesabixCore/src/Controller/Front/UiGeneralController.php
@@ -11,6 +11,6 @@ class UiGeneralController extends AbstractController
#[Route('/', name: 'general_home')]
public function general_home(): JsonResponse
{
- return $this->json(['message'=>'HesabixApi is running ...']);
+ return $this->json(['message'=>'System is running ...']);
}
}
diff --git a/hesabixCore/src/Controller/GeneralController.php b/hesabixCore/src/Controller/GeneralController.php
index c6a3e9b..2160ff0 100644
--- a/hesabixCore/src/Controller/GeneralController.php
+++ b/hesabixCore/src/Controller/GeneralController.php
@@ -80,7 +80,7 @@ class GeneralController extends AbstractController
Response::HTTP_OK,
[
'Content-Type' => 'application/pdf',
- 'Content-Disposition' => 'inline; filename="Hesabix PrintOut.pdf"',
+ 'Content-Disposition' => 'inline; filename="PrintOut.pdf"',
]
);
}
diff --git a/hesabixCore/src/Controller/System/RegistrySettingsController.php b/hesabixCore/src/Controller/System/RegistrySettingsController.php
index 71e3f5b..a0f4cdc 100644
--- a/hesabixCore/src/Controller/System/RegistrySettingsController.php
+++ b/hesabixCore/src/Controller/System/RegistrySettingsController.php
@@ -53,7 +53,8 @@ final class RegistrySettingsController extends AbstractController
'sponsorMessage' => $registryMGR->get('system', 'sponsers'),
'footerLeft' => $registryMGR->get('system', 'footerLeft'),
'footerRight' => $registryMGR->get('system', 'footerRight'),
-
+ 'appName' => $registryMGR->get('system', 'appName'),
+ 'appUrl' => $registryMGR->get('system', 'appUrl'),
];
return new JsonResponse([
@@ -82,6 +83,8 @@ final class RegistrySettingsController extends AbstractController
$registryMGR->update('system', 'sponsers', $data['sponsorMessage'] ?? '');
$registryMGR->update('system', 'footerLeft', $data['footerLeft'] ?? '');
$registryMGR->update('system', 'footerRight', $data['footerRight'] ?? '');
+ $registryMGR->update('system', 'appName', $data['appName'] ?? '');
+ $registryMGR->update('system', 'appUrl', $data['appUrl'] ?? '');
return new JsonResponse([
'result' => 1,
diff --git a/hesabixCore/src/Controller/UserController.php b/hesabixCore/src/Controller/UserController.php
index 3be3222..7c6fd46 100644
--- a/hesabixCore/src/Controller/UserController.php
+++ b/hesabixCore/src/Controller/UserController.php
@@ -36,8 +36,8 @@ use Symfony\Contracts\Translation\TranslatorInterface;
use SymfonyCasts\Bundle\VerifyEmail\Exception\VerifyEmailExceptionInterface;
use Symfony\Component\EventDispatcher\EventDispatcher,
-Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken,
-Symfony\Component\Security\Http\Event\InteractiveLoginEvent;
+ Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken,
+ Symfony\Component\Security\Http\Event\InteractiveLoginEvent;
use function PHPUnit\Framework\throwException;
class UserController extends AbstractController
@@ -388,7 +388,7 @@ class UserController extends AbstractController
$email = (new Email())
->to($user->getEmail())
->priority(Email::PRIORITY_HIGH)
- ->subject('تایید ایمیل در حسابیکس')
+ ->subject('تایید ایمیل')
->html(
$this->renderView('user/email/confrim-register.html.twig', [
'code' => $user->getVerifyCode()
@@ -455,7 +455,7 @@ class UserController extends AbstractController
$email = (new Email())
->to($user->getEmail())
->priority(Email::PRIORITY_HIGH)
- ->subject('تایید ایمیل در حسابیکس')
+ ->subject('تایید ایمیل ')
->html(
$this->renderView('user/email/confrim-register.html.twig', [
'code' => $user->getVerifyCode()
@@ -613,7 +613,7 @@ class UserController extends AbstractController
$email = (new Email())
->to($user->getEmail())
->priority(Email::PRIORITY_HIGH)
- ->subject('حسابیکس - فراموشی کلمه عبور')
+ ->subject('فراموشی کلمه عبور')
->html(
$this->renderView('user/email/confrim-forget-password.html.twig', [
'code' => $user->getVerifyCode()
@@ -690,7 +690,7 @@ class UserController extends AbstractController
$email = (new Email())
->to($user->getEmail())
->priority(Email::PRIORITY_HIGH)
- ->subject('تایید ایمیل در حسابیکس')
+ ->subject('تایید ایمیل ')
->html(
$this->renderView('user/email/confrim-register.html.twig', [
'code' => $user->getVerifyCode()
@@ -716,4 +716,53 @@ class UserController extends AbstractController
'canRegister' => $canRegister
]);
}
+
+ #[Route('/api/admin/user/change-password/{userId}', name: 'change_user_password', methods: ['POST'])]
+ public function changePassword(
+ int $userId,
+ Request $request,
+ EntityManagerInterface $entityManager,
+ UserPasswordHasherInterface $passwordHasher,
+ registryMGR $registryMGR,
+ MailerInterface $mailer,
+ SMS $SMS
+ ): JsonResponse {
+ $data = json_decode($request->getContent(), true);
+ $password = $data['password'] ?? null;
+ $notifyUser = $data['notifyUser'] ?? false;
+
+ if (!$password) {
+ return new JsonResponse(['error' => 'Password is required'], 400);
+ }
+
+ $user = $entityManager->getRepository(User::class)->find($userId);
+
+ if (!$user) {
+ return new JsonResponse(['error' => 'User not found'], 404);
+ }
+
+ $user->setPassword($passwordHasher->hashPassword($user, $password));
+ $entityManager->persist($user);
+ $entityManager->flush();
+
+ if ($notifyUser) {
+ $SMS->send(
+ [$password],
+ $registryMGR->get('sms', 'changePassword'),
+ $user->getMobile()
+ );
+ $email = (new Email())
+ ->to($user->getEmail())
+ ->priority(Email::PRIORITY_HIGH)
+ ->subject('تغییر کلمه عبور')
+ ->html(
+ $this->renderView('user/email/reset-password.html.twig', [
+ 'code' => $password
+ ])
+ );
+ $mailer->send($email);
+ }
+
+ return new JsonResponse(['message' => 'Password changed successfully']);
+ }
}
diff --git a/hesabixCore/src/Service/pdfMGR.php b/hesabixCore/src/Service/pdfMGR.php
index 3d0b03e..b95b448 100644
--- a/hesabixCore/src/Service/pdfMGR.php
+++ b/hesabixCore/src/Service/pdfMGR.php
@@ -59,7 +59,7 @@ class pdfMGR
$htmlContent = $printQueue->getView() ?: 'محتوای PDF در دسترس نیست.
';
$mpdf->WriteHTML($htmlContent);
$mpdf->SetAutoPageBreak(true);
- $mpdf->SetTitle('حسابیکس');
+ $mpdf->SetTitle('PDF Export');
// به جای Output مستقیم، محتوا رو برگردونید
return $mpdf->Output('', 'S'); // 'S' برای برگرداندن به صورت رشته
diff --git a/hesabixCore/templates/blank.html.twig b/hesabixCore/templates/blank.html.twig
index 2590519..9cde64e 100644
--- a/hesabixCore/templates/blank.html.twig
+++ b/hesabixCore/templates/blank.html.twig
@@ -4,9 +4,9 @@
-
+
- حسابیکس - {% block title %}{% endblock %}
+ {{twigFunctions.getStaticData('system', 'appName')}} - {% block title %}{% endblock %}
{# Run `composer require symfony/webpack-encore-bundle` to start using Symfony UX #}
{% block stylesheets %}
{#{{ encore_entry_link_tags('app') }}#}
diff --git a/hesabixCore/templates/bundles/TwigBundle/Exception/error404.html.twig b/hesabixCore/templates/bundles/TwigBundle/Exception/error404.html.twig
index 1eb3cb1..dd7b19f 100644
--- a/hesabixCore/templates/bundles/TwigBundle/Exception/error404.html.twig
+++ b/hesabixCore/templates/bundles/TwigBundle/Exception/error404.html.twig
@@ -13,7 +13,7 @@
@@ -35,7 +35,7 @@
diff --git a/hesabixCore/templates/membership/index.html.twig b/hesabixCore/templates/membership/index.html.twig
deleted file mode 100644
index df61480..0000000
--- a/hesabixCore/templates/membership/index.html.twig
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-Hello MembershipController!
-
-{% block body %}
-
-
-
-
Hello {{ controller_name }}! ✅
-
- This friendly message is coming from:
-
- Your controller at /var/www/html/next.hesabix.ir/hesabixCore/src/Controller/MembershipController.php
- Your template at /var/www/html/next.hesabix.ir/hesabixCore/templates/membership/index.html.twig
-
-
-{% endblock %}
diff --git a/hesabixCore/templates/pay/fail.html.twig b/hesabixCore/templates/pay/fail.html.twig
index 46661fb..bd8744f 100644
--- a/hesabixCore/templates/pay/fail.html.twig
+++ b/hesabixCore/templates/pay/fail.html.twig
@@ -9,8 +9,8 @@
@@ -58,7 +59,7 @@
{{bid.name}}
آدرس :
- استان
+ استان
{{bid.ostan}}
شهرستان
{{bid.shahrestan}}
@@ -86,7 +87,7 @@
{{ person.nikename }}
آدرس :
- استان
+ استان
{{person.ostan}}
شهرستان
{{person.shahr}}
@@ -162,8 +163,8 @@
-
- حسابیکس
+
+ {{twigFunctions.getStaticData('system', 'appName')}}
سامانه جامع مالی رایگان ، ابری و متن باز
diff --git a/hesabixCore/templates/shortlinks/sell.html.twig b/hesabixCore/templates/shortlinks/sell.html.twig
index 1a1bfc1..154a060 100644
--- a/hesabixCore/templates/shortlinks/sell.html.twig
+++ b/hesabixCore/templates/shortlinks/sell.html.twig
@@ -239,8 +239,8 @@
-
- حسابیکس
+
+ {{twigFunctions.getStaticData('system', 'appName')}}
سامانه جامع مالی رایگان ، ابری و متن باز
diff --git a/hesabixCore/templates/shortlinks/storeroom.html.twig b/hesabixCore/templates/shortlinks/storeroom.html.twig
index 336d459..d3989f6 100644
--- a/hesabixCore/templates/shortlinks/storeroom.html.twig
+++ b/hesabixCore/templates/shortlinks/storeroom.html.twig
@@ -130,8 +130,8 @@
{{ doc.des }}
-
- حسابیکس
+
+ {{twigFunctions.getStaticData('system', 'appName')}}
سامانه جامع مالی رایگان ، ابری و متن باز
diff --git a/hesabixCore/templates/store/base.html.twig b/hesabixCore/templates/store/base.html.twig
index 47d1aed..f5ee5a3 100644
--- a/hesabixCore/templates/store/base.html.twig
+++ b/hesabixCore/templates/store/base.html.twig
@@ -1,327 +1,348 @@
-
-
-
+
+
+
+
- {% block title %}{% endblock %}
+
+ {% block title %}{% endblock %}
+
-
-
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
- 'remember-theme' Remembers active color theme and dark mode between pages using localStorage when set through
- - Theme helper buttons [data-toggle="theme"],
- - Layout helper buttons [data-toggle="layout" data-action="dark_mode_[on/off/toggle]"]
- - ..and/or Dashmix.layout('dark_mode_[on/off/toggle]')
+
+
+
+
+
+
+
+
+
+
+
+
+ داشبورد
+
+ به برنامه خود خوش آمدید، همه چیز عالی به نظر می رسد!
+
+
+
+
- SIDEBAR & SIDE OVERLAY
+
+
+
+
+
+
+
- 'sidebar-r' Right Sidebar and left Side Overlay (default is left Sidebar and right Side Overlay)
- 'sidebar-mini' Mini hoverable Sidebar (screen width > 991px)
- 'sidebar-o' Visible Sidebar by default (screen width > 991px)
- 'sidebar-o-xs' Visible Sidebar by default (screen width < 992px)
- 'sidebar-dark' Dark themed sidebar
+
+
+
+
+
- 'enable-page-overlay' Enables a visible clickable Page Overlay (closes Side Overlay on click) when Side Overlay opens
-
- 'side-scroll' Enables custom scrolling on Sidebar and Side Overlay instead of native scrolling (screen width > 991px)
-
- HEADER
-
- '' Static Header if no class is added
- 'page-header-fixed' Fixed Header
+
+
- FOOTER
-
- '' Static Footer if no class is added
- 'page-footer-fixed' Fixed Footer (please have in mind that the footer has a specific height when is fixed)
-
- HEADER STYLE
-
- '' Classic Header style if no class is added
- 'page-header-dark' Dark themed Header
- 'page-header-glass' Light themed Header with transparency by default
- (absolute position, perfect for light images underneath - solid light background on scroll if the Header is also set as fixed)
- 'page-header-glass page-header-dark' Dark themed Header with transparency by default
- (absolute position, perfect for dark images underneath - solid dark background on scroll if the Header is also set as fixed)
-
- MAIN CONTENT LAYOUT
-
- '' Full width Main Content if no class is added
- 'main-content-boxed' Full width Main Content with a specific maximum width (screen width > 1200px)
- 'main-content-narrow' Full width Main Content with a percentage width (screen width > 1200px)
-
- DARK MODE
-
- 'sidebar-dark page-header-dark dark-mode' Enable dark mode (light sidebar/header is not supported with dark mode)
--->
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
داشبورد
- به برنامه خود خوش آمدید، همه چیز عالی به نظر می رسد!
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
ساخته شده با
در
حسابیکس
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+
diff --git a/hesabixCore/templates/user/email/confrim-forget-password.html.twig b/hesabixCore/templates/user/email/confrim-forget-password.html.twig
index 2b0b555..21887cf 100644
--- a/hesabixCore/templates/user/email/confrim-forget-password.html.twig
+++ b/hesabixCore/templates/user/email/confrim-forget-password.html.twig
@@ -89,7 +89,7 @@
- حسابیکس
+ {{twigFunctions.getStaticData('system', 'appName')}}
diff --git a/hesabixCore/templates/user/email/confrim-register.html.twig b/hesabixCore/templates/user/email/confrim-register.html.twig
index ab5b375..c626fb7 100644
--- a/hesabixCore/templates/user/email/confrim-register.html.twig
+++ b/hesabixCore/templates/user/email/confrim-register.html.twig
@@ -5,8 +5,7 @@