@fleetbase/fleetops-engine 0.6.50 → 0.6.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +185 -67
- package/addon/components/contact/panel-header.hbs +11 -48
- package/addon/components/customer/details.hbs +1 -2
- package/addon/components/customer/form.hbs +63 -51
- package/addon/components/customer/form.js +27 -1
- package/addon/components/customer/orders.hbs +48 -0
- package/addon/components/customer/orders.js +67 -5
- package/addon/components/driver/form.hbs +1 -1
- package/addon/components/home/getting-started-guidance.hbs +113 -0
- package/addon/components/home/getting-started-guidance.js +107 -0
- package/addon/components/issue/details/comments.hbs +3 -0
- package/addon/components/issue/details/comments.js +3 -0
- package/addon/components/issue/details/correspondence.hbs +9 -0
- package/addon/components/issue/details/correspondence.js +83 -0
- package/addon/components/issue/details/documents.hbs +69 -0
- package/addon/components/issue/details/documents.js +85 -0
- package/addon/components/issue/details.hbs +220 -59
- package/addon/components/issue/details.js +245 -0
- package/addon/components/issue/form.hbs +19 -1
- package/addon/components/issue/panel-header.hbs +43 -0
- package/addon/components/issue/panel-header.js +22 -0
- package/addon/components/issue/timeline.hbs +40 -0
- package/addon/components/issue/timeline.js +45 -0
- package/addon/components/leaflet-tracking-marker.js +3 -0
- package/addon/components/map/drawer/position-listing.js +3 -0
- package/addon/components/map/leaflet-live-map.hbs +2 -2
- package/addon/components/map/leaflet-live-map.js +17 -0
- package/addon/components/map/order-list-overlay.hbs +4 -4
- package/addon/components/modals/convert-customer-to-vendor.hbs +30 -0
- package/addon/components/modals/convert-customer-to-vendor.js +55 -0
- package/addon/components/modals/issue-assign.hbs +20 -0
- package/addon/components/modals/issue-assign.js +49 -0
- package/addon/components/modals/issue-close.hbs +30 -0
- package/addon/components/modals/issue-close.js +73 -0
- package/addon/components/modals/issue-status.hbs +20 -0
- package/addon/components/modals/issue-status.js +43 -0
- package/addon/components/modals/reset-customer-credentials.js +12 -6
- package/addon/components/modals/update-order-activity.hbs +51 -17
- package/addon/components/modals/update-order-activity.js +59 -5
- package/addon/components/order/details/activity.js +2 -2
- package/addon/components/order/details/proof.hbs +40 -38
- package/addon/components/order/details/proof.js +31 -4
- package/addon/components/order/details.hbs +5 -5
- package/addon/components/order/details.js +19 -1
- package/addon/components/order/header.hbs +1 -1
- package/addon/components/route-list.hbs +0 -12
- package/addon/components/service-rate/details.hbs +1 -1
- package/addon/components/service-rate/form.hbs +1 -1
- package/addon/components/service-rate/form.js +4 -0
- package/addon/components/vendor/personnel-manager.hbs +166 -0
- package/addon/components/vendor/personnel-manager.js +143 -0
- package/addon/components/widget/live-fleet.hbs +1 -0
- package/addon/components/widget/live-fleet.js +2 -7
- package/addon/components/widget/revenue-trend.hbs +1 -1
- package/addon/components/widget/revenue-trend.js +75 -2
- package/addon/controllers/management/contacts/customers/details.js +31 -13
- package/addon/controllers/management/contacts/customers.js +16 -5
- package/addon/controllers/management/contacts/index/details.js +31 -13
- package/addon/controllers/management/contacts/index.js +7 -0
- package/addon/controllers/management/issues/index/details.js +52 -6
- package/addon/controllers/management/vendors/index/details.js +4 -0
- package/addon/controllers/operations/orders/index/details.js +11 -3
- package/addon/controllers/operations/orders/index.js +1 -1
- package/addon/extension.js +19 -12
- package/addon/helpers/format-duration.js +1 -38
- package/addon/initializers/load-leaflet-assets.js +5 -6
- package/addon/initializers/patch-ember-leaflet-tooltip-layer.js +51 -0
- package/addon/routes/management/issues/index/details.js +1 -1
- package/addon/routes.js +1 -0
- package/addon/services/contact-actions.js +231 -1
- package/addon/services/getting-started.js +44 -0
- package/addon/services/issue-actions.js +71 -0
- package/addon/services/leaflet-map-manager.js +2 -0
- package/addon/services/map-adapter/leaflet.js +19 -0
- package/addon/services/service-areas.js +3 -0
- package/addon/styles/fleetops-engine.css +1036 -0
- package/addon/templates/management/contacts/customers/details.hbs +1 -1
- package/addon/templates/management/contacts/index/details.hbs +1 -1
- package/addon/templates/management/contacts.hbs +2 -2
- package/addon/templates/management/issues/index/details/index.hbs +3 -1
- package/addon/templates/management/issues/index/details.hbs +3 -2
- package/addon/templates/management/vendors/index/details/personnel.hbs +1 -2
- package/addon/templates/operations/orders/index/details/index.hbs +2 -2
- package/addon/templates/operations/orders/index.hbs +1 -1
- package/addon/templates/operations/service-rates/index/edit.hbs +1 -0
- package/addon/templates/operations/service-rates/index/new.hbs +1 -0
- package/addon/templates/settings/payments/onboard.hbs +8 -8
- package/addon/utils/leaflet-draw-namespace-guard.js +22 -0
- package/addon/utils/leaflet-plugin-loader.js +219 -0
- package/addon/utils/setup-customer-portal.js +4 -64
- package/app/components/home/getting-started-guidance.js +1 -0
- package/app/components/issue/details/comments.js +1 -0
- package/app/components/issue/details/correspondence.js +1 -0
- package/app/components/issue/details/documents.js +1 -0
- package/app/components/issue/panel-header.js +1 -0
- package/app/components/modals/convert-customer-to-vendor.js +1 -0
- package/app/components/modals/issue-assign.js +1 -0
- package/app/components/modals/issue-close.js +1 -0
- package/app/components/modals/issue-status.js +1 -0
- package/app/components/vendor/personnel-manager.js +1 -0
- package/app/helpers/format-duration.js +1 -1
- package/app/services/getting-started.js +1 -0
- package/app/utils/leaflet-draw-namespace-guard.js +1 -0
- package/app/utils/leaflet-plugin-loader.js +1 -0
- package/composer.json +1 -1
- package/extension.json +1 -1
- package/package.json +5 -5
- package/server/migrations/2026_05_31_000001_add_portal_fields_to_vendor_personnels_table.php +30 -0
- package/server/migrations/2026_06_03_000000_ensure_tags_column_on_issues_table.php +31 -0
- package/server/migrations/2026_06_03_000001_add_order_uuid_to_issues_table.php +25 -0
- package/server/migrations/2026_06_04_000001_backfill_order_transaction_subjects.php +39 -0
- package/server/migrations/2026_06_04_000002_backfill_order_transaction_directions.php +24 -0
- package/server/resources/views/mail/customer-credentials.blade.php +16 -13
- package/server/src/Expansions/UserFilterExpansion.php +28 -0
- package/server/src/Http/Controllers/Api/v1/IssueController.php +2 -0
- package/server/src/Http/Controllers/Api/v1/OrderController.php +26 -25
- package/server/src/Http/Controllers/Api/v1/PlaceController.php +10 -58
- package/server/src/Http/Controllers/Internal/v1/ContactController.php +135 -0
- package/server/src/Http/Controllers/Internal/v1/CustomerController.php +116 -6
- package/server/src/Http/Controllers/Internal/v1/GettingStartedController.php +17 -0
- package/server/src/Http/Controllers/Internal/v1/IssueController.php +251 -0
- package/server/src/Http/Controllers/Internal/v1/OrderController.php +172 -97
- package/server/src/Http/Controllers/Internal/v1/PlaceController.php +10 -68
- package/server/src/Http/Controllers/Internal/v1/VendorController.php +89 -0
- package/server/src/Http/Requests/CreateIssueRequest.php +4 -0
- package/server/src/Http/Requests/UpdateIssueRequest.php +4 -0
- package/server/src/Http/Resources/v1/Index/Order.php +12 -9
- package/server/src/Http/Resources/v1/Issue.php +25 -0
- package/server/src/Http/Resources/v1/Order.php +20 -18
- package/server/src/Mail/CustomerCredentialsMail.php +5 -6
- package/server/src/Models/Contact.php +30 -51
- package/server/src/Models/Issue.php +47 -6
- package/server/src/Models/Order.php +33 -6
- package/server/src/Models/ServiceArea.php +1 -1
- package/server/src/Models/VendorPersonnel.php +10 -1
- package/server/src/Models/Zone.php +1 -1
- package/server/src/Observers/PurchaseRateObserver.php +20 -0
- package/server/src/Observers/ZoneObserver.php +56 -0
- package/server/src/Providers/FleetOpsServiceProvider.php +1 -0
- package/server/src/Support/Analytics/TopDrivers.php +9 -1
- package/server/src/Support/GettingStarted.php +144 -0
- package/server/src/Support/PlaceSearch.php +282 -0
- package/server/src/Support/ResolvesOrderServiceStops.php +22 -12
- package/server/src/routes.php +33 -1
- package/server/tests/AnalyticsRoutesTest.php +8 -0
- package/server/tests/CustomerContactIdentitySafetyTest.php +41 -0
- package/server/tests/DriverVehicleStatusDefaultTest.php +2 -2
- package/server/tests/GettingStartedStatusTest.php +21 -0
- package/server/tests/OrderActivityFlowRegressionTest.php +116 -0
- package/server/tests/ServiceAreaZoneApiShapeTest.php +44 -0
- package/translations/ar-ae.yml +9 -0
- package/translations/bg-bg.yaml +9 -0
- package/translations/en-us.yaml +11 -0
- package/translations/es-pa.yaml +9 -0
- package/translations/fr-fr.yaml +9 -0
- package/translations/mn-mn.yaml +9 -0
- package/translations/pt-br.yaml +9 -0
- package/translations/ru-ru.yaml +9 -0
- package/translations/vi-vn.yaml +9 -0
|
@@ -52,3 +52,44 @@ test('customer conflict audit command is registered and read only', function ()
|
|
|
52
52
|
->not->toContain('->update(')
|
|
53
53
|
->not->toContain('forceFill');
|
|
54
54
|
});
|
|
55
|
+
|
|
56
|
+
test('customer portal welcome email is opt in and does not create organization invites', function () {
|
|
57
|
+
$internalContact = file_get_contents(__DIR__ . '/../src/Http/Controllers/Internal/v1/ContactController.php');
|
|
58
|
+
$internalCustomer = file_get_contents(__DIR__ . '/../src/Http/Controllers/Internal/v1/CustomerController.php');
|
|
59
|
+
$contactModel = file_get_contents(__DIR__ . '/../src/Models/Contact.php');
|
|
60
|
+
$customerCredentials = file_get_contents(__DIR__ . '/../src/Mail/CustomerCredentialsMail.php');
|
|
61
|
+
$customerEmail = file_get_contents(__DIR__ . '/../resources/views/mail/customer-credentials.blade.php');
|
|
62
|
+
$customerForm = file_get_contents(__DIR__ . '/../../addon/components/customer/form.hbs');
|
|
63
|
+
|
|
64
|
+
expect($internalContact)
|
|
65
|
+
->toContain('meta.customer_portal.send_welcome_email')
|
|
66
|
+
->toContain('assertCustomerPortalCanSendWelcomeEmail')
|
|
67
|
+
->toContain('sendCustomerPortalWelcomeEmail')
|
|
68
|
+
->toContain('Contact::createUserFromContact($contact, false, true)')
|
|
69
|
+
->toContain('Mail::to($user)->send(new CustomerCredentialsMail($password, $contact))')
|
|
70
|
+
->toContain("data_forget(\$meta, 'customer_portal.send_welcome_email')")
|
|
71
|
+
->toContain('fleetbase/customer-portal-api')
|
|
72
|
+
->not->toContain('UserInvited')
|
|
73
|
+
->not->toContain('Invite::create');
|
|
74
|
+
|
|
75
|
+
expect($internalCustomer)
|
|
76
|
+
->toContain('Contact::createUserFromContact($customer, false, true)')
|
|
77
|
+
->not->toContain('send_invite');
|
|
78
|
+
|
|
79
|
+
expect($customerCredentials)->toContain('customer portal access is ready')
|
|
80
|
+
->and($customerCredentials)->toContain("Utils::consoleUrl(\$accessUrlSlug ?: 'customer-portal')")
|
|
81
|
+
->and($customerEmail)->toContain('Your customer portal access is ready')
|
|
82
|
+
->and($customerEmail)->toContain('Sign in to customer portal')
|
|
83
|
+
->and($customerEmail)->toContain('Temporary password:')
|
|
84
|
+
->and($customerEmail)->toContain('You can change your password after signing in.')
|
|
85
|
+
->and($customerForm)->toContain('this.showWelcomeEmailOption')
|
|
86
|
+
->and($customerForm)->toContain('this.toggleWelcomeEmail');
|
|
87
|
+
|
|
88
|
+
expect($contactModel)
|
|
89
|
+
->toContain('assignUserToContactCompany')
|
|
90
|
+
->toContain('$contact->company->addUser($user, $role)')
|
|
91
|
+
->toContain('Deprecated and ignored. Contact and customer users do not receive organization invitations.')
|
|
92
|
+
->not->toContain('UserInvited')
|
|
93
|
+
->not->toContain('Invite::create')
|
|
94
|
+
->not->toContain('->assignCompany(');
|
|
95
|
+
});
|
|
@@ -11,14 +11,14 @@ test('driver and vehicle statuses default to available', function () {
|
|
|
11
11
|
});
|
|
12
12
|
|
|
13
13
|
test('legacy active and null driver and vehicle statuses normalize to available', function () {
|
|
14
|
-
$driver
|
|
14
|
+
$driver = new Driver();
|
|
15
15
|
$driver->status = 'active';
|
|
16
16
|
expect($driver->status)->toBe('available');
|
|
17
17
|
|
|
18
18
|
$driver->status = null;
|
|
19
19
|
expect($driver->status)->toBe('available');
|
|
20
20
|
|
|
21
|
-
$vehicle
|
|
21
|
+
$vehicle = new Vehicle();
|
|
22
22
|
$vehicle->status = 'active';
|
|
23
23
|
expect($vehicle->status)->toBe('available');
|
|
24
24
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
test('getting started status route is registered', function () {
|
|
4
|
+
$routes = file_get_contents(dirname(__DIR__) . '/src/routes.php');
|
|
5
|
+
|
|
6
|
+
expect($routes)
|
|
7
|
+
->toContain("['prefix' => 'getting-started']")
|
|
8
|
+
->toContain("\$router->get('status', 'GettingStartedController@status');");
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
test('getting started support exposes checklist and generic recommendations', function () {
|
|
12
|
+
$support = file_get_contents(dirname(__DIR__) . '/src/Support/GettingStarted.php');
|
|
13
|
+
|
|
14
|
+
expect($support)
|
|
15
|
+
->toContain("'key' => 'add_driver'")
|
|
16
|
+
->toContain("'key' => 'create_order'")
|
|
17
|
+
->toContain("'key' => 'assign_driver'")
|
|
18
|
+
->toContain("'key' => 'update_activity'")
|
|
19
|
+
->toContain("'profile_source' => 'generic'")
|
|
20
|
+
->toContain("'recommendations' => \$this->recommendations()");
|
|
21
|
+
});
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
use Fleetbase\FleetOps\Models\Payload;
|
|
4
|
+
use Fleetbase\FleetOps\Models\Place;
|
|
5
|
+
use Fleetbase\FleetOps\Models\Waypoint;
|
|
6
|
+
use Fleetbase\FleetOps\Support\ResolvesOrderServiceStops;
|
|
7
|
+
|
|
8
|
+
function activity_flow_helper()
|
|
9
|
+
{
|
|
10
|
+
return new class {
|
|
11
|
+
use ResolvesOrderServiceStops {
|
|
12
|
+
payloadServiceStops as public serviceStops;
|
|
13
|
+
payloadUsesServiceStopActivity as public usesServiceStopActivity;
|
|
14
|
+
resolveServiceStopFromKey as public resolveStop;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function activity_flow_place(string $key): Place
|
|
20
|
+
{
|
|
21
|
+
$place = new Place();
|
|
22
|
+
$place->uuid = (string) Illuminate\Support\Str::uuid();
|
|
23
|
+
$place->public_id = "place_{$key}";
|
|
24
|
+
$place->id = "place_{$key}";
|
|
25
|
+
$place->name = ucfirst($key);
|
|
26
|
+
|
|
27
|
+
return $place;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function activity_flow_waypoint(Payload $payload, Place $place, int $order): Waypoint
|
|
31
|
+
{
|
|
32
|
+
$waypoint = new Waypoint();
|
|
33
|
+
$waypoint->uuid = (string) Illuminate\Support\Str::uuid();
|
|
34
|
+
$waypoint->public_id = "waypoint_{$order}";
|
|
35
|
+
$waypoint->payload_uuid = $payload->uuid;
|
|
36
|
+
$waypoint->place_uuid = $place->uuid;
|
|
37
|
+
$waypoint->order = $order;
|
|
38
|
+
$waypoint->tracking_number_uuid = null;
|
|
39
|
+
$waypoint->setRelation('place', $place);
|
|
40
|
+
$waypoint->setRelation('trackingNumber', null);
|
|
41
|
+
|
|
42
|
+
return $waypoint;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function activity_flow_payload(?Place $pickup = null, ?Place $dropoff = null, array $waypointPlaces = [], ?Place $return = null): Payload
|
|
46
|
+
{
|
|
47
|
+
$payload = new Payload();
|
|
48
|
+
$payload->uuid = (string) Illuminate\Support\Str::uuid();
|
|
49
|
+
$payload->setRelation('pickup', $pickup);
|
|
50
|
+
$payload->setRelation('dropoff', $dropoff);
|
|
51
|
+
$payload->setRelation('return', $return);
|
|
52
|
+
$payload->setRelation('waypoints', collect($waypointPlaces));
|
|
53
|
+
$payload->setRelation('waypointMarkers', collect($waypointPlaces)->values()->map(fn (Place $place, int $index) => activity_flow_waypoint($payload, $place, $index)));
|
|
54
|
+
|
|
55
|
+
return $payload;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
test('classic pickup and dropoff route stays order activity driven even with a destination param', function () {
|
|
59
|
+
$pickup = activity_flow_place('pickup');
|
|
60
|
+
$dropoff = activity_flow_place('dropoff');
|
|
61
|
+
$payload = activity_flow_payload($pickup, $dropoff);
|
|
62
|
+
$helper = activity_flow_helper();
|
|
63
|
+
|
|
64
|
+
expect($helper->usesServiceStopActivity($payload))->toBeFalse()
|
|
65
|
+
->and($helper->resolveStop($payload, $pickup->public_id))->not->toBeNull();
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
test('pickup waypoint and dropoff route uses service stop activity in pickup waypoint dropoff order', function () {
|
|
69
|
+
$pickup = activity_flow_place('pickup');
|
|
70
|
+
$waypoint = activity_flow_place('middle');
|
|
71
|
+
$dropoff = activity_flow_place('dropoff');
|
|
72
|
+
$payload = activity_flow_payload($pickup, $dropoff, [$waypoint]);
|
|
73
|
+
$helper = activity_flow_helper();
|
|
74
|
+
$stops = $helper->serviceStops($payload);
|
|
75
|
+
|
|
76
|
+
expect($helper->usesServiceStopActivity($payload))->toBeTrue()
|
|
77
|
+
->and($stops)->toHaveCount(3)
|
|
78
|
+
->and($stops->pluck('type')->all())->toBe(['pickup', 'waypoint', 'dropoff']);
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
test('pickup plus waypoints without dropoff and waypoint only routes use service stop activity', function () {
|
|
82
|
+
$pickup = activity_flow_place('pickup');
|
|
83
|
+
$firstStop = activity_flow_place('first');
|
|
84
|
+
$secondStop = activity_flow_place('second');
|
|
85
|
+
$withPickup = activity_flow_payload($pickup, null, [$firstStop, $secondStop]);
|
|
86
|
+
$waypointOnly = activity_flow_payload(null, null, [$firstStop, $secondStop]);
|
|
87
|
+
$helper = activity_flow_helper();
|
|
88
|
+
|
|
89
|
+
expect($helper->usesServiceStopActivity($withPickup))->toBeTrue()
|
|
90
|
+
->and($helper->serviceStops($withPickup)->pluck('type')->all())->toBe(['pickup', 'waypoint', 'waypoint'])
|
|
91
|
+
->and($helper->usesServiceStopActivity($waypointOnly))->toBeTrue()
|
|
92
|
+
->and($helper->serviceStops($waypointOnly)->pluck('type')->all())->toBe(['waypoint', 'waypoint']);
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
test('return address is excluded from normal service stop activity sequence', function () {
|
|
96
|
+
$pickup = activity_flow_place('pickup');
|
|
97
|
+
$dropoff = activity_flow_place('dropoff');
|
|
98
|
+
$return = activity_flow_place('return');
|
|
99
|
+
$payload = activity_flow_payload($pickup, $dropoff, [], $return);
|
|
100
|
+
$helper = activity_flow_helper();
|
|
101
|
+
|
|
102
|
+
expect($helper->serviceStops($payload)->pluck('type')->all())->toBe(['pickup', 'dropoff']);
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
test('pod bypass is internal console only', function () {
|
|
106
|
+
$internalController = file_get_contents(dirname(__DIR__) . '/src/Http/Controllers/Internal/v1/OrderController.php');
|
|
107
|
+
$publicController = file_get_contents(dirname(__DIR__) . '/src/Http/Controllers/Api/v1/OrderController.php');
|
|
108
|
+
$consoleModal = file_get_contents(dirname(__DIR__, 2) . '/addon/components/modals/update-order-activity.hbs');
|
|
109
|
+
|
|
110
|
+
expect($internalController)
|
|
111
|
+
->toContain("boolean('bypass_proof')")
|
|
112
|
+
->and($publicController)
|
|
113
|
+
->not->toContain('bypass_proof')
|
|
114
|
+
->and($consoleModal)
|
|
115
|
+
->toContain('Bypass proof of delivery');
|
|
116
|
+
});
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
<?php
|
|
2
2
|
|
|
3
|
+
use Fleetbase\FleetOps\Models\ServiceArea;
|
|
4
|
+
use Fleetbase\FleetOps\Models\Zone;
|
|
5
|
+
|
|
3
6
|
test('service area create and update accept persisted map geometry and style fields', function () {
|
|
4
7
|
$controller = file_get_contents(__DIR__ . '/../src/Http/Controllers/Api/v1/ServiceAreaController.php');
|
|
5
8
|
|
|
@@ -32,3 +35,44 @@ test('zone create accepts only service area public ids on the consumable api', f
|
|
|
32
35
|
->toContain("'public_id' => \$request->input('service_area')")
|
|
33
36
|
->not->toContain("->orWhere('uuid'");
|
|
34
37
|
});
|
|
38
|
+
|
|
39
|
+
test('service area zones relationship uses the stored service area uuid foreign key', function () {
|
|
40
|
+
$relation = (new ServiceArea())->zones();
|
|
41
|
+
|
|
42
|
+
expect($relation->getForeignKeyName())->toBe('service_area_uuid')
|
|
43
|
+
->and($relation->getLocalKeyName())->toBe('uuid');
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
test('zone service area relationship uses the stored service area uuid foreign key', function () {
|
|
47
|
+
$relation = (new Zone())->serviceArea();
|
|
48
|
+
|
|
49
|
+
expect($relation->getForeignKeyName())->toBe('service_area_uuid')
|
|
50
|
+
->and($relation->getOwnerKeyName())->toBe('uuid');
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
test('zone observer is registered to invalidate service area cache when zones change', function () {
|
|
54
|
+
$provider = file_get_contents(__DIR__ . '/../src/Providers/FleetOpsServiceProvider.php');
|
|
55
|
+
$observer = file_get_contents(__DIR__ . '/../src/Observers/ZoneObserver.php');
|
|
56
|
+
|
|
57
|
+
expect($provider)
|
|
58
|
+
->toContain('\Fleetbase\FleetOps\Models\Zone::class')
|
|
59
|
+
->toContain('\Fleetbase\FleetOps\Observers\ZoneObserver::class');
|
|
60
|
+
|
|
61
|
+
expect($observer)
|
|
62
|
+
->toContain('function created')
|
|
63
|
+
->toContain('function updated')
|
|
64
|
+
->toContain('function deleted')
|
|
65
|
+
->toContain('function restored')
|
|
66
|
+
->toContain("\$zone->getOriginal('service_area_uuid')")
|
|
67
|
+
->toContain('ServiceArea::invalidateApiCacheManually($zone->company_uuid)')
|
|
68
|
+
->toContain('ServiceArea::invalidateApiCacheManually()');
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
test('internal service area controller does not bypass api cache directly', function () {
|
|
72
|
+
$controller = file_get_contents(__DIR__ . '/../src/Http/Controllers/Internal/v1/ServiceAreaController.php');
|
|
73
|
+
|
|
74
|
+
expect($controller)
|
|
75
|
+
->not->toContain('disableApiCache')
|
|
76
|
+
->not->toContain('function queryRecord')
|
|
77
|
+
->not->toContain('function findRecord');
|
|
78
|
+
});
|
package/translations/ar-ae.yml
CHANGED
|
@@ -721,6 +721,15 @@ fleet-ops:
|
|
|
721
721
|
fleet-ops-quickstart:
|
|
722
722
|
message: لنرى ما يمكنك فعله لبدء العمليات...
|
|
723
723
|
start-task: بدء المهمة
|
|
724
|
+
get-started:
|
|
725
|
+
title: Get Started with Fleet-Ops
|
|
726
|
+
subtitle: Set up the essentials and complete your first dispatch flow.
|
|
727
|
+
completed: completed
|
|
728
|
+
preview-title: First order workflow
|
|
729
|
+
recommended-features:
|
|
730
|
+
title: Recommended features for you
|
|
731
|
+
subtitle: Explore tools that help new operations teams get productive faster.
|
|
732
|
+
learn-more: Learn more
|
|
724
733
|
key-metrics:
|
|
725
734
|
title: مقاييس Fleet-Ops
|
|
726
735
|
earnings: الأرباح
|
package/translations/bg-bg.yaml
CHANGED
|
@@ -1594,6 +1594,15 @@ widget:
|
|
|
1594
1594
|
fleet-ops-quickstart:
|
|
1595
1595
|
message: Нека видим какво можете да направите, за да стартирате операциите...
|
|
1596
1596
|
start-task: Започнете задача
|
|
1597
|
+
get-started:
|
|
1598
|
+
title: Get Started with Fleet-Ops
|
|
1599
|
+
subtitle: Set up the essentials and complete your first dispatch flow.
|
|
1600
|
+
completed: completed
|
|
1601
|
+
preview-title: First order workflow
|
|
1602
|
+
recommended-features:
|
|
1603
|
+
title: Recommended features for you
|
|
1604
|
+
subtitle: Explore tools that help new operations teams get productive faster.
|
|
1605
|
+
learn-more: Learn more
|
|
1597
1606
|
key-metrics:
|
|
1598
1607
|
title: Метрики на Fleet-Ops
|
|
1599
1608
|
earnings: Печалби
|
package/translations/en-us.yaml
CHANGED
|
@@ -403,6 +403,8 @@ customer:
|
|
|
403
403
|
select-address: Select Address
|
|
404
404
|
new-address: New Adddress
|
|
405
405
|
select-user: Select User
|
|
406
|
+
send-welcome-email: Send customer portal welcome email
|
|
407
|
+
send-welcome-email-help-text: Generate a temporary password and email this customer a link to sign in to the customer portal.
|
|
406
408
|
upload-new-photo: Upload New Photo
|
|
407
409
|
user-account: User Account
|
|
408
410
|
user-account-help-text: Each customer profile needs to be connected to a specific user account. This association is essential for handling the authentication process, ensuring that each customer can securely access and manage their profile and other services.
|
|
@@ -1688,6 +1690,15 @@ widget:
|
|
|
1688
1690
|
title: Geofence Violations
|
|
1689
1691
|
live-fleet:
|
|
1690
1692
|
title: Live Fleet Map
|
|
1693
|
+
get-started:
|
|
1694
|
+
title: Get Started with Fleet-Ops
|
|
1695
|
+
subtitle: Set up the essentials and complete your first dispatch flow.
|
|
1696
|
+
completed: completed
|
|
1697
|
+
preview-title: First order workflow
|
|
1698
|
+
recommended-features:
|
|
1699
|
+
title: Recommended features for you
|
|
1700
|
+
subtitle: Explore tools that help new operations teams get productive faster.
|
|
1701
|
+
learn-more: Learn more
|
|
1691
1702
|
fleet-ops-quickstart:
|
|
1692
1703
|
message: Let's see what you can do to jumpstart operations...
|
|
1693
1704
|
start-task: Start Task
|
package/translations/es-pa.yaml
CHANGED
|
@@ -1487,6 +1487,15 @@ widget:
|
|
|
1487
1487
|
fleet-ops-quickstart:
|
|
1488
1488
|
message: Veamos qué puedes hacer para impulsar las operaciones...
|
|
1489
1489
|
start-task: Iniciar tarea
|
|
1490
|
+
get-started:
|
|
1491
|
+
title: Get Started with Fleet-Ops
|
|
1492
|
+
subtitle: Set up the essentials and complete your first dispatch flow.
|
|
1493
|
+
completed: completed
|
|
1494
|
+
preview-title: First order workflow
|
|
1495
|
+
recommended-features:
|
|
1496
|
+
title: Recommended features for you
|
|
1497
|
+
subtitle: Explore tools that help new operations teams get productive faster.
|
|
1498
|
+
learn-more: Learn more
|
|
1490
1499
|
key-metrics:
|
|
1491
1500
|
title: Métricas de operaciones de flota
|
|
1492
1501
|
earnings: Ganancias
|
package/translations/fr-fr.yaml
CHANGED
|
@@ -1614,6 +1614,15 @@ widget:
|
|
|
1614
1614
|
fleet-ops-quickstart:
|
|
1615
1615
|
message: Voyons ce que vous pouvez faire pour démarrer rapidement les opérations...
|
|
1616
1616
|
start-task: Démarrer la tâche
|
|
1617
|
+
get-started:
|
|
1618
|
+
title: Get Started with Fleet-Ops
|
|
1619
|
+
subtitle: Set up the essentials and complete your first dispatch flow.
|
|
1620
|
+
completed: completed
|
|
1621
|
+
preview-title: First order workflow
|
|
1622
|
+
recommended-features:
|
|
1623
|
+
title: Recommended features for you
|
|
1624
|
+
subtitle: Explore tools that help new operations teams get productive faster.
|
|
1625
|
+
learn-more: Learn more
|
|
1617
1626
|
key-metrics:
|
|
1618
1627
|
title: Métriques Fleet-Ops
|
|
1619
1628
|
earnings: Gains
|
package/translations/mn-mn.yaml
CHANGED
|
@@ -1565,6 +1565,15 @@ widget:
|
|
|
1565
1565
|
fleet-ops-quickstart:
|
|
1566
1566
|
message: Үйл ажиллагааг эхлүүлэхийн тулд юу хийж чадахаа харцгаая...
|
|
1567
1567
|
start-task: Ажлыг эхлүүлэх
|
|
1568
|
+
get-started:
|
|
1569
|
+
title: Get Started with Fleet-Ops
|
|
1570
|
+
subtitle: Set up the essentials and complete your first dispatch flow.
|
|
1571
|
+
completed: completed
|
|
1572
|
+
preview-title: First order workflow
|
|
1573
|
+
recommended-features:
|
|
1574
|
+
title: Recommended features for you
|
|
1575
|
+
subtitle: Explore tools that help new operations teams get productive faster.
|
|
1576
|
+
learn-more: Learn more
|
|
1568
1577
|
key-metrics:
|
|
1569
1578
|
title: Флийт-Опсын хэмжүүрүүд
|
|
1570
1579
|
earnings: Орлого
|
package/translations/pt-br.yaml
CHANGED
|
@@ -1584,6 +1584,15 @@ widget:
|
|
|
1584
1584
|
fleet-ops-quickstart:
|
|
1585
1585
|
message: Vamos ver o que você pode fazer para acelerar as operações...
|
|
1586
1586
|
start-task: Iniciar Tarefa
|
|
1587
|
+
get-started:
|
|
1588
|
+
title: Get Started with Fleet-Ops
|
|
1589
|
+
subtitle: Set up the essentials and complete your first dispatch flow.
|
|
1590
|
+
completed: completed
|
|
1591
|
+
preview-title: First order workflow
|
|
1592
|
+
recommended-features:
|
|
1593
|
+
title: Recommended features for you
|
|
1594
|
+
subtitle: Explore tools that help new operations teams get productive faster.
|
|
1595
|
+
learn-more: Learn more
|
|
1587
1596
|
key-metrics:
|
|
1588
1597
|
title: Métricas Fleet-Ops
|
|
1589
1598
|
earnings: Ganhos
|
package/translations/ru-ru.yaml
CHANGED
|
@@ -1578,6 +1578,15 @@ widget:
|
|
|
1578
1578
|
fleet-ops-quickstart:
|
|
1579
1579
|
message: Давайте посмотрим, что вы можете сделать, чтобы быстро начать работу...
|
|
1580
1580
|
start-task: Начать задачу
|
|
1581
|
+
get-started:
|
|
1582
|
+
title: Get Started with Fleet-Ops
|
|
1583
|
+
subtitle: Set up the essentials and complete your first dispatch flow.
|
|
1584
|
+
completed: completed
|
|
1585
|
+
preview-title: First order workflow
|
|
1586
|
+
recommended-features:
|
|
1587
|
+
title: Recommended features for you
|
|
1588
|
+
subtitle: Explore tools that help new operations teams get productive faster.
|
|
1589
|
+
learn-more: Learn more
|
|
1581
1590
|
key-metrics:
|
|
1582
1591
|
title: Метрики Fleet-Ops
|
|
1583
1592
|
earnings: Доходы
|
package/translations/vi-vn.yaml
CHANGED
|
@@ -722,6 +722,15 @@ fleet-ops:
|
|
|
722
722
|
fleet-ops-quickstart:
|
|
723
723
|
message: Hãy xem những gì bạn có thể làm để khởi động các hoạt động...
|
|
724
724
|
start-task: Bắt đầu Nhiệm vụ
|
|
725
|
+
get-started:
|
|
726
|
+
title: Get Started with Fleet-Ops
|
|
727
|
+
subtitle: Set up the essentials and complete your first dispatch flow.
|
|
728
|
+
completed: completed
|
|
729
|
+
preview-title: First order workflow
|
|
730
|
+
recommended-features:
|
|
731
|
+
title: Recommended features for you
|
|
732
|
+
subtitle: Explore tools that help new operations teams get productive faster.
|
|
733
|
+
learn-more: Learn more
|
|
725
734
|
key-metrics:
|
|
726
735
|
title: Các Chỉ số Fleet-Ops
|
|
727
736
|
earnings: Doanh thu
|