-- Pacific Logistics · slice 08 · Data Import perms
--
-- The Import controller lets HR / Ops / Fleet / Admin bulk-upload trucks,
-- drivers, and customers from an Excel template. Parsing is client-side via
-- SheetJS; server validates and inserts row-by-row. Access is deliberately
-- narrow — this is a data-heavy privileged action.

INSERT IGNORE INTO user_groups_perms (user_group_id, controller_allowed, action_allowed, created_by, created_on) VALUES
-- Administrator (10) — full
(10, 'Import', 'index',           1, NOW()),
(10, 'Import', 'trucksAj',        1, NOW()),
(10, 'Import', 'driversAj',       1, NOW()),
(10, 'Import', 'customersAj',     1, NOW()),
-- Ops Manager (20) — can import trucks and customers
(20, 'Import', 'index',           1, NOW()),
(20, 'Import', 'trucksAj',        1, NOW()),
(20, 'Import', 'customersAj',     1, NOW()),
-- Fleet Manager (22) — can import trucks
(22, 'Import', 'index',           1, NOW()),
(22, 'Import', 'trucksAj',        1, NOW()),
-- HR Officer (24) — can import drivers
(24, 'Import', 'index',           1, NOW()),
(24, 'Import', 'driversAj',       1, NOW()),
-- Accountant (3) — can import customers (for AR opening balances migration)
(3,  'Import', 'index',           1, NOW()),
(3,  'Import', 'customersAj',     1, NOW());
