79 Commits

Author SHA1 Message Date
9a7b42dea5 Update .github/workflows/gemini-pr-review.yaml
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 11s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 9s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 16s
Laravel Pint / pint (pull_request) Successful in 2m33s
Laravel Larastan / larastan (pull_request) Failing after 3m38s
2026-01-13 09:18:16 +00:00
0ce59ebe22 Merge pull request 'changed time in scheduler for invoice in transit' (#178) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Reviewed-on: #178
2026-01-08 04:26:24 +00:00
dhanabalan
053c07bcfb changed time in scheduler for invoice in transit
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 12s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 10s
Gemini PR Review / review (pull_request) Failing after 37s
Laravel Pint / pint (pull_request) Successful in 2m15s
Laravel Larastan / larastan (pull_request) Failing after 3m20s
2026-01-08 09:56:12 +05:30
c032cdc58d Merge pull request 'changed time in invoice in transit' (#177) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s
Reviewed-on: #177
2026-01-07 04:59:13 +00:00
dhanabalan
b09ed3481a changed time in invoice in transit
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 11s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 10s
Gemini PR Review / review (pull_request) Failing after 23s
Laravel Pint / pint (pull_request) Successful in 2m40s
Laravel Larastan / larastan (pull_request) Failing after 3m38s
2026-01-07 10:29:01 +05:30
4074374614 Merge pull request 'Added logic for columns missing invoice in transit' (#176) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 17s
Reviewed-on: #176
2026-01-07 03:59:10 +00:00
dhanabalan
c2d840d772 Added logic for columns missing invoice in transit
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 11s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 10s
Gemini PR Review / review (pull_request) Failing after 42s
Laravel Pint / pint (pull_request) Successful in 2m37s
Laravel Larastan / larastan (pull_request) Failing after 3m49s
2026-01-07 09:28:57 +05:30
15712c44b6 Merge pull request 'changed report time for invoice in transit' (#175) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Reviewed-on: #175
2026-01-07 02:52:28 +00:00
dhanabalan
119262405c changed report time for invoice in transit
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 11s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 12s
Gemini PR Review / review (pull_request) Failing after 33s
Laravel Pint / pint (pull_request) Successful in 2m5s
Laravel Larastan / larastan (pull_request) Failing after 3m11s
2026-01-07 08:21:52 +05:30
99f7450e5e Merge pull request 'changed logic in testing temp resource page' (#174) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 13s
Reviewed-on: #174
2026-01-06 13:48:37 +00:00
dhanabalan
84748c5e3d changed logic in testing temp resource page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 11s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 11s
Gemini PR Review / review (pull_request) Failing after 23s
Laravel Pint / pint (pull_request) Successful in 3m49s
Laravel Larastan / larastan (pull_request) Failing after 4m51s
2026-01-06 19:18:22 +05:30
f6f6f0924e Merge pull request 'Added testing temp policy file' (#173) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 13s
Reviewed-on: #173
2026-01-06 13:28:27 +00:00
dhanabalan
4ec781b942 Added testing temp policy file
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Gemini PR Review / review (pull_request) Failing after 26s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 11s
Laravel Pint / pint (pull_request) Successful in 2m33s
Laravel Larastan / larastan (pull_request) Failing after 3m35s
2026-01-06 18:58:16 +05:30
3bab0310a1 Merge pull request 'Added testing temp resource files' (#172) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Reviewed-on: #172
2026-01-06 13:26:55 +00:00
dhanabalan
f0f7bffe74 Added testing temp resource files
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Gemini PR Review / review (pull_request) Failing after 28s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Pint / pint (pull_request) Successful in 2m25s
Laravel Larastan / larastan (pull_request) Failing after 3m26s
2026-01-06 18:56:45 +05:30
6924990ace Merge pull request 'Added testing temp model file' (#171) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Reviewed-on: #171
2026-01-06 13:25:41 +00:00
dhanabalan
40889f8802 Added testing temp model file
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Gemini PR Review / review (pull_request) Failing after 30s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Pint / pint (pull_request) Successful in 2m9s
Laravel Larastan / larastan (pull_request) Failing after 3m28s
2026-01-06 18:55:30 +05:30
ba0b2c2709 Merge pull request 'Added Testing temp migration file' (#170) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Reviewed-on: #170
2026-01-06 13:24:52 +00:00
dhanabalan
62272df783 Added Testing temp migration file
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 11s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 12s
Gemini PR Review / review (pull_request) Failing after 26s
Laravel Pint / pint (pull_request) Successful in 2m19s
Laravel Larastan / larastan (pull_request) Failing after 3m24s
2026-01-06 18:54:39 +05:30
51416cdf37 Merge pull request 'Added 10 am for mauil trigger invoice in transit' (#169) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s
Reviewed-on: #169
2026-01-06 12:25:35 +00:00
dhanabalan
53d55555d8 Added 10 am for mauil trigger invoice in transit
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 11s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 19s
Gemini PR Review / review (pull_request) Failing after 22m14s
Laravel Larastan / larastan (pull_request) Failing after 27m34s
Laravel Pint / pint (pull_request) Successful in 7m16s
2026-01-06 17:54:50 +05:30
a8ff5b5120 Merge pull request 'modified logic for proper pending days in invoice in transit' (#168) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 11s
Reviewed-on: #168
2026-01-06 07:16:55 +00:00
dhanabalan
8c0a404665 modified logic for proper pending days in invoice in transit
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 11s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 11s
Gemini PR Review / review (pull_request) Failing after 25s
Laravel Larastan / larastan (pull_request) Failing after 3m19s
Laravel Pint / pint (pull_request) Successful in 3m28s
2026-01-06 12:46:41 +05:30
4ca965ccb1 Merge pull request 'chnaged time for invoice in transit' (#167) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 10s
Reviewed-on: #167
2026-01-06 06:36:03 +00:00
dhanabalan
def447e12b chnaged time for invoice in transit
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 11s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 10s
Gemini PR Review / review (pull_request) Failing after 31s
Laravel Pint / pint (pull_request) Successful in 3m31s
Laravel Larastan / larastan (pull_request) Failing after 13m46s
2026-01-06 12:05:52 +05:30
22cbb6c4d3 Merge pull request 'changed time for invoice transit' (#166) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Reviewed-on: #166
2026-01-06 04:28:11 +00:00
dhanabalan
f0b80554d2 changed time for invoice transit
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 12s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 11s
Gemini PR Review / review (pull_request) Failing after 26s
Laravel Pint / pint (pull_request) Successful in 2m35s
Laravel Larastan / larastan (pull_request) Failing after 3m26s
2026-01-06 09:57:58 +05:30
6db07e1825 Merge pull request 'Added delete logic inside the invoice in transits resource page' (#165) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 12s
Reviewed-on: #165
2026-01-04 10:37:33 +00:00
dhanabalan
469e0e1bbe Added delete logic inside the invoice in transits resource page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 12s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 10s
Gemini PR Review / review (pull_request) Failing after 52s
Laravel Pint / pint (pull_request) Successful in 2m10s
Laravel Larastan / larastan (pull_request) Failing after 2m55s
2026-01-04 16:07:21 +05:30
1bc0a4b01d Merge pull request 'chnaged logic for lr aw br date for pending days' (#164) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 11s
Reviewed-on: #164
2026-01-04 10:30:47 +00:00
dhanabalan
d03b803bae chnaged logic for lr aw br date for pending days
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 11s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 11s
Gemini PR Review / review (pull_request) Failing after 50s
Laravel Larastan / larastan (pull_request) Failing after 2m59s
Laravel Pint / pint (pull_request) Successful in 2m35s
2026-01-04 16:00:26 +05:30
dc77a51c3c Merge pull request 'Added permissions to view process order upload and download button' (#163) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Reviewed-on: #163
2026-01-04 09:59:05 +00:00
dhanabalan
5be689a9c1 Added permissions to view process order upload and download button
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 11s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 11s
Gemini PR Review / review (pull_request) Failing after 33s
Laravel Pint / pint (pull_request) Successful in 2m30s
Laravel Larastan / larastan (pull_request) Failing after 3m15s
2026-01-04 15:28:51 +05:30
b07a9596e5 Merge pull request 'Added order quantity in process order importer' (#162) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 13s
Reviewed-on: #162
2026-01-04 09:26:15 +00:00
dhanabalan
59b94b2b26 Added order quantity in process order importer
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 11s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 11s
Gemini PR Review / review (pull_request) Failing after 55s
Laravel Pint / pint (pull_request) Successful in 2m8s
Laravel Larastan / larastan (pull_request) Failing after 2m56s
2026-01-04 14:56:03 +05:30
b96a54aae5 Merge pull request 'Added alert mail rule exporter file' (#161) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 12s
Reviewed-on: #161
2026-01-04 06:07:42 +00:00
dhanabalan
09b756b35b Added alert mail rule exporter file
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 10s
Gemini PR Review / review (pull_request) Failing after 1m24s
Laravel Larastan / larastan (pull_request) Failing after 3m3s
Laravel Pint / pint (pull_request) Successful in 2m14s
2026-01-04 11:37:30 +05:30
fe0e1e139e Merge pull request 'Added alert mail rule importer file' (#160) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Reviewed-on: #160
2026-01-04 06:06:52 +00:00
dhanabalan
ed26b4c705 Added alert mail rule importer file
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 12s
Gemini PR Review / review (pull_request) Failing after 1m7s
Laravel Pint / pint (pull_request) Successful in 2m18s
Laravel Larastan / larastan (pull_request) Failing after 2m56s
2026-01-04 11:36:41 +05:30
a95766fd45 Merge pull request 'Added import and export inside the alert mail resource page' (#159) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Reviewed-on: #159
2026-01-04 06:06:04 +00:00
dhanabalan
9789f2828f Added import and export inside the alert mail resource page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 12s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 10s
Gemini PR Review / review (pull_request) Failing after 1m47s
Laravel Larastan / larastan (pull_request) Failing after 3m2s
Laravel Pint / pint (pull_request) Successful in 2m14s
2026-01-04 11:35:51 +05:30
d5d5a6d193 Merge pull request 'Added logic for invoice rule empty invoice in transit' (#158) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s
Reviewed-on: #158
2026-01-04 04:24:30 +00:00
dhanabalan
f27ba80475 Added logic for invoice rule empty invoice in transit
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 12s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 10s
Gemini PR Review / review (pull_request) Failing after 38s
Laravel Pint / pint (pull_request) Successful in 2m6s
Laravel Larastan / larastan (pull_request) Failing after 3m12s
2026-01-04 09:54:18 +05:30
25125cfead Merge pull request 'chnaged report timing to acctual time of invoice in transit' (#157) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Reviewed-on: #157
2026-01-04 04:23:23 +00:00
dhanabalan
1f657a626a chnaged report timing to acctual time of invoice in transit
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 11s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 11s
Gemini PR Review / review (pull_request) Failing after 37s
Laravel Larastan / larastan (pull_request) Failing after 3m3s
Laravel Pint / pint (pull_request) Successful in 2m44s
2026-01-04 09:53:09 +05:30
d6c6cf0c69 Merge pull request 'changed report time for invoice in transit' (#156) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 13s
Reviewed-on: #156
2026-01-04 04:17:22 +00:00
dhanabalan
ca9261d75a changed report time for invoice in transit
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 1m5s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 44s
Gemini PR Review / review (pull_request) Failing after 2m43s
Laravel Larastan / larastan (pull_request) Failing after 3m4s
Laravel Pint / pint (pull_request) Successful in 2m22s
2026-01-04 09:47:10 +05:30
99a95dc150 Merge pull request 'removed manual trigger of invoice data report button from alert mail resource' (#155) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 13s
Reviewed-on: #155
2026-01-03 11:13:49 +00:00
dhanabalan
99afa82c75 removed manual trigger of invoice data report button from alert mail resource
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 10s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 9s
Gemini PR Review / review (pull_request) Failing after 48s
Laravel Pint / pint (pull_request) Successful in 1m58s
Laravel Larastan / larastan (pull_request) Failing after 3m16s
2026-01-03 16:43:35 +05:30
6d26307c4a Merge pull request 'Added invoice master id in alert mail rules' (#154) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 10s
Reviewed-on: #154
2026-01-03 11:07:06 +00:00
dhanabalan
efaf876df3 Added invoice master id in alert mail rules
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 11s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 10s
Gemini PR Review / review (pull_request) Failing after 46s
Laravel Pint / pint (pull_request) Successful in 2m16s
Laravel Larastan / larastan (pull_request) Failing after 2m51s
2026-01-03 16:36:54 +05:30
8703aec73e Merge pull request 'changed sub group name of all pages for invoice management' (#153) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 13s
Reviewed-on: #153
2026-01-03 10:41:58 +00:00
dhanabalan
d3166eacf5 changed sub group name of all pages for invoice management
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 10s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 10s
Gemini PR Review / review (pull_request) Failing after 23s
Laravel Pint / pint (pull_request) Successful in 1m58s
Laravel Larastan / larastan (pull_request) Failing after 2m58s
2026-01-03 16:11:44 +05:30
f8691500cf Merge pull request 'Added export permissions for invoice in transit' (#152) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s
Reviewed-on: #152
2026-01-03 10:23:58 +00:00
dhanabalan
cada0added Added export permissions for invoice in transit
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s
Gemini PR Review / review (pull_request) Failing after 50s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 11s
Laravel Pint / pint (pull_request) Successful in 2m10s
Laravel Larastan / larastan (pull_request) Failing after 2m47s
2026-01-03 15:53:46 +05:30
12f9cb683f Merge pull request 'Added import and export permissions for invoice in transit' (#151) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Reviewed-on: #151
2026-01-03 10:22:55 +00:00
dhanabalan
eb62b3a38b Added import and export permissions for invoice in transit
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 10s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 10s
Gemini PR Review / review (pull_request) Failing after 38s
Laravel Pint / pint (pull_request) Successful in 2m14s
Laravel Larastan / larastan (pull_request) Failing after 3m36s
2026-01-03 15:52:40 +05:30
73c26a649a Merge pull request 'removed report period in invoice in transit' (#150) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 10s
Reviewed-on: #150
2026-01-03 09:48:21 +00:00
dhanabalan
e0d34fbc7b removed report period in invoice in transit
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 10s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 9s
Gemini PR Review / review (pull_request) Failing after 42s
Laravel Larastan / larastan (pull_request) Failing after 3m4s
Laravel Pint / pint (pull_request) Successful in 6m57s
2026-01-03 15:18:08 +05:30
80f6aeb3d6 Merge pull request 'remove searchable in alert mail resource' (#149) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 12s
Reviewed-on: #149
2026-01-03 09:25:07 +00:00
dhanabalan
cffb86cde2 remove searchable in alert mail resource
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 10s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 11s
Gemini PR Review / review (pull_request) Failing after 31s
Laravel Pint / pint (pull_request) Successful in 2m18s
Laravel Larastan / larastan (pull_request) Failing after 2m55s
2026-01-03 14:54:55 +05:30
f633285a57 Merge pull request 'Changed logic for to mail and cc mail for production report' (#148) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 10s
Reviewed-on: #148
2026-01-03 09:12:44 +00:00
dhanabalan
6acdfc30fa Changed logic for to mail and cc mail for production report
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 11s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 9s
Gemini PR Review / review (pull_request) Failing after 1m2s
Laravel Larastan / larastan (pull_request) Failing after 3m9s
Laravel Pint / pint (pull_request) Successful in 2m34s
2026-01-03 14:42:33 +05:30
841922a4b3 Merge pull request 'changed content in invoice transit and table column structure' (#147) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s
Reviewed-on: #147
2026-01-03 09:01:29 +00:00
dhanabalan
0852712dd9 changed content in invoice transit and table column structure
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 10s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 10s
Gemini PR Review / review (pull_request) Failing after 41s
Laravel Pint / pint (pull_request) Successful in 2m55s
Laravel Larastan / larastan (pull_request) Failing after 3m58s
2026-01-03 14:31:17 +05:30
3a819737cb Merge pull request 'chnage dposition of lower and middle in table section of product characteritics master' (#146) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 11s
Reviewed-on: #146
2026-01-03 07:37:11 +00:00
dhanabalan
ad91c848e5 chnage dposition of lower and middle in table section of product characteritics master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 10s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 10s
Gemini PR Review / review (pull_request) Failing after 50s
Laravel Pint / pint (pull_request) Successful in 2m11s
Laravel Larastan / larastan (pull_request) Failing after 2m49s
2026-01-03 13:07:00 +05:30
18f60ec336 Merge pull request 'changed to plant code for product characteritics master importer and exporter' (#145) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 12s
Reviewed-on: #145
2026-01-03 07:32:56 +00:00
dhanabalan
3b11781132 changed to plant code for product characteritics master importer and exporter
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 10s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 10s
Gemini PR Review / review (pull_request) Failing after 30s
Laravel Pint / pint (pull_request) Successful in 2m30s
Laravel Larastan / larastan (pull_request) Failing after 3m9s
2026-01-03 13:02:44 +05:30
4ab7be97bb Merge pull request 'Added characteristics type in product characteristics master filter' (#144) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s
Reviewed-on: #144
2026-01-03 07:25:21 +00:00
dhanabalan
454e6ee431 Added characteristics type in product characteristics master filter
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 10s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 9s
Gemini PR Review / review (pull_request) Failing after 30s
Laravel Pint / pint (pull_request) Successful in 2m2s
Laravel Larastan / larastan (pull_request) Failing after 3m9s
2026-01-03 12:55:09 +05:30
a643bce1c2 Merge pull request 'Added searchable in product characteristics resource page' (#143) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 13s
Reviewed-on: #143
2026-01-03 07:12:10 +00:00
dhanabalan
aa958eaa2e Added searchable in product characteristics resource page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 10s
Gemini PR Review / review (pull_request) Failing after 49s
Laravel Pint / pint (pull_request) Successful in 2m20s
Laravel Larastan / larastan (pull_request) Failing after 2m56s
2026-01-03 12:41:59 +05:30
45392419cd Merge pull request 'Added filter options in product characteristics master resource' (#142) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Reviewed-on: #142
2026-01-03 07:09:49 +00:00
dhanabalan
779ed6a7d6 Added filter options in product characteristics master resource
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 11s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 10s
Gemini PR Review / review (pull_request) Failing after 31s
Laravel Pint / pint (pull_request) Successful in 2m15s
Laravel Larastan / larastan (pull_request) Failing after 3m25s
2026-01-03 12:39:24 +05:30
7b300f63d2 Merge pull request 'added label in invoice in transit exporter' (#141) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 12s
Reviewed-on: #141
2026-01-03 06:44:27 +00:00
dhanabalan
d35e35748f added label in invoice in transit exporter
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s
Gemini PR Review / review (pull_request) Failing after 28s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 10s
Laravel Pint / pint (pull_request) Successful in 2m7s
Laravel Larastan / larastan (pull_request) Failing after 3m12s
2026-01-03 12:14:11 +05:30
650314a435 Merge pull request 'Added receiving plant name and transport name in alert mail resource page' (#140) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Reviewed-on: #140
2026-01-03 06:32:00 +00:00
dhanabalan
dd0d429b3a Added receiving plant name and transport name in alert mail resource page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Gemini PR Review / review (pull_request) Failing after 35s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 9s
Laravel Pint / pint (pull_request) Successful in 1m52s
Laravel Larastan / larastan (pull_request) Failing after 2m56s
2026-01-03 12:01:46 +05:30
30 changed files with 1384 additions and 263 deletions

View File

@@ -5,15 +5,20 @@ name: Gemini PR Review
on:
pull_request:
types: [opened, reopened, synchronize]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
review:
gemini-pr-review:
runs-on: ubuntu-latest
name: Gemini PR Review
steps:
- name: Checkout code
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
fetch-depth: 0 # This fetches the full history
@@ -22,7 +27,6 @@ jobs:
with:
node-version: '24'
- name: Get npm cache directory
id: npm-cache-dir
run: |
@@ -36,8 +40,14 @@ jobs:
restore-keys: |
${{ runner.os }}-npm-global-
# - name: Install Gemini CLI globally
# run: npm install -g --loglevel=http @google/gemini-cli
- name: Install Gemini CLI globally (if not already installed)
run: |
if ! command -v gemini &> /dev/null; then
echo "Gemini CLI not found, installing..."
npm install -g --loglevel=http @google/gemini-cli
else
echo "Gemini CLI already installed."
fi
- name: Generate git diff and review with Gemini
id: review
@@ -52,7 +62,6 @@ jobs:
cat /tmp/gemini-client-error*.json || true
- name: Post output to PR comment
id: post_comment
run: |

View File

@@ -220,7 +220,6 @@ class Scheduler extends Command
}
}
/**
* Helper to call Artisan commands with parameters.
*/

View File

@@ -44,7 +44,7 @@ class SendInvoiceTransitReport extends Command
? Plant::all()
: Plant::where('id', $plantId)->get();
$plantCodes = $plants->pluck('code', 'id');
$plantCodes = $plants->pluck('name', 'id');
if ($plants->isEmpty()) {
$this->error('No valid plant(s) found.');
@@ -63,16 +63,25 @@ class SendInvoiceTransitReport extends Command
'it.plant_id',
'it.receiving_plant_name',
'it.lr_bl_aw_date',
'it.lr_bl_aw_number',
'im.id as invoice_master_id',
'im.transport_name',
DB::raw('CAST(im.transit_days AS INTEGER) as transit_days'),
DB::raw('(CURRENT_DATE - CAST(it.lr_bl_aw_date AS DATE)) as delayed_days')
// DB::raw('(CURRENT_DATE - CAST(it.lr_bl_aw_date AS DATE)) as delayed_days')
DB::raw('
GREATEST(
0,
(CURRENT_DATE - CAST(it.lr_bl_aw_date AS DATE) - 1)
- CAST(im.transit_days AS INTEGER)
) AS delayed_days
')
)
->when($plantId != 0, fn($q) => $q->where('it.plant_id', $plantId))
->whereNotNull('it.lr_bl_aw_date')
->whereRaw(
'(CURRENT_DATE - CAST(it.lr_bl_aw_date AS DATE)) >= CAST(im.transit_days AS INTEGER)'
)
->whereRaw('
(CURRENT_DATE - CAST(it.lr_bl_aw_date AS DATE))
- CAST(im.transit_days AS INTEGER) > 0
')
->get();
@@ -86,6 +95,13 @@ class SendInvoiceTransitReport extends Command
foreach ($mailRules as $rule) {
$ruleInvoices = $results->where('invoice_master_id', $rule->invoice_master_id);
//$ruleInvoices = $results->filter(fn($item) => $item->invoice_master_id == (int)$rule->invoice_master_id);
if ($ruleInvoices->isEmpty()) {
$this->info("Skipping rule {$rule->id} — no invoice transit data.");
continue; // ❌ DO NOT SEND MAIL
}
$invoiceMaster = InvoiceMaster::find($rule->invoice_master_id);
@@ -106,6 +122,7 @@ class SendInvoiceTransitReport extends Command
'invoice_number' => $item->invoice_number,
'transport_name' => $item->transport_name,
'lr_bl_aw_date' => $item->lr_bl_aw_date,
'lr_bl_aw_number' => $item->lr_bl_aw_number,
'transit_days' => $item->transit_days,
'status' => $item->delayed_days . ' Days',
];

View File

@@ -2,15 +2,13 @@
namespace App\Console\Commands;
use App\Models\InvoiceValidation;
use App\Models\Plant;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Mail;
use App\Mail\ProductionMail;
use App\Models\Line;
use App\Models\Plant;
use App\Models\ProductionPlan;
use App\Models\ProductionQuantity;
use DB;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Mail;
class SendProductionReport extends Command
{
@@ -19,7 +17,7 @@ class SendProductionReport extends Command
*
* @var string
*/
//protected $signature = 'send:production-report';
// protected $signature = 'send:production-report';
protected $signature = 'send:production-report {schedule_type} {plant}';
/**
@@ -32,11 +30,10 @@ class SendProductionReport extends Command
/**
* Execute the console command.
*/
public function handle()
{
ini_set('max_execution_time', 0); // disable limit
set_time_limit(0);
// ini_set('max_execution_time', 0); // disable limit
// set_time_limit(0);
$scheduleType = $this->argument('schedule_type');
$plantId = (int) $this->argument('plant'); // cast to int for safety
@@ -55,33 +52,30 @@ class SendProductionReport extends Command
: Plant::where('id', $plantId)->get();
if ($plants->isEmpty()) {
$this->error("No valid plant(s) found.");
$this->error('No valid plant(s) found.');
return;
}
// $startDate = now()->setTime(8, 0, 0);
// $endDate = now()->copy()->addDay()->setTime(8, 0, 0);
if (strtolower($scheduleType) == 'daily')
{
if (strtolower($scheduleType) == 'daily') {
$startDate = now()->subDay()->setTime(8, 0, 0);
$endDate = now()->setTime(8, 0, 0);
}
else
{
} else {
$startDate = now()->setTime(8, 0, 0);
$endDate = now()->copy()->addDay()->setTime(8, 0, 0);
}
$PlanstartDate = now()->setTime(8, 0, 0);
$planendDate = now()->copy()->addDay()->setTime(7, 59, 0);
$PlanstartDate = now()->subDay()->setTime(8, 0, 0);
$planendDate = now()->setTime(7, 59, 0);
$tableData = [];
$no = 1;
//.
// .
foreach ($plants as $plant)
{
foreach ($plants as $plant) {
$lines = Line::where('plant_id', $plant->id)->get();
foreach ($lines as $line) {
@@ -90,6 +84,7 @@ class SendProductionReport extends Command
->whereBetween('created_at', [$PlanstartDate, $planendDate])
->sum('plan_quantity');
/** @phpstan-ignore property.notFound */
if (strtolower($line->type) == 'fg line') {
$productionQuantity = \App\Models\QualityValidation::where('plant_id', $plant->id)
->where('line_id', $line->id)
@@ -113,9 +108,7 @@ class SendProductionReport extends Command
}
}
//$this->table(['No', 'Plant', 'Line', 'Target Quantity', 'Production Quantity'], $fgTableData);
// $this->table(['No', 'Plant', 'Line', 'Target Quantity', 'Production Quantity'], $fgTableData);
// $this->table(['No', 'Plant', 'Line', 'Target Quantity', 'Production Quantity'], $tableData);
@@ -140,13 +133,39 @@ class SendProductionReport extends Command
$this->info($contentVars['wishes'] ?? '');
// Send mails
if (!empty($emails)) {
foreach ($emails as $email) {
Mail::to($email)->send(new ProductionMail($scheduleType, $tableData));
// if (! empty($emails)) {
// foreach ($emails as $email) {
// Mail::to($email)->send(new ProductionMail($scheduleType, $tableData));
// }
// $this->info('Production report sent to '.count($emails).' recipient(s).');
// } else {
// $this->warn('No recipients found for ProductionMailAlert.');
// }
foreach ($mailRules as $rule)
{
$toEmails = collect(explode(',', $rule->email))
->map(fn ($e) => trim($e))
->filter()
->unique()
->values()
->toArray();
$ccEmails = collect(explode(',', $rule->cc_emails))
->map(fn ($e) => trim($e))
->filter()
->unique()
->values()
->toArray();
if (empty($toEmails)) {
$this->warn("Skipping rule ID {$rule->id} — no valid To emails found.");
continue;
}
$this->info("Production report sent to " . count($emails) . " recipient(s).");
} else {
$this->warn('No recipients found for ProductionMailAlert.');
\Mail::to($toEmails)->cc($ccEmails)->send($mail);
$this->info("Mail sent for rule ID {$rule->id} → To: ".implode(', ', $toEmails).($ccEmails ? ' | CC: '.implode(', ', $ccEmails) : ''));
}
}
}

View File

@@ -0,0 +1,73 @@
<?php
namespace App\Filament\Exports;
use App\Models\AlertMailRule;
use App\Models\Plant;
use Filament\Actions\Exports\ExportColumn;
use Filament\Actions\Exports\Exporter;
use Filament\Actions\Exports\Models\Export;
class AlertMailRuleExporter extends Exporter
{
protected static ?string $model = AlertMailRule::class;
public static function getColumns(): array
{
static $rowNumber = 0;
return [
ExportColumn::make('no')
->label('NO')
->state(function ($record) use (&$rowNumber) {
// Increment and return the row number
return ++$rowNumber;
}),
ExportColumn::make('module')
->label('MODULE'),
ExportColumn::make('rule_name')
->label('RULE NAME'),
ExportColumn::make('email')
->label('EMAIL'),
ExportColumn::make('schedule_type')
->label('SCHEDULE TYPE'),
ExportColumn::make('plant')
->label('PLANT CODE')
->formatStateUsing(function ($state) {
// $state is the plant ID from the database
if ($state == 0) {
return 'All Plants';
}
$plant = Plant::find($state);
return $plant ? $plant->code : 'Unknown';
}),
ExportColumn::make('cc_emails')
->label('CC EMAILS'),
ExportColumn::make('invoiceMaster.receiving_plant_name')
->label('RECEIVING PLANT NAME'),
ExportColumn::make('invoiceMaster.transport_name')
->label('TRANSPORT NAME'),
ExportColumn::make('created_at')
->label('CREATED AT'),
ExportColumn::make('created_by')
->label('CREATED BY'),
ExportColumn::make('updated_at')
->label('UPDATED AT'),
ExportColumn::make('deleted_at')
->label('DELETED AT')
->enabledByDefault(false),
];
}
public static function getCompletedNotificationBody(Export $export): string
{
$body = 'Your alert mail rule export has completed and ' . number_format($export->successful_rows) . ' ' . str('row')->plural($export->successful_rows) . ' exported.';
if ($failedRowsCount = $export->getFailedRowsCount()) {
$body .= ' ' . number_format($failedRowsCount) . ' ' . str('row')->plural($failedRowsCount) . ' failed to export.';
}
return $body;
}
}

View File

@@ -13,36 +13,69 @@ class InvoiceInTransitExporter extends Exporter
public static function getColumns(): array
{
static $rowNumber = 0;
return [
ExportColumn::make('id')
->label('ID'),
ExportColumn::make('plant.name'),
ExportColumn::make('receiving_plant'),
ExportColumn::make('receiving_plant_name'),
ExportColumn::make('invoice_number'),
ExportColumn::make('invoice_date'),
ExportColumn::make('item_code'),
ExportColumn::make('description'),
ExportColumn::make('quantity'),
ExportColumn::make('transport_name'),
ExportColumn::make('lr_bl_aw_number'),
ExportColumn::make('lr_bl_aw_date'),
ExportColumn::make('pending_days'),
ExportColumn::make('obd_number'),
ExportColumn::make('obd_date'),
ExportColumn::make('shipment_weight'),
ExportColumn::make('unit_price'),
ExportColumn::make('net_value'),
ExportColumn::make('total_item_amount'),
ExportColumn::make('tax_amount'),
ExportColumn::make('transport_mode'),
ExportColumn::make('vehicle_number'),
ExportColumn::make('e_waybill_number'),
ExportColumn::make('created_at'),
ExportColumn::make('updated_at'),
ExportColumn::make('created_by'),
ExportColumn::make('updated_by'),
ExportColumn::make('deleted_at'),
ExportColumn::make('no')
->label('NO')
->state(function ($record) use (&$rowNumber) {
// Increment and return the row number
return ++$rowNumber;
}),
ExportColumn::make('plant.code')
->label('PLANT'),
ExportColumn::make('receiving_plant')
->label('RECEIVING PLANT'),
ExportColumn::make('receiving_plant_name')
->label('RECEIVING PLANT NAME'),
ExportColumn::make('invoice_number')
->label('INVOICE NUMBER'),
ExportColumn::make('invoice_date')
->label('INVOICE DATE'),
ExportColumn::make('item_code')
->label('ITEM CODE'),
ExportColumn::make('description')
->label('DESCRIPTION'),
ExportColumn::make('quantity')
->label('QUANTITY'),
ExportColumn::make('transport_name')
->label('TRANSPORT NAME'),
ExportColumn::make('lr_bl_aw_number')
->label('LR_BL_AW NUMBER'),
ExportColumn::make('lr_bl_aw_date')
->label('LR_BL_AW DATE'),
ExportColumn::make('pending_days')
->label('PENDING DAYS'),
ExportColumn::make('obd_number')
->label('OBD NUMBER'),
ExportColumn::make('obd_date')
->label('OBD DATE'),
ExportColumn::make('shipment_weight')
->label('SHIPMENT WEIGHT'),
ExportColumn::make('unit_price')
->label('UNIT PRICE'),
ExportColumn::make('net_value')
->label('NET VALUE'),
ExportColumn::make('total_item_amount')
->label('TOTAL ITEM AMOUNT'),
ExportColumn::make('tax_amount')
->label('TAX AMOUNT'),
ExportColumn::make('transport_mode')
->label('TRANSPORT MODE'),
ExportColumn::make('vehicle_number')
->label('VEHICLE NUMBER'),
ExportColumn::make('e_waybill_number')
->label('E_WAYBILL NUMBER'),
ExportColumn::make('created_at')
->label('CREATED AT'),
ExportColumn::make('updated_at')
->label('UPDATED AT'),
ExportColumn::make('created_by')
->label('CREATED BY'),
ExportColumn::make('updated_by')
->label('UPDATED BY'),
ExportColumn::make('deleted_at')
->label('DELETED AT')
->enabledByDefault(false),
];
}

View File

@@ -14,6 +14,7 @@ class ProductCharacteristicsMasterExporter extends Exporter
public static function getColumns(): array
{
static $rowNumber = 0;
return [
ExportColumn::make('no')
->label('NO')
@@ -21,12 +22,12 @@ class ProductCharacteristicsMasterExporter extends Exporter
// Increment and return the row number
return ++$rowNumber;
}),
ExportColumn::make('plant.name')
->label('PLANT'),
ExportColumn::make('plant.code')
->label('PLANT CODE'),
ExportColumn::make('item.code')
->label('ITEM CODE'),
ExportColumn::make('line.name')
->label('LINE NAME'), //machine.workGroupMaster.name
->label('LINE NAME'), // machine.workGroupMaster.name
ExportColumn::make('machine.workGroupMaster.name')
->label('WORK GROUP MASTER'),
ExportColumn::make('machine.work_center')
@@ -34,15 +35,15 @@ class ProductCharacteristicsMasterExporter extends Exporter
ExportColumn::make('characteristics_type')
->label('CHARACTERISTICS TYPE'),
ExportColumn::make('name')
->label('NAME'),
->label('CHARACTERISTICS NAME'),
ExportColumn::make('inspection_type')
->label('INSPECTION TYPE'),
ExportColumn::make('upper')
->label('UPPER'),
ExportColumn::make('lower')
->label('LOWER'),
ExportColumn::make('middle')
->label('MIDDLE'),
ExportColumn::make('upper')
->label('UPPER'),
ExportColumn::make('created_at')
->label('CREATED AT'),
ExportColumn::make('updated_at')
@@ -59,10 +60,10 @@ class ProductCharacteristicsMasterExporter extends Exporter
public static function getCompletedNotificationBody(Export $export): string
{
$body = 'Your product characteristics master export has completed and ' . number_format($export->successful_rows) . ' ' . str('row')->plural($export->successful_rows) . ' exported.';
$body = 'Your product characteristics master export has completed and '.number_format($export->successful_rows).' '.str('row')->plural($export->successful_rows).' exported.';
if ($failedRowsCount = $export->getFailedRowsCount()) {
$body .= ' ' . number_format($failedRowsCount) . ' ' . str('row')->plural($failedRowsCount) . ' failed to export.';
$body .= ' '.number_format($failedRowsCount).' '.str('row')->plural($failedRowsCount).' failed to export.';
}
return $body;

View File

@@ -0,0 +1,141 @@
<?php
namespace App\Filament\Imports;
use App\Models\AlertMailRule;
use App\Models\Plant;
use Filament\Actions\Imports\ImportColumn;
use Filament\Actions\Imports\Importer;
use Filament\Actions\Imports\Models\Import;
use Filament\Actions\Imports\Exceptions\RowImportFailedException;
use Filament\Facades\Filament;
use Str;
class AlertMailRuleImporter extends Importer
{
protected static ?string $model = AlertMailRule::class;
public static function getColumns(): array
{
return [
ImportColumn::make('module')
->requiredMapping()
->exampleHeader('Module')
->example('ProductionQuantities/InvoiceValidation/QualityValidation/InvoiceDataReport/InvoiceTransit')
->label('Module')
->rules(['required']),
ImportColumn::make('rule_name')
->requiredMapping()
->exampleHeader('Rule Name')
->example('ProductionMail/InvoiceMail/QualityMail/InvoiceDataMail/InvoiceTransitMail')
->label('Rule Name')
->rules(['required']),
ImportColumn::make('email')
->requiredMapping()
->exampleHeader('Email')
->example('admin@cripumps.com,ranjith.bala@cripumps.com')
->label('Email')
->rules(['required']),
ImportColumn::make('schedule_type')
->exampleHeader('Schedule Type')
->example('Daily/Live/Hourly')
->label('Schedule Type'),
ImportColumn::make('plant')
->requiredMapping()
->exampleHeader('Plant Code')
->example('1000 or All Plants')
->label('Plant Code')
->rules(['required']),
ImportColumn::make('cc_emails')
->exampleHeader('CC Email')
->example('admin@cripumps.com,ranjith.bala@cripumps.com')
->label('CC Email')
->rules(['nullable', 'string']),
//->rules(['cc_emails']),
// ImportColumn::make('invoiceMaster')
// ->relationship(),
ImportColumn::make('receiving_plant_name')
->exampleHeader('Receiving Plant Name')
->example('BANGALORE')
->label('Receiving Plant Name')
->requiredMapping(),
ImportColumn::make('transporter_name')
->exampleHeader('Transporter Name')
->example('SAFEXPRESS PRIVATE LIMITED')
->label('Transporter Name')
->requiredMapping(),
];
}
public function resolveRecord(): ?AlertMailRule
{
$warnMsg = [];
$user = Filament::auth()->user();
$operatorName = $user->name;
if (strtolower($this->data['plant']) == 'all plants') {
$this->data['plant'] = 0;
} else {
$plant = Plant::where('code', $this->data['plant'])->first();
if (!$plant) {
$warnMsg[] = "Plant code '{$this->data['plant']}' not found.";
$this->data['plant'] = null;
} else {
$this->data['plant'] = $plant->id;
}
}
$receivingPlantName = $this->data['receiving_plant_name'] ?? null;
$transporterName = $this->data['transporter_name'] ?? null;
if (!$receivingPlantName || !$transporterName)
{
$warnMsg [] = 'Both Receiving Plant Name and Transporter Name are required.';
}
$invoiceMaster = \App\Models\InvoiceMaster::where('receiving_plant_name', $receivingPlantName)
->where('transport_name', $transporterName)
->first();
if (!$invoiceMaster) {
$warnMsg [] = "Invoice Master not found for Receiving Plant '{$receivingPlantName}' and Transporter '{$transporterName}'.";
}
$this->data['invoice_master_id'] = $invoiceMaster->id;
unset($this->data['receiving_plant_name'], $this->data['transporter_name']);
if(! empty($warnMsg)){
throw new RowImportFailedException(implode(', ', $warnMsg));
}
return AlertMailRule::Create([
'module' => $this->data['module'],
'rule_name' => $this->data['rule_name'],
'email' => $this->data['email'],
'schedule_type' => $this->data['schedule_type'],
'plant' => $this->data['plant'],
'cc_emails' => $this->data['cc_emails'] ?? null,
'invoice_master_id' => $invoiceMaster->id,
'created_by' => $operatorName,
'updated_by' => $operatorName,
]);
//return new AlertMailRule();
}
public static function getCompletedNotificationBody(Import $import): string
{
$body = 'Your alert mail rule import has completed and ' . number_format($import->successful_rows) . ' ' . str('row')->plural($import->successful_rows) . ' imported.';
if ($failedRowsCount = $import->getFailedRowsCount()) {
$body .= ' ' . number_format($failedRowsCount) . ' ' . str('row')->plural($failedRowsCount) . ' failed to import.';
}
return $body;
}
}

View File

@@ -10,6 +10,7 @@ use Filament\Actions\Imports\Exceptions\RowImportFailedException;
use Filament\Actions\Imports\ImportColumn;
use Filament\Actions\Imports\Importer;
use Filament\Actions\Imports\Models\Import;
use Filament\Facades\Filament;
use Str;
class ProcessOrderImporter extends Importer
@@ -38,41 +39,57 @@ class ProcessOrderImporter extends Importer
->example('202500123456')
->label('PROCESS ORDER')
->rules(['required']),
ImportColumn::make('created_by')
->exampleHeader('CREATED BY')
->example('RAW01234')
->label('CREATED BY')
ImportColumn::make('order_quantity')
->exampleHeader('ORDER QUANTITY')
->example('100')
->label('ORDER QUANTITY')
->rules(['required']),
// ImportColumn::make('created_by')
// ->exampleHeader('CREATED BY')
// ->example('RAW01234')
// ->label('CREATED BY')
// ->rules(['required']),
];
}
public function resolveRecord(): ?ProcessOrder
{
$warnMsg = [];
$plant = Plant::where('code', $this->data['plant'])->first();
$itemCode = Item::where('code', $this->data['item'])->first();
$plantCod = $this->data['plant'];
$plant = null;
$iCode = trim($this->data['item']);
$processOrder = trim($this->data['process_order'] ?? '');
$user = Filament::auth()->user();
$operatorName = $user->name;
if (Str::length($plantCod) < 4 || ! is_numeric($plantCod) || ! preg_match('/^[1-9]\d{3,}$/', $plantCod)) {
$warnMsg[] = 'Invalid plant code found';
} else {
$plant = Plant::where('code', $plantCod)->first();
if (! $plant) {
$warnMsg[] = 'Plant not found';
} elseif (Str::length($iCode) < 6 || ! ctype_alnum($iCode)) {
$warnMsg[] = 'Invalid item code found';
} elseif (! $itemCode) {
$warnMsg[] = 'Item Code not found';
}
}
$processOrder = trim($this->data['process_order'] ?? '');
if (Str::length($iCode) < 6 || ! ctype_alnum($iCode)) {
$warnMsg[] = 'Invalid item code found';
} else {
$itemCode = Item::where('code', $iCode)->first();
if (! $itemCode) {
$warnMsg[] = 'Item Code not found';
}
}
if ($processOrder == '') {
$warnMsg[] = 'Process Order cannot be empty';
}
$user = User::where('name', $this->data['created_by'])->first();
if (! $user) {
$warnMsg[] = 'User not found';
}
// $user = User::where('name', $this->data['created_by'])->first();
// if (! $user) {
// $warnMsg[] = 'User not found';
// }
if ($plant && $processOrder != '') {
if ($plant && $itemCode && $processOrder != '') {
$existingOrder = ProcessOrder::where('plant_id', $plant->id)
->where('process_order', $processOrder)
@@ -94,7 +111,7 @@ class ProcessOrderImporter extends Importer
'coil_number' => '0',
'order_quantity' => 0,
'received_quantity' => 0,
'created_by' => $user->name,
'created_by' => $operatorName,
]);
// return new ProcessOrder();

View File

@@ -9,12 +9,12 @@ use App\Models\Plant;
use App\Models\ProductCharacteristicsMaster;
use App\Models\User;
use App\Models\WorkGroupMaster;
use Filament\Actions\Imports\Exceptions\RowImportFailedException;
use Filament\Actions\Imports\ImportColumn;
use Filament\Actions\Imports\Importer;
use Filament\Actions\Imports\Models\Import;
use Str;
use Filament\Actions\Imports\Exceptions\RowImportFailedException;
use Illuminate\Support\Facades\Auth;
use Str;
class ProductCharacteristicsMasterImporter extends Importer
{
@@ -25,38 +25,38 @@ class ProductCharacteristicsMasterImporter extends Importer
return [
ImportColumn::make('plant')
->requiredMapping()
->exampleHeader('Plant Name')
->example('Ransar Industries-I')
->label('Plant Name')
->relationship(resolveUsing:'name')
->exampleHeader('Plant Code')
->example('1000')
->label('Plant Code')
->relationship(resolveUsing: 'code')
->rules(['required']),
ImportColumn::make('item')
->requiredMapping()
->exampleHeader('Item Code')
->example('630214')
->label('Item Code')
->relationship(resolveUsing:'code')
->relationship(resolveUsing: 'code')
->rules(['required']),
ImportColumn::make('line')
->requiredMapping()
->exampleHeader('Line')
->exampleHeader('Line Name')
->example('4 inch pump line')
->label('Line')
->relationship(resolveUsing:'name')
->label('Line Name')
->relationship(resolveUsing: 'name')
->rules(['required']),
ImportColumn::make('work_group_master_id')
->label('Group Work Center')
->requiredMapping()
->exampleHeader('Group Work Center')
->example('RMGCGABC')
->relationship(resolveUsing:'name')
->relationship(resolveUsing: 'name')
->rules(['required']),
ImportColumn::make('machine')
->requiredMapping()
->exampleHeader('Work Center')
->example('RMGCE001')
->label('Work Center')
->relationship(resolveUsing:'work_center')
->relationship(resolveUsing: 'work_center')
->rules(['required']),
ImportColumn::make('characteristics_type')
->exampleHeader('Characteristics Type')
@@ -64,9 +64,9 @@ class ProductCharacteristicsMasterImporter extends Importer
->label('Characteristics Type')
->rules(['required']),
ImportColumn::make('name')
->exampleHeader('Name')
->exampleHeader('Characteristics Name')
->example('Body')
->label('Name')
->label('Characteristics Name')
->rules(['required']),
ImportColumn::make('inspection_type')
->exampleHeader('Inspection Type')
@@ -93,7 +93,7 @@ class ProductCharacteristicsMasterImporter extends Importer
->exampleHeader('Created By')
->example('Admin')
->label('Created By'),
//ImportColumn::make('updated_by'),
// ImportColumn::make('updated_by'),
];
}
@@ -102,48 +102,48 @@ class ProductCharacteristicsMasterImporter extends Importer
{
$warnMsg = [];
$plant = Plant::where('name', $this->data['plant'])->first();
if (!$plant) {
$warnMsg[] = "Plant not found";
}
$plantCod = $this->data['plant'];
$plant = null;
if (Str::length($plantCod) < 4 || ! is_numeric($plantCod) || ! preg_match('/^[1-9]\d{3,}$/', $plantCod)) {
$warnMsg[] = 'Invalid plant code found';
} else {
$plant = Plant::where('code', $plantCod)->first();
if (! $plant) {
$warnMsg[] = 'Plant not found';
} else {
$itemExists = Item::where('code', $this->data['item'])->first();
if (!$itemExists) {
$warnMsg[] = "Item not found";
if (! $itemExists) {
$warnMsg[] = 'Item not found';
}
$itemAgainstPlant = Item::where('code', $this->data['item'])
->where('plant_id', $plant->id)
->first();
if (!$itemAgainstPlant) {
$warnMsg[] = "Item code not found for the given plant";
}
else {
if (! $itemAgainstPlant) {
$warnMsg[] = 'Item code not found for the given plant';
} else {
$itemId = $itemAgainstPlant->id;
}
$lineExists = Line::where('name', $this->data['line'])->first();
if (!$lineExists) {
$warnMsg[] = "Line not found";
if (! $lineExists) {
$warnMsg[] = 'Line not found';
}
$lineAgainstPlant = Line::where('name', $this->data['line'])
->where('plant_id', $plant->id)
->first();
if (!$lineAgainstPlant) {
$warnMsg[] = "Line not found for the given plant";
}
else
{
if (! $lineAgainstPlant) {
$warnMsg[] = 'Line not found for the given plant';
} else {
$LineId = $lineAgainstPlant->id;
}
$WorkgroupMaster = WorkGroupMaster::where('name', $this->data['work_group_master_id'])->where('plant_id', $plant->id)->first();
if (!$WorkgroupMaster) {
$warnMsg[] = "Work Group Master value not found";
}
else {
if (! $WorkgroupMaster) {
$warnMsg[] = 'Work Group Master value not found';
} else {
$workGroupMasterId = $WorkgroupMaster->id;
@@ -156,20 +156,17 @@ class ProductCharacteristicsMasterImporter extends Importer
})
->exists();
if (!$existsInLine) {
if (! $existsInLine) {
$warnMsg[] = "Work Group Master '{$WorkgroupMaster->name}' is not mapped to any line in this plant";
}
else {
} else {
$workGroupMasterId = $WorkgroupMaster->id;
}
}
$machine = Machine::where('work_center', $this->data['machine'])->first();
if (!$machine) {
$warnMsg[] = "Work Center not found";
}
else {
if (! $machine) {
$warnMsg[] = 'Work Center not found';
} else {
$machineId = $machine->id;
}
@@ -177,17 +174,15 @@ class ProductCharacteristicsMasterImporter extends Importer
->where('plant_id', $plant->id)
->first();
if (!$machineAgainstPlant) {
$warnMsg[] = "Work Center not found for the given plant";
}
else
{
if (! $machineAgainstPlant) {
$warnMsg[] = 'Work Center not found for the given plant';
} else {
$machineId = $machineAgainstPlant->id;
}
$user = User::where('name', $this->data['created_by'])->first();
if (!$user) {
$warnMsg[] = "Operator ID not found";
if (! $user) {
$warnMsg[] = 'Operator ID not found';
}
if (($this->data['inspection_type'] ?? null) == 'Value') {
@@ -197,18 +192,18 @@ class ProductCharacteristicsMasterImporter extends Importer
if (is_null($upper) || is_null($lower) || is_null($middle)) {
$warnMsg[] = "For 'Value' inspection type, Upper, Lower, and Middle values are required.";
} elseif (!is_numeric($upper) || !is_numeric($lower) || !is_numeric($middle)) {
$warnMsg[] = "Upper, Lower, and Middle values must be numeric.";
} elseif (!($lower <= $middle && $middle <= $upper)) {
} elseif (! is_numeric($upper) || ! is_numeric($lower) || ! is_numeric($middle)) {
$warnMsg[] = 'Upper, Lower, and Middle values must be numeric.';
} elseif (! ($lower <= $middle && $middle <= $upper)) {
$warnMsg[] = "For 'Value' inspection type, values must satisfy: Lower ≤ Middle ≤ Upper.";
}
}
if (!empty($warnMsg)) {
throw new RowImportFailedException(implode(', ', $warnMsg));
}
else
{
}
if (! empty($warnMsg)) {
throw new RowImportFailedException(implode(', ', $warnMsg));
} else {
$record = ProductCharacteristicsMaster::firstOrNew([
'plant_id' => $plant->id,
'item_id' => $itemId,
@@ -220,7 +215,7 @@ class ProductCharacteristicsMasterImporter extends Importer
$currentUser = Auth::check() ? Auth::user()->name : ($this->data['created_by'] ?? 'System');
// If record is new, fill all fields
if (!$record->exists) {
if (! $record->exists) {
$record->name = $this->data['name'];
$record->characteristics_type = $this->data['characteristics_type'];
$record->inspection_type = $this->data['inspection_type'];
@@ -264,17 +259,17 @@ class ProductCharacteristicsMasterImporter extends Importer
// return null;
// }
//return new WorkGroupMaster();
// return new WorkGroupMaster();
// return new ProductCharacteristicsMaster();
}
public static function getCompletedNotificationBody(Import $import): string
{
$body = 'Your product characteristics master import has completed and ' . number_format($import->successful_rows) . ' ' . str('row')->plural($import->successful_rows) . ' imported.';
$body = 'Your product characteristics master import has completed and '.number_format($import->successful_rows).' '.str('row')->plural($import->successful_rows).' imported.';
if ($failedRowsCount = $import->getFailedRowsCount()) {
$body .= ' ' . number_format($failedRowsCount) . ' ' . str('row')->plural($failedRowsCount) . ' failed to import.';
$body .= ' '.number_format($failedRowsCount).' '.str('row')->plural($failedRowsCount).' failed to import.';
}
return $body;

View File

@@ -20,7 +20,7 @@ class InvoiceDataDashboard extends Page
protected static string $view = 'filament.pages.invoice-data-dashboard';
protected static ?string $navigationGroup = 'Invoice Management';
protected static ?string $navigationGroup = 'Manufacturing SD';
public function mount(): void
{

View File

@@ -2,9 +2,12 @@
namespace App\Filament\Resources;
use App\Filament\Exports\AlertMailRuleExporter;
use App\Filament\Imports\AlertMailRuleImporter;
use App\Filament\Resources\AlertMailRuleResource\Pages;
use App\Filament\Resources\AlertMailRuleResource\RelationManagers;
use App\Models\AlertMailRule;
use App\Models\InvoiceMaster;
use App\Models\Plant;
use Dotenv\Exception\ValidationException;
use Filament\Facades\Filament;
@@ -17,7 +20,13 @@ use Filament\Tables\Table;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;
use Filament\Forms\Components\Section;
use Filament\Forms\Components\Actions\Action;
use Filament\Notifications\Notification;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\DB;
use Illuminate\Validation\ValidationException as ValidationValidationException;
use Filament\Tables\Actions\ImportAction;
use Filament\Tables\Actions\ExportAction;
class AlertMailRuleResource extends Resource
{
@@ -51,6 +60,7 @@ class AlertMailRuleResource extends Resource
'InvoiceDataReport' => 'InvoiceDataReport',
'ProductionQuantities' => 'ProductionQuantities',
'QualityValidation' => 'QualityValidation',
'InvoiceTransit' => 'InvoiceTransit',
]),
Forms\Components\Select::make('rule_name')
->label('Rule Name')
@@ -61,6 +71,7 @@ class AlertMailRuleResource extends Resource
'ProductionMail' => 'Production Mail',
'InvoiceDataMail' => 'Invoice Data Mail',
'QualityMail' => 'Quality Mail',
'InvoiceTransitMail' => 'Invoice Transit Mail',
])
->required(),
Forms\Components\TextInput::make('email')
@@ -75,29 +86,76 @@ class AlertMailRuleResource extends Resource
'Hourly' => 'Hourly',
'Daily' => 'Daily',
]),
Forms\Components\Select::make('receiving_plant_name')
->label('Receiving Plant')
->options(
InvoiceMaster::query()
->whereNotNull('receiving_plant_name')
->select('receiving_plant_name')
->distinct()
->pluck('receiving_plant_name', 'receiving_plant_name')
)
->searchable()
->reactive()
->afterStateUpdated(function (callable $set) {
$set('invoice_master_id', null);
}),
Forms\Components\Select::make('invoice_master_id')
->label('Transporter Name')
->options(function (callable $get) {
$recPlant = $get('receiving_plant_name');
if (! $recPlant) {
return [];
}
return InvoiceMaster::query()
->where('receiving_plant_name', $recPlant)
->whereNotNull('transport_name')
->where('transport_name', '!=', '')
->orderBy('transport_name')
->pluck('transport_name', 'id')
->toArray();
})
->searchable(),
Checkbox::make('is_active')
->label('All Plants Reports')
->afterStateUpdated(fn ($state, callable $set) => $state ? $set('plant', null) : null)
->reactive(),
// Forms\Components\Actions::make([
// Action::make('sendInvoiceData')
// ->label('Invoice Data Report')
// ->action(function ($get) {
// $plantIds = AlertMailRule::where('module', 'InvoiceDataReport')
// ->orderBy('plant')
// ->pluck('plant')
// ->toArray();
// foreach ($plantIds as $plantId) {
// Artisan::call('send:invoice-data-report', [
// 'schedule_type' => 'Daily',
// 'plant' => $plantId,
// ]);
// }
// // Notify user in Filament
// Notification::make()
// ->title('Invoice data report sent successfully!')
// ->success()
// ->send();
// }),
// ]),
Forms\Components\Hidden::make('created_by')
->default(fn () => Filament::auth()->user()?->name),
Forms\Components\Hidden::make('updated_by')
->default(fn () => Filament::auth()->user()?->name),
])
->columns(6),
->columns(2),
]);
}
// Optionally, also override for update/editing
// public static function mutateFormDataBeforeSave(array $data): array
// {
// dd('test');
// if ($data['is_active']) {
// $data['plant'] = 'All Plants';
// }
// return $data;
// }
public static function table(Table $table): Table
{
return $table
@@ -132,6 +190,14 @@ class AlertMailRuleResource extends Resource
->alignCenter()
->searchable()
->sortable(),
Tables\Columns\TextColumn::make('invoiceMaster.receiving_plant_name')
->label('Receiving Plant')
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('invoiceMaster.transport_name')
->label('Transporter')
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('email')
->label('TO Emails')
->searchable()
@@ -188,6 +254,22 @@ class AlertMailRuleResource extends Resource
Tables\Actions\ForceDeleteBulkAction::make(),
Tables\Actions\RestoreBulkAction::make(),
]),
])
->headerActions([
ImportAction::make()
->label('Import Alert Mail Rule')
->color('warning')
->importer(AlertMailRuleImporter::class)
->visible(function() {
return Filament::auth()->user()->can('view import alert mail rule');
}),
ExportAction::make()
->label('Export Alert Mail Rule')
->color('warning')
->exporter(AlertMailRuleExporter::class)
->visible(function() {
return Filament::auth()->user()->can('view export alert mail rule');
}),
]);
}

View File

@@ -28,7 +28,7 @@ class InvoiceDataValidationResource extends Resource
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
protected static ?string $navigationGroup = 'Invoice Management';
protected static ?string $navigationGroup = 'Manufacturing SD';
public static function form(Form $form): Form
{

View File

@@ -29,7 +29,7 @@ class InvoiceInTransitResource extends Resource
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
protected static ?string $navigationGroup = 'Invoice Transit';
protected static ?string $navigationGroup = 'Manufacturing SD';
public static function form(Form $form): Form
{
@@ -256,6 +256,7 @@ class InvoiceInTransitResource extends Resource
->directory('uploads/temp'),
])
->action(function (array $data) {
InvoiceInTransit::truncate();
$uploadedFile = $data['invoice_in_transit_file'];
$disk = Storage::disk('local');
@@ -453,6 +454,22 @@ class InvoiceInTransitResource extends Resource
return;
}
$mandatoryColumns = 23;
$firstRow = $rows[0] ?? [];
if (count($firstRow) < $mandatoryColumns) {
Notification::make()
->title('Invalid Excel Format')
->body('Few columns not found. Columns A to W are mandatory.')
->danger()
->persistent()
->send();
return;
}
foreach ($rows as $index => $row)
{
if ($index == 0) {
@@ -581,7 +598,7 @@ class InvoiceInTransitResource extends Resource
->color('warning')
->exporter(InvoiceInTransitExporter::class)
->visible(function () {
return Filament::auth()->user()->can('view export invoice master');
return Filament::auth()->user()->can('view export invoice in transit');
}),
]);
}

View File

@@ -26,7 +26,7 @@ class InvoiceMasterResource extends Resource
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
protected static ?string $navigationGroup = 'Invoice Transit';
protected static ?string $navigationGroup = 'Manufacturing SD';
public static function form(Form $form): Form
{

View File

@@ -30,7 +30,7 @@ class InvoiceOutValidationResource extends Resource
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
protected static ?string $navigationGroup = 'Invoice Management';
protected static ?string $navigationGroup = 'Manufacturing SD';
public static function form(Form $form): Form
{

View File

@@ -30,6 +30,8 @@ use Filament\Forms\Components\Select;
use App\Models\Line;
use Filament\Forms\Components\TextInput;
use App\Models\Item;
use App\Models\User;
// use App\Models\PalletValidation;
// use Dom\Text;
@@ -286,10 +288,16 @@ class ProcessOrderResource extends Resource
->disk('local')
->directory('uploads/temp')
->preserveFilenames()
->visible(function() {
return Filament::auth()->user()->can('view process order packing slip');
})
->reactive(),
Forms\Components\Actions::make([
Action::make('uploadNow')
->label('Upload PDF Now')
->visible(function() {
return Filament::auth()->user()->can('view process order packing slip');
})
->action(function ($get, callable $set) {
$uploadedFiles = $get('attachment');
@@ -377,6 +385,9 @@ class ProcessOrderResource extends Resource
Action::make('downloadAttachment')
->label('Download PDF')
->visible(function() {
return Filament::auth()->user()->can('view process order packing slip');
})
->action(function ($get) {
$equipmentNumber = $get('process_order');

View File

@@ -6,6 +6,7 @@ use App\Filament\Exports\ProductCharacteristicsMasterExporter;
use App\Filament\Imports\ProductCharacteristicsMasterImporter;
use App\Filament\Resources\ProductCharacteristicsMasterResource\Pages;
use App\Filament\Resources\ProductCharacteristicsMasterResource\RelationManagers;
use App\Models\Item;
use App\Models\Line;
use App\Models\Machine;
use App\Models\Plant;
@@ -22,6 +23,10 @@ use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;
use Filament\Tables\Actions\ImportAction;
use Filament\Tables\Actions\ExportAction;
use Filament\Forms\Components\DateTimePicker;
use Filament\Tables\Filters\Filter;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\TextInput;
class ProductCharacteristicsMasterResource extends Resource
{
@@ -232,47 +237,57 @@ class ProductCharacteristicsMasterResource extends Resource
}),
Tables\Columns\TextColumn::make('plant.name')
->label('Plant')
->searchable()
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('item.code')
->label('Item Code')
->alignCenter()
->searchable()
->sortable(),
Tables\Columns\TextColumn::make('line.name')
->label('Line')
->alignCenter()
->searchable()
->sortable(),
Tables\Columns\TextColumn::make('characteristics_type')
->label('Characteristics Type')
->alignCenter()
->searchable()
->sortable(),
Tables\Columns\TextColumn::make('workGroupMaster.name')
->label('Group Work Center')
->alignCenter()
->searchable()
->sortable(),
Tables\Columns\TextColumn::make('machine.work_center')
->label('Work Center')
->alignCenter()
->searchable()
->sortable(),
Tables\Columns\TextColumn::make('machine.work_center')
->label('Work Center')
->alignCenter()
->sortable(),
// Tables\Columns\TextColumn::make('machine.work_center')
// ->label('Work Center')
// ->alignCenter()
// ->sortable(),
Tables\Columns\TextColumn::make('inspection_type')
->label('Inspection Type')
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('upper')
->label('Upper')
->alignCenter()
->searchable()
->sortable(),
Tables\Columns\TextColumn::make('lower')
->label('Lower')
->alignCenter()
->searchable()
->sortable(),
Tables\Columns\TextColumn::make('middle')
->label('Middle')
->alignCenter()
->searchable()
->sortable(),
Tables\Columns\TextColumn::make('upper')
->label('Upper')
->alignCenter()
->searchable()
->sortable(),
Tables\Columns\TextColumn::make('created_at')
->label('Created At')
@@ -302,9 +317,203 @@ class ProductCharacteristicsMasterResource extends Resource
->sortable()
->toggleable(isToggledHiddenByDefault: true),
])
// ->filters([
// Tables\Filters\TrashedFilter::make(),
// ])
->filters([
Tables\Filters\TrashedFilter::make(),
Filter::make('advanced_filters')
->label('Advanced Filters')
->form([
Select::make('Plant')
->label('Select Plant')
->nullable()
->options(function (callable $get) {
$userHas = Filament::auth()->user()->plant_id;
return ($userHas && strlen($userHas) > 0) ? Plant::where('id', $userHas)->pluck('name', 'id')->toArray() : Plant::pluck('name', 'id')->toArray();
})
->reactive()
->afterStateUpdated(function ($state, callable $set, callable $get) {
$set('Item', null);
}),
Select::make('Line')
->label('Select Line')
->nullable()
->options(function (callable $get) {
$plantId = $get('Plant');
if(empty($plantId)) {
return [];
}
return Line::where('plant_id', $plantId)->pluck('name', 'id');
//return $plantId ? Item::where('plant_id', $plantId)->pluck('code', 'id') : [];
})
->reactive()
->afterStateUpdated(function ($state, callable $set, callable $get) {
$set('Item', null);
}),
Select::make('Item')
->label('Item Code')
->nullable()
->searchable()
->options(function (callable $get) {
$plantId = $get('Plant');
if(empty($plantId)) {
return [];
}
return Item::where('plant_id', $plantId)->pluck('code', 'id');
//return $plantId ? Item::where('plant_id', $plantId)->pluck('code', 'id') : [];
})
->reactive()
->afterStateUpdated(function ($state, callable $set, callable $get) {
$set('process_order', null);
}),
Select::make('work_group_master')
->label('Select Work Group Master')
->nullable()
->options(function (callable $get) {
$plantId = $get('Plant');
if(empty($plantId)) {
return [];
}
return WorkGroupMaster::where('plant_id', $plantId)->pluck('name', 'id');
//return $plantId ? Item::where('plant_id', $plantId)->pluck('code', 'id') : [];
})
->reactive()
->afterStateUpdated(function ($state, callable $set, callable $get) {
$set('Machine', null);
}),
Select::make('Machine')
->label('Select Machine')
->nullable()
->options(function (callable $get) {
$plantId = $get('Plant');
$lineId = $get('Line');
if(empty($plantId) || empty($lineId)) {
return [];
}
return Machine::where('plant_id', $plantId)->where('line_id', $lineId)->pluck('work_center', 'id');
//return $plantId ? Item::where('plant_id', $plantId)->pluck('code', 'id') : [];
})
->reactive(),
// ->afterStateUpdated(function ($state, callable $set, callable $get) {
// $set('process_order', null);
// }),
// TextInput::make('process_order')
// ->label('Process Order')
// ->placeholder('Enter Process Order'),
// TextInput::make('coil_number')
// ->label('Coil Number')
// ->placeholder(placeholder: 'Enter Coil Number'),
Select::make('characteristics_type')
->label('Characteristics Type')
->options([
'Product' => 'Product',
'Process' => 'Process'
]),
DateTimePicker::make(name: 'created_from')
->label('Created From')
->placeholder(placeholder: 'Select From DateTime')
->reactive()
->native(false),
DateTimePicker::make('created_to')
->label('Created To')
->placeholder(placeholder: 'Select To DateTime')
->reactive()
->native(false),
])
->query(function ($query, array $data) {
// Hide all records initially if no filters are applied
if (empty($data['Plant']) && empty($data['Line']) && empty($data['Item']) && empty($data['work_group_master']) && empty($data['Machine']) && empty($data['characteristics_type']) && empty($data['created_from']) && empty($data['created_to'])) {
return $query->whereRaw('1 = 0');
}
if (!empty($data['Plant'])) {
$query->where('plant_id', $data['Plant']);
}
if (!empty($data['Line'])) {
$query->where('line_id', $data['Line']);
}
if (!empty($data['Item'])) {
$query->where('item_id', $data['Item']);
}
if (!empty($data['work_group_master'])) {
$query->where('work_group_master_id', $data['work_group_master']);
}
if (!empty($data['Machine'])) {
$query->where('machine_id', $data['Machine']);
}
if (!empty($data['characteristics_type'])) {
$query->where('characteristics_type', $data['characteristics_type']);
}
if (!empty($data['created_from'])) {
$query->where('created_at', '>=', $data['created_from']);
}
if (!empty($data['created_to'])) {
$query->where('created_at', '<=', $data['created_to']);
}
//$query->orderBy('created_at', 'asc');
})
->indicateUsing(function (array $data) {
$indicators = [];
if (!empty($data['Plant'])) {
$indicators[] = 'Plant: ' . Plant::where('id', $data['Plant'])->value('name');
}
if (!empty($data['Line'])) {
$indicators[] = 'Line: ' . Line::where('id', $data['Line'])->value('name');
}
if (!empty($data['Item'])) {
$indicators[] = 'Item: ' . Item::where('id', $data['Item'])->value('code');
}
if (!empty($data['work_group_master'])) {
$indicators[] = 'Work Group Master: ' . WorkGroupMaster::where('id', $data['work_group_master'])->value('name');
}
if (!empty($data['Machine'])) {
$indicators[] = 'Machine: ' . Machine::where('id', $data['Machine'])->value('work_center');
}
if (!empty($data['characteristics_type'])) {
$indicators[] = 'Characteristics Type: ' . $data['characteristics_type'];
}
if (!empty($data['created_from'])) {
$indicators[] = 'From: ' . $data['created_from'];
}
if (!empty($data['created_to'])) {
$indicators[] = 'To: ' . $data['created_to'];
}
return $indicators;
})
])
->filtersFormMaxHeight('280px')
->actions([
Tables\Actions\ViewAction::make(),
Tables\Actions\EditAction::make(),

View File

@@ -0,0 +1,252 @@
<?php
namespace App\Filament\Resources;
use App\Filament\Resources\TestingTempResource\Pages;
use App\Filament\Resources\TestingTempResource\RelationManagers;
use App\Models\TestingTemp;
use Filament\Facades\Filament;
use Filament\Forms;
use Filament\Forms\Form;
use Filament\Resources\Resource;
use Filament\Tables;
use Filament\Tables\Table;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;
use Filament\Forms\Components\Actions\Action;
use Filament\Notifications\Notification;
use Storage;
use Livewire\Features\SupportFileUploads\TemporaryUploadedFile;
class TestingTempResource extends Resource
{
protected static ?string $model = TestingTemp::class;
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
public static function form(Form $form): Form
{
return $form
->schema([
Forms\Components\TextInput::make('name')
->label('File Name'),
Forms\Components\Select::make('selected_file')
->label('Select Uploaded File')
->options(function () {
return collect(Storage::disk('local')->files('uploads'))
->mapWithKeys(function ($file) {
return [
$file => basename($file), // value => label
];
})
->toArray();
})
->searchable()
->reactive(),
Forms\Components\FileUpload::make('attachment')
->label('Upload')
// ->acceptedFileTypes(['application/pdf'])
->storeFiles(false)
->disk('local')
->directory('uploads/temp')
->preserveFilenames()
->reactive(),
Forms\Components\Actions::make([
Action::make('uploadNow')
->label('File Upload')
->color('success')
->action(function ($get) {
$uploadedFiles = $get('attachment');
if (is_array($uploadedFiles) && count($uploadedFiles) > 0) {
$uploaded = reset($uploadedFiles);
if ($uploaded instanceof TemporaryUploadedFile) {
$baseName = $get('name');
$extension = $uploaded->getClientOriginalExtension();
$finalFileName = $baseName . '.' . $extension;
$uploaded->storeAs(
'uploads',
$finalFileName,
'local'
);
Notification::make()
->title("File uploaded successfully: {$finalFileName}")
->success()
->send();
}
} else {
Notification::make()
->title('No file selected to upload')
->warning()
->send();
}
}),
// Action::make('downloadAttachment')
// ->label('Download File')
// ->action(function ($get) {
// $fileName = basename($get('selected_file'));
// //dd($fileName);
// // if (!$fileName) {
// // Notification::make()
// // ->title('Enter file name to download')
// // ->danger()
// // ->send();
// // return;
// // }
// $files = Storage::disk('local')->files('uploads');
// foreach ($files as $file) {
// if (pathinfo($file, PATHINFO_FILENAME) === $fileName) {
// dd($fileName);
// Notification::make()
// ->title("File downloaded successfully")
// ->success()
// ->send();
// return response()->download(
// Storage::disk('local')->path($file)
// );
// }
// }
// // Notification::make()
// // ->title('File not found')
// // ->danger()
// // ->send();
// }),
Action::make('downloadAttachment')
->label('Download File')
->action(function ($get) {
$filePath = $get('selected_file'); // uploads/filename.pdf
if (!$filePath || !Storage::disk('local')->exists($filePath)) {
Notification::make()
->title('File not found')
->danger()
->send();
return;
}
Notification::make()
->title('File downloaded successfully')
->success()
->send();
return response()->download(
Storage::disk('local')->path($filePath)
);
}),
Action::make('deleteAttachment')
->label('Delete File')
->color('danger')
->requiresConfirmation()
->action(function ($get) {
$filePath = $get('selected_file'); // uploads/filename.pdf
if (!$filePath || !Storage::disk('local')->exists($filePath)) {
Notification::make()
->title('File not found')
->danger()
->send();
return;
}
Storage::disk('local')->delete($filePath);
Notification::make()
->title('File deleted successfully')
->success()
->send();
}),
]),
Forms\Components\Hidden::make('created_by')
->label('Created By')
->default(Filament::auth()->user()?->name),
Forms\Components\Hidden::make('updated_by')
->label('Updated By')
->default(Filament::auth()->user()?->name),
]);
}
public static function table(Table $table): Table
{
return $table
->columns([
Tables\Columns\TextColumn::make('id')
->label('ID')
->numeric()
->sortable(),
Tables\Columns\TextColumn::make('created_at')
->dateTime()
->sortable()
->toggleable(isToggledHiddenByDefault: true),
Tables\Columns\TextColumn::make('updated_at')
->dateTime()
->sortable()
->toggleable(isToggledHiddenByDefault: true),
Tables\Columns\TextColumn::make('deleted_at')
->dateTime()
->sortable()
->toggleable(isToggledHiddenByDefault: true),
])
->filters([
Tables\Filters\TrashedFilter::make(),
])
->actions([
Tables\Actions\ViewAction::make(),
Tables\Actions\EditAction::make(),
])
->bulkActions([
Tables\Actions\BulkActionGroup::make([
Tables\Actions\DeleteBulkAction::make(),
Tables\Actions\ForceDeleteBulkAction::make(),
Tables\Actions\RestoreBulkAction::make(),
]),
]);
}
public static function getRelations(): array
{
return [
//
];
}
public static function getPages(): array
{
return [
'index' => Pages\ListTestingTemps::route('/'),
'create' => Pages\CreateTestingTemp::route('/create'),
'view' => Pages\ViewTestingTemp::route('/{record}'),
'edit' => Pages\EditTestingTemp::route('/{record}/edit'),
];
}
public static function getEloquentQuery(): Builder
{
return parent::getEloquentQuery()
->withoutGlobalScopes([
SoftDeletingScope::class,
]);
}
}

View File

@@ -0,0 +1,12 @@
<?php
namespace App\Filament\Resources\TestingTempResource\Pages;
use App\Filament\Resources\TestingTempResource;
use Filament\Actions;
use Filament\Resources\Pages\CreateRecord;
class CreateTestingTemp extends CreateRecord
{
protected static string $resource = TestingTempResource::class;
}

View File

@@ -0,0 +1,22 @@
<?php
namespace App\Filament\Resources\TestingTempResource\Pages;
use App\Filament\Resources\TestingTempResource;
use Filament\Actions;
use Filament\Resources\Pages\EditRecord;
class EditTestingTemp extends EditRecord
{
protected static string $resource = TestingTempResource::class;
protected function getHeaderActions(): array
{
return [
Actions\ViewAction::make(),
Actions\DeleteAction::make(),
Actions\ForceDeleteAction::make(),
Actions\RestoreAction::make(),
];
}
}

View File

@@ -0,0 +1,19 @@
<?php
namespace App\Filament\Resources\TestingTempResource\Pages;
use App\Filament\Resources\TestingTempResource;
use Filament\Actions;
use Filament\Resources\Pages\ListRecords;
class ListTestingTemps extends ListRecords
{
protected static string $resource = TestingTempResource::class;
protected function getHeaderActions(): array
{
return [
Actions\CreateAction::make(),
];
}
}

View File

@@ -0,0 +1,19 @@
<?php
namespace App\Filament\Resources\TestingTempResource\Pages;
use App\Filament\Resources\TestingTempResource;
use Filament\Actions;
use Filament\Resources\Pages\ViewRecord;
class ViewTestingTemp extends ViewRecord
{
protected static string $resource = TestingTempResource::class;
protected function getHeaderActions(): array
{
return [
Actions\EditAction::make(),
];
}
}

View File

@@ -52,7 +52,9 @@ class InvoiceTransitMail extends Mailable
public function content(): Content
{
$greeting = 'Dear Sir/Madam,<br><br>We are sending here with list of pending sale invoices currently in transit.';
$greeting = '<b>Dear Service Provider</b>,<br><br>The following consignments to our branch warehouse are overdue beyond the agreed timeline.Immediate delivery is required today; Failure to complain will result to not able to fulfill customer requirements and leads to potential sales loss.Please treat this as the critical and confirm despatch without delay. <br><br><b> Dear C.R.I Branch Team,</b> <br><br> Please follow and ensure the same.';
//$greeting1 = 'Dear C.R.I Branch Team, <br><br> Please follow and ensure the same';
if (strtolower($this->scheduleType) == 'daily') {
@@ -71,12 +73,12 @@ class InvoiceTransitMail extends Mailable
$endDate = now();
$reportPeriod = "<br><br>"
. "Report Period: <b>{$startDate->format('d-m-Y')}</b> "
. "to <b>{$endDate->format('d-m-Y')}.</b>"
. "<br>Please arrange to receipt the same immediately.";
// $reportPeriod = "<br><br>"
// . "Report Period: <b>{$startDate->format('d-m-Y')}</b> "
// . "to <b>{$endDate->format('d-m-Y')}.</b>";
// . "<br>Please arrange to receipt the same immediately.";
$greeting .= $reportPeriod;
//$greeting .= $reportPeriod;
}
if ($this->scheduleType == 'Hourly') {

View File

@@ -13,6 +13,7 @@ class AlertMailRule extends Model
protected $fillable = [
'module',
'plant',
'invoice_master_id',
'rule_name',
'email',
'cc_emails',
@@ -23,8 +24,9 @@ class AlertMailRule extends Model
'updated_by',
];
// public function plant(): BelongsTo
// {
// return $this->belongsTo(Plant::class);
// }
public function invoiceMaster(): BelongsTo
{
return $this->belongsTo(InvoiceMaster::class);
//return $this->belongsTo(InvoiceMaster::class, 'invoice_master_id');
}
}

View File

@@ -0,0 +1,20 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class TestingTemp extends Model
{
use SoftDeletes;
protected $fillable = [
'name',
'created_at',
'updated_at',
'created_by',
'updated_by',
];
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\TestingTemp;
use App\Models\User;
class TestingTempPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any TestingTemp');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, TestingTemp $testingtemp): bool
{
return $user->checkPermissionTo('view TestingTemp');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create TestingTemp');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, TestingTemp $testingtemp): bool
{
return $user->checkPermissionTo('update TestingTemp');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, TestingTemp $testingtemp): bool
{
return $user->checkPermissionTo('delete TestingTemp');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any TestingTemp');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, TestingTemp $testingtemp): bool
{
return $user->checkPermissionTo('restore TestingTemp');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any TestingTemp');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, TestingTemp $testingtemp): bool
{
return $user->checkPermissionTo('replicate TestingTemp');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder TestingTemp');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, TestingTemp $testingtemp): bool
{
return $user->checkPermissionTo('force-delete TestingTemp');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any TestingTemp');
}
}

View File

@@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
$sql = <<<'SQL'
CREATE TABLE testing_temps (
id BIGINT GENERATED always AS IDENTITY PRIMARY KEY,
name TEXT DEFAULT NULL,
created_at TIMESTAMP NOT NULL DEFAULT NOW(),
updated_at TIMESTAMP NOT NULL DEFAULT NOW(),
created_by TEXT DEFAULT NULL,
updated_by TEXT DEFAULT NULL,
deleted_at TIMESTAMP
);
SQL;
DB::statement($sql);
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('testing_temps');
}
};

View File

@@ -171,5 +171,12 @@ class PermissionSeeder extends Seeder
Permission::updateOrCreate(['name' => 'view import sticker printing']);
Permission::updateOrCreate(['name' => 'view export sticker printing']);
Permission::updateOrCreate(['name' => 'view import invoice master']);
Permission::updateOrCreate(['name' => 'view export invoice master']);
Permission::updateOrCreate(['name' => 'view import invoice in transit']);
Permission::updateOrCreate(['name' => 'view export invoice in transit']);
}
}

View File

@@ -78,26 +78,27 @@
<thead>
<tr>
<th>No</th>
<th>Plant Code</th>
<th>Receiving Plant Code</th>
<th>Plant Name</th>
<th>Receiving Plant Name</th>
<th>Invoice Number</th>
<th>Transport Name</th>
<th>LR_BL_AW Date</th>
<th>LR Number</th>
<th>LR Date</th>
<th>Transit Days</th>
<th>Status</th>
<th>Pending Days</th>
</tr>
</thead>
<tbody>
@foreach ($tableData as $row)
<tr>
<td>{{ $row['no'] }}</td>
<td>{{ $row['plant'] }}</td>
<td>{{ $row['receiving_plant'] }}</td>
<td>{{ $row['plant'] }}</td>
<td>{{ $row['receiving_plant_name'] }}</td>
<td>{{ $row['invoice_number'] }}</td>
<td class="td-left">{{ $row['transport_name'] }}</td>
<td>{{ $row['lr_bl_aw_number'] }}</td>
<td>
@if(!empty($row['lr_bl_aw_date']) && $row['lr_bl_aw_date'] != '-')
{{ \Carbon\Carbon::parse($row['lr_bl_aw_date'])->format('d-M-Y') }}
@@ -105,6 +106,7 @@
-
@endif
</td>
{{-- <td>{{ $row['lr_bl_aw_date'] }}</td> --}}
<td>{{ $row['transit_days'] }}</td>
<td>{{ $row['status'] }}</td>