Commit Graph

22 Commits

Author SHA1 Message Date
Kazem Alghasi
b25bfda597 feat(core): enhance order processing and bridge integration
Refactor the order and shipment lifecycle across WordPress and Laravel,
improving multi-package handling, payment automation, and frontend
reliability.

- Laravel:
  - Rename `package_number` to `package_no` and `description` to
    `content_description` in `ShipmentPackage` model and controller.
  - Update `PaymentController` to automatically transition approved
    shipments to `Processed` status upon successful payment.
  - Adjust `OrderPaymentService` to validate against `Approved` status
    instead of `PendingPayment`.
  - Expose `/countries` endpoint as a public route (unauthenticated).
  - Remove obsolete `read_excel.php` utility.

- WordPress (Bridge Plugin & Theme):
  - Implement AJAX handler for wallet-based order payments.
  - Update `ifnex-order-form.js` to support multi-package input names
    and auto-select Iran based on shipment direction.
  - Improve error handling and feedback in the order form and country
    loading logic.
  - Add automatic tracking submission when an `awb` parameter is
    present in the URL.
  - Update CSS with `!important` flags to ensure correct visibility
    of form steps and dashboard elements.
  - Implement cache-busting for plugin assets and prevent OPcache
    stale files via header controls.
  - Optimize theme logo loading with eager loading and explicit
    dimensions.
2026-09-09 12:03:58 +03:30
Kazem Alghasi
02c29db696 feat(core): implement order approval flow, credit system, and import invoicing
Introduce a comprehensive set of commercial features including a multi-step
order approval workflow, customer credit management, and specialized
import service invoicing.

Key changes:
- Implement `pending_approval` and `approved` shipment statuses to allow
  staff verification before customer payment.
- Add a credit system to `User` model with `credit_limit` and `credit_used`
  to manage customer balances and debts.
- Develop a new `importInvoice` PDF generation service following the
  "Sheet ENG Invoice" specification for import services.
- Add Filament resources for managing Audit Logs, Commitment Forms,
  Customer Credits, and Shipment Checklists.
- Implement staff-specific APIs for order approval/rejection and
  customer financial status monitoring.
- Integrate Kavenegar SMS service for mobile verification and notifications.
- Add bulk tracking import functionality via CSV/Excel.
- Update WordPress bridge assets (CSS/JS) to support the new multi-step
  order form UI and updated redirection logic.
- Update deployment configurations and documentation to reflect new
  production domains and feature sets.
2026-09-03 06:04:20 +03:30
Kazem Alghasi
b35e933475 Phase 3.5 — Core Features Complete:
 Multi-Package Support (3.5.1)
- Add shipment_packages migration and ShipmentPackage model
- Add packages() relation to Shipment model
- Update CustomerOrderController to accept packages[] array
- Auto-calculate volumetric weight from dimensions (L*W*H/5000)
- Repeater UI for adding/removing packages
- Real-time summary of total weights

 Invoice Form for PARCEL (3.5.2)
- New step in order form (only for PARCEL type)
- Customs items: description, HS Code, quantity, unit price (USD)
- Auto-calculate total per item and invoice total
- Maximum 9 items
- 5-step order form structure

 PDF Redesign (3.5.4)
- Install picqer/php-barcode-generator
- Redesign AWB with barcode, From/To, Value, Service, Type
- Redesign Invoice with 9-row table, legal declaration
- Redesign Label to A5 landscape with large barcode
- DOC/PARCEL condition (only PARCEL has invoice)
- Barcode as base64 embed

 Technical Fixes (3.5.5)
- Add Enum casts to Shipment model (status, direction, type)
- Fix deselectAfterCompletion -> deselectRecordsAfterCompletion
- Migration for shipment_items (row_number, unit_price)
- Migration to make name nullable
- Fix Enum method names (DocNormal/DocEconomy)

 Tracking Test (3.5.6)
