handled some bugs and adde some feature for banner

This commit is contained in:
2026-07-19 15:53:05 +03:30
parent fc9de5198c
commit 160d6bd923
10 changed files with 158 additions and 36 deletions
+3 -3
View File
@@ -61,7 +61,7 @@ class PargarSyncService
public function registerOnCreate(Customer $customer): void
{
if (! empty($customer->pargar_account_id) || ! $this->isSyncEnabled()) {
if ($customer->hasValidPargarAccountId() || ! $this->isSyncEnabled()) {
return;
}
@@ -74,7 +74,7 @@ class PargarSyncService
}
$customer = Customer::find($customerId);
if ($customer === null || ! empty($customer->pargar_account_id)) {
if ($customer === null || $customer->hasValidPargarAccountId()) {
return;
}
@@ -115,7 +115,7 @@ class PargarSyncService
{
$customer->refresh();
if (! empty($customer->pargar_account_id)) {
if ($customer->hasValidPargarAccountId()) {
return [
'ok' => true,
'message' => 'مشتری قبلاً در پرگار ثبت شده است',