feat: Complete Shiplogic integration with mobile-optimized ops workflow
**Shiplogic API Integration:**
- Fixed API base URL configuration (removed /api suffix)
- Implemented comprehensive request/response logging for rates and shipments endpoints
- Fixed PDF fetching: API returns S3 URLs, now downloads actual PDFs from S3
- Added tests and mock API responses for local development (routes/shiplogic-mock.php)
**Courier Service Enhancements:**
- Added redownloadShipmentPdfs() public method for re-downloading corrupted PDFs
- Enhanced error logging with full request/response bodies for debugging
- Proper binary PDF storage using Laravel Storage facade
- URL and S3 download handling for Shiplogic API responses
**Workflow & Operations:**
- Changed to manual "Ready for Collection" button instead of automatic move
- Operators now: scan QR → apply labels → click "Ready for Collection" → moves to Awaiting Collection
- Removed duplicate PDF attachments to Trello (was adding twice from two listeners)
- Fixed NotifySlackOnShipmentCreated to only handle Slack notifications
**Mobile-Optimized Ops Page:**
- Removed QR code display from order detail page
- Implemented responsive single-column layout for mobile phones
- Large touch-friendly buttons (full width, increased padding)
- Bold typography for better readability on small screens
- Larger input fields and tracking number displays
- Clear step-by-step instructions for warehouse operators
- Re-download PDF button for damaged/corrupted labels
**New Features:**
- POST /ops/orders/{uuid}/ready-for-collection endpoint
- Re-download PDFs functionality accessible from awaiting_collection and in_transit states
- Full audit logging for all operations via ops interface
- Proper error handling and user feedback
**Testing:**
- Added ShipmentCreationTest with mock HTTP client
- Created comprehensive testing guide (SHIPLOGIC_TESTING.md)
- Mock API routes for local development without hitting live API
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
<div
|
||||
x-data="{ theme: null }"
|
||||
x-init="
|
||||
$watch('theme', () => {
|
||||
$dispatch('theme-changed', theme)
|
||||
})
|
||||
|
||||
theme = localStorage.getItem('theme') || <?php echo \Illuminate\Support\Js::from(filament()->getDefaultThemeMode()->value)->toHtml() ?>
|
||||
"
|
||||
class="fi-theme-switcher"
|
||||
>
|
||||
<?php if (isset($component)) { $__componentOriginalad1f400c934be44fb66b397d4f7989b8 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginalad1f400c934be44fb66b397d4f7989b8 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'filament-panels::components.theme-switcher.button','data' => ['icon' => \Filament\Support\Icons\Heroicon::Sun,'theme' => 'light']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('filament-panels::theme-switcher.button'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['icon' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(\Filament\Support\Icons\Heroicon::Sun),'theme' => 'light']); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginalad1f400c934be44fb66b397d4f7989b8)): ?>
|
||||
<?php $attributes = $__attributesOriginalad1f400c934be44fb66b397d4f7989b8; ?>
|
||||
<?php unset($__attributesOriginalad1f400c934be44fb66b397d4f7989b8); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginalad1f400c934be44fb66b397d4f7989b8)): ?>
|
||||
<?php $component = $__componentOriginalad1f400c934be44fb66b397d4f7989b8; ?>
|
||||
<?php unset($__componentOriginalad1f400c934be44fb66b397d4f7989b8); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (isset($component)) { $__componentOriginalad1f400c934be44fb66b397d4f7989b8 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginalad1f400c934be44fb66b397d4f7989b8 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'filament-panels::components.theme-switcher.button','data' => ['icon' => \Filament\Support\Icons\Heroicon::Moon,'theme' => 'dark']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('filament-panels::theme-switcher.button'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['icon' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(\Filament\Support\Icons\Heroicon::Moon),'theme' => 'dark']); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginalad1f400c934be44fb66b397d4f7989b8)): ?>
|
||||
<?php $attributes = $__attributesOriginalad1f400c934be44fb66b397d4f7989b8; ?>
|
||||
<?php unset($__attributesOriginalad1f400c934be44fb66b397d4f7989b8); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginalad1f400c934be44fb66b397d4f7989b8)): ?>
|
||||
<?php $component = $__componentOriginalad1f400c934be44fb66b397d4f7989b8; ?>
|
||||
<?php unset($__componentOriginalad1f400c934be44fb66b397d4f7989b8); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (isset($component)) { $__componentOriginalad1f400c934be44fb66b397d4f7989b8 = $component; } ?>
|
||||
<?php if (isset($attributes)) { $__attributesOriginalad1f400c934be44fb66b397d4f7989b8 = $attributes; } ?>
|
||||
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'filament-panels::components.theme-switcher.button','data' => ['icon' => \Filament\Support\Icons\Heroicon::ComputerDesktop,'theme' => 'system']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||
<?php $component->withName('filament-panels::theme-switcher.button'); ?>
|
||||
<?php if ($component->shouldRender()): ?>
|
||||
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||
<?php endif; ?>
|
||||
<?php $component->withAttributes(['icon' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(\Filament\Support\Icons\Heroicon::ComputerDesktop),'theme' => 'system']); ?>
|
||||
<?php echo $__env->renderComponent(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__attributesOriginalad1f400c934be44fb66b397d4f7989b8)): ?>
|
||||
<?php $attributes = $__attributesOriginalad1f400c934be44fb66b397d4f7989b8; ?>
|
||||
<?php unset($__attributesOriginalad1f400c934be44fb66b397d4f7989b8); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($__componentOriginalad1f400c934be44fb66b397d4f7989b8)): ?>
|
||||
<?php $component = $__componentOriginalad1f400c934be44fb66b397d4f7989b8; ?>
|
||||
<?php unset($__componentOriginalad1f400c934be44fb66b397d4f7989b8); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php /**PATH /var/www/additional_design/vendor/filament/filament/resources/views/components/theme-switcher/index.blade.php ENDPATH**/ ?>
|
||||
Reference in New Issue
Block a user