- Update TrackController with status_label
- Redesign tracking page with beautiful timeline
- Status box with colored badge
- Timeline with date, description, location, source
- Carrier mappings section

Documentation:
- Update README, Laravel_README, Roadmap, Checklist
- Add IFNEX_Meeting_Summary.md for client presentation
- Update IFNEX_I18N_Strategy.md (moved to deploy phase)

Phase 3.5 — 90% complete (i18n moved to deploy phase)"
2026-08-29 08:35:34 +03:30
Kazem Alghasi
1e4a8532fa - Phase 3.5.1: Multi-Package support in order form
- Phase 3.5.2: Invoice items form (PARCEL only)
- ShipmentPackage model and migration
- Updated CustomerOrderController to accept packages[] and items[]
- Auto-calculate volumetric weight from dimensions
- 5-step order form with conditional Invoice step

Phase 3.5 — core complete"
git push origin main
2026-08-29 07:33:28 +03:30
Kazem Alghasi
1c8fb2c9d9 - Add shipment_packages migration and ShipmentPackage model
- Add packages() relation to Shipment model
- Update CustomerOrderController to accept packages[] array
- Auto-calculate volumetric weight from dimensions (L*W*H/5000)
- Redesign order form Step 1 with Multi-Package UI
- Add package repeater (add/remove packages)
- Real-time summary of total weights
- Both real weight and dimensions are required
- Dimensions normalized to * format (5*6*9)

Phase 3.5.1 — Multi-Package complete"
2026-08-29 07:09:25 +03:30
Kazem Alghasi
a1a6dbdd8a feat(core): complete phase 3 integration and enhance country/phone features
This commit marks the completion of Phase 3 (Integration and Improvements) and updates the project status to reflect that Phases 0 through 3 are finished.

Key changes include:
- **Laravel (Backend):**
  - Added `calling_code` column to `countries` table via new migration.
  - Added scripts to update calling codes for all countries.
  - Updated `CustomerOrderController` to include `calling_code` in country data.
  - Registered `api_key` middleware alias in `bootstrap/app.php`.
  - Improved error handling to return JSON 401 for API authentication failures.
  - Updated `README.md` with detailed architecture and feature descriptions.
- **WordPress (Frontend/Bridge):**
  - Added `ifnex_wallet_charge` shortcode and AJAX handler for wallet top-ups.
  - Implemented auto-fill for calling codes in the order form based on selected country.
  - Added real-time phone number validation (digits, +, spaces only).
  - Added English-only validation for name, city, and address fields with UI warnings.
  - Updated asset enqueuing logic and versioning for CSS/JS.
- **Documentation:**
  - Updated `IFNEX_File_Map.md`, `IFNEX_Phase0_Checklist.md`, and `IFNEX_Roadmap.md` to reflect completed phases and new features.
  - Updated `DEPLOYMENT.md` with new environment variables (`IFNEX_BRIDGE_API_KEY`) and required WordPress pages.
  - Updated project `README.md` with comprehensive feature list and system architecture.
2026-08-29 04:38:28 +03:30
Kazem Alghasi
528a82e38c حذف برخی پلاکین های زاید وردپرس 2026-08-29 01:45:26 +03:30
Kazem Alghasi
98181abc45 feat(api): expose notification endpoints for customer dashboard
Implement backend support for the user notification system by adding
endpoints to retrieve and manage notifications.

- Add `notifications` and `markNotificationRead` methods to
  `CustomerOrderController`
- Register notification routes under the `v1` API prefix
- Update `IFNEX_User_Bridge` in WordPress to support fetching
  notifications and marking them as read via API calls
2026-08-24 05:13:22 +03:30
Kazem Alghasi
fc1c2f023d feat(ui): implement user notification system in customer dashboard
Integrate a new notification module into the customer dashboard to allow users to view and manage alerts.

