1 Commits

Author SHA1 Message Date
c841ff830d Update dependency erag/laravel-pwa to v2
Some checks failed
renovate/artifacts Artifact file update failure
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 19s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 14s
Laravel Pint / pint (pull_request) Failing after 1m27s
Laravel Larastan / larastan (pull_request) Failing after 1m31s
2026-06-14 00:01:08 +00:00
3 changed files with 11 additions and 81 deletions

View File

@@ -337,7 +337,7 @@ class Scheduler extends Command
} }
break; break;
case 'Daily': case 'Daily':
if (now()->format('H:i') == '09:30') { if (now()->format('H:i') == '11:30') {
try { try {
\Artisan::call('send-import-transit', [ \Artisan::call('send-import-transit', [
'schedule_type' => $rule->schedule_type, 'schedule_type' => $rule->schedule_type,

View File

@@ -3529,80 +3529,14 @@ class QualityValidationResource extends Resource
$mPlantName = $mailData['plant_name']; $mPlantName = $mailData['plant_name'];
$emails = $mailData['emails']; $emails = $mailData['emails'];
$ccEmails = $mailData['cc_emails'] ?? [];
$mUserName = Filament::auth()->user()->name; $mUserName = Filament::auth()->user()->name;
// if (! empty($emails)) { if (! empty($emails)) {
// if (is_array($emails)) { // Mail::to($emails)->send(new InvalidSerialMail($serNo, $invoiceNumber, $mPlantName, $mInvoiceType));
// $emailList = collect($emails) Mail::to($emails)->send(
// ->flatMap(fn ($email) => explode(',', $email)) new InvalidQualityMail($state, $mPorder, $mPlantName, $mLinePart, $mUserName, $mExpectedValue, 'InvalidPartNumber')
// ->map(fn ($email) => trim($email)) );
// ->filter() } else {
// ->toArray();
// } else {
// $emailList = array_map('trim', explode(',', $emails));
// }
// $ccList = [];
// if (!empty($cc_emails)) {
// if (is_array($cc_emails)) {
// $ccList = collect($cc_emails)
// ->flatMap(fn ($email) => explode(',', $email))
// ->map(fn ($email) => trim($email))
// ->filter()
// ->toArray();
// } else {
// $ccList = collect(explode(',', $cc_emails))
// ->map(fn ($email) => trim($email))
// ->filter()
// ->toArray();
// }
// }
// Mail::to($emailList)
// ->cc($ccList)
// ->send(
// new InvalidQualityMail(
// $state,
// $mPorder,
// $mPlantName,
// $mLinePart,
// $mUserName,
// $mExpectedValue,
// 'InvalidPartNumber'
// )
// );
// }
if (!empty($emails)) {
$emailList = collect(is_array($emails) ? $emails : explode(',', $emails))
->flatMap(fn ($email) => explode(',', $email))
->map(fn ($email) => trim($email))
->filter()
->toArray();
$ccList = collect(is_array($ccEmails) ? $ccEmails : explode(',', $ccEmails))
->flatMap(fn ($email) => explode(',', $email))
->map(fn ($email) => trim($email))
->filter()
->toArray();
Mail::to($emailList)
->cc($ccList)
->send(
new InvalidQualityMail(
$state,
$mPorder,
$mPlantName,
$mLinePart,
$mUserName,
$mExpectedValue,
'InvalidPartNumber'
)
);
}
else {
\Log::warning("No recipients found for plant {$mPlantName}, module Serial, rule invalid_serial."); \Log::warning("No recipients found for plant {$mPlantName}, module Serial, rule invalid_serial.");
} }
$set('part_validation1', null); $set('part_validation1', null);
@@ -4044,7 +3978,6 @@ class QualityValidationResource extends Resource
->where('module', 'QualityValidation') ->where('module', 'QualityValidation')
->where('rule_name', 'QualityMail') ->where('rule_name', 'QualityMail')
->where(fn ($q) => $q->whereNull('schedule_type')->orWhere('schedule_type', '')) ->where(fn ($q) => $q->whereNull('schedule_type')->orWhere('schedule_type', ''))
// ->get()
->pluck('email') ->pluck('email')
->toArray(); ->toArray();
@@ -4062,16 +3995,13 @@ class QualityValidationResource extends Resource
->where('module', 'QualityValidation') ->where('module', 'QualityValidation')
->where('rule_name', 'QualityMail') ->where('rule_name', 'QualityMail')
->where(fn ($q) => $q->whereNull('schedule_type')->orWhere('schedule_type', '')) ->where(fn ($q) => $q->whereNull('schedule_type')->orWhere('schedule_type', ''))
->get(['email', 'cc_emails']); ->pluck('email')
// ->pluck('email') ->toArray();
// ->toArray();
return [ return [
'plant_id' => $plantId, 'plant_id' => $plantId,
'plant_name' => $mPlantName, 'plant_name' => $mPlantName,
'emails' => $emails->pluck('email')->filter()->toArray(), 'emails' => $emails,
'cc_emails' => $emails->pluck('cc_emails')->filter()->toArray(),
// 'emails' => $emails,
]; ];
} }

View File

@@ -10,7 +10,7 @@
"alperenersoy/filament-export": "^3.0", "alperenersoy/filament-export": "^3.0",
"althinect/filament-spatie-roles-permissions": "^2.3", "althinect/filament-spatie-roles-permissions": "^2.3",
"diogogpinto/filament-auth-ui-enhancer": "^1.0", "diogogpinto/filament-auth-ui-enhancer": "^1.0",
"erag/laravel-pwa": "^1.9", "erag/laravel-pwa": "^2.0",
"filament/filament": "^3.3", "filament/filament": "^3.3",
"intervention/image": "^3.11", "intervention/image": "^3.11",
"irazasyed/telegram-bot-sdk": "^3.15", "irazasyed/telegram-bot-sdk": "^3.15",