141 Commits

Author SHA1 Message Date
1709135963 Merge pull request 'ranjith-dev' (#784) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 21s
Reviewed-on: #784
2026-06-20 09:58:31 +00:00
dhanabalan
2e6129970c Added machine has many in model files
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Pint / pint (pull_request) Successful in 1m59s
Laravel Larastan / larastan (pull_request) Failing after 3m27s
2026-06-20 15:27:52 +05:30
dhanabalan
7e2098318e Added filter logic in machine page
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s
2026-06-20 15:26:09 +05:30
8d4c245090 Merge pull request 'Added filter logic in work group master page' (#783) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 23s
Reviewed-on: #783
2026-06-20 06:51:58 +00:00
dhanabalan
021cdfa9c2 Added filter logic in work group master page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 16s
Laravel Pint / pint (pull_request) Successful in 2m6s
Laravel Larastan / larastan (pull_request) Failing after 3m24s
2026-06-20 12:21:33 +05:30
0e3c9dcd2b Merge pull request 'declared property in panel box validation' (#782) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 27s
Reviewed-on: #782
2026-06-20 03:21:07 +00:00
dhanabalan
7e97eed775 declared property in panel box validation
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 17s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 21s
Laravel Pint / pint (pull_request) Successful in 1m55s
Laravel Larastan / larastan (pull_request) Failing after 3m33s
2026-06-20 08:50:38 +05:30
ea3cebe7f2 Merge pull request 'ranjith-dev' (#781) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 1m2s
Reviewed-on: #781
2026-06-19 12:06:08 +00:00
dhanabalan
68c43b69e9 Added SAP Invoice Importer Page with validation
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 16s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 19s
Laravel Pint / pint (pull_request) Successful in 1m54s
Laravel Larastan / larastan (pull_request) Failing after 4m6s
2026-06-19 17:34:47 +05:30
dhanabalan
d6395224ff Added category column on report view and export logic
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
2026-06-19 17:21:40 +05:30
5bc51fa35b Merge pull request 'Chnaged logic in import transit mail' (#780) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Reviewed-on: #780
2026-06-19 11:00:31 +00:00
dhanabalan
b069f3dbe7 Chnaged logic in import transit mail
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 17s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 18s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Larastan / larastan (pull_request) Failing after 40s
Laravel Pint / pint (pull_request) Successful in 1m52s
2026-06-19 16:30:14 +05:30
4bebf31600 Merge pull request 'ranjith-dev' (#779) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 28s
Reviewed-on: #779
2026-06-19 10:54:57 +00:00
dhanabalan
c307d5bc6a Added options in remark and i make text input for status
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 18s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 17s
Laravel Pint / pint (pull_request) Successful in 1m48s
Laravel Larastan / larastan (pull_request) Failing after 4m27s
2026-06-19 16:22:08 +05:30
dhanabalan
99cb1eb7a0 Updated warning label
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
2026-06-19 15:23:49 +05:30
3bdd7e0e73 Merge pull request 'Added na radio option in quality validation' (#778) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 30s
Reviewed-on: #778
2026-06-19 09:25:26 +00:00
dhanabalan
90876dda8d Added na radio option in quality validation
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 17s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 20s
Laravel Pint / pint (pull_request) Successful in 1m52s
Laravel Larastan / larastan (pull_request) Failing after 3m46s
2026-06-19 14:55:01 +05:30
b1b66b9aa8 Merge pull request 'Swapped column of remark and status column in import transit mail' (#777) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 41s
Reviewed-on: #777
2026-06-19 08:57:39 +00:00
dhanabalan
dc732016eb Swapped column of remark and status column in import transit mail
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 17s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 21s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 16s
Laravel Pint / pint (pull_request) Successful in 2m18s
Laravel Larastan / larastan (pull_request) Failing after 3m57s
2026-06-19 14:27:19 +05:30
64c5b87dee Merge pull request 'ranjith-dev' (#776) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 21s
Reviewed-on: #776
2026-06-18 15:50:01 +00:00
dhanabalan
16e4ce43bb Updated invoice_quantity value to trace scanned and pending quantity for the item code in livewire and blade file
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 20s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 19s
Laravel Pint / pint (pull_request) Successful in 2m48s
Laravel Larastan / larastan (pull_request) Failing after 3m58s
2026-06-18 21:18:53 +05:30
dhanabalan
f82c3fe390 Updated invoice_quantity value to trace scanned and pending quantity for the item code in create page
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
2026-06-18 21:17:06 +05:30
dhanabalan
8efd64545d Added invoice_quantity column in model
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 17s
2026-06-18 21:13:33 +05:30
dhanabalan
f0e218d279 Added invoice_quantity column in migration 2026-06-18 21:12:32 +05:30
9e13a120db Merge pull request 'changed logic in panel' (#775) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 24s
Reviewed-on: #775
2026-06-18 12:23:37 +00:00
dhanabalan
d756177bd9 changed logic in panel
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 36s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 25s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Pint / pint (pull_request) Successful in 1m47s
Laravel Larastan / larastan (pull_request) Failing after 3m12s
2026-06-18 17:53:14 +05:30
6169625b67 Merge pull request 'removed unwanted logic in panel box validation' (#774) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 25s
Reviewed-on: #774
2026-06-18 12:20:37 +00:00
dhanabalan
30ac265f71 removed unwanted logic in panel box validation
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 14s
Laravel Pint / pint (pull_request) Successful in 1m50s
Laravel Larastan / larastan (pull_request) Failing after 3m36s
2026-06-18 17:50:22 +05:30
fd73596c66 Merge pull request 'Chnaged schedule time of import transit mail' (#773) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 32s
Reviewed-on: #773
2026-06-18 12:14:15 +00:00
dhanabalan
9cf817e304 Chnaged schedule time of import transit mail
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 18s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 14s
Laravel Pint / pint (pull_request) Successful in 1m53s
Laravel Larastan / larastan (pull_request) Failing after 4m0s
2026-06-18 17:44:00 +05:30
9eeec6b3d2 Merge pull request 'Added logic in panel box' (#772) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 24s
Reviewed-on: #772
2026-06-18 11:45:16 +00:00
dhanabalan
b0f13d9b57 Added logic in panel box
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 18s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 14s
Laravel Pint / pint (pull_request) Successful in 1m47s
Laravel Larastan / larastan (pull_request) Failing after 3m15s
2026-06-18 17:15:01 +05:30
8385065c6c Merge pull request 'Issue solved in production characteristics' (#771) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 1m13s
Reviewed-on: #771
2026-06-18 11:17:06 +00:00
dhanabalan
8cb76196bc Issue solved in production characteristics
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 18s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 14s
Laravel Pint / pint (pull_request) Successful in 1m49s
Laravel Larastan / larastan (pull_request) Failing after 3m49s
2026-06-18 16:46:52 +05:30
abdfd362cc Merge pull request 'Solved issue in panel box validation' (#770) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 28s
Reviewed-on: #770
2026-06-18 10:59:39 +00:00
dhanabalan
c1f5d232ac Solved issue in panel box validation
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Pint / pint (pull_request) Successful in 1m43s
Laravel Larastan / larastan (pull_request) Failing after 3m29s
2026-06-18 16:29:26 +05:30
c07ad779a5 Merge pull request 'Added logic is in production characteristics page' (#769) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 23s
Reviewed-on: #769
2026-06-18 10:44:29 +00:00
dhanabalan
be4611d863 Added logic is in production characteristics page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 16s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 14s
Laravel Pint / pint (pull_request) Successful in 1m43s
Laravel Larastan / larastan (pull_request) Failing after 3m29s
2026-06-18 16:14:17 +05:30
aa2a8cc6e9 Merge pull request 'Added logic in panel check list livewire page' (#768) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 20s
Reviewed-on: #768
2026-06-18 10:30:29 +00:00
dhanabalan
4301b4b19a Added logic in panel check list livewire page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 19s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 13s
Laravel Larastan / larastan (pull_request) Failing after 33s
Laravel Pint / pint (pull_request) Successful in 3m29s
2026-06-18 16:00:13 +05:30
fb29da0bdd Merge pull request 'Added logic in guard patrol entry page' (#767) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 1m19s
Reviewed-on: #767
2026-06-18 09:30:30 +00:00
dhanabalan
82cfd81a8a Added logic in guard patrol entry page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 17s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 21s
Laravel Pint / pint (pull_request) Successful in 1m59s
Laravel Larastan / larastan (pull_request) Failing after 4m58s
2026-06-18 15:00:11 +05:30
fabda51ef7 Merge pull request 'Added created by column in check panel list' (#766) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 21s
Reviewed-on: #766
2026-06-18 07:08:24 +00:00
dhanabalan
687f4367c4 Added created by column in check panel list
Some checks failed
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 16s
Laravel Pint / pint (pull_request) Successful in 1m49s
Laravel Larastan / larastan (pull_request) Failing after 3m19s
2026-06-18 12:38:06 +05:30
9a54308441 Merge pull request 'ranjith-dev' (#765) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 18s
Reviewed-on: #765
2026-06-18 06:51:04 +00:00
dhanabalan
18cd1938a5 Added panel check list livewire file
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 17s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 20s
Laravel Pint / pint (pull_request) Successful in 3m23s
Laravel Larastan / larastan (pull_request) Failing after 3m44s
2026-06-18 12:20:23 +05:30
dhanabalan
66a35d2796 Added panel checklist wrapper blade file
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s
2026-06-18 12:18:36 +05:30
dhanabalan
3e8ab512d6 Added panel box validation policy file
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
2026-06-18 12:17:58 +05:30
dhanabalan
fde2208c85 Added panel box validation resource pages
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
2026-06-18 12:15:18 +05:30
dhanabalan
c99aea0d3a Added panel box validation model file
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
2026-06-18 12:13:23 +05:30
dhanabalan
f7e5144484 Added panel box validation migration file
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
2026-06-18 12:12:32 +05:30
d61bcf4f6d Merge pull request 'Added filter logic in line resource page' (#764) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 17s
Reviewed-on: #764
2026-06-18 03:12:38 +00:00
dhanabalan
58bfd4cbf8 Added filter logic in line resource page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 17s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 21s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 14s
Laravel Pint / pint (pull_request) Successful in 6m51s
Laravel Larastan / larastan (pull_request) Failing after 8m34s
2026-06-18 08:42:22 +05:30
bd722da07b Merge pull request 'Added logic to show only in time records in visiotr entries' (#763) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Reviewed-on: #763
2026-06-17 12:04:17 +00:00
dhanabalan
a5f1432bfd Added logic to show only in time records in visiotr entries
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 25s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 28s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 20s
Laravel Larastan / larastan (pull_request) Failing after 2m57s
Laravel Pint / pint (pull_request) Successful in 3m47s
2026-06-17 17:34:00 +05:30
20583ee55b Merge pull request 'Change import transit time for mail' (#762) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Reviewed-on: #762
2026-06-17 12:01:36 +00:00
dhanabalan
02db70c0bd Change import transit time for mail
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 18s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 20s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Pint / pint (pull_request) Successful in 2m23s
Laravel Larastan / larastan (pull_request) Failing after 4m3s
2026-06-17 17:31:20 +05:30
c81769aeae Merge pull request 'Added filter logic in import transit resource page' (#761) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 23s
Reviewed-on: #761
2026-06-17 07:31:41 +00:00
dhanabalan
1d6a914c04 Added filter logic in import transit resource page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 16s
Laravel Pint / pint (pull_request) Successful in 1m57s
Laravel Larastan / larastan (pull_request) Failing after 3m21s
2026-06-17 13:01:08 +05:30
841526e1cd Merge pull request 'Added mesage in import transit mail' (#760) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 25s
Reviewed-on: #760
2026-06-17 07:23:50 +00:00
dhanabalan
0e1d823581 Added mesage in import transit mail
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 18s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 16s
Laravel Pint / pint (pull_request) Successful in 2m3s
Laravel Larastan / larastan (pull_request) Failing after 3m21s
2026-06-17 12:53:32 +05:30
b39067d7f8 Merge pull request 'solved issue for shipped invoice date and eta date in import transit mail' (#759) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Reviewed-on: #759
2026-06-17 06:36:47 +00:00
dhanabalan
2a57b87bfa solved issue for shipped invoice date and eta date in import transit mail
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 10s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Larastan / larastan (pull_request) Failing after 1m20s
Laravel Pint / pint (pull_request) Failing after 1m19s
2026-06-17 12:06:29 +05:30
02990f1f5d Merge pull request 'Changed logic for eta date and etd date in import transit mail' (#758) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Reviewed-on: #758
2026-06-17 05:49:47 +00:00
dhanabalan
8d8e433ce9 Changed logic for eta date and etd date in import transit mail
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 16s
Laravel Larastan / larastan (pull_request) Failing after 1m35s
Laravel Pint / pint (pull_request) Failing after 1m33s
2026-06-17 11:19:20 +05:30
7f773c6b92 Merge pull request 'Added item description in characteristic approval mail template' (#757) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Reviewed-on: #757
2026-06-17 04:18:20 +00:00
dhanabalan
afcbadaee0 Added item description in characteristic approval mail template
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 19s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 18s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 21s
Laravel Larastan / larastan (pull_request) Failing after 1m37s
Laravel Pint / pint (pull_request) Failing after 1m35s
2026-06-17 09:47:51 +05:30
838a1bb731 Merge pull request 'issue solved in sub assembly code in testing panel readings' (#756) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 29s
Reviewed-on: #756
2026-06-15 09:02:43 +00:00
dhanabalan
e5cb8241eb issue solved in sub assembly code in testing panel readings
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 18s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 18s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Pint / pint (pull_request) Successful in 1m57s
Laravel Larastan / larastan (pull_request) Failing after 3m29s
2026-06-15 14:32:28 +05:30
ecfda1b739 Merge pull request 'Changed time of import transit mail report' (#755) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Failing after 20s
Reviewed-on: #755
2026-06-15 04:16:44 +00:00
dhanabalan
75836e3159 Changed time of import transit mail report
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Failing after 16s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Failing after 4s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 19s
Laravel Pint / pint (pull_request) Successful in 1m57s
Laravel Larastan / larastan (pull_request) Failing after 3m46s
2026-06-15 09:46:31 +05:30
e616a66278 Merge pull request 'Added mail logic for to and cc for quality validation' (#754) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 25s
Reviewed-on: #754
2026-06-15 03:54:08 +00:00
dhanabalan
bfb8fcde29 Added mail logic for to and cc for quality validation
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 1m22s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 48s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 2m2s
Laravel Pint / pint (pull_request) Successful in 2m21s
Laravel Larastan / larastan (pull_request) Failing after 4m5s
2026-06-15 09:23:53 +05:30
f99bc12603 Merge pull request 'Added logic to slect default ok button in checklist of quality' (#752) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 21s
Reviewed-on: #752
2026-06-13 11:30:24 +00:00
dhanabalan
2b3d423769 Added logic to slect default ok button in checklist of quality
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 16s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Pint / pint (pull_request) Successful in 1m55s
Laravel Larastan / larastan (pull_request) Failing after 3m23s
2026-06-13 17:00:09 +05:30
efd469e07d Merge pull request 'Updated PUMP SET model as PUMPSET on request approval' (#751) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 34s
Reviewed-on: #751
2026-06-13 09:45:20 +00:00
dhanabalan
e0ed67dfc0 Updated PUMP SET model as PUMPSET on request approval
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 15s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 18s
Laravel Pint / pint (pull_request) Successful in 2m23s
Laravel Larastan / larastan (pull_request) Failing after 4m21s
2026-06-13 15:14:43 +05:30
dd88bdca78 Merge pull request 'Removed unique rfq number in import transaction page' (#750) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 19s
Reviewed-on: #750
2026-06-13 07:10:13 +00:00
dhanabalan
efd5416ced Removed unique rfq number in import transaction page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Laravel Pint / pint (pull_request) Successful in 1m53s
Laravel Larastan / larastan (pull_request) Failing after 3m16s
2026-06-13 12:39:24 +05:30
229a69b82a Merge pull request 'Changed body message of import transit mail' (#749) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 22s
Reviewed-on: #749
2026-06-13 06:43:05 +00:00
dhanabalan
03df2f50dc Changed body message of import transit mail
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Pint / pint (pull_request) Successful in 2m3s
Laravel Larastan / larastan (pull_request) Failing after 3m37s
2026-06-13 12:12:47 +05:30
3d404d93ef Merge pull request 'Added sort of rfq number logic in import transit mail' (#748) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 22s
Reviewed-on: #748
2026-06-13 05:36:45 +00:00
dhanabalan
aaaa021597 Added sort of rfq number logic in import transit mail
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 18s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Pint / pint (pull_request) Successful in 2m29s
Laravel Larastan / larastan (pull_request) Failing after 4m3s
2026-06-13 11:06:25 +05:30
d1f170440c Merge pull request 'Changed report time for import transit mail' (#747) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 24s
Reviewed-on: #747
2026-06-13 05:27:05 +00:00
dhanabalan
78961a7436 Changed report time for import transit mail
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 23s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 29s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 19s
Laravel Pint / pint (pull_request) Successful in 2m12s
Laravel Larastan / larastan (pull_request) Failing after 3m54s
2026-06-13 10:56:52 +05:30
01bda8f736 Merge pull request 'Adjusted logic for mobile an dtab screen resolution for quality check' (#746) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Reviewed-on: #746
2026-06-13 05:25:01 +00:00
dhanabalan
f0bb74690f Adjusted logic for mobile an dtab screen resolution for quality check
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 18s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 17s
Laravel Pint / pint (pull_request) Successful in 1m56s
Laravel Larastan / larastan (pull_request) Failing after 3m39s
2026-06-13 10:54:41 +05:30
0b83b7cb22 Merge pull request 'Removed form box of ref number from import transit page' (#745) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 23s
Reviewed-on: #745
2026-06-13 04:32:28 +00:00
dhanabalan
88e00b2f8a Removed form box of ref number from import transit page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 18s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 14s
Laravel Pint / pint (pull_request) Successful in 2m5s
Laravel Larastan / larastan (pull_request) Failing after 3m24s
2026-06-13 10:02:13 +05:30
3bb3674d39 Merge pull request 'Added proper subject name for import transit mail' (#744) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 21s
Reviewed-on: #744
2026-06-13 03:27:05 +00:00
dhanabalan
ab79a2235a Added proper subject name for import transit mail
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 18s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 16s
Laravel Pint / pint (pull_request) Successful in 2m22s
Laravel Larastan / larastan (pull_request) Failing after 3m38s
2026-06-13 08:56:47 +05:30
f02598feeb Merge pull request 'Changed label name of ref number in import tranist page' (#743) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 22s
Reviewed-on: #743
2026-06-13 03:13:18 +00:00
dhanabalan
c17bc3be3a Changed label name of ref number in import tranist page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Pint / pint (pull_request) Successful in 1m55s
Laravel Larastan / larastan (pull_request) Failing after 3m34s
2026-06-13 08:43:04 +05:30
f84a579224 Merge pull request 'Changed font size for all column text values in import tranist mail' (#742) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 23s
Reviewed-on: #742
2026-06-13 03:06:28 +00:00
dhanabalan
4edac7987d Changed font size for all column text values in import tranist mail
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 16s
Laravel Pint / pint (pull_request) Successful in 2m4s
Laravel Larastan / larastan (pull_request) Failing after 3m34s
2026-06-13 08:35:37 +05:30
15241feae2 Merge pull request 'corrected spell mistake of searchable in import transit' (#741) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 23s
Reviewed-on: #741
2026-06-13 02:53:48 +00:00
dhanabalan
9cbeb5166f corrected spell mistake of searchable in import transit
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 18s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 14s
Laravel Pint / pint (pull_request) Successful in 2m19s
Laravel Larastan / larastan (pull_request) Failing after 3m58s
2026-06-13 08:23:35 +05:30
4915d12c7d Merge pull request 'Added searchable in import transit and change tto inv value as text input' (#740) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 24s
Reviewed-on: #740
2026-06-13 02:49:15 +00:00
dhanabalan
46f1ecd7be Added searchable in import transit and change tto inv value as text input
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 16s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 20s
Laravel Pint / pint (pull_request) Successful in 2m1s
Laravel Larastan / larastan (pull_request) Failing after 3m29s
2026-06-13 08:18:49 +05:30
44779683fd Merge pull request 'Added import transit excel attachment logic in mail' (#739) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 26s
Reviewed-on: #739
2026-06-12 03:50:24 +00:00
dhanabalan
05a3c9f7ac Added import transit excel attachment logic in mail
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 18s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 19s
Laravel Pint / pint (pull_request) Successful in 2m11s
Laravel Larastan / larastan (pull_request) Failing after 3m28s
2026-06-12 09:20:03 +05:30
82cb39feb5 Merge pull request 'Added import transit export excel file page' (#738) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 23s
Reviewed-on: #738
2026-06-11 04:13:47 +00:00
dhanabalan
3c5f9f7273 Added import transit export excel file page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 20s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 16s
Laravel Pint / pint (pull_request) Successful in 2m14s
Laravel Larastan / larastan (pull_request) Failing after 3m38s
2026-06-11 09:43:30 +05:30
9db03a4c56 Merge pull request 'added left alignment logic for all columns' (#737) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 26s
Reviewed-on: #737
2026-06-10 06:07:27 +00:00
dhanabalan
cef8415b2c added left alignment logic for all columns
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 17s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 19s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Pint / pint (pull_request) Successful in 12m36s
Laravel Larastan / larastan (pull_request) Failing after 14m26s
2026-06-10 11:37:10 +05:30
3140a1e88d Merge pull request 'changed logic by default loading of of data in table list of asrs' (#736) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Reviewed-on: #736
2026-06-10 03:53:20 +00:00
dhanabalan
7b71f07f39 changed logic by default loading of of data in table list of asrs
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 53s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 1m5s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 40s
Laravel Pint / pint (pull_request) Successful in 10m23s
Laravel Larastan / larastan (pull_request) Failing after 17m59s
2026-06-10 09:22:58 +05:30
58b2df8d94 Merge pull request 'Added body in import transit mail of mail' (#735) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Reviewed-on: #735
2026-06-09 08:58:20 +00:00
dhanabalan
4bade21e10 Added body in import transit mail of mail
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 17s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 14s
Laravel Pint / pint (pull_request) Successful in 5m52s
Laravel Larastan / larastan (pull_request) Failing after 15m48s
2026-06-09 14:28:06 +05:30
e9eb5539d3 Merge pull request 'Added logic for fetch against visitor names' (#734) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Reviewed-on: #734
2026-06-09 07:13:27 +00:00
dhanabalan
e103755a8b Added logic for fetch against visitor names
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 16s
Laravel Larastan / larastan (pull_request) Failing after 7m11s
Laravel Pint / pint (pull_request) Failing after 15m27s
2026-06-09 12:43:07 +05:30
aa403f00c0 Merge pull request 'ranjith-dev' (#733) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Reviewed-on: #733
2026-06-09 05:54:12 +00:00
dhanabalan
2ec549019e Added In and out logic in gate out entry page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 16s
Laravel Larastan / larastan (pull_request) Failing after 15m44s
Laravel Pint / pint (pull_request) Failing after 15m43s
2026-06-09 11:23:51 +05:30
dhanabalan
72274d6f47 solved issue in entering mobile number logic in visitor create page
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
2026-06-09 11:23:11 +05:30
dhanabalan
9d23f7f3e8 Added mode of travel in visitor resource page and only shows todays records
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
2026-06-09 11:22:27 +05:30
dhanabalan
e0ab003852 Added column in model file of visitor entry page
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
2026-06-09 11:19:56 +05:30
dhanabalan
769a034167 Added mode of travel column in visitor entry page
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
2026-06-09 11:18:50 +05:30
c5fe2379e7 Merge pull request 'Chnaged logic in create visitor entry page' (#732) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 17s
Reviewed-on: #732
2026-06-09 04:19:45 +00:00
dhanabalan
12490c0a23 Chnaged logic in create visitor entry page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 24s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 22s
Laravel Pint / pint (pull_request) Failing after 4m46s
Laravel Larastan / larastan (pull_request) Failing after 27m19s
2026-06-09 09:48:49 +05:30
03d620607d Merge pull request 'remove dfe columns and adjusted alignment in import transit mail' (#731) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Reviewed-on: #731
2026-06-08 13:19:11 +00:00
dhanabalan
461188788b remove dfe columns and adjusted alignment in import transit mail
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 16s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 14s
Laravel Pint / pint (pull_request) Successful in 7m14s
Laravel Larastan / larastan (pull_request) Failing after 8m53s
2026-06-08 18:48:56 +05:30
bfdaef7cec Merge pull request 'Added logic in part validation 1 for pipeline' (#730) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 23s
Reviewed-on: #730
2026-06-08 12:31:34 +00:00
dhanabalan
27fc3e2cbf Added logic in part validation 1 for pipeline
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 16s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Pint / pint (pull_request) Successful in 7m47s
Laravel Larastan / larastan (pull_request) Failing after 8m49s
2026-06-08 18:01:17 +05:30
bd15298ee8 Merge pull request 'Added logic to show plant names in visitor entry page' (#729) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s
Reviewed-on: #729
2026-06-08 11:15:20 +00:00
dhanabalan
24865267a2 Added logic to show plant names in visitor entry page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 17s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 20s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 14s
Laravel Larastan / larastan (pull_request) Failing after 4m16s
Laravel Pint / pint (pull_request) Failing after 4m23s
2026-06-08 16:45:03 +05:30
14ec323086 Merge pull request 'added three columns in import transit exporter' (#728) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 25s
Reviewed-on: #728
2026-06-08 08:49:26 +00:00
dhanabalan
be0a0cc78e added three columns in import transit exporter
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 18s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 14s
Laravel Pint / pint (pull_request) Successful in 8m9s
Laravel Larastan / larastan (pull_request) Failing after 8m56s
2026-06-08 14:19:09 +05:30
ab2211cf85 Merge pull request 'changed logic in visitor badge blade file' (#727) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Reviewed-on: #727
2026-06-08 06:34:04 +00:00
dhanabalan
9ce11ed5ff changed logic in visitor badge blade 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 14s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 28s
Laravel Pint / pint (pull_request) Successful in 8m28s
Laravel Larastan / larastan (pull_request) Failing after 8m57s
2026-06-08 12:03:49 +05:30
20de7e9b71 Merge pull request 'Added logic for gate out entry for out time' (#726) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Reviewed-on: #726
2026-06-08 05:27:49 +00:00
dhanabalan
f7bfc1373d Added logic for gate out entry for out time
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 15s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 34s
Laravel Pint / pint (pull_request) Successful in 13m14s
Laravel Larastan / larastan (pull_request) Failing after 15m42s
2026-06-08 10:56:35 +05:30
d935e5044d Merge pull request 'Added company and in table list in visitor resource page' (#725) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Reviewed-on: #725
2026-06-08 05:14:42 +00:00
dhanabalan
f00cc4c386 Added company and in table list in visitor resource page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 11s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 16s
Laravel Pint / pint (pull_request) Failing after 4m38s
Laravel Larastan / larastan (pull_request) Failing after 8m1s
2026-06-08 10:44:25 +05:30
deaeaa4754 Merge pull request 'Added charset in print panel in production order' (#724) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 41s
Reviewed-on: #724
2026-06-08 03:57:57 +00:00
dhanabalan
e59acd6458 Added charset in print panel in production order
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 31s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 23s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 17s
Laravel Larastan / larastan (pull_request) Failing after 8m5s
Laravel Pint / pint (pull_request) Successful in 4m48s
2026-06-08 09:27:39 +05:30
97aed0a4b1 Merge pull request 'added logic in print item of production order' (#723) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Reviewed-on: #723
2026-06-08 03:53:59 +00:00
dhanabalan
84634302b1 added logic in print item of production order
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 34s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 27s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 17s
Laravel Larastan / larastan (pull_request) Failing after 7m18s
Laravel Pint / pint (pull_request) Successful in 8m12s
2026-06-08 09:23:37 +05:30
acab42ee6b Merge pull request 'issue solved of showing 1/2 inch number in item description of producion order' (#722) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 50s
Reviewed-on: #722
2026-06-08 03:50:36 +00:00
dhanabalan
46e5a46121 issue solved of showing 1/2 inch number in item description of producion order
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 38s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 39s
Laravel Pint / pint (pull_request) Failing after 13s
Laravel Larastan / larastan (pull_request) Failing after 10m56s
2026-06-08 09:20:20 +05:30
16f1937e9c Merge pull request 'changed updated logic for import transit' (#721) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Reviewed-on: #721
2026-06-07 09:07:50 +00:00
dhanabalan
59e6bd7b10 changed updated logic for import transit
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Failing after 9m50s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 4m2s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 13m47s
Laravel Larastan / larastan (pull_request) Failing after 6m35s
Laravel Pint / pint (pull_request) Failing after 6m34s
2026-06-07 14:37:35 +05:30
54 changed files with 5218 additions and 1344 deletions

View File

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

View File

@@ -7,6 +7,8 @@ use App\Models\AlertMailRule;
use App\Models\ImportTransit;
use App\Models\Plant;
use Illuminate\Console\Command;
use Maatwebsite\Excel\Facades\Excel;
use App\Exports\ImportTransitReportExport;
class SendImportTransit extends Command
{
@@ -51,44 +53,14 @@ class SendImportTransit extends Command
return;
}
// $todayRecordExists = ImportTransit::whereDate('created_at', now()->toDateString())->first();
$tableData = ImportTransit::where('status', '!=', 'Delivered')->orderByRaw("
CASE
WHEN cri_rfq_number ~ '[0-9]+'
THEN CAST(regexp_replace(cri_rfq_number, '[^0-9]', '', 'g') AS INTEGER)
ELSE NULL
END NULLS LAST
")->get();
// if (!$todayRecordExists) {
// $this->info('No records created today. Mail not sent.');
// return;
// }
$tableData = ImportTransit::select([
'cri_rfq_number',
'mail_received_date',
'pricol_ref_number',
'requester',
'shipper',
'shipper_location',
'shipper_invoice',
'shipper_invoice_date',
'customs_agent_name',
'eta_date',
'status',
'delivery_location',
'etd_date',
'mode',
'inco_terms',
'port_of_loading',
'port_of_discharge',
'delivery_city',
'packages',
'type_of_package',
'gross_weight',
'volume',
'bill_number',
'bill_received_date',
'vessel_number',
'remark',
'is_transit_identified',
])
->where('status', '!=', 'Delivered')
->get();
if ($tableData->isEmpty()) {
$this->info('No pending Import Transit records found. Mail skipped.');
@@ -101,10 +73,19 @@ class SendImportTransit extends Command
$mailSubject = 'Daily Import Transit Report';
$fileName = 'reports/pending_import_shipment_' . now()->format('Ymd_His') . '.xlsx';
Excel::store(
new ImportTransitReportExport($tableData),
$fileName,
'local'
);
$mail = new ImportTransitMail(
$scheduleType,
$tableData,
$mailSubject
$mailSubject,
$fileName
);
$toEmails = collect(explode(',', $rule->email))

View File

@@ -0,0 +1,97 @@
<?php
namespace App\Exports;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\WithMapping;
use Maatwebsite\Excel\Concerns\WithEvents;
use PhpOffice\PhpSpreadsheet\Style\Fill;
use Illuminate\Support\Facades\Log;
use Maatwebsite\Excel\Events\AfterSheet;
class ImportTransitReportExport implements FromCollection, WithHeadings, WithMapping, WithEvents
{
protected $data;
public function __construct($data)
{
$this->data = $data;
}
public function headings(): array
{
return [
'No',
'CRI RFQ Number',
'Requestor',
'Shipper',
'Shipper Location',
'Shipper Invoice',
'Shipper Invoice Date',
'Custom Agent Name',
'ETA',
'Status',
'Delivery Location',
'ETD Date',
'Remark',
];
}
public function collection()
{
return collect($this->data);
}
public function map($row): array
{
static $srNo = 0;
$srNo++;
return [
$srNo,
$row->cri_rfq_number,
$row->requester,
$row->shipper,
$row->shipper_location,
$row->shipper_invoice,
$row->shipper_invoice_date,
$row->customs_agent_name,
$row->eta_date,
$row->status,
$row->delivery_location,
$row->etd_date,
$row->remark,
];
}
public function registerEvents(): array
{
return [
AfterSheet::class => function (AfterSheet $event) {
$rowNumber = 2; // Excel row starts after header
foreach ($this->data as $row) {
if ((int) $row->is_transit_identified == 1) {
$event->sheet
->getStyle("A{$rowNumber}:M{$rowNumber}")
->applyFromArray([
'fill' => [
'fillType' => Fill::FILL_SOLID,
'startColor' => [
'rgb' => 'FFFF00',
],
],
]);
}
$rowNumber++;
}
},
];
}
}

View File

@@ -36,12 +36,18 @@ class ImportTransitExporter extends Exporter
->label('SHIPPER INVOICE'),
ExportColumn::make('shipper_invoice_date')
->label('SHIPPER INVOICE DATE'),
ExportColumn::make('inv_value')
->label('Inv Value'),
ExportColumn::make('freight_charge')
->label('Freight Charge'),
ExportColumn::make('customs_agent_name')
->label('CUSTOMS AGENT NAME'),
ExportColumn::make('eta_date')
->label('ETA DATE'),
ExportColumn::make('status')
->label('STATUS'),
ExportColumn::make('insurance_status')
->label('Insurance Status'),
ExportColumn::make('delivery_location')
->label('DELIVERY LOCATION'),
ExportColumn::make('etd_date')

View File

@@ -28,8 +28,10 @@ class StickerMasterExporter extends Exporter
->label('PLANT CODE'),
ExportColumn::make('item.code')
->label('ITEM CODE'),
ExportColumn::make('item.category')
->label('CATEGORY'),
ExportColumn::make('item.description')
->label('ITEM DESCRIPTION'),
->label('DESCRIPTION'),
ExportColumn::make('item.uom')
->label('UNIT OF MEASURE'),
ExportColumn::make('serial_number_motor')

View File

@@ -75,7 +75,7 @@ class ImportTransitImporter extends Importer
->label('Status'),
ImportColumn::make('insurance_status')
->exampleHeader('Insurance Status')
->example('Receipted')
->example('Yes')
->label('Insurance Status'),
ImportColumn::make('delivery_location')
->exampleHeader('Delivery Location')
@@ -176,6 +176,7 @@ class ImportTransitImporter extends Importer
return ImportTransit::updateOrCreate([
'cri_rfq_number' => $criRfqNumber,
'shipper_invoice' => $shipperInvoice,
],
[
'mail_received_date' => $this->formatDate($mailRecDate),
@@ -187,7 +188,6 @@ class ImportTransitImporter extends Importer
'requester' => $requester,
'shipper' => $shipper,
'shipper_location' => $shipperLocation,
'shipper_invoice' => $shipperInvoice,
'inv_value' => $invValue,
'freight_charge' => $freightCharge,
'custom_agent_name' => $customsAgentname,

View File

@@ -359,7 +359,7 @@ class InvoiceValidationImporter extends Importer
$curPanelBoxSerialNumber = $record->panel_box_serial_number ?? null;
}
$warnMsg[] = 'Record Item ID : '.$record->sticker_master_id.' Master Item ID : '.$stickId;
$warnMsg[] = 'Invoice Record Item ID : '.$record->sticker_master_id.' Master Item ID : '.$stickId;
if ($record->invoice_number != $invoiceNumber) {
$stickId = null;
$warnMsg[] = 'Invoice number mismatch with existing record!';

View File

@@ -0,0 +1,308 @@
<?php
namespace App\Filament\Imports;
use App\Models\InvoiceValidation;
use App\Models\Item;
use App\Models\Plant;
use App\Models\StickerMaster;
use Carbon\Carbon;
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 SapInvoiceValidationImporter extends Importer
{
protected static ?string $model = InvoiceValidation::class;
public static function getColumns(): array
{
return [
ImportColumn::make('plant')
->requiredMapping()
->exampleHeader('PLANT CODE')
->example('2040')
->label('PLANT CODE')
->relationship(resolveUsing: 'code')
->rules(['required']),
ImportColumn::make('invoice_number')
->requiredMapping()
->exampleHeader('INVOICE NUMBER')
->example('INV000001')
->label('INVOICE NUMBER')
->rules(['required']),
ImportColumn::make('item_reference') // stickerMaster
->requiredMapping()
->exampleHeader('ITEM CODE')
->example('123456')
->label('ITEM CODE')
// ->relationship() // resolveUsing: 'items.code'
->rules(['required']),
ImportColumn::make('serial_number')
->requiredMapping()
->exampleHeader('SERIAL NUMBER')
->example('12345678901234')
->label('SERIAL NUMBER'),
ImportColumn::make('scanned_status_set')
->requiredMapping()
->exampleHeader('PUMPSET SCANNED STATUS')
->example('1')
->label('PUMPSET SCANNED STATUS'),
ImportColumn::make('created_at')
->requiredMapping()
->exampleHeader('CREATED AT')
->example('19-06-2026 15:00:00')
->label('CREATED AT')
->rules(['required']),
ImportColumn::make('operator_id')
->requiredMapping()
->exampleHeader('OPERATOR ID')
->example('USER00001')
->label('OPERATOR ID')
->rules(['required']),
];
}
public function resolveRecord(): ?InvoiceValidation
{
// return InvoiceValidation::firstOrNew([
// // Update existing records, matching them by `$this->data['column_name']`
// 'email' => $this->data['email'],
// ]);
$warnMsg = [];
$plantId = null;
$stickId = null;
$plantCod = $this->data['plant'];
$invoiceNumber = strtoupper(trim($this->data['invoice_number'])) ?? null;
$iCode = strtoupper(trim($this->data['item_reference'])) ?? null;
$serialNumber = trim($this->data['serial_number']) ?? null;
$curPumpSetQr = trim($this->data['scanned_status_set']) ?? null;
$curScanStatus = null;
$loadRate = 0;
$operatorId = trim($this->data['operator_id']);
$createdAt = $this->data['created_at'];
$createdBy = Filament::auth()->user()?->name;
$updatedBy = $createdBy;
$packCnt = 0;
$scanCnt = 0;
$hasPumpSetQr = null;
$hadPumpSetQr = null;
if ($plantCod == null || $plantCod == '') {
$warnMsg[] = "Plant code can't be empty!";
} elseif ($invoiceNumber == null || $invoiceNumber == '') {
$warnMsg[] = "Invoice number can't be empty!";
} elseif ($iCode == null || $iCode == '') {
$warnMsg[] = "Item code can't be empty!";
} elseif ($serialNumber == null || $serialNumber == '') {
$warnMsg[] = "Serial number can't be empty!";
} elseif ($curPumpSetQr != null && $curPumpSetQr != '' && $curPumpSetQr != '1' && $curPumpSetQr != 1) {
$warnMsg[] = 'PumpSet scanned status is invalid!';
} elseif ($operatorId == null || $operatorId == '') {
$warnMsg[] = "Operator ID can't be empty!";
} elseif ($createdAt == null || $createdAt == '') {
$warnMsg[] = "Created at timestamp can't be empty!";
}
if (Str::length($plantCod) > 0) {
if (Str::length($plantCod) < 4 || ! is_numeric($plantCod) || ! preg_match('/^[1-9]\d{3,}$/', $plantCod)) {
$warnMsg[] = 'Invalid plant code found!';
} elseif ($plantCod == '2040') { // 2040
$plant = Plant::where('code', $plantCod)->first();
if (! $plant) {
$warnMsg[] = 'Plant code not found!';
} else {
$plantId = $plant->id;
}
} else {
$warnMsg[] = "Unknown plant code '$plantCod' found!";
}
}
if (Str::length($invoiceNumber) > 0 && ! ctype_alnum($invoiceNumber)) {
$warnMsg[] = "Invalid invoice number '$invoiceNumber' found!";
} elseif (Str::length($iCode) > 0 && (Str::length($iCode) < 6 || ! ctype_alnum($iCode))) {
$warnMsg[] = "Invalid item code '$iCode' found!";
} elseif ($plantId) {
$itemCode = Item::where('code', $iCode)->first();
if (! $itemCode) {
$warnMsg[] = 'Item code not found in item master!';
} else {
$itemCode = Item::where('code', $iCode)->where('plant_id', $plantId)->first();
if (! $itemCode) {
$warnMsg[] = 'Item code not found in item master for the given plant!';
} else {
$itemId = $itemCode->id;
$itemCode = StickerMaster::where('item_id', $itemId)->first();
if (! $itemCode) {
$warnMsg[] = 'Item code not found in sticker master!';
} else {
if ($plantId) {
$itemCode = StickerMaster::where('item_id', $itemId)->where('plant_id', $plantId)->first();
if (! $itemCode) {
$warnMsg[] = 'Item code not found in sticker master for the given plant!';
} elseif ($itemCode->material_type != '' && $itemCode->material_type != null) {
$stickId = null;
$warnMsg[] = 'Material invoice item code found!';
} else {
$stickId = $itemCode->id;
$loadRate = $itemCode->load_rate ?? 0;
$invalidPackage = false;
$hasMotorQr = $itemCode->tube_sticker_motor ?? null;
$hasPumpQr = $itemCode->tube_sticker_pump ?? null;
$hasPumpSetQr = $itemCode->tube_sticker_pumpset ?? null;
$hasCapacitorQr = $itemCode->panel_box_code ?? null;
if (! $hasMotorQr && ! $hasPumpQr && ! $hasPumpSetQr) {// && ! $hasCapacitorQr
$hasMotorQr = $itemCode->pack_slip_motor ?? null;
$hasPumpQr = $itemCode->pack_slip_pump ?? null;
$hasPumpSetQr = $itemCode->pack_slip_pumpset ?? null;
} else {
if (! $hasPumpSetQr && ! $hasPumpQr) {
$hasPumpQr = $itemCode->pack_slip_pump ?? null;
}
$hasTubeMotorQr = $itemCode->tube_sticker_motor ?? null;
$hasPackMotorQr = $itemCode->pack_slip_motor ?? null;
$hasTubePumpSetQr = $itemCode->tube_sticker_pumpset ?? null;
$hasPackPumpSetQr = $itemCode->pack_slip_pumpset ?? null;
if ($hasTubeMotorQr != $hasPackMotorQr || $hasTubePumpSetQr != $hasPackPumpSetQr) {
$invalidPackage = true;
}
}
if ($hasMotorQr || $hasPumpQr || ! $hasPumpSetQr || $hasCapacitorQr || $invalidPackage) {
$stickId = null;
$warnMsg[] = "Item code doesn't have valid package type to proceed!";
} else {
$packCnt++;
}
}
}
}
}
}
}
if ($stickId) {
$record = InvoiceValidation::where('serial_number', $serialNumber)->where('plant_id', $plantId)->first();
if ($record) {
if ($record->sticker_master_id != $stickId) {
$stickId = null;
$warnMsg[] = 'Item code mismatch with existing record!';
} else {
$record = InvoiceValidation::where('serial_number', $serialNumber)->where('plant_id', $plantId)
->whereHas('stickerMasterRelation.item', function ($query) use ($plantId, $iCode) {
$query->where('plant_id', $plantId)->where('code', $iCode);
})
->first();
if ($record) {
$hadPumpSetQr = $record->scanned_status_set ?? null;
if ($hadPumpSetQr && $hasPumpSetQr) {
$curPumpSetQr = $hadPumpSetQr;
}
$warnMsg[] = 'Invoice Record Item ID : '.$record->sticker_master_id.' Master Item ID : '.$stickId;
if ($record->invoice_number != $invoiceNumber) {
$stickId = null;
$warnMsg[] = 'Invoice number mismatch with existing record!';
} elseif ($record->scanned_status == 'Scanned') {
$stickId = null;
return null;
} else {
if ($hasPumpSetQr) {
$scanCnt = $curPumpSetQr ? $scanCnt + 1 : $scanCnt;
$record->scanned_status_set = $curPumpSetQr;
if ($packCnt == $scanCnt) {
$record->scanned_status = 'Scanned';
}
$record->upload_status = 'Y';
$record->updated_by = $updatedBy;
$record->save();
return null;
}
}
}
}
}
}
if ($stickId) {
$formats = ['d-m-Y H:i', 'd-m-Y H:i:s']; // '07-05-2025 08:00' or '07-05-2025 08:00:00'
$cDateTime = null;
foreach ($formats as $format) {
try {
$cDateTime = Carbon::createFromFormat($format, $createdAt);
break;
} catch (\Exception $e) {
// $warnMsg[] = "Date format mismatch with format: $format";
}
}
if (! isset($cDateTime)) {
$warnMsg[] = "Invalid 'Created DateTime' format. Expected DD-MM-YYYY HH:MM:SS";
}
}
if (! empty($warnMsg)) {
throw new RowImportFailedException(implode(', ', $warnMsg));
}
if ($stickId) {
if ($hasPumpSetQr) {
$scanCnt = $curPumpSetQr ? $scanCnt + 1 : $scanCnt;
if ($packCnt == $scanCnt) {
$curScanStatus = 'Scanned';
} else {
$curScanStatus = null;
}
}
// $curScanStatus
InvoiceValidation::updateOrCreate([
'plant_id' => $plantId,
'sticker_master_id' => $stickId,
'serial_number' => $serialNumber,
],
[
'invoice_number' => $invoiceNumber,
'scanned_status_set' => $curPumpSetQr,
'scanned_status' => $curScanStatus,
'load_rate' => $loadRate,
'upload_status' => 'Y',
'operator_id' => $operatorId,
'created_by' => $createdBy,
'created_at' => $cDateTime->format('Y-m-d H:i:s'),
'updated_by' => $updatedBy,
]);
}
return null;
// return new InvoiceValidation;
}
public static function getCompletedNotificationBody(Import $import): string
{
$body = 'Your sap invoice validation 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

@@ -4,6 +4,7 @@ namespace App\Filament\Pages;
use App\Models\Plant;
use App\Models\VisitorEntry;
use Carbon\Carbon;
use Filament\Facades\Filament;
use Filament\Pages\Page;
use Filament\Forms\Contracts\HasForms;
@@ -37,38 +38,172 @@ class GateOutEntry extends Page implements HasForms
->schema([
Section::make('') // You can give your section a title or leave it blank
->schema([
TextInput::make('scan_out_gate_pass')
Select::make('scan_out_gate_pass')
->label('Scan Gate Pass')
->required()
->reactive()
->options([
'In' => 'In',
'Out' => 'Out',
]),
TextInput::make('scan_out_gate_pass_in')
->label('Scan In Gate Pass')
->required()
->reactive()
->visible(fn ($get) => $get('scan_out_gate_pass') == 'In')
->extraAttributes([
'wire:keydown.enter' => 'processGatePassIn($event.target.value)',
]),
TextInput::make('scan_out_gate_pass_out')
->label('Scan Out Gate Pass')
->required()
->reactive()
->visible(fn ($get) => $get('scan_out_gate_pass') == 'Out')
->extraAttributes([
'wire:keydown.enter' => 'processGatePass($event.target.value)',
'wire:keydown.enter' => 'processGatePassOut($event.target.value)',
]),
])
->columns(5)
]);
}
public function processGatePass($gatePass)
public function processGatePassIn($gatePass)
{
$entry = VisitorEntry::where('register_id', $gatePass)->first();
$entry = VisitorEntry::where('register_id', $gatePass)->latest()->first();
if ($entry) {
$entry->out_time = now();
$entry->save();
if ($entry)
{
if($entry->in_time && !$entry->out_time && (empty($entry->valid_upto) || $entry->valid_upto == '' || $entry->valid_upto == null)){
Notification::make()
->title('Already Entered')
->body('Gate pass In has already been processed for entry.')
->warning()
->send();
$this->filters['scan_out_gate_pass_in'] = '';
return;
}
elseif (
!empty($entry->valid_upto) &&
Carbon::parse($entry->valid_upto)->endOfDay()->gte(now())
){
if (empty($entry->out_time)) {
Notification::make()
->title('Gate In Not Allowed')
->body("Previous gate-out has not been punched. Please complete gate-out first for ID ' . $gatePass . '.")
->warning()
->send();
Notification::make()
->title('Gate Pass Processed')
->body('Gate pass has been successfully processed. Visitor marked as exited.')
->success()
->send();
$this->filters['scan_out_gate_pass'] = '';
} else {
$this->filters['scan_out_gate_pass_in'] = '';
return;
}
else{
$newEntry = $entry->replicate();
$newEntry->in_time = now();
$newEntry->out_time = null;
$newEntry->save();
Notification::make()
->title('Gate In')
->body('Gate in has been successfully processed. Visitor marked as entered.')
->success()
->send();
$this->filters['scan_out_gate_pass_in'] = '';
}
}
else{
Notification::make()
->title('Visitor Pass Expired')
->body('Your visitor pass validity has expired.')
->danger()
->send();
$this->filters['scan_out_gate_pass_in'] = '';
return;
}
}
else
{
Notification::make()
->title('Invalid Gate Pass')
->body('The scanned gate pass is not valid. Please try again.')
->body('Scanned gate in pass is not valid.')
->danger()
->send();
return;
}
}
public function processGatePassOut($gatePass)
{
$entry = VisitorEntry::where('register_id', $gatePass)->latest()->first();
if (!$entry) {
Notification::make()
->title('Invalid Gate Pass')
->body('Scanned gate out pass is not valid.')
->danger()
->send();
$this->filters['scan_out_gate_pass_out'] = '';
return;
}
if (empty($entry->valid_upto) || $entry->valid_upto == '' || $entry->valid_upto == null) {
if (!empty($entry->out_time)) {
Notification::make()
->title('Already Exited')
->body('Gate pass has already been processed.')
->warning()
->send();
$this->filters['scan_out_gate_pass_out'] = '';
return;
}
else
{
$entry->out_time = now();
$entry->save();
Notification::make()
->title('Gate Pass Processed')
->body('Visitor marked as exited.')
->success()
->send();
$this->filters['scan_out_gate_pass_out'] = '';
return;
}
}
elseif ((empty($entry->valid_upto) || $entry->valid_upto != '' || $entry->valid_upto != null))
{
if (Carbon::parse($entry->valid_upto)->endOfDay()->lt(now()))
{
Notification::make()
->title('Visitor Pass Expired')
->body('Your visitor pass validity has expired.')
->danger()
->send();
$this->filters['scan_out_gate_pass_out'] = '';
return;
}
if (!empty($entry->out_time)) {
Notification::make()
->title('Already Exited')
->body('Gate pass has already been processed.')
->warning()
->send();
$this->filters['scan_out_gate_pass_out'] = '';
return;
}
else{
$entry->out_time = now();
$entry->save();
Notification::make()
->title('Gate Out')
->body('Visitor marked as exited.')
->success()
->send();
$this->filters['scan_out_gate_pass_out'] = '';
}
}
}

View File

@@ -285,27 +285,27 @@ class AsrsItemValidationResource extends Resource
$status = $data['status'] ?? 'NotUpdated';
// Hide all records initially if no filters are applied
// if (empty($data['Plant']) && empty($data['item_code']) && empty($data['status']) && empty($data['created_from']) && empty($data['created_to'])) {
// // return $query->whereRaw('1 = 0');
// $query->where('status', 'NotUpdated');
// }
if (
empty($data['Plant']) &&
empty($data['item_code']) &&
empty($data['uom']) &&
empty($data['status']) &&
empty($data['created_from']) &&
empty($data['created_to'])
) {
if (empty($data['Plant']) && empty($data['item_code']) && empty($data['uom']) && empty($data['status']) && empty($data['created_from']) && empty($data['created_to'])) {
return $query->whereRaw('1 = 0');
// $query->where('status', 'NotUpdated');
$query->where(function ($q) {
$q->where('status', 'NotUpdated')
->orWhereNull('status')
->orWhere('status', '');
});
}
// if (
// empty($data['Plant']) &&
// empty($data['item_code']) &&
// empty($data['uom']) &&
// empty($data['status']) &&
// empty($data['created_from']) &&
// empty($data['created_to'])
// ) {
// // $query->where('status', 'NotUpdated');
// $query->where(function ($q) {
// $q->where('status', 'NotUpdated')
// ->orWhereNull('status')
// ->orWhere('status', '');
// });
// }
if (! empty($data['Plant'])) {
$query->where('plant_id', $data['Plant']);
}
@@ -387,11 +387,12 @@ class AsrsItemValidationResource extends Resource
Tables\Actions\ViewAction::make(),
Tables\Actions\EditAction::make(),
// ->hidden(function ($record): bool {
// if (auth()->user()?->hasRole('SuperAdmin')) {
// if (auth()->user()?->hasRole('Super Admin')) {
// return false;
// }
// return trim(strtolower($record->status)) == 'updated';
// else{
// return trim(($record->status)) == 'Updated';
// }
// }),
// ->visible(function ($record): bool {
// return auth()->user()?->hasRole('SuperAdmin')

View File

@@ -77,42 +77,48 @@ class GuardPatrolEntryResource extends Resource
])
->hint(fn ($get) => $get('gPePlantError') ? $get('gPePlantError') : null)
->hintColor('danger'),
Forms\Components\Select::make('guard_name_id')
// Forms\Components\Select::make('guard_name_id')
// ->label('Guard Name')
// // ->relationship('guardNames', 'name')
// ->options(function (callable $get) {
// $plantId = $get('plant_id');
// if (! $plantId) {
// return [];
// }
// return GuardName::where('plant_id', $plantId)
// ->pluck('name', 'id')
// ->toArray();
// })
// ->required()
// ->reactive()
// ->default(function () {
// return optional(GuardPatrolEntry::where('created_by', Filament::auth()->user()?->name)->latest()->first())->guard_name_id;
// })
// ->disabled(fn (Get $get) => ! empty($get('id')))
// ->afterStateUpdated(function ($state, callable $set, callable $get) {
// $guardName = $get('guard_name_id');
// if (! $guardName) {
// $set('gPeGuardNameError', 'Please select a guard name first.');
// return;
// } else {
// $set('patrol_time', now()->format('Y-m-d H:i:s'));
// $set('updated_by', Filament::auth()->user()?->name);
// $set('gPeGuardNameError', null);
// }
// })
// ->extraAttributes(fn ($get) => [
// 'class' => $get('gPeGuardNameError') ? 'border-red-500' : '',
// ])
// ->hint(fn ($get) => $get('gPeGuardNameError') ? $get('gPeGuardNameError') : null)
// ->hintColor('danger'),
Forms\Components\TextInput::make('guard_name')
->label('Guard Name')
// ->relationship('guardNames', 'name')
->options(function (callable $get) {
$plantId = $get('plant_id');
if (! $plantId) {
return [];
}
->default(fn () => Filament::auth()->user()?->name)
->readOnly()
->dehydrated(),
return GuardName::where('plant_id', $plantId)
->pluck('name', 'id')
->toArray();
})
->required()
->reactive()
->default(function () {
return optional(GuardPatrolEntry::where('created_by', Filament::auth()->user()?->name)->latest()->first())->guard_name_id;
})
->disabled(fn (Get $get) => ! empty($get('id')))
->afterStateUpdated(function ($state, callable $set, callable $get) {
$guardName = $get('guard_name_id');
if (! $guardName) {
$set('gPeGuardNameError', 'Please select a guard name first.');
return;
} else {
$set('patrol_time', now()->format('Y-m-d H:i:s'));
$set('updated_by', Filament::auth()->user()?->name);
$set('gPeGuardNameError', null);
}
})
->extraAttributes(fn ($get) => [
'class' => $get('gPeGuardNameError') ? 'border-red-500' : '',
])
->hint(fn ($get) => $get('gPeGuardNameError') ? $get('gPeGuardNameError') : null)
->hintColor('danger'),
Forms\Components\Hidden::make('check_point_name')// TextInput
->label('Check Point Name')
->reactive()
@@ -123,50 +129,88 @@ class GuardPatrolEntryResource extends Resource
->extraAttributes([
'x-on:keydown.enter.prevent' => '$wire.processCheckPointName()',
]),
Forms\Components\Select::make('check_point_name_id')
->label('Check Point Name')
// ->relationship('checkPointNames', 'name')
->options(function (callable $get) {
$plantId = $get('plant_id');
if (! $plantId) {
return [];
}
// Forms\Components\Select::make('check_point_name_id')
// ->label('Check Point Name')
// // ->relationship('checkPointNames', 'name')
// ->options(function (callable $get) {
// $plantId = $get('plant_id');
// if (! $plantId) {
// return [];
// }
return CheckPointName::where('plant_id', $plantId)
->pluck('name', 'id')
->toArray();
})
// return CheckPointName::where('plant_id', $plantId)
// ->pluck('name', 'id')
// ->toArray();
// })
// ->required()
// ->reactive()
// // ->default(function () {
// // return optional(GuardPatrolEntry::where('created_by', Filament::auth()->user()?->name)->latest()->first())->check_point_name_id;
// // })
// ->disabled(fn (Get $get) => ! empty($get('id')))
// ->afterStateUpdated(function ($state, callable $set, callable $get) {
// $checkPointName = $get('check_point_name_id');
// if (! $checkPointName) {
// $set('check_point_name_id', null);
// $set('gPeCheckPointNameError', 'Please select a check point name first.');
// return;
// } else {
// $set('patrol_time', now()->format('Y-m-d H:i:s'));
// $set('updated_by', Filament::auth()->user()?->name);
// $set('gPeCheckPointNameError', null);
// }
// })
// ->extraAttributes(fn ($get) => [
// 'class' => $get('gPeCheckPointNameError') ? 'border-red-500' : '',
// ])
// ->hint(fn ($get) => $get('gPeCheckPointNameError') ? $get('gPeCheckPointNameError') : null)
// ->hintColor('danger')
// ->rule(function (callable $get) {
// return Rule::unique('guard_patrol_entries', 'check_point_name_id')
// ->where('guard_name_id', $get('guard_name_id'))
// ->where('patrol_time', now())
// ->where('plant_id', $get('plant_id'))
// ->ignore($get('id'));
// }),
Forms\Components\Hidden::make('check_point_name_id')
->dehydrated(true),
Forms\Components\TextInput::make('check_point_name')
->label('Check Point Name')
->required()
->reactive()
// ->default(function () {
// return optional(GuardPatrolEntry::where('created_by', Filament::auth()->user()?->name)->latest()->first())->check_point_name_id;
// })
->disabled(fn (Get $get) => ! empty($get('id')))
->afterStateUpdated(function ($state, callable $set, callable $get) {
$checkPointName = $get('check_point_name_id');
if (! $checkPointName) {
if (blank($state)) {
$set('check_point_name_id', null);
$set('gPeCheckPointNameError', 'Please select a check point name first.');
$set('gPeCheckPointNameError', 'Please enter a check point name.');
return;
} else {
$set('patrol_time', now()->format('Y-m-d H:i:s'));
$set('updated_by', Filament::auth()->user()?->name);
$set('gPeCheckPointNameError', null);
}
$checkPoint = CheckPointName::where('plant_id', $get('plant_id'))
->whereRaw('LOWER(name) = ?', [strtolower(trim($state))])
->first();
if (! $checkPoint) {
$set('check_point_name_id', null);
$set('gPeCheckPointNameError', 'Invalid check point name.');
return;
}
$set('check_point_name_id', $checkPoint->id);
$set('patrol_time', now()->format('Y-m-d H:i:s'));
$set('updated_by', Filament::auth()->user()?->name);
$set('gPeCheckPointNameError', null);
})
->extraAttributes(fn ($get) => [
'class' => $get('gPeCheckPointNameError') ? 'border-red-500' : '',
])
->hint(fn ($get) => $get('gPeCheckPointNameError') ? $get('gPeCheckPointNameError') : null)
->hintColor('danger')
->rule(function (callable $get) {
return Rule::unique('guard_patrol_entries', 'check_point_name_id')
->where('guard_name_id', $get('guard_name_id'))
->where('patrol_time', now())
->where('plant_id', $get('plant_id'))
->ignore($get('id'));
}),
->hint(fn ($get) => $get('gPeCheckPointNameError'))
->hintColor('danger'),
Forms\Components\TextInput::make('reader_code')
->label('Reader Code')
->hidden(fn (Get $get) => ! $get('id'))

View File

@@ -3,6 +3,10 @@
namespace App\Filament\Resources\GuardPatrolEntryResource\Pages;
use App\Filament\Resources\GuardPatrolEntryResource;
use App\Models\CheckPointName;
use App\Models\CheckPointTime;
use App\Models\GuardName;
use App\Models\GuardPatrolEntry;
use Filament\Actions;
use Filament\Facades\Filament;
use Filament\Notifications\Notification;
@@ -29,6 +33,100 @@ class CreateGuardPatrolEntry extends CreateRecord
// public ?array $data = null;
protected function mutateFormDataBeforeCreate(array $data): array
{
$guardId = GuardName::where(
'name',
Filament::auth()->user()?->name
)->value('id');
if (! $guardId) {
Notification::make()
->title('Guard Name Not Matched')
->body('Logged-in user name was not found in Guard Name Master.')
->danger()
->send();
$this->halt();
}
$data['guard_name_id'] = $guardId;
$checkPoint = CheckPointName::where('plant_id', $data['plant_id'])
->where('name', trim($data['check_point_name']))
->value('id');
if (! $checkPoint) {
Notification::make()
->title('Invalid Check Point')
->body('The entered check point name does not exist.')
->danger()
->send();
$this->halt();
}
// $lastScan = GuardPatrolEntry::where('plant_id', $data['plant_id'])
// ->where('guard_name_id', $guardId)
// ->latest('id')
// ->first();
// if ($lastScan) {
// $previousPoint = $lastScan->check_point_name_id;
// $route = CheckPointTime::where('plant_id', $data['plant_id'])
// ->where('check_point1_id', $previousPoint)
// ->where('check_point2_id', $checkPoint->id)
// ->first();
// if (! $route) {
// Notification::make()
// ->title('Wrong Check Point Order')
// ->body('This checkpoint is not the next allowed point.')
// ->danger()
// ->send();
// $this->halt();
// }
// } else {
// // First scan must start from sequence 1
// $firstRoute = CheckPointTime::where('plant_id', $data['plant_id'])
// ->where('check_point2_id', $checkPoint->id)
// ->where('sequence_number', 1)
// ->first();
// if (! $firstRoute) {
// Notification::make()
// ->title('Invalid Starting Point')
// ->body('Patrol must start from the first checkpoint.')
// ->danger()
// ->send();
// $this->halt();
// }
// }
$data['check_point_name_id'] = $checkPoint;
unset($data['check_point_name']);
return $data;
}
public function processCheckPointName()
{

View File

@@ -24,6 +24,10 @@ use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Storage;
use Maatwebsite\Excel\Facades\Excel;
use Filament\Tables\Actions\ImportAction;
use Filament\Forms\Components\DateTimePicker;
use Filament\Forms\Components\Select;
use Filament\Tables\Filters\Filter;
use Filament\Forms\Components\TextInput;
// use PhpOffice\PhpSpreadsheet\IOFactory;
class ImportTransitResource extends Resource
@@ -40,16 +44,16 @@ class ImportTransitResource extends Resource
->schema([
Forms\Components\TextInput::make('cri_rfq_number')
->label('CRI/RFQ Number')
->disabled(fn ($operation) => $operation == 'edit')
->unique(ignoreRecord: true),
->required()
->disabled(fn ($operation) => $operation == 'edit'),
Forms\Components\DatePicker::make('mail_received_date')
->label('Mail Received Date')
->required(),
Forms\Components\TextInput::make('pricol_ref_number')
->label('Pricol Ref Number')
->afterStateUpdated(function (callable $set) {
$set('updated_by', Filament::auth()->user()?->name);
}),
// Forms\Components\TextInput::make('pricol_ref_number')
// ->label('Ref Number')
// ->afterStateUpdated(function (callable $set) {
// $set('updated_by', Filament::auth()->user()?->name);
// }),
Forms\Components\TextInput::make('requester')
->label('Requester')
->afterStateUpdated(function (callable $set) {
@@ -75,7 +79,7 @@ class ImportTransitResource extends Resource
->afterStateUpdated(function (callable $set) {
$set('updated_by', Filament::auth()->user()?->name);
}),
Forms\Components\DatePicker::make('inv_value')
Forms\Components\TextInput::make('inv_value')
->label('Inv Value')
->afterStateUpdated(function (callable $set) {
$set('updated_by', Filament::auth()->user()?->name);
@@ -95,16 +99,8 @@ class ImportTransitResource extends Resource
->afterStateUpdated(function (callable $set) {
$set('updated_by', Filament::auth()->user()?->name);
}),
Forms\Components\Select::make('status')
Forms\Components\TextInput::make('status')
->label('Status')
->options([
'Under Service Provider Finalization' => 'Under Service Provider Finalization',
'Yet to pick up' => 'Yet to pick up',
'Awaiting Vessel Loading' => 'Awaiting Vessel Loading',
'In Transit' => 'In Transit',
'Under Import Customs Clearance in Destination' => 'Under Import Customs Clearance in Destination',
'Delivered' => 'Delivered',
])
->reactive()
->afterStateUpdated(function (callable $set) {
$set('updated_by', Filament::auth()->user()?->name);
@@ -184,8 +180,17 @@ class ImportTransitResource extends Resource
->afterStateUpdated(function (callable $set) {
$set('updated_by', Filament::auth()->user()?->name);
}),
Forms\Components\TextInput::make('remark')
Forms\Components\Select::make('remark')
->label('Remark')
->options([
'Under Service Provider Finalization' => 'Under Service Provider Finalization',
'Yet to pick up' => 'Yet to pick up',
'Awaiting Vessel Loading' => 'Awaiting Vessel Loading',
'In Transit' => 'In Transit',
'Under Import Customs Clearance in Destination' => 'Under Import Customs Clearance in Destination',
'Delivered' => 'Delivered',
])
->reactive()
->afterStateUpdated(function (callable $set) {
$set('updated_by', Filament::auth()->user()?->name);
}),
@@ -220,128 +225,158 @@ class ImportTransitResource extends Resource
}),
Tables\Columns\TextColumn::make('cri_rfq_number')
->label('CRI/RFQ Number')
->searchable()
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('mail_received_date')
->label('Mail Received Date')
->searchable()
->date()
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('pricol_ref_number')
->label('Pricol Ref Number')
->label('Ref Number')
->searchable()
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('requester')
->label('Requester')
->searchable()
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('shipper')
->label('Shipper')
->searchable()
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('shipper_location')
->label('Shipper Location')
->searchable()
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('shipper_invoice')
->label('Shipper Invoice')
->searchable()
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('shipper_invoice_date')
->label('Shipper Invoice Date')
->searchable()
->date()
->formatStateUsing(fn ($state) => $state?->format('Y-m-d'))
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('inv_value')
->label('Inv Value')
->searchable()
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('freight_charge')
->label('Freight Charge')
->searchable()
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('customs_agent_name')
->label('Customs Agent Name')
->searchable()
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('eta_date')
->label('ETA Date')
->searchable()
->date()
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('status')
->label('Status')
->searchable()
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('insurance_status')
->label('Insurance Status')
->searchable()
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('delivery_location')
->label('Delivery Location')
->searchable()
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('etd_date')
->label('ETD Date')
->searchable()
->date()
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('mode')
->label('Mode')
->searchable()
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('inco_terms')
->label('Inco Terms')
->searchable()
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('port_of_loading')
->label('Port of Loading')
->searchable()
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('port_of_discharge')
->label('Port of Discharge')
->searchable()
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('delivery_city')
->label('Delivery City')
->searchable()
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('packages')
->label('Packages')
->searchable()
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('type_of_package')
->label('Type of Package')
->searchable()
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('gross_weight')
->label('Gross Weight')
->searchable()
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('volume')
->label('Volume')
->searchable()
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('bill_number')
->label('Bill Number')
->searchable()
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('bill_received_date')
->label('Bill Received Date')
->searchable()
->alignCenter()
->date()
->sortable(),
Tables\Columns\TextColumn::make('vessel_number')
->label('Vessel Number')
->searchable()
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('remark')
->label('Remark')
->searchable()
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('is_transit_identified')
->label('Is Transit Identified')
->searchable()
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('created_at')
@@ -372,7 +407,100 @@ class ImportTransitResource extends Resource
])
->filters([
Tables\Filters\TrashedFilter::make(),
Filter::make('advanced_filters')
->label('Advanced Filters')
->form([
TextInput::make('cri_rfq_number')
->label('CRI RFQ Number')
->reactive()
->placeholder('Enter Rfq Number')
->afterStateUpdated(function ($state, callable $set, callable $get): void {
$set('created_from', null);
$set('created_to', null);
}),
TextInput::make('status')
->label('Status')
->reactive()
->placeholder('Enter Status')
->afterStateUpdated(function ($state, callable $set, callable $get): void {
$set('created_from', null);
$set('created_to', null);
}),
Select::make('is_transit_identified')
->label('Is Transit Identified')
->reactive()
->options([
0 => 0,
1 => 1,
])
->afterStateUpdated(function ($state, callable $set, callable $get): void {
$set('created_from', null);
$set('created_to', null);
}),
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['cri_rfq_number']) && empty($data['status']) && ! isset($data['is_transit_identified']) && empty($data['created_from']) && empty($data['created_to'])) {
return $query;
}
if (! empty($data['cri_rfq_number'])) {
$query->where('cri_rfq_number', 'like', '%'.$data['cri_rfq_number'].'%');
}
if (! empty($data['status'])) {
$query->where('status', 'like', '%'.$data['status'].'%');
}
if (isset($data['is_transit_identified'])) {
$query->where('is_transit_identified', $data['is_transit_identified']);
}
if (! empty($data['created_from'])) {
$query->where('created_at', '>=', $data['created_from']);
}
if (! empty($data['created_to'])) {
$query->where('created_at', '<=', $data['created_to']);
}
})
->indicateUsing(function (array $data) {
$indicators = [];
if (! empty($data['cri_rfq_number'])) {
$indicators[] = 'CRI Rfq Number: '.$data['cri_rfq_number'];
}
if (! empty($data['status'])) {
$indicators[] = 'Status: '.$data['status'];
}
if (isset($data['is_transit_identified'])) {
$indicators[] = 'Is Transit Identified: '.$data['is_transit_identified'];
}
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(),

File diff suppressed because it is too large Load Diff

View File

@@ -611,6 +611,7 @@ class CreateInvoiceValidation extends CreateRecord
'sticker_master_id' => $sticker->id,
'plant_id' => $plantId,
'invoice_number' => $invoiceNumber,
'invoice_quantity' => 1,
'quantity' => 1,
'operator_id' => $operatorName,
'created_by' => $operatorName,
@@ -653,6 +654,7 @@ class CreateInvoiceValidation extends CreateRecord
'sticker_master_id' => $sticker->id,
'plant_id' => $plantId,
'invoice_number' => $invoiceNumber,
'invoice_quantity' => $bundleQty,
'quantity' => $bundleQty,
'operator_id' => $operatorName,
'created_by' => $operatorName,
@@ -697,11 +699,13 @@ class CreateInvoiceValidation extends CreateRecord
// 8 = 3 + 5 // 8 = 5 + 3 // 8 = 0 + 8 // 8 = 8 + 0
// 8 = 3 + 5 // 8 = 5 + 3 // 8 = 0 + 8 // 8 = 8 + 0
// 0 = 0 + 0
// 4 = 1.5 + 2.5
$existQty = $existEmpQty + $existComQty;
// 8 <= 11 // 8 <= 8 // 8 <= 11 // 8 <= 9
// 8 <= 7 // 8 <= 7 // 8 <= 7 // 8 <= 7
// 0 <= 5
// 4 <= 2
if ($existQty <= $totalExcelQty) {
// 6 = 11 - 5 // 5 = 8 - 3 // 3 = 11 - 8 // 9 = 9 - 0
@@ -723,29 +727,46 @@ class CreateInvoiceValidation extends CreateRecord
'updated_by' => $operatorName,
'updated_at' => now(),
]);
InvoiceValidation::where('invoice_number', $invoiceNumber)->where('plant_id', $plantId)->where('sticker_master_id', $sticker->id)
->update([
'invoice_quantity' => $totalExcelQty,
]);
$newQuan--;
$inserted++;
} elseif ($newInsQty > 0) { // if ($sticker) // create
InvoiceValidation::where('invoice_number', $invoiceNumber)->where('plant_id', $plantId)->where('sticker_master_id', $sticker->id)
->update([
'invoice_quantity' => $totalExcelQty,
]);
InvoiceValidation::create([
'sticker_master_id' => $sticker->id,
'plant_id' => $plantId,
'invoice_number' => $invoiceNumber,
'invoice_quantity' => $totalExcelQty,
'quantity' => $newInsQty,
'operator_id' => $operatorName,
'created_by' => $operatorName,
'updated_by' => $operatorName,
]);
$inserted++;
}
}
// 8 > 7 // 8 > 7 // 8 > 7 // 8 > 7
// 4 > 2
else {
// 2 = 7 - 5 // 4 = 7 - 3 // -1 = 7 - 8 // 7 = 7 - 0
// -0.5 = 2 - 2.5 //
$newInsQty = $totalExcelQty - $existComQty;
// 3 > 0 // 5 > 0 // 0 > 0 // 8 > 0
if ($existEmpQty > 0) { // update
// 1.5 > 0 //
if ($newInsQty > 0 && $existEmpQty > 0) { // update
// 3 = 2 // 5 = 4 // 0 = -1 // 8 = 7
// 1.5 == -0.5 //
if ($existEmpQty == $newInsQty) {
continue;
}
@@ -756,6 +777,12 @@ class CreateInvoiceValidation extends CreateRecord
'updated_by' => $operatorName,
'updated_at' => now(),
]);
InvoiceValidation::where('invoice_number', $invoiceNumber)->where('plant_id', $plantId)->where('sticker_master_id', $sticker->id)
->update([
'invoice_quantity' => $totalExcelQty,
]);
$newQuan--;
$inserted++;
} elseif ($newInsQty > 0) { // create
@@ -763,11 +790,18 @@ class CreateInvoiceValidation extends CreateRecord
'sticker_master_id' => $sticker->id,
'plant_id' => $plantId,
'invoice_number' => $invoiceNumber,
'invoice_quantity' => $totalExcelQty,
'quantity' => $newInsQty,
'operator_id' => $operatorName,
'created_by' => $operatorName,
'updated_by' => $operatorName,
]);
InvoiceValidation::where('invoice_number', $invoiceNumber)->where('plant_id', $plantId)->where('sticker_master_id', $sticker->id)
->update([
'invoice_quantity' => $totalExcelQty,
]);
$inserted++;
}
}
@@ -1791,6 +1825,7 @@ class CreateInvoiceValidation extends CreateRecord
'sticker_master_id' => $sticker->id,
'plant_id' => $plantId,
'invoice_number' => $invoiceNumber,
'invoice_quantity' => 1,
'quantity' => 1,
'operator_id' => $operatorName,
'created_by' => $operatorName,
@@ -1826,6 +1861,7 @@ class CreateInvoiceValidation extends CreateRecord
'sticker_master_id' => $sticker->id,
'plant_id' => $plantId,
'invoice_number' => $invoiceNumber,
'invoice_quantity' => $bundleQty,
'quantity' => $bundleQty,
'operator_id' => $operatorName,
'created_by' => $operatorName,
@@ -1859,6 +1895,7 @@ class CreateInvoiceValidation extends CreateRecord
'sticker_master_id' => $sticker->id,
'plant_id' => $plantId,
'invoice_number' => $invoiceNumber,
'invoice_quantity' => $totalExcelQty,
'quantity' => $totalExcelQty,
'operator_id' => $operatorName,
'created_by' => $operatorName,
@@ -3347,6 +3384,7 @@ class CreateInvoiceValidation extends CreateRecord
$createdDt = $record->created_at;
$stickMasterId = $record->sticker_master_id;
$curExistQty = $record->quantity;
$curItemInvQty = $record->invoice_quantity;
// $curScanQty = 2;
if ($curExistQty > $curScanQty) { // 5 > 2
@@ -3362,6 +3400,7 @@ class CreateInvoiceValidation extends CreateRecord
'invoice_number' => $invoiceNumber,
'serial_number' => $serialNumber,
'batch_number' => $batchNumber,
'invoice_quantity' => $curItemInvQty,
'quantity' => $curScanQty,
'created_at' => $createdDt,
'operator_id' => $operatorName,
@@ -3545,6 +3584,7 @@ class CreateInvoiceValidation extends CreateRecord
$this->dispatch('refreshInvoiceData', invoiceNumber: $invoiceNumber, plantId: $plantId, onCapFocus: false);
}
// TN01/BOX22/SERIAL999 >> PANEL BOX QR
// /^([a-zA-Z0-9]{6,})\|([1-9][a-zA-Z0-9]{8,})(?:\/[MmPpCc])?\|?$/
if (! preg_match('/^([a-zA-Z0-9]{6,})\|([1-9][a-zA-Z0-9]{8,})(?:\/[MmPpCc])?\|?$/', $serNo, $matches)) {
Notification::make()

View File

@@ -6,6 +6,7 @@ use App\Filament\Exports\LineExporter;
use App\Filament\Imports\LineImporter;
use App\Filament\Resources\LineResource\Pages;
use App\Models\Block;
use App\Models\Item;
use App\Models\Line;
use App\Models\Plant;
use App\Models\WorkGroupMaster;
@@ -24,6 +25,11 @@ use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;
use Illuminate\Validation\Rule;
use Illuminate\Validation\Rules\Unique;
use Filament\Forms\Components\DateTimePicker;
use Filament\Forms\Components\FileUpload;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\TextInput;
use Filament\Tables\Filters\Filter;
class LineResource extends Resource
{
@@ -1184,7 +1190,207 @@ class LineResource extends Resource
])
->filters([
Tables\Filters\TrashedFilter::make(),
Filter::make('advanced_filters')
->label('Advanced Filters')
->form([
Select::make('Plant')
->label('Search by Plant Name')
->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::orderBy('code')->pluck('name', 'id')->toArray();
if ($userHas && strlen($userHas) > 0) {
return Plant::where('id', $userHas)->pluck('name', 'id')->toArray();
} else {
return Plant::whereHas('items', function ($query) {
$query->whereNotNull('id');
})->orderBy('code')->pluck('name', 'id')->toArray();
}
})
->searchable()
->reactive()
->afterStateUpdated(function ($state, callable $set, callable $get): void {
$set('code', null);
$set('operator_id', null);
}),
Select::make('name')
->label('Search by Line Name')
->nullable()
->options(function (callable $get) {
$plantId = $get('Plant');
return $plantId ? Line::where('plant_id', $plantId)->pluck('name', 'id') : [];
})
->searchable()
->reactive(),
Select::make('type')
->label('Search by Line Type')
->nullable()
->options(function (callable $get) {
$plantId = $get('Plant');
return $plantId ? Line::where('plant_id', $plantId)->distinct()->pluck('type', 'type')->toArray(): [];
})
->searchable()
->reactive(),
Select::make('work_group_id')
->label('Search by WorkGroupCenter')
->nullable()
->options(function (callable $get) {
$plantId = $get('Plant');
$workGroupIds = Line::where('plant_id', $plantId)
->get([
'work_group1_id',
'work_group2_id',
'work_group3_id',
'work_group4_id',
'work_group5_id',
'work_group6_id',
'work_group7_id',
'work_group8_id',
'work_group9_id',
'work_group10_id',
])
->flatMap(function ($line) {
return [
$line->work_group1_id,
$line->work_group2_id,
$line->work_group3_id,
$line->work_group4_id,
$line->work_group5_id,
$line->work_group6_id,
$line->work_group7_id,
$line->work_group8_id,
$line->work_group9_id,
$line->work_group10_id,
];
})
->filter()
->unique()
->values()
->toArray();
return WorkGroupMaster::whereIn('id', $workGroupIds)
->pluck('name', 'id')
->toArray();
})
->searchable()
->reactive(),
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['name']) && empty($data['type']) && empty($data['work_group_id']) && empty($data['created_from']) && empty($data['created_to']) && empty($data['updated_from']) && empty($data['updated_to'])) {
// return $query->whereRaw('1 = 0');
}
if (! empty($data['Plant'])) { // $plant = $data['Plant'] ?? null
$query->where('plant_id', $data['Plant']);
} else {
$userHas = Filament::auth()->user()->plant_id;
if ($userHas && strlen($userHas) > 0) {
return $query->whereRaw('1 = 0');
}
}
if (! empty($data['name'])) {
$query->where('id', $data['name']);
}
if (! empty($data['type'])) {
$query->where('type', $data['type']);
}
// if (! empty($data['work_group_id'])) {
// $query->where('name', $data['work_group_id']);
// }
if (! empty($data['work_group_id'])) {
$query->where(function ($q) use ($data) {
$q->where('work_group1_id', $data['work_group_id'])
->orWhere('work_group2_id', $data['work_group_id'])
->orWhere('work_group3_id', $data['work_group_id'])
->orWhere('work_group4_id', $data['work_group_id'])
->orWhere('work_group5_id', $data['work_group_id'])
->orWhere('work_group6_id', $data['work_group_id'])
->orWhere('work_group7_id', $data['work_group_id'])
->orWhere('work_group8_id', $data['work_group_id'])
->orWhere('work_group9_id', $data['work_group_id'])
->orWhere('work_group10_id', $data['work_group_id']);
});
}
if (! empty($data['created_from'])) {
$query->where('created_at', '>=', $data['created_from']);
}
if (! empty($data['created_to'])) {
$query->where('created_at', '<=', $data['created_to']);
}
})
->indicateUsing(function (array $data) {
$indicators = [];
if (! empty($data['Plant'])) {
$indicators[] = 'Plant: '.Plant::where('id', $data['Plant'])->value('name');
} else {
$userHas = Filament::auth()->user()->plant_id;
if ($userHas && strlen($userHas) > 0) {
return 'Plant: Choose plant to filter records.';
}
}
if (! empty($data['name'])) {
$indicators[] = 'Line Name: '.Line::where('id', $data['name'])->value('name');
}
if (! empty($data['type'])) {
$indicators[] = 'Line Type: '.Line::where('type', $data['type'])->value('type');
}
if (! empty($data['work_group_id'])) {
$indicators[] = 'Work Group: ' .
WorkGroupMaster::where('id', $data['work_group_id'])->value('name');
}
if (! empty($data['created_from'])) {
$indicators[] = 'From: '.$data['created_from'];
}
if (! empty($data['created_to'])) {
$indicators[] = 'To: '.$data['created_to'];
}
if (! empty($data['updated_from'])) {
$indicators[] = 'From: '.$data['updated_from'];
}
if (! empty($data['updated_to'])) {
$indicators[] = 'To: '.$data['updated_to'];
}
return $indicators;
}),
])
->filtersFormMaxHeight('280px')
->actions([
Tables\Actions\ViewAction::make(),
Tables\Actions\EditAction::make(),

View File

@@ -23,6 +23,11 @@ use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;
use Illuminate\Validation\Rule;
use Str;
use Filament\Forms\Components\DateTimePicker;
use Filament\Forms\Components\FileUpload;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\TextInput;
use Filament\Tables\Filters\Filter;
class MachineResource extends Resource
{
@@ -249,7 +254,177 @@ class MachineResource extends Resource
])
->filters([
Tables\Filters\TrashedFilter::make(),
Filter::make('advanced_filters')
->label('Advanced Filters')
->form([
Select::make('Plant')
->label('Search by Plant Name')
->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::orderBy('code')->pluck('name', 'id')->toArray();
if ($userHas && strlen($userHas) > 0) {
return Plant::where('id', $userHas)->pluck('name', 'id')->toArray();
} else {
return Plant::whereHas('machines', function ($query) {
$query->whereNotNull('id');
})->orderBy('code')->pluck('name', 'id')->toArray();
}
})
->searchable()
->reactive()
->afterStateUpdated(function ($state, callable $set, callable $get): void {
$set('code', null);
$set('operator_id', null);
}),
Select::make('Line')
->label('Search by Line')
->searchable()
->options(function (callable $get) {
$plantId = $get('Plant');
if (empty($plantId)) {
return [];
}
return Line::whereHas('machines', function ($query) use ($plantId) {
if ($plantId) {
$query->where('plant_id', $plantId);
}
})->pluck('name', 'id');
})
->searchable()
->reactive(),
TextInput::make('name')
->label('Description')
->reactive(),
Select::make('work_group_master')
->label('Search by Work Group Center')
->options(function (callable $get) {
$plantId = $get('Plant');
return WorkGroupMaster::whereHas('machines', function ($query) use ($plantId) {
if ($plantId) {
$query->where('plant_id', $plantId);
}
})
->pluck('name', 'id')
->toArray();
})
->searchable()
->reactive(),
Select::make('work_center')
->label('Search by Work Center')
->options(function (callable $get) {
$plantId = $get('Plant');
$workGroupMasterId = $get('work_group_master');
if (!$workGroupMasterId) {
return [];
}
return Machine::query()
->when($plantId, fn ($q) => $q->where('plant_id', $plantId))
->where('work_group_master_id', $workGroupMasterId)
->pluck('work_center', 'work_center')
->toArray();
})
->searchable()
->reactive(),
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['name']) && empty($data['work_group_master']) && empty($data['created_from']) && empty($data['created_to']) && empty($data['updated_from']) && empty($data['updated_to'])) {
// return $query->whereRaw('1 = 0');
}
if (! empty($data['Plant'])) { // $plant = $data['Plant'] ?? null
$query->where('plant_id', $data['Plant']);
} else {
$userHas = Filament::auth()->user()->plant_id;
if ($userHas && strlen($userHas) > 0) {
return $query->whereRaw('1 = 0');
}
}
if (! empty($data['Line'])) {
$query->where('line_id', $data['Line']);
}
if (! empty($data['name'])) {
$query->where('name', $data['name']);
}
if (! empty($data['work_group_master'])) {
$query->where('work_group_master_id', $data['work_group_master']);
}
if (! empty($data['work_center'])) {
$query->where('work_center', $data['work_center']);
}
if (! empty($data['created_from'])) {
$query->where('created_at', '>=', $data['created_from']);
}
if (! empty($data['created_to'])) {
$query->where('created_at', '<=', $data['created_to']);
}
})
->indicateUsing(function (array $data) {
$indicators = [];
if (! empty($data['Plant'])) {
$indicators[] = 'Plant: '.Plant::where('id', $data['Plant'])->value('name');
} else {
$userHas = Filament::auth()->user()->plant_id;
if ($userHas && strlen($userHas) > 0) {
return 'Plant: Choose plant to filter records.';
}
}
if (! empty($data['Line'])) {
$indicators[] = 'Line Name: '.Line::where('id', $data['Line'])->value('name');
}
if (! empty($data['name'])) {
$indicators[] = 'Description: ' . $data['name'];
}
if (! empty($data['work_group_master'])) {
$indicators[] = 'Work Group Center: '.WorkGroupMaster::where('id', $data['work_group_master'])->value('name');
}
if (! empty($data['work_center'])) {
$indicators[] = 'Work Center: '.Machine::where('work_center', $data['work_center'])->value('work_center');
}
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(),

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,269 @@
<?php
namespace App\Filament\Resources\PanelBoxValidationResource\Pages;
use App\Filament\Resources\PanelBoxValidationResource;
use App\Models\ProductCharacteristicsMaster;
use Filament\Actions;
use Filament\Resources\Pages\CreateRecord;
use Illuminate\Validation\ValidationException;
class CreatePanelBoxValidation extends CreateRecord {
protected static string $resource = PanelBoxValidationResource::class;
public $showChecklist = false;
public $checklist;
public $skipChecklistValidation = false;
public bool $shouldSkipChecklist = false;
public $existingRecords = [];
protected $listeners = [
'checklistUpdated' => 'setChecklist',
'checklist-cancelled' => 'handleChecklistCancel',
'checklist-saved' => 'checkListSaved',
];
public function setChecklist($checklist)
{
$this->data['checklist'] = $checklist;
}
public function doCreate()
{
$this->create();
}
public function mount(): void
{
parent::mount();
session()->forget([
'last_selected_plant_id',
'last_selected_line',
'last_selected_production',
]);
}
public function handleChecklistCancel()
{
$this->skipChecklistValidation = true;
$this->showChecklist = false;
}
protected function mutateFormDataBeforeCreate(array $data): array
{
// if ($this->shouldSkipChecklist) {
// return $data;
// }
if ($this->checkIfHasCharacteristics($data)) {
$this->showChecklist = true;
$this->halt();
}
return $data;
}
protected function checkIfHasCharacteristics(array $data)
{
$plantId = $data['plant_id'] ?? null;
$itemCode = $data['item_id'] ?? null;
$lineId = $data['line_id'] ?? null;
if (!$plantId || !$itemCode || !$lineId) {
return false;
}
$item = \App\Models\Item::where('code', $itemCode)
->where('plant_id', $plantId)
->first();
$categoryName = trim($item->category) ?? null;
if (!$item) {
$this->existingRecords = collect();
return false;
}
$this->existingRecords = ProductCharacteristicsMaster::where('plant_id', $plantId)
->where('category', $categoryName)
->where('line_id', $lineId)
->get();
return $this->existingRecords->isNotEmpty();
}
public function checkListSaved()
{
$this->showChecklist = false;
$plantId = $this->data['plant_id'] ?? null;
$lineId = $this->data['line_id'] ?? null;
$productionOrder = $this->data['production_order'] ?? null;
return redirect()->to(
static::getResource()::getUrl('create', [
'plant_id' => $this->data['plant_id'] ?? null,
'line_id' => $this->data['line_id'] ?? null,
'production_order' => $this->data['production_order'] ?? null,
])
);
}
protected function beforeCreate(): void
{
$errors = [];
if (!empty($this->data['validationError'])) {
$errors['validationError'] = ['Fix the errors before submitting.'];
}
if (!empty($this->data['serialPanelError'])) {
$errors['serialPanelError'] = ['Fix the errors before submitting.'];
}
if (!empty($this->data['packSlipPanelError'])) {
$errors['packSlipPanelError'] = ['Fix the errors before submitting.'];
}
if (!empty($this->data['namePlatePanelError'])) {
$errors['namePlatePanelError'] = ['Fix the errors before submitting.'];
}
//..name plate
if (!empty($this->data['tubeStickerPanelError'])) {
$errors['tubeStickerPanelError'] = ['Fix the errors before submitting.'];
}
if (!empty($this->data['warrantyCardPanelError'])) {
$errors['warrantyCardPanelError'] = ['Fix the errors before submitting.'];
}
//..part validations
if (!empty($this->data['part_validation1_error'])) {
$errors['part_validation1_error'] = ['Fix the errors before submitting.'];
}
if (!empty($this->data['part_validation2_error'])) {
$errors['part_validation2_error'] = ['Fix the errors before submitting.'];
}
if (!empty($this->data['part_validation3_error'])) {
$errors['part_validation3_error'] = ['Fix the errors before submitting.'];
}
if (!empty($this->data['part_validation4_error'])) {
$errors['part_validation4_error'] = ['Fix the errors before submitting.'];
}
if (!empty($this->data['part_validation5_error'])) {
$errors['part_validation5_error'] = ['Fix the errors before submitting.'];
}
if (!empty($errors)) {
throw ValidationException::withMessages($errors);
}
$this->checkExisting();
$checklist = $this->data['data']['checklist'] ?? [];
if (count($this->existingRecords) > 0){
$this->showChecklist = true;
$this->halt();
}
else{
$this->showChecklist = false;
}
}
public function checkExisting()
{
$plant_id = $this->data['plant_id'] ?? null;
$item_code = $this->data['item_id'] ?? null;
$line_id = $this->data['line_id'] ?? null;
$item = \App\Models\Item::where('code', $item_code)->where('plant_id', $plant_id)->first();
if (!$item) {
$this->existingRecords = collect();
return;
}
// $item_id = $item->id;
$categoryName = trim($item->category) ?? null;
$this->existingRecords = ProductCharacteristicsMaster::where('plant_id', $plant_id)
->where('category', $categoryName)
->where('line_id', $line_id)
->get();
}
protected function afterCreate(): void
{
// Get the value from the hidden field 'plant'
$plant = $this->form->getState()['plant'] ?? null;
$line = $this->form->getState()['line'] ?? null;
$production = $this->form->getState()['production'] ?? null;
// $this->skipChecklistValidation = false;
// $this->showChecklist = false;
// $this->checklist = [];
// $this->form->fill();
// reset checklist
$this->checklist = [];
$this->skipChecklistValidation = false;
$this->showChecklist = false;
$this->form->fill([]);
$this->data = [];
$this->resetValidation();
$this->resetErrorBag();
$this->form->fill([
'plant_id' => null,
'line_id' => null,
'production_order' => null,
]);
// $this->dispatch('focus-item-id');
session()->flash('focus_item_id_after_redirect', true);
logger('Focus flag set in session');
if ($plant) {
session(['last_selected_plant_id' => $plant]);
}
if ($line) {
session(['last_selected_line' => $line]);
}
if ($production) {
session(['last_selected_production' => $production]);
}
}
protected function getRedirectUrl(): string
{
//return $this->getResource()::getUrl('create'); // Stay on Create Page after savin
return $this->getResource()::getUrl('create', [
'plant_id' => $this->data['plant_id'] ?? null,
'line_id' => $this->data['line_id'] ?? null,
'production_order' => $this->data['production_order'] ?? null,
]);
}
}

View File

@@ -0,0 +1,22 @@
<?php
namespace App\Filament\Resources\PanelBoxValidationResource\Pages;
use App\Filament\Resources\PanelBoxValidationResource;
use Filament\Actions;
use Filament\Resources\Pages\EditRecord;
class EditPanelBoxValidation extends EditRecord
{
protected static string $resource = PanelBoxValidationResource::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\PanelBoxValidationResource\Pages;
use App\Filament\Resources\PanelBoxValidationResource;
use Filament\Actions;
use Filament\Resources\Pages\ListRecords;
class ListPanelBoxValidations extends ListRecords
{
protected static string $resource = PanelBoxValidationResource::class;
protected function getHeaderActions(): array
{
return [
Actions\CreateAction::make(),
];
}
}

View File

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

View File

@@ -253,9 +253,9 @@ class ProductionCharacteristicResource extends Resource
->label('Spec. Value')
// ->searchable()
->formatStateUsing(function ($record) {
$specVal = ProductCharacteristicsMaster::where('plant_id', $record->plant_id)->where('item_id', $record->item_id)->where('line_id', $record->line_id)->where('machine_id', $record->machine_id)->first();
$specVal = ProductCharacteristicsMaster::where('plant_id', $record->plant_id)->where('item_id', $record->item_id)->where('line_id', $record->line_id)->where('machine_id', $record->machine_id)->where('name', $record->characteristic_name)->first();
// return $record?->plant_id.'-'.$record?->item_id.'-'.$record->line_id.'-'.$record?->machine_id;
return $specVal?->lower.' - '.$specVal?->upper;
})
->alignCenter()
@@ -276,7 +276,7 @@ class ProductionCharacteristicResource extends Resource
'Not Ok' => 'danger',
'NotOk' => 'danger',
'ConditionallyAccepted' => 'success',
default => 'gray',
default => 'black',
})
->alignCenter()
->sortable(),

View File

@@ -3507,6 +3507,17 @@ class QualityValidationResource extends Resource
return;
}
if (strpos($state, '|') !== false) {
$state = explode('|', $state)[0];
if ($state != $expectedValue){
$set('part_validation1_error', 'Invalid input for part validation 1.');
}
else{
$set('part_validation1', $state);
$set('part_validation1_error', null);
}
}
if ($state == $expectedValue) {
$set('part_validation1_error', null);
} else {
@@ -3518,14 +3529,80 @@ class QualityValidationResource extends Resource
$mPlantName = $mailData['plant_name'];
$emails = $mailData['emails'];
$ccEmails = $mailData['cc_emails'] ?? [];
$mUserName = Filament::auth()->user()->name;
if (! empty($emails)) {
// Mail::to($emails)->send(new InvalidSerialMail($serNo, $invoiceNumber, $mPlantName, $mInvoiceType));
Mail::to($emails)->send(
new InvalidQualityMail($state, $mPorder, $mPlantName, $mLinePart, $mUserName, $mExpectedValue, 'InvalidPartNumber')
);
} else {
// if (! empty($emails)) {
// if (is_array($emails)) {
// $emailList = collect($emails)
// ->flatMap(fn ($email) => explode(',', $email))
// ->map(fn ($email) => trim($email))
// ->filter()
// ->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.");
}
$set('part_validation1', null);
@@ -3967,6 +4044,7 @@ class QualityValidationResource extends Resource
->where('module', 'QualityValidation')
->where('rule_name', 'QualityMail')
->where(fn ($q) => $q->whereNull('schedule_type')->orWhere('schedule_type', ''))
// ->get()
->pluck('email')
->toArray();
@@ -3984,13 +4062,16 @@ class QualityValidationResource extends Resource
->where('module', 'QualityValidation')
->where('rule_name', 'QualityMail')
->where(fn ($q) => $q->whereNull('schedule_type')->orWhere('schedule_type', ''))
->pluck('email')
->toArray();
->get(['email', 'cc_emails']);
// ->pluck('email')
// ->toArray();
return [
'plant_id' => $plantId,
'plant_name' => $mPlantName,
'emails' => $emails,
'emails' => $emails->pluck('email')->filter()->toArray(),
'cc_emails' => $emails->pluck('cc_emails')->filter()->toArray(),
// 'emails' => $emails,
];
}

View File

@@ -540,8 +540,15 @@ class StickerMasterResource extends Resource
->alignCenter()
->sortable()
->searchable(),
Tables\Columns\TextColumn::make('item.category')
->label('Category')
->default('-')
->alignCenter()
->sortable()
->searchable()
->toggleable(isToggledHiddenByDefault: true),
Tables\Columns\TextColumn::make('item.description')
->label('Item Description')
->label('Description')
->alignCenter()
->sortable()
->searchable()

View File

@@ -813,7 +813,7 @@ class TestingPanelReadingResource extends Resource
if ($plantId) {
return MotorTestingMaster::whereHas('testingPanelReadings', function ($query) {
$query->whereNotNull('id');
})->orderBy('subassembly_code')->pluck('subassembly_code', 'id');
})->whereNotNull('subassembly_code')->orderBy('subassembly_code')->pluck('subassembly_code', 'id');
} else {
return [];
// return Item::whereHas('motorTestingMasters')

View File

@@ -187,6 +187,15 @@ class VisitorEntryResource extends Resource
->numeric()
->default(1)
->required(),
Forms\Components\Select::make('mode_of_travel')
->label('Mode of Travel')
->options([
'Rental' => 'Rental',
'Car' => 'Car',
'Bike' => 'Bike',
])
->reactive()
->placeholder('Select Mode of Travel'),
Forms\Components\DateTimePicker::make('in_time')
->label('In Time')
->required()
@@ -214,6 +223,7 @@ class VisitorEntryResource extends Resource
public static function table(Table $table): Table
{
return $table
// ->modifyQueryUsing(fn (Builder $query) => $query->whereDate('created_at', today()))
->columns([
Tables\Columns\TextColumn::make('No.')
->label('NO')
@@ -244,15 +254,25 @@ class VisitorEntryResource extends Resource
->alignCenter()
->searchable()
->sortable(),
Tables\Columns\TextColumn::make('mobile_number')
->label('Visitor Mobile Number')
->alignCenter()
->searchable()
->searchable()
->sortable(),
Tables\Columns\TextColumn::make('name')
->label('Visitor Name')
->sortable()
->alignCenter()
->searchable(),
Tables\Columns\TextColumn::make('mobile_number')
->label('Visitor Mobile Number')
Tables\Columns\TextColumn::make('company')
->label('Visitor Company')
->sortable()
->alignCenter()
->searchable(),
Tables\Columns\TextColumn::make('employeeMaster.plant.name')
->label('Visited Plant')
->alignCenter()
->searchable()
->searchable()
->sortable(),
Tables\Columns\TextColumn::make('employeeMaster.name')
@@ -275,6 +295,16 @@ class VisitorEntryResource extends Resource
->searchable()
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('purpose_of_visit')
->label('Purpose of Visit')
->searchable()
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('mode_of_travel')
->label('Mode of Travel')
->searchable()
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('in_time')
->label('In Time')
->searchable()
@@ -405,9 +435,25 @@ class VisitorEntryResource extends Resource
])
->query(function ($query, array $data) {
// Hide all records initially if no filters are applied
if (empty($data['register_id']) && empty($data['type']) && empty($data['name']) && empty($data['company']) && empty($data['employee_master_id']) && empty($data['created_from']) && empty($data['created_to'])) {
$query->where(function ($q) {
});
// if (empty($data['register_id']) && empty($data['type']) && empty($data['name']) && empty($data['company']) && empty($data['employee_master_id']) && empty($data['created_from']) && empty($data['created_to'])) {
// $query->where(function ($q) {
// });
// }
$hasAnyFilter = !empty($data['register_id'])
|| !empty($data['type'])
|| !empty($data['name'])
|| !empty($data['company'])
|| !empty($data['employee_master_id'])
|| !empty($data['employee_department'])
|| !empty($data['created_from'])
|| !empty($data['created_to']);
if (!$hasAnyFilter) {
// $query->whereDate('created_at', today());
$query->whereDate('visitor_entries.created_at', today())
->whereNull('out_time');
return;
}
if (! empty($data['register_id'])) {
@@ -423,8 +469,15 @@ class VisitorEntryResource extends Resource
}
}
// if (! empty($data['name'])) {
// $query->where('name', 'like', '%'.$data['name'].'%');
// }
if (! empty($data['name'])) {
$query->where('name', 'like', '%'.$data['name'].'%');
$query->whereRaw(
'LOWER(name) LIKE ?',
['%' . strtolower($data['name']) . '%']
);
}
if (! empty($data['company'])) {
@@ -621,4 +674,5 @@ class VisitorEntryResource extends Resource
SoftDeletingScope::class,
]);
}
}

View File

@@ -21,36 +21,42 @@ class CreateVisitorEntry extends CreateRecord
public function processMobile($mobile)
{
$visitor = VisitorEntry::where('mobile_number', $mobile)->latest()->first();
$registerId = $this->data['register_id'] ?? null;
$visitor = VisitorEntry::where('mobile_number', $mobile)->latest()->first();
if ($visitor) {
$employee = EmployeeMaster::where('id', $visitor->employee_master_id)->first();
$this->form->fill([
'register_id' => $visitor->register_id ?? '',
'mobile_number' => $mobile ?? '',
'name' => $visitor->name ?? '',
'company' => $visitor->company ?? '',
'type' => $visitor->type ?? '',
'department' => $employee->department ?? '',
'employee_master_id' => $visitor->employee_master_id->name ?? '',
'code' => $employee->code ?? '',
'register_id' => $registerId ?? '',
'mobile_number' => $visitor->mobile_number,
'name' => $visitor->name ?? '',
'company' => $visitor->company ?? '',
'type' => $visitor->type ?? '',
'department' => $employee?->department ?? '',
'employee_master_id' => $visitor->employee_master_id,
'code' => $employee?->code ?? '',
'purpose_of_visit' => '',
'in_time' => now(),
'out_time' => null,
'valid_upto' => null,
]);
}
else {
$registerId = $this->form->getState()['register_id'] ?? '';
$this->form->fill([
'register_id' => $registerId ?? '',
'mobile_number' => $mobile ?? '',
'name' => $visitor->name ?? '',
'company' => $visitor->company ?? '',
'type' => $visitor->type ?? '',
'department' => $employee->department ?? '',
'employee_master_id' => $visitor->employee_master_id->name ?? '',
'code' => $employee->code ?? '',
'register_id' => $registerId ?? '',
'mobile_number' => $mobile,
'name' => '',
'company' => '',
'type' => '',
'department' => '',
'employee_master_id' => null,
'code' => '',
'purpose_of_visit' => '',
'in_time' => now(),
'out_time' => null,
'valid_upto' => null,
]);
}
}

View File

@@ -5,6 +5,7 @@ namespace App\Filament\Resources;
use App\Filament\Exports\WorkGroupMasterExporter;
use App\Filament\Imports\WorkGroupMasterImporter;
use App\Filament\Resources\WorkGroupMasterResource\Pages;
use App\Models\Line;
use App\Models\Plant;
use App\Models\WorkGroupMaster;
use Filament\Facades\Filament;
@@ -20,6 +21,11 @@ use Filament\Tables\Table;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;
use Illuminate\Validation\Rule;
use Filament\Forms\Components\DateTimePicker;
use Filament\Forms\Components\FileUpload;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\TextInput;
use Filament\Tables\Filters\Filter;
class WorkGroupMasterResource extends Resource
{
@@ -166,7 +172,144 @@ class WorkGroupMasterResource extends Resource
])
->filters([
Tables\Filters\TrashedFilter::make(),
Filter::make('advanced_filters')
->label('Advanced Filters')
->form([
Select::make('Plant')
->label('Search by Plant Name')
->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::orderBy('code')->pluck('name', 'id')->toArray();
if ($userHas && strlen($userHas) > 0) {
return Plant::where('id', $userHas)->pluck('name', 'id')->toArray();
} else {
return Plant::whereHas('workGroupMasters', function ($query) {
$query->whereNotNull('id');
})->orderBy('code')->pluck('name', 'id')->toArray();
}
})
->searchable()
->reactive()
->afterStateUpdated(function ($state, callable $set, callable $get): void {
$set('code', null);
$set('operator_id', null);
}),
Select::make('name')
->label('Search by Work Group Center')
->searchable()
->options(function (callable $get) {
$plantId = $get('Plant');
if(!$plantId){
return [];
}
else{
return $plantId ? WorkGroupMaster::where('plant_id', $plantId)->distinct()->pluck('name', 'name')->toArray(): [];
}
})
->searchable()
->reactive(),
TextInput::make('description')
->label('Description')
->reactive(),
TextInput::make('operation_number')
->label('Operation Number')
->reactive(),
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['name']) && empty($data['description']) && empty($data['operation_number']) && empty($data['created_from']) && empty($data['created_to']) && empty($data['updated_from']) && empty($data['updated_to'])) {
// return $query->whereRaw('1 = 0');
}
if (! empty($data['Plant'])) { // $plant = $data['Plant'] ?? null
$query->where('plant_id', $data['Plant']);
} else {
$userHas = Filament::auth()->user()->plant_id;
if ($userHas && strlen($userHas) > 0) {
return $query->whereRaw('1 = 0');
}
}
if (! empty($data['name'])) {
$query->where('name', $data['name']);
}
if (! empty($data['description'])) {
$query->where('description', $data['description']);
}
if (! empty($data['operation_number'])) {
$query->where('operation_number', $data['operation_number']);
}
if (! empty($data['created_from'])) {
$query->where('created_at', '>=', $data['created_from']);
}
if (! empty($data['created_to'])) {
$query->where('created_at', '<=', $data['created_to']);
}
})
->indicateUsing(function (array $data) {
$indicators = [];
if (! empty($data['Plant'])) {
$indicators[] = 'Plant: '.Plant::where('id', $data['Plant'])->value('name');
} else {
$userHas = Filament::auth()->user()->plant_id;
if ($userHas && strlen($userHas) > 0) {
return 'Plant: Choose plant to filter records.';
}
}
if (! empty($data['name'])) {
$indicators[] = 'Work Group Name: ' . $data['name'];
}
if (! empty($data['description'])) {
$indicators[] = 'Description: ' . $data['description'];
}
if (! empty($data['operation_number'])) {
$indicators[] = 'Operation Number: ' . $data['operation_number'];
}
if (! empty($data['created_from'])) {
$indicators[] = 'From: '.$data['created_from'];
}
if (! empty($data['created_to'])) {
$indicators[] = 'To: '.$data['created_to'];
}
if (! empty($data['updated_from'])) {
$indicators[] = 'From: '.$data['updated_from'];
}
if (! empty($data['updated_to'])) {
$indicators[] = 'To: '.$data['updated_to'];
}
return $indicators;
}),
])
->filtersFormMaxHeight('280px')
->actions([
Tables\Actions\ViewAction::make(),
Tables\Actions\EditAction::make(),

View File

@@ -520,7 +520,7 @@ class CharacteristicsController extends Controller
if (Str::contains($modelHeading, 'PRESSURE BOOSTER SYSTEM', ignoreCase: true)) {
$typesToCreate = ['MOTOR', 'PUMP', 'NAME_PLATE'];
} elseif (Str::contains($modelHeading, 'PUMPS', ignoreCase: true) || Str::contains($modelHeading, 'PUMPSET', ignoreCase: true)) {
} elseif (Str::contains($modelHeading, 'PUMP SET', ignoreCase: true) || Str::contains($modelHeading, 'PUMPSET', ignoreCase: true) || Str::contains($modelHeading, 'PUMPS', ignoreCase: true)) {
$typesToCreate = ['MOTOR', 'PUMP'];
} elseif (Str::contains($modelHeading, 'PUMP', ignoreCase: true) && ! Str::contains($modelHeading, 'PUMP SET', ignoreCase: true) && ! Str::contains($modelHeading, 'PUMPSET', ignoreCase: true) && ! Str::contains($modelHeading, 'PUMPS', ignoreCase: true)) {
$typesToCreate = ['PUMP'];
@@ -673,7 +673,7 @@ class CharacteristicsController extends Controller
// 'status_description' => "Serial number '{$serialNumber}' doesn't have pumpset model to proceed!",
// ], 404);
}
} elseif (! Str::contains($curHead, 'PUMPS', ignoreCase: true) && ! Str::contains($curHead, 'PUMPSET', ignoreCase: true)) {
} elseif (! Str::contains($curHead, 'PUMP SET', ignoreCase: true) && ! Str::contains($curHead, 'PUMPSET', ignoreCase: true) && ! Str::contains($curHead, 'PUMPS', ignoreCase: true)) {
return response()->json([
'status_code' => 'ERROR',
'status_description' => "Serial number '{$serialNumber}' doesn't have valid model type to proceed!",
@@ -1562,7 +1562,7 @@ class CharacteristicsController extends Controller
if (Str::contains($modelHeading, 'PRESSURE BOOSTER SYSTEM', ignoreCase: true)) {
$typesToCreate = ['MOTOR', 'PUMP', 'NAME_PLATE'];
} elseif (Str::contains($modelHeading, 'PUMPS', ignoreCase: true) || Str::contains($modelHeading, 'PUMPSET', ignoreCase: true)) {
} elseif (Str::contains($modelHeading, 'PUMP SET', ignoreCase: true) || Str::contains($modelHeading, 'PUMPSET', ignoreCase: true) || Str::contains($modelHeading, 'PUMPS', ignoreCase: true)) {
$typesToCreate = ['MOTOR', 'PUMP'];
} elseif (Str::contains($modelHeading, 'PUMP', ignoreCase: true) && ! Str::contains($modelHeading, 'PUMP SET', ignoreCase: true) && ! Str::contains($modelHeading, 'PUMPSET', ignoreCase: true) && ! Str::contains($modelHeading, 'PUMPS', ignoreCase: true)) {
$typesToCreate = ['PUMP'];
@@ -1941,7 +1941,7 @@ class CharacteristicsController extends Controller
if (Str::contains($modelHeading, 'PRESSURE BOOSTER SYSTEM', ignoreCase: true)) {
$typesToCreate = ['MOTOR', 'PUMP', 'NAME_PLATE'];
} elseif (Str::contains($modelHeading, 'PUMPS', ignoreCase: true) || Str::contains($modelHeading, 'PUMPSET', ignoreCase: true)) {
} elseif (Str::contains($modelHeading, 'PUMP SET', ignoreCase: true) || Str::contains($modelHeading, 'PUMPSET', ignoreCase: true) || Str::contains($modelHeading, 'PUMPS', ignoreCase: true)) {
$typesToCreate = ['MOTOR', 'PUMP'];
} elseif (Str::contains($modelHeading, 'PUMP', ignoreCase: true) && ! Str::contains($modelHeading, 'PUMP SET', ignoreCase: true) && ! Str::contains($modelHeading, 'PUMPSET', ignoreCase: true) && ! Str::contains($modelHeading, 'PUMPS', ignoreCase: true)) {
$typesToCreate = ['PUMP'];
@@ -2399,7 +2399,7 @@ class CharacteristicsController extends Controller
// 'status_description' => "Serial number '{$serialNumber}' doesn't have pumpset model to proceed!",
// ], 404);
}
} elseif (! Str::contains($curHead, 'PUMPS', ignoreCase: true) && ! Str::contains($curHead, 'PUMPSET', ignoreCase: true)) {
} elseif (! Str::contains($curHead, 'PUMP SET', ignoreCase: true) && ! Str::contains($curHead, 'PUMPSET', ignoreCase: true) && ! Str::contains($curHead, 'PUMPS', ignoreCase: true)) {
return response()->json([
'status_code' => 'ERROR',
'status_description' => "Serial number '{$serialNumber}' doesn't have valid model type to proceed!",
@@ -3666,7 +3666,7 @@ class CharacteristicsController extends Controller
if (Str::contains($modelHeading, 'PRESSURE BOOSTER SYSTEM', ignoreCase: true)) {
$typesToCreate = ['MOTOR', 'PUMP', 'NAME_PLATE'];
} elseif (Str::contains($modelHeading, 'PUMPS', ignoreCase: true) || Str::contains($modelHeading, 'PUMPSET', ignoreCase: true)) {
} elseif (Str::contains($modelHeading, 'PUMP SET', ignoreCase: true) || Str::contains($modelHeading, 'PUMPSET', ignoreCase: true) || Str::contains($modelHeading, 'PUMPS', ignoreCase: true)) {
$typesToCreate = ['MOTOR', 'PUMP'];
} elseif (Str::contains($modelHeading, 'PUMP', ignoreCase: true) && ! Str::contains($modelHeading, 'PUMP SET', ignoreCase: true) && ! Str::contains($modelHeading, 'PUMPSET', ignoreCase: true) && ! Str::contains($modelHeading, 'PUMPS', ignoreCase: true)) {
$typesToCreate = ['PUMP'];
@@ -4701,7 +4701,7 @@ class CharacteristicsController extends Controller
if (Str::contains($modelHeading, 'PRESSURE BOOSTER SYSTEM', ignoreCase: true)) {
$typesToCreate = ['MOTOR', 'PUMP', 'NAME_PLATE'];
} elseif (Str::contains($modelHeading, 'PUMPS', ignoreCase: true) || Str::contains($modelHeading, 'PUMPSET', ignoreCase: true)) {
} elseif (Str::contains($modelHeading, 'PUMP SET', ignoreCase: true) || Str::contains($modelHeading, 'PUMPSET', ignoreCase: true) || Str::contains($modelHeading, 'PUMPS', ignoreCase: true)) {
$typesToCreate = ['MOTOR', 'PUMP'];
} elseif (Str::contains($modelHeading, 'PUMP', ignoreCase: true) && ! Str::contains($modelHeading, 'PUMP SET', ignoreCase: true) && ! Str::contains($modelHeading, 'PUMPSET', ignoreCase: true) && ! Str::contains($modelHeading, 'PUMPS', ignoreCase: true)) {
$typesToCreate = ['PUMP'];

View File

@@ -581,6 +581,9 @@ class InvoiceDataTable extends Component
return [
'sticker_master_id' => $record->sticker_master_id,
// 'material_type' => StickerMaster::where('id', $record->sticker_master_id)->first()->material_type ?? '',
'invoice_quantity' => $record->invoice_quantity ?? 0,
'scanned_quantity' => ($record->invoice_quantity == null) ? 0 : ($record->invoice_quantity - $record->quantity) ?? 0,
// 'scanned_quantity' => number_format(($record->invoice_quantity == null ? 0 : ($record->invoice_quantity - $record->quantity)), 3, '.', ''),
'quantity' => $record->quantity ?? '',
'serial_number' => $record->serial_number ?? '',
'batch_number' => $record->batch_number ?? '',
@@ -597,12 +600,17 @@ class InvoiceDataTable extends Component
$matType = StickerMaster::where('id', $row['sticker_master_id'] ?? null)->first()->material_type ?? '';
if ($matType == 1) {
$row['material_type'] = 'Individual';
$row['invoice_quantity'] = $row['quantity'];
} elseif ($matType == 2) {
$row['material_type'] = 'Bundle';
$row['invoice_quantity'] = $row['quantity'];
} elseif ($matType == 3) {
$row['material_type'] = 'Quantity';
$row['invoice_quantity'] = number_format($row['invoice_quantity'], 3, '.', '');
$row['scanned_quantity'] = number_format($row['scanned_quantity'], 3, '.', '');
} elseif ($matType == 4) {
$row['material_type'] = 'Bundle Individual';
$row['invoice_quantity'] = $row['quantity'];
} else {
$row['material_type'] = 'N/A';
}

View File

@@ -0,0 +1,266 @@
<?php
namespace App\Livewire;
use App\Models\AlertMailRule;
use App\Models\Item;
use App\Models\Line;
use App\Models\PanelBoxValidation;
use App\Models\Plant;
use App\Models\ProductCharacteristicsMaster;
use App\Models\ProductionCharacteristic;
use Filament\Facades\Filament;
use Livewire\Component;
use Filament\Notifications\Notification;
use Illuminate\Support\Facades\Mail;
use App\Mail\InvalidQualityMail;
class PanelCheckList extends Component
{
public $records = [];
public $existingRecords = [];
// public bool $shouldSkipChecklist = false;
public array $checklist = [];
public $showChecklist = false;
// public $skipChecklistValidation = false;
// protected $listeners = ['focus-item-id' => 'handleFocus', 'trigger-create' => 'doCreate',];
public $data =
[
'item_id' => '',
'plant_id' => '',
];
public $data1 = [
'checklist' => [],
];
// public function doCreate()
// {
// $this->create();
// $this->shouldSkipChecklist = false;
// }
public function mount($records = [])
{
// $this->records = collect($records);
$this->records = $records;
// foreach ($records as $record) {
// $this->checklist[$record['id']] = 'ok';
// }
}
public function cancel()
{
$this->dispatch('checklist-cancelled');
}
public function saveChecklist()
{
if (empty($this->checklist) || count($this->checklist) != count($this->records)) {
Notification::make()
->title('Incomplete Checklist')
->body('Please complete all checklist fields before submitting.')
->danger()
->send();
return;
}
$item = Item::where('code', $this->data['item_id'])->first();
if (! $item) {
Notification::make()
->title('Invalid Item Code')
->body('Item not found for given code.')
->danger()
->send();
return;
}
$itemAgaPlant = Item::where('code', $this->data['item_id'])->where('plant_id', $this->data['plant_id'])->first();
$plant = Plant::find($this->data['plant_id']);
if (! $itemAgaPlant) {
Notification::make()
->title('Invalid Item Code')
->body("Item code '$this->data['item_id']' not found for given plant code '{$plant?->code}'.")
->danger()
->send();
return;
}
$itemId = $itemAgaPlant->id;
$exists = PanelBoxValidation::where('plant_id', $this->data['plant_id'] ?? null)
->where('serial_number', $this->data['serial_number'] ?? null)
->first();
$plan = Plant::find($this->data['plant_id']);
if ($exists) {
Notification::make()
->title('Duplicate Serial Number')
->body("serial number {$this->data['serial_number']} already exists for the selected plant $plan->code.")
->danger()
->send();
return;
}
$qualityValidation = PanelBoxValidation::create([
'plant_id' => $this->data['plant_id'] ?? null,
'line_id' => $this->data['line_id'] ?? null,
'sticker_master_id' => $this->data['sticker_master_id'] ?? null,
'production_order' => $this->data['production_order'] ?? null,
'serial_number' => $this->data['serial_number'] ?? null,
'serial_number_panel' => $this->data['serial_number_panel'] ?? null,
'pack_slip_panel' => $this->data['pack_slip_panel'] ?? null,
'name_plate_panel' => $this->data['name_plate_panel'] ?? null,
'tube_sticker_panel' => $this->data['tube_sticker_panel'] ?? null,
'warranty_card_panel' => $this->data['warranty_card_panel'] ?? null,
'part_validation1' => $this->data['part_validation1'] ?? null,
'part_validation2' => $this->data['part_validation2'] ?? null,
'part_validation3' => $this->data['part_validation3'] ?? null,
'part_validation4' => $this->data['part_validation4'] ?? null,
'part_validation5' => $this->data['part_validation5'] ?? null,
'created_by' => $this->data['created_by'] ?? null,
]);
if (! $qualityValidation || ! $qualityValidation->exists) {
Notification::make()
->title('Failed to save Panel Box Validation')
->body('Something went wrong while inserting data.')
->danger()
->send();
return;
}
foreach ($this->checklist as $characteristicId => $value) {
// $status = 'Ok';
$characteristic = ProductCharacteristicsMaster::find($characteristicId);
if (($characteristic?->inspection_type ?? null) === 'Value') {
if (
$characteristic &&
is_numeric($value) &&
$value >= $characteristic->lower &&
$value <= $characteristic->upper
) {
$status = 'Ok';
} else {
$status = 'NotOk';
}
}
else {
$status = $value;
}
ProductionCharacteristic::create([
'plant_id' => $this->data['plant_id'] ?? null,
'item_id' => $itemId ?? null,
'line_id' => $this->data['line_id'] ?? null,
'machine_id' => $characteristic?->machine_id ?? null,
'production_order' => $this->data['production_order'] ?? null,
'serial_number' => $this->data['serial_number'] ?? null,
'characteristic_name' => $characteristic?->name ?? null,
'observed_value' => $value ?? null,
'status' => $status,
'inspection_status' => $finalInspectionStatus ?? null,
'created_by' => $this->data['operator_id'] ?? null,
]);
}
$this->showChecklist = false;
$this->dispatch('checklist-saved');
}
public function canSaveChecklist(): bool
{
if (empty($this->checklist) || count($this->checklist) != count($this->records)) {
return false;
}
foreach ($this->checklist as $characteristicId => $value) {
if ($value == null || $value == '') {
return false;
}
$characteristic = ProductCharacteristicsMaster::find($characteristicId);
if (! $characteristic || ! is_numeric($value) || $value <= $characteristic->lower || $value >= $characteristic->upper){
return false;
}
}
return true;
}
public function getCharacteristicStatus($characteristicId): ?string
{
$value = $this->checklist[$characteristicId] ?? null;
if ($value == null || $value == '') {
return null;
}
$characteristic = ProductCharacteristicsMaster::find($characteristicId);
if (! $characteristic || ! is_numeric($value)) {
return 'Not Ok';
}
return ($value > $characteristic->lower && $value < $characteristic->upper) ? 'Ok' : 'Not Ok';
}
// public static function getMailData($plantId)
// {
// $globalEmails = AlertMailRule::where('plant', 0)
// ->where('module', 'QualityValidation')
// ->where('rule_name', 'QualityMail')
// ->where(fn ($q) => $q->whereNull('schedule_type')->orWhere('schedule_type', ''))
// ->pluck('email')
// ->toArray();
// if (! empty($globalEmails)) {
// return [
// 'plant_id' => 0,
// 'plant_name' => 'All Plants',
// 'emails' => $globalEmails,
// ];
// }
// $mPlantName = Plant::where('id', $plantId)->value('name');
// $emails = AlertMailRule::where('plant', $plantId)
// ->where('module', 'QualityValidation')
// ->where('rule_name', 'QualityMail')
// ->where(fn ($q) => $q->whereNull('schedule_type')->orWhere('schedule_type', ''))
// ->pluck('email')
// ->toArray();
// return [
// 'plant_id' => $plantId,
// 'plant_name' => $mPlantName,
// 'emails' => $emails,
// ];
// }
public function render()
{
return view('livewire.panel-check-list');
}
}

View File

@@ -25,15 +25,15 @@ class ProductionCheckList extends Component
public $existingRecords = [];
public bool $shouldSkipChecklist = false;
// public bool $shouldSkipChecklist = false;
public array $checklist = [];
public $showChecklist = false;
public $skipChecklistValidation = false;
// public $skipChecklistValidation = false;
protected $listeners = ['focus-item-id' => 'handleFocus', 'trigger-create' => 'doCreate',];
// protected $listeners = ['focus-item-id' => 'handleFocus', 'trigger-create' => 'doCreate',];
public $data =
[
@@ -45,23 +45,21 @@ class ProductionCheckList extends Component
'checklist' => [],
];
#[On('focus-item-id')]
public function handleFocus()
{
$this->dispatch('focus-input');
}
public function doCreate()
{
$this->create();
$this->shouldSkipChecklist = false;
}
// public function doCreate()
// {
// $this->create();
// $this->shouldSkipChecklist = false;
// }
public function mount($records = [])
{
$this->records = collect($records);
// $this->records = collect($records);
$this->records = $records;
foreach ($records as $record) {
$this->checklist[$record['id']] = 'ok';
}
}
public function cancel()
@@ -178,7 +176,12 @@ class ProductionCheckList extends Component
'serial_number' => $this->data['serial_number'] ?? null,
'characteristic_name' => $characteristic?->name ?? null,
'observed_value' => $this->data['observed_value'] ?? null,
'status' => $value == 'ok' ? 'Ok' : 'NotOk',
// 'status' => $value == 'ok' ? 'Ok' : 'NotOk',
'status' => match (strtolower($value)) {
'ok' => 'Ok',
'na' => 'N/A',
'not_ok' => 'NotOk',
},
'inspection_status' => $finalInspectionStatus ?? null,
'created_by' => $this->data['operator_id'] ?? null,
]);
@@ -255,11 +258,10 @@ class ProductionCheckList extends Component
];
}
public function updatedDataChecklist()
{
$this->dispatch('checklistUpdated', $this->data['checklist']);
}
// public function updatedDataChecklist()
// {
// $this->dispatch('checklistUpdated', $this->data['checklist']);
// }
public function render()
{

View File

@@ -9,6 +9,7 @@ use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
use Illuminate\Mail\Mailables\Attachment;
class ImportTransitMail extends Mailable
{
@@ -20,14 +21,17 @@ class ImportTransitMail extends Mailable
public $mailSubject;
public $excelPath;
/**
* Create a new message instance.
*/
public function __construct($scheduleType, $tableData, $mailSubject)
public function __construct($scheduleType, $tableData, $mailSubject, $excelPath)
{
$this->scheduleType = $scheduleType;
$this->tableData = $tableData ?? [];
$this->mailSubject = $mailSubject ?? 'Import Transit';
$this->excelPath = $excelPath;
}
/**
@@ -36,7 +40,7 @@ class ImportTransitMail extends Mailable
public function envelope(): Envelope
{
return new Envelope(
subject: 'Import Transit Mail',
subject: 'Import Shipment InTransit Mail',
);
}
@@ -45,7 +49,9 @@ class ImportTransitMail extends Mailable
*/
public function content(): Content
{
$greeting = '<b>Dear Sir</b>';
$now = now();
$reportDate = $now->format('d/m/Y');
$greeting = '<b>Dear Sir/Madam</b>,<br>Kindly find attached the Pending Import Shipment Status Report as on ' . $reportDate . ' for your reference.<br>We request you to review the shipments highlighted in <span style="background-color: yellow; font-weight: bold;">yellow</span> and arrange for their clearance at the earliest to avoid further delays and additional charges.<br>Please note that for shipments pending under <b>Telex Release</b> and <b>Duty Payment</b>, CFS charges will be commenced post ETA. We therefore urge you to expedite the necessary actions at your end.<br>FCL shipment will take 5-6 Days for clearance & LCL shipment will take 7-8 Days for clearance after arrival of the shipment @ destination Port.</br>';
//$greeting1 = 'Dear C.R.I Branch Team, <br><br> Please follow and ensure the same';
@@ -88,6 +94,14 @@ class ImportTransitMail extends Mailable
*/
public function attachments(): array
{
return [];
return [
Attachment::fromStorageDisk(
'local',
$this->excelPath
)->as('Import_Transit_Report.xlsx')
->withMime(
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
),
];
}
}

View File

@@ -30,6 +30,7 @@ class InvoiceValidation extends Model
'upload_status',
'batch_number',
'quantity',
'invoice_quantity',
'operator_id',
'created_by',
'updated_by',

View File

@@ -0,0 +1,46 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;
class PanelBoxValidation extends Model
{
use SoftDeletes;
protected $fillable = [
'plant_id',
'line_id',
'sticker_master_id',
'production_order',
'serial_number',
'serial_number_panel',
'pack_slip_panel',
'name_plate_panel',
'tube_sticker_panel',
'warranty_card_panel',
'part_validation1',
'part_validation2',
'part_validation3',
'part_validation4',
'part_validation5',
'created_by',
'updated_by'
];
public function plant(): BelongsTo
{
return $this->belongsTo(Plant::class);
}
public function line(): BelongsTo
{
return $this->belongsTo(Line::class);
}
public function stickerMaster(): BelongsTo
{
return $this->belongsTo(StickerMaster::class);
}
}

View File

@@ -49,6 +49,11 @@ class Plant extends Model
return $this->hasMany(StickerMaster::class, 'plant_id', 'id');
}
public function locators(): HasMany
{
return $this->hasMany(Locator::class, 'plant_id', 'id');
}
public function weightValidations(): HasMany
{
return $this->hasMany(WeightValidation::class, 'plant_id', 'id');
@@ -104,6 +109,11 @@ class Plant extends Model
return $this->hasMany(WorkGroupMaster::class, 'plant_id', 'id');
}
public function machines()
{
return $this->hasMany(Machine::class, 'plant_id', 'id');
}
public function processOrders()
{
return $this->hasMany(ProcessOrder::class, 'plant_id', 'id');
@@ -178,4 +188,9 @@ class Plant extends Model
{
return $this->hasMany(AsrsItemValidation::class, 'plant_id', 'id');
}
// public function locatorValidations()
// {
// return $this->hasMany(LocatorValidation::class, 'plant_id', 'id');
// }
}

View File

@@ -23,6 +23,7 @@ class VisitorEntry extends Model
'employee_master_id',
'number_of_person',
'valid_upto',
'mode_of_travel',
];
public function employeeMaster(): BelongsTo

View File

@@ -30,6 +30,11 @@ class WorkGroupMaster extends Model
return $this->hasMany(ProductCharacteristicsMaster::class);
}
public function machines()
{
return $this->hasMany(Machine::class, 'work_group_master_id');
}
// public function rejectReasons()
// {
// return $this->hasMany(RejectReason::class, 'work_group_master_id', 'id');

View File

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

View File

@@ -11,7 +11,7 @@
"althinect/filament-spatie-roles-permissions": "^2.3",
"diogogpinto/filament-auth-ui-enhancer": "^1.0",
"erag/laravel-pwa": "^1.9",
"filament/filament": "^5.0",
"filament/filament": "^3.3",
"intervention/image": "^3.11",
"irazasyed/telegram-bot-sdk": "^3.15",
"laravel/framework": "^11.31",

View File

@@ -0,0 +1,31 @@
<?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
{
$sql1 = <<<'SQL'
ALTER TABLE visitor_entries
ADD COLUMN mode_of_travel TEXT DEFAULT NULL
SQL;
DB::statement($sql1);
}
/**
* Reverse the migrations.
*/
public function down(): void
{
// Schema::table('visitor_entries', function (Blueprint $table) {
// //
// });
}
};

View File

@@ -0,0 +1,56 @@
<?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 panel_box_validations (
id BIGINT GENERATED always AS IDENTITY PRIMARY KEY,
plant_id BIGINT NOT NULL,
line_id BIGINT NOT NULL,
sticker_master_id BIGINT NOT NULL,
production_order TEXT DEFAULT NULL,
serial_number TEXT DEFAULT NULL,
serial_number_panel TEXT DEFAULT NULL,
pack_slip_panel TEXT DEFAULT NULL,
name_plate_panel TEXT DEFAULT NULL,
tube_sticker_panel TEXT DEFAULT NULL,
warranty_card_panel TEXT DEFAULT NULL,
part_validation1 TEXT DEFAULT NULL,
part_validation2 TEXT DEFAULT NULL,
part_validation3 TEXT DEFAULT NULL,
part_validation4 TEXT DEFAULT NULL,
part_validation5 TEXT DEFAULT NULL,
created_at TIMESTAMP NOT NULL DEFAULT NOW(),
updated_at TIMESTAMP,
created_by TEXT DEFAULT NULL,
updated_by TEXT DEFAULT NULL,
deleted_at TIMESTAMP,
UNIQUE (plant_id, serial_number),
FOREIGN KEY (plant_id) REFERENCES plants (id),
FOREIGN KEY (line_id) REFERENCES lines (id),
FOREIGN KEY (sticker_master_id) REFERENCES sticker_masters (id)
);
SQL;
DB::statement($sql);
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('panel_box_validations');
}
};

View File

@@ -0,0 +1,29 @@
<?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
{
DB::statement(<<<'SQL'
ALTER TABLE invoice_validations
ADD COLUMN invoice_quantity NUMERIC(10,3) NULL;
SQL);
}
/**
* Reverse the migrations.
*/
public function down(): void
{
// Schema::table('invoice_validations', function (Blueprint $table) {
// //
// });
}
};

View File

@@ -0,0 +1,6 @@
<div>
@livewire('panel-check-list', [
'records' => $existingRecords,
'data' => $data
])
</div>

View File

@@ -229,7 +229,9 @@
<th class="border px-4 py-2">No</th>
<th class="border px-4 py-2">Material Code</th>
<th class="border px-4 py-2">Material Type</th>
<th class="border px-4 py-2">Material Quantity</th>
<th class="border px-4 py-2">Invoice Quantity</th>
<th class="border px-4 py-2">To Be Scanned</th>
<th class="border px-4 py-2">Scanned Quantity</th>
<th class="border px-4 py-2">Serial Number</th>
<th class="border px-4 py-2">Batch Number</th>
<th class="border px-4 py-2">TimeStamp</th>
@@ -244,9 +246,23 @@
<td class="border px-4 py-2">{{ $row['material_type'] ?? 'N/A' }}</td>
<td class="border px-4 py-2">
@if(($row['material_type'] ?? '') == 'Individual' || ($row['material_type'] ?? '') == 'Bundle' || ($row['material_type'] ?? '') == 'Bundle Individual')
{{ number_format((float)($row['quantity'] ?? 0), 0) }}
{{ number_format((float)($row['invoice_quantity'] ?? 0), 0) }}
@else
{{ $row['quantity'] ?? 'N/A' }}
{{ $row['invoice_quantity'] ?? 'N/A' }}
@endif
</td>
<td class="border px-4 py-2">
@if(($row['material_type'] ?? '') == 'Individual' || ($row['material_type'] ?? '') == 'Bundle' || ($row['material_type'] ?? '') == 'Bundle Individual')
{{ number_format((float)($row['quantity'] ?? 0), 0) }}
@else
{{ $row['quantity'] ?? 'N/A' }}
@endif
</td>
<td class="border px-4 py-2">
@if(($row['material_type'] ?? '') == 'Individual' || ($row['material_type'] ?? '') == 'Bundle' || ($row['material_type'] ?? '') == 'Bundle Individual')
{{ number_format((float)($row['scanned_quantity'] ?? 0), 0) }}
@else
{{ $row['scanned_quantity'] ?? 'N/A' }}
@endif
</td>
<td class="border px-4 py-2">{{ $row['serial_number'] ?? 'N/A' }}</td>

View File

@@ -0,0 +1,141 @@
<div class="fixed inset-0 flex items-center justify-center z-50">
{{-- <div class="bg-white max-h-[80vh] overflow-hidden p-6 rounded-lg shadow-lg pointer-events-auto"
style="width:30vw !important; max-width:none !important;"> --}}
<div
class="bg-white rounded-lg shadow-lg pointer-events-auto
w-full max-w-2xl max-h-[90vh] flex flex-col">
{{-- @if($records && $records->count()) --}}
@if(!empty($records) && count($records))
<div style="max-height:250px; overflow-y:auto; border:1px solid #ccc;">
{{-- <table class="min-w-full border"> --}}
<table class="w-full table-fixed border text-sm">
<thead>
<tr class="bg-gray-100">
<th class="border px-2 py-1 w-2/3">Characteristics</th>
<th class="border px-2 py-1 w-1/3">Value</th>
</tr>
</thead>
<tbody>
@foreach($records as $record)
<tr>
<td class="border p-2">
{{ $record['name'] }}
</td>
{{-- <td class="border p-2">
<input
type="text"
wire:model.defer="checklist.{{ $record['id'] }}"
wire:model.live="checklist.{{ $record['id'] }}"
class="w-full border rounded px-2 py-1"
placeholder="Enter value"
>
</td> --}}
{{-- <td class="border p-2">
@php
$status = $this->getCharacteristicStatus($record['id']);
@endphp
<input
type="text"
wire:model.live="checklist.{{ $record['id'] }}"
class="w-full rounded px-2 py-1 border-2 transition-all duration-200"
style="
@if($status === 'Ok')
border-color: #22c55e;
box-shadow: 0 0 8px rgba(34, 197, 94, 0.8);
@elseif($status === 'Not Ok')
border-color: #ef4444;
box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
@else
border-color: #d1d5db;
@endif
"
placeholder="Enter value"
>
</td> --}}
<td class="border p-2">
@php
$status = $this->getCharacteristicStatus($record['id']);
@endphp
@if(($record['inspection_type'] ?? null) === 'Visual')
<div class="flex gap-4">
<label class="flex items-center gap-1">
<input
type="radio"
wire:model.live="checklist.{{ $record['id'] }}"
value="Ok"
>
Ok
</label>
<label class="flex items-center gap-1">
<input
type="radio"
wire:model.live="checklist.{{ $record['id'] }}"
value="NotOk"
>
Not Ok
</label>
</div>
@else
<input
type="text"
wire:model.live="checklist.{{ $record['id'] }}"
class="w-full rounded px-2 py-1 border-2 transition-all duration-200"
style="
@if($status === 'Ok')
border-color: #22c55e;
box-shadow: 0 0 8px rgba(34, 197, 94, 0.8);
@elseif($status === 'Not Ok')
border-color: #ef4444;
box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
@else
border-color: #d1d5db;
@endif
"
placeholder="Enter value"
>
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
@else
<p>No records found.</p>
@endif
<div class="border-t mt-6 pt-4 flex justify-end gap-3">
<button
type="button"
wire:click="cancel"
style="background-color:#dc2626; color:white;"
class="px-6 py-2 rounded-lg shadow-md"
>
Cancel
</button>
<button
type="button"
wire:click="saveChecklist"
style="background-color:#16a34a; color:white;"
{{-- @disabled(!$this->canSaveChecklist()) --}}
class="px-6 py-2 rounded-lg shadow-md disabled:opacity-50 disabled:cursor-not-allowed"
>
Save
</button>
</div>
</div>
</div>

View File

@@ -1,7 +1,11 @@
<div class="fixed inset-0 flex items-center justify-center z-50">
<div class="bg-white max-h-[80vh] overflow-hidden p-6 rounded-lg shadow-lg pointer-events-auto"
style="width:30vw !important; max-width:none !important;">
{{-- <div class="bg-white max-h-[80vh] overflow-hidden p-6 rounded-lg shadow-lg pointer-events-auto"
style="width:30vw !important; max-width:none !important;"> --}}
<div
class="bg-white rounded-lg shadow-lg pointer-events-auto
w-full max-w-2xl max-h-[90vh] flex flex-col">
{{-- @if($records && $records->count()) --}}
@if(!empty($records) && count($records))
@@ -14,6 +18,7 @@
<th class="border px-2 py-1 w-2/3">Characteristics</th>
<th class="border px-2 py-1 w-1/6">OK</th>
<th class="border px-2 py-1 w-1/6">Not OK</th>
<th class="border px-2 py-1 w-1/6">N/A</th>
</tr>
</thead>
<tbody>
@@ -34,6 +39,12 @@
wire:model="checklist.{{ $record['id'] }}"
value="not_ok">
</td>
<td class="border text-center">
<input type="radio"
wire:model="checklist.{{ $record['id'] }}"
value="na">
</td>
</tr>
@endforeach
</tbody>

View File

@@ -29,6 +29,10 @@
<td>Item Code</td>
<td style="text-align: center;">{{ $request->item->code ?? $request->code }}</td>
</tr>
<tr>
<td>Description</td>
<td style="text-align: center;">{{ $request->item->description ?? $request->description }}</td>
</tr>
<tr>
<td>Job Number</td>
<td style="text-align: center;">{{ $request->aufnr }}</td>

View File

@@ -19,13 +19,13 @@
table {
border-collapse: collapse;
width: 100%;
font-size: 14px;
font-size: 10px;
white-space: nowrap !important;
}
th, td {
border: 1px solid #020813da;
padding: 8px 10px;
text-align: center;
text-align: left;
white-space: nowrap !important;
text-overflow: ellipsis;
}
@@ -41,6 +41,13 @@
background-color: #f3f4f6;
}
.status-column {
text-align: left !important;
white-space: normal !important;
min-width: 250px;
width: 250px;
vertical-align: top;
}
.footer {
text-align: center;
font-size: 13px;
@@ -64,7 +71,6 @@
<tr>
<th>No</th>
<th>CRI RFQ Number</th>
<th>Ref Number</th>
<th>Requestor</th>
<th>Shipper</th>
<th>Shipper Location</th>
@@ -83,36 +89,30 @@
<tr style="{{ $row['is_transit_identified'] == 1 ? 'background-color:#FFFF00;' . 'font-weight: bold;' : '' }}">
<td>{{ $loop->iteration }}</td>
<td>{{ $row['cri_rfq_number'] }}</td>
{{-- <td>{{ $row['mail_received_date'] }}</td> --}}
{{-- <td>{{ \Carbon\Carbon::parse($row['mail_received_date'])->format('Y-m-d') }}</td> --}}
<td>{{ $row['pricol_ref_number'] }}</td>
<td>{{ $row['requester'] }}</td>
<td>{{ $row['shipper'] }}</td>
<td>{{ $row['shipper_location'] }}</td>
<td>{{ $row['shipper_invoice'] }}</td>
{{-- <td>{{ $row['shipper_invoice_date'] }}</td> --}}
<td>{{ \Carbon\Carbon::parse($row['shipper_invoice_date'])->format('Y-m-d') }}</td>
{{-- <td>{{ \Carbon\Carbon::parse($row['shipper_invoice_date'])->format('Y-m-d') }}</td> --}}
<td>
{{ !empty($row['shipper_invoice_date']) ? \Carbon\Carbon::parse($row['shipper_invoice_date'])->format('Y-m-d') : '' }}
</td>
<td>{{ $row['customs_agent_name'] }}</td>
{{-- <td>{{ $row['eta_date'] }}</td> --}}
<td>{{ \Carbon\Carbon::parse($row['eta_date'])->format('Y-m-d') }}</td>
<td>{{ $row['status'] }}</td>
{{-- <td>{{ \Carbon\Carbon::parse($row['eta_date'])->format('Y-m-d') }}</td> --}}
<td>
{{ !empty($row['eta_date']) ? \Carbon\Carbon::parse($row['eta_date'])->format('Y-m-d') : '' }}
</td>
<td class="status-column">
{{ $row['status'] }}
</td>
<td>{{ $row['delivery_location'] }}</td>
{{-- <td>{{ $row['etd_date'] }}</td> --}}
<td>{{ \Carbon\Carbon::parse($row['etd_date'])->format('Y-m-d') }}</td>
{{-- <td>{{ $row['mode'] }}</td>
<td>{{ $row['inco_terms'] }}</td>
<td>{{ $row['port_of_loading'] }}</td>
<td>{{ $row['port_of_discharge'] }}</td>
<td>{{ $row['delivery_city'] }}</td>
<td>{{ $row['packages'] }}</td>
<td>{{ $row['type_of_package'] }}</td>
<td>{{ $row['gross_weight'] }}</td>
<td>{{ $row['volume'] }}</td>
<td>{{ $row['bill_number'] }}</td> --}}
{{-- <td>{{ $row['bill_received_date'] }}</td> --}}
{{-- <td>{{ \Carbon\Carbon::parse($row['bill_received_date'])->format('Y-m-d') }}</td>
<td>{{ $row['vessel_number'] }}</td> --}}
<td>{{ $row['remark'] }}</td>
{{-- <td>{{ \Carbon\Carbon::parse($row['etd_date'])->format('Y-m-d') }}</td> --}}
<td>
{{ !empty($row['etd_date']) ? \Carbon\Carbon::parse($row['etd_date'])->format('Y-m-d') : '' }}
</td>
<td>
{{ $row['remark'] }}
</td>
</tr>
@endforeach
</tbody>

View File

@@ -1,6 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<style>
@page {
margin: 0;

View File

@@ -1,6 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<style>
@page {
margin: 0;

View File

@@ -1,6 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<style>
@page {
margin: 0;

View File

@@ -41,32 +41,26 @@
.badge-header {
background: #1a1a2e;
color: #fff;
text-align: center;
padding: 2mm 2mm 1.5mm;
padding: 1.5mm 2mm;
font-size: 8pt;
font-weight: bold;
letter-spacing: 1px;
display: flex;
justify-content: space-between;
align-items: center;
flex-shrink: 0;
}
.badge-header .type {
font-size: 9pt;
letter-spacing: 2px;
}
.badge-header .badge-id {
font-size: 7pt;
opacity: 0.85;
}
.badge-header .type { font-size: 9pt; letter-spacing: 2px; }
.badge-header .badge-id { font-size: 7pt; opacity: 0.85; }
/* ── Body ── */
.badge-body {
display: flex;
flex: 1;
padding: 2mm;
padding: 1.5mm 2mm;
gap: 2mm;
overflow: hidden;
}
/* ── Fields (left) ── */
@@ -74,82 +68,104 @@
flex: 1;
display: flex;
flex-direction: column;
gap: 1.2mm;
overflow: hidden;
}
.field-row {
display: grid;
grid-template-columns: 16mm 3mm 1fr;
line-height: 1.3;
margin-bottom: 0.7mm;
line-height: 1.25;
margin-bottom: 0.6mm;
align-items: start;
}
.field-label {
color: #000; /* was #555 — now pure black */
color: #000;
font-size: 6.5pt;
font-weight: 700; /* was normal — now bold */
font-weight: 700;
white-space: nowrap;
}
.field-colon {
color: #000; /* was #555 — now pure black */
color: #000;
font-size: 6.5pt;
font-weight: 700; /* added bold */
font-weight: 700;
text-align: center;
}
.field-value {
font-weight: 700; /* was 600 — now fully bold */
font-weight: 700;
font-size: 6.5pt;
color: #000; /* was #111 — now pure black */
color: #000;
/* Prevent wrapping — truncate with ellipsis if too long */
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* ── Photo (right) ── */
/* ── Photo column (right) ── */
.badge-photo {
display: flex;
flex-direction: column;
align-items: center;
gap: 1mm;
width: 18mm;
flex-shrink: 0;
gap: 0.5mm;
}
.badge-photo img {
width: 16mm;
height: 18mm;
height: 16mm;
object-fit: cover;
border: 1px solid #ccc;
border: 1px solid #000;
}
.badge-photo .no-photo {
width: 16mm;
height: 18mm;
border: 1.5px dashed #000; /* was #aaa — darker border */
height: 16mm;
border: 1.5px dashed #000;
display: flex;
align-items: center;
justify-content: center;
font-size: 6pt; /* slightly larger */
color: #000; /* was #aaa */
font-size: 6pt;
color: #000;
font-weight: 700;
text-align: center;
}
.host-sign {
font-size: 6pt; /* was 5.5pt — slightly larger */
color: #000; /* was #555 — now pure black */
font-weight: 700; /* added bold */
font-size: 6pt;
color: #000;
font-weight: 700;
text-align: center;
border-top: 1px solid #000; /* was 0.5px #aaa — darker line */
border-top: 1px solid #000;
padding-top: 0.5mm;
width: 100%;
}
/* ── QR code ── */
.visitor-qr {
margin-top: 1mm;
width: 18mm;
display: flex;
justify-content: center;
}
.visitor-qr svg {
width: 16mm !important;
height: 16mm !important;
display: block;
}
/* ── Footer ── */
.badge-footer {
border-top: 1px solid #000; /* was 0.5px #ddd — darker line */
padding: 1mm 2mm;
border-top: 1px solid #000;
padding: 0.8mm 2mm;
text-align: right;
font-size: 6pt; /* was 5.5pt — slightly larger */
color: #000; /* was #888 — now pure black */
font-weight: 700; /* added bold */
font-size: 6pt;
color: #000;
font-weight: 700;
flex-shrink: 0;
}
@media print {
@@ -158,9 +174,9 @@
}
</style>
</head>
<body onload="window.print()">
<body>
{{-- ── Print button (visible on screen only, hidden when printing) ── --}}
{{-- ── Print / Close buttons (screen only) ── --}}
<div class="no-print" style="padding: 8px; text-align:center; background:#f3f4f6;">
<button onclick="window.print()" style="padding:6px 18px; background:#1a1a2e; color:#fff; border:none; border-radius:6px; cursor:pointer; font-size:13px;">
🖨️ Print Badge
@@ -175,7 +191,7 @@
{{-- Header --}}
<div class="badge-header">
<span class="type">{{ strtoupper($visitor->type ?? 'VISITOR') }}</span>
<span class="badge-id">#{{ str_pad($visitor->register_id, 5, '0', STR_PAD_LEFT) }}</span>
<span class="badge-id">#{{ $visitor->register_id ?? str_pad($visitor->id, 5, '0', STR_PAD_LEFT) }}</span>
</div>
{{-- Body --}}
@@ -183,61 +199,62 @@
{{-- Left: fields --}}
<div class="badge-fields">
<div class="field-row">
<span class="field-label">Name</span>
<span class="field-colon">:</span>
<span class="field-value">{{ strtoupper($visitor->name) }}</span>
</div>
<div class="field-row">
<span class="field-label">Company</span>
<span class="field-colon">:</span>
<span class="field-value">{{ $visitor->company }}</span>
</div>
<div class="field-row">
<span class="field-label">To Meet</span>
<span class="field-colon">:</span>
<span class="field-value">{{ strtoupper($visitor->employeeMaster?->name ?? '—') }}</span>
</div>
<div class="field-row">
<span class="field-label">Dept</span>
<span class="field-colon">:</span>
<span class="field-value">{{ strtoupper($visitor->employeeMaster?->department ?? $visitor->department ?? '—') }}</span>
</div>
<div class="field-row">
<span class="field-label">Valid Upto</span>
<span class="field-colon">:</span>
<span class="field-value">{{ $visitor->valid_upto ? \Carbon\Carbon::parse($visitor->valid_upto)->format('d/m/Y H:i:s') : '—' }}</span>
</div>
<div class="field-row">
<span class="field-label">Date & Time</span>
<span class="field-colon">:</span>
<span class="field-value">{{ $visitor->in_time ? \Carbon\Carbon::parse($visitor->in_time)->format('d/m/Y H:i:s') : '—' }}</span>
</div>
<div class="field-row">
<span class="field-label">No of Visitors</span>
<span class="field-colon">:</span>
<span class="field-value">{{ $visitor->number_of_person ?? 1 }}</span>
</div>
<div class="field-row">
<span class="field-label">Name</span>
<span class="field-colon">:</span>
<span class="field-value">{{ strtoupper($visitor->name) }}</span>
</div>
<div class="field-row">
<span class="field-label">Company</span>
<span class="field-colon">:</span>
<span class="field-value">{{ $visitor->company }}</span>
</div>
<div class="field-row">
<span class="field-label">To Meet</span>
<span class="field-colon">:</span>
<span class="field-value">{{ strtoupper($visitor->employeeMaster?->name ?? '—') }}</span>
</div>
<div class="field-row">
<span class="field-label">Dept</span>
<span class="field-colon">:</span>
<span class="field-value">{{ strtoupper($visitor->employeeMaster?->department ?? $visitor->department ?? '—') }}</span>
</div>
<div class="field-row">
<span class="field-label">Valid Upto</span>
<span class="field-colon">:</span>
<span class="field-value">{{ $visitor->valid_upto ? \Carbon\Carbon::parse($visitor->valid_upto)->format('d/m/Y H:i:s') : '—' }}</span>
</div>
<div class="field-row">
<span class="field-label">Date & Time</span>
<span class="field-colon">:</span>
<span class="field-value">{{ $visitor->in_time ? \Carbon\Carbon::parse($visitor->in_time)->format('d/m/Y H:i:s') : '—' }}</span>
</div>
<div class="field-row">
<span class="field-label">No of Visitors</span>
<span class="field-colon">:</span>
<span class="field-value">{{ $visitor->number_of_person ?? 1 }}</span>
</div>
</div>
{{-- Right: photo + host sign --}}
{{-- Right: photo + host sign + QR --}}
<div class="badge-photo">
@if($photoUrl)
<img src="{{ $photoUrl }}" alt="Visitor Photo" />
@else
<div class="no-photo">No Photo</div>
@endif
<div class="host-sign">Host Sign</div>
<div class="visitor-qr" style="margin-top:2mm;">
{{-- {!! QrCode::size(25)
->margin(0)
->generate($visitor->register_id) !!} --}}
@if(!empty($visitor->register_id))
{!! QrCode::size(35)
->margin(0)
{{-- QR Code high res, with quiet zone and high error correction --}}
@if(!empty($visitor->register_id))
<div class="visitor-qr">
{!! QrCode::size(300)
->margin(2)
->errorCorrection('H')
->generate((string) $visitor->register_id) !!}
@endif
</div>
</div>
@endif
</div>
</div>
@@ -247,5 +264,11 @@
</div>
<script>
window.addEventListener('load', function () {
setTimeout(function () { window.print(); }, 300);
});
</script>
</body>
</html>