- Add `get_notifications` and `mark_notification_read` methods to `IFNEX_User_Bridge` to interface with the API
- Introduce a new 'notifications' tab in the customer dashboard shortcode
- Implement notification badge logic to display unread counts in the sidebar menu
- Add new SVG icon for notifications
- Add comprehensive CSS styles for notification items, badges, and unread states
2026-08-24 04:48:08 +03:30
Kazem Alghasi
1c2ff9941e feat(order): add English address detection warning in order form
Implement a real-time language detection mechanism for sender and
receiver address fields to warn users when they enter addresses
exclusively in English.

- Add JavaScript logic to detect non-Arabic/Persian characters in address inputs
- Implement a warning UI component with specific styling for address alerts
- Update order form shortcode to include warning containers
- Increment CSS asset versions to ensure style updates are applied
2026-08-24 04:16:06 +03:30
Kazem Alghasi
c0a50acaef style(ui): modernize transaction list styling and update plugin version
Update the transaction interface with a modern design including improved
typography, card-based layouts, and color-coded status badges.

- Add comprehensive CSS for transaction items, types, and statuses
- Implement responsive styles for mobile transaction views
- Update transaction shortcode to include pagination limit
- Increment plugin asset version to 1.5.0
2026-08-24 04:04:29 +03:30
Kazem Alghasi
11b524cf43 refactor: improve hero section responsiveness and update admin path
WordPress:
- Refactor hero section layout using CSS Grid for better responsiveness across desktop, tablet, and mobile devices.
- Improve spacing and alignment for hero buttons and trust badges.
- Fix admin bar offset issues in the hero section.
- Clean up redundant HTML tags in front-page template.

Laravel:
- Change Filament admin panel path from 'admin' to 'panel'.
- Clean up comments in web routes.
2026-08-12 11:58:46 +03:30
Kazem Alghasi
779c5aab98 feat(theme): implement custom login template and dynamic navigation
Implement a new split-design login page template and enhance theme
navigation logic to improve user experience:

- Add `template-login.php` with a modern split-screen layout featuring
  animated decorative elements and a clean form interface.
- Implement dynamic header navigation that toggles between "Client Login"
  and "Dashboard" based on user authentication status.
- Update front-page service links to point to functional account and
  tracking endpoints.
- Add comprehensive CSS for the new login page design, including
  animations and responsive form styling.
- Update footer credits to reflect VernaSoft.
2026-08-12 05:34:06 +03:30
Kazem Alghasi
f08981da31 feat(ui): implement modern customer dashboard
Implement a new, modern customer dashboard interface including:
- A new `[ifnex_customer_dashboard]` shortcode.
- A redesigned sidebar with user profile information and navigation.
- A statistics overview section with icon-based cards.
- Modern SVG icon system (Heroicons style) for dashboard elements.
- Updated CSS with a modern design language (gradients, shadows, and flexbox layouts).
- Global asset enqueuing to ensure consistent styling and AJAX availability across all plugin-related pages.
2026-08-12 03:52:35 +03:30
Kazem Alghasi
bac2a7bb25 feat: Complete WordPress customer portal 2026-08-10 13:08:53 +03:30
Kazem Alghasi
4ee1d27d44 feat: Complete customer ordering system (Phase 3)
Laravel Backend:
- Add AuthController for Sanctum token login/logout
- Add CustomerOrderController with 6 endpoints
  (profile, countries, orders CRUD, cancel)
- Extend ShipmentStatus enum with pending_payment/cancelled
- Add SampleShippingRatesSeeder (10 zones, 3 service types)
- Zone-assign 232 countries (Gulf=1, Asia=2, EU=3, East=4, US=5)
- Add migration to extend shipments.status enum
- Add test-api.php automated test suite (5 tests)

WordPress Frontend:
- Add [ifnex_order_form] multi-step wizard (4 steps)
- Add [ifnex_orders_list] with status filter & cancel action
- Add [ifnex_user_profile] with wallet & stats
- Add ifnex-orders.css (RTL-ready, IFNEX theme)
- Add ifnex-order-form.js (step navigation + AJAX)
- Add AJAX handlers (countries, calculate, submit, cancel)
- Fix plugin asset paths with dirname(__FILE__)
2026-08-10 06:09:56 +03:30
Kazem Alghasi
1f70fe5ee0 feat(theme): implement multi-language support and enhanced customizer
Introduce comprehensive localization capabilities and expanded theme
customization options for the ifnex theme.

- Add Polylang-compatible language switching logic and UI components
- Implement LTR/RTL direction handling based on active language
- Add new Customizer sections for logo management and language settings
- Add localized content support for Hero section and site metadata
- Refactor template files (header, footer, single, front-page) to use
  translation functions and dynamic content
- Add support for custom logo images via WordPress Customizer
- Implement new archive template and improved single post layout
- Update CSS to handle English (LTR) mode and language-specific styling
2026-08-09 02:25:01 +03:30
Kazem Alghasi
56244f14fa fix(wp): update to version 7.0.3 and improve security
Upgrade WordPress core to version 7.0.3 and implement various security
hardening measures, including improved input sanitization, enhanced
URL validation for HTTP requests, and stricter CSS filtering.

- Update version to 7.0.3 in version.php and about.php
- Implement stricter IP address validation in wp_http_validate_url()
- Add escaping to user-related error messages and authentication flows
- Improve sanitization in block rendering (post-content, post-date)
- Enhance CSS filtering in kses.php to handle PCRE errors
- Add validation for tagName attributes in post-content block
- Update emoji loader to use more secure DOM selection patterns
- Enable WP_DEBUG and error logging in wp-config.php
- Add new ifnex theme directory
2026-08-09 01:32:57 +03:30
Kazem Alghasi
8b0814230c feat(ui): implement unified design system and financial reporting
Introduce a comprehensive design system across WordPress and Laravel
to ensure visual consistency. Implement new financial reporting
capabilities and Excel export functionality within the Filament admin
panel.

- Add `DESIGN_SYSTEM.md` to define brand colors, typography, and spacing
- Implement `FinancialReport` page in Filament for transaction and
  shipment summaries
- Add Excel export support for `ShipmentResource` and
  `WalletTransactionResource` using Laravel Excel
- Refactor WordPress plugin and Filament CSS to utilize the new
  design system variables
- Update project status to reflect new reporting and design milestones
2026-08-08 06:13:09 +03:30
Kazem Alghasi
b605b689fd feat(wp-plugin): expand IFNEX Bridge with wallet and transaction support
Extend the WordPress bridge plugin to provide seamless integration with
the backend wallet system. This update introduces user-specific
functionality via shortcodes and AJAX.

- feat(bridge): implement `IFNEX_User_Bridge` for Sanctum token management
- feat(bridge): add `[ifnex_wallet_balance]` shortcode for balance display
- feat(bridge): add `[ifnex_transactions]` shortcode for transaction history
- feat(bridge): implement AJAX handlers for real-time balance and transaction updates
- feat(bridge): add plugin-specific CSS assets and enqueueing logic
- docs: update project status with new bridge capabilities
- chore: add plugin testing utility and asset directory structure
2026-08-08 03:49:46 +03:30
Kazem Alghasi
97e641de42 feat(wp): add ifnex-bridge plugin for Laravel API integration
Implement a new WordPress plugin to bridge the frontend with the Laravel
logistics API. This includes:

- API client for secure shipment tracking via Bearer token
- Admin settings page for configuring API URL and Key
- Shortcodes for embedding tracking forms and status displays
- AJAX-based tracking form with real-time results and timeline view
2026-08-04 11:38:36 +03:30
Kazem Alghasi
c95e992dbb feat: Complete Phase 1 core logic and WP bridge setup 2026-08-01 04:01:22 +03:30