mirror of
https://github.com/fleetbase/fleetbase.git
synced 2026-04-08 01:15:23 +00:00
Compare commits
209 Commits
feat/sched
...
cloud
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2d47509edf | ||
|
|
f2724e3039 | ||
|
|
f9906909c7 | ||
|
|
6df8bdac96 | ||
|
|
ee83e5d232 | ||
|
|
14f9849d53 | ||
|
|
a8781e4ce8 | ||
|
|
f55462ee9c | ||
|
|
43f9914afa | ||
|
|
cbcf7a239b | ||
|
|
58686b9d77 | ||
|
|
979b451130 | ||
|
|
9d4b1167ab | ||
|
|
98cde6795a | ||
|
|
3a70c42054 | ||
|
|
becf73a83e | ||
|
|
f5c16ffe60 | ||
|
|
4b3d23c0b9 | ||
|
|
7ba7b62096 | ||
|
|
8d8c1d2253 | ||
|
|
0e4baa34e0 | ||
|
|
d6d078df62 | ||
|
|
7252a95805 | ||
|
|
7ba7821fed | ||
|
|
af3c60fc7c | ||
|
|
a372b515da | ||
|
|
f8b9c0415b | ||
|
|
b525ad4b1a | ||
|
|
b161b415d0 | ||
|
|
e444d7994c | ||
|
|
0e44375d32 | ||
|
|
a9bb2f0166 | ||
|
|
ac02a6b6e0 | ||
|
|
4a640561d6 | ||
|
|
5957bc6339 | ||
|
|
9b15a6856f | ||
|
|
0a4e5b31cc | ||
|
|
0d47ffc785 | ||
|
|
3f2c739810 | ||
|
|
6b2ab28ec9 | ||
|
|
42df48c9b0 | ||
|
|
268749fcd9 | ||
|
|
50ae560409 | ||
|
|
2e48024949 | ||
|
|
908f60aaac | ||
|
|
a1f2992f18 | ||
|
|
0252b387e2 | ||
|
|
12e1ec2cac | ||
|
|
5f2003eec5 | ||
|
|
e05d12dd87 | ||
|
|
86378d3ede | ||
|
|
1d36bf144b | ||
|
|
293f67d6d1 | ||
|
|
01e8298968 | ||
|
|
094d1d375e | ||
|
|
8a1dee0cbd | ||
|
|
df2da8cea1 | ||
|
|
ced5e6b6fd | ||
|
|
de2cbd2ded | ||
|
|
894f4348dd | ||
|
|
2030a72a71 | ||
|
|
41d20c41c5 | ||
|
|
9976075843 | ||
|
|
b26f735fee | ||
|
|
791cc7283d | ||
|
|
21601737a1 | ||
|
|
0cd9e076b8 | ||
|
|
5fe799b708 | ||
|
|
878a70d328 | ||
|
|
4c5487b6bb | ||
|
|
599fd0e8f7 | ||
|
|
64561c85a8 | ||
|
|
c8d8be11d2 | ||
|
|
12847437b0 | ||
|
|
53eadee8a6 | ||
|
|
657de6c99d | ||
|
|
db601606c5 | ||
|
|
6ec176011a | ||
|
|
d416baf3cc | ||
|
|
d80b968eaa | ||
|
|
eef6847919 | ||
|
|
2ad569eaf6 | ||
|
|
dc18b48f6a | ||
|
|
3e93e161dc | ||
|
|
fac29308fd | ||
|
|
7b62e992eb | ||
|
|
18af3b4515 | ||
|
|
264c564ad6 | ||
|
|
dbf9a37ae9 | ||
|
|
46c4ac9dda | ||
|
|
e692bc3365 | ||
|
|
0b807011a3 | ||
|
|
80d84e1c3b | ||
|
|
08c722359a | ||
|
|
ebd9b0d8cb | ||
|
|
ec5ace214c | ||
|
|
396e0cbf36 | ||
|
|
3faac3481f | ||
|
|
36f837a4af | ||
|
|
094bd6c8ce | ||
|
|
aea35f6f5f | ||
|
|
96fa0294bc | ||
|
|
72ed388cd6 | ||
|
|
5a79a06642 | ||
|
|
010a6b0d05 | ||
|
|
6d138761ee | ||
|
|
1f59d8831b | ||
|
|
746b2142f0 | ||
|
|
343e07e24d | ||
|
|
d6094b8e29 | ||
|
|
59d7fa3de9 | ||
|
|
14c05a6c6a | ||
|
|
5c12254a58 | ||
|
|
65416833ca | ||
|
|
40e0de6e6b | ||
|
|
5986ced2c0 | ||
|
|
ca260bb94c | ||
|
|
95ef8ef3c9 | ||
|
|
df8513cf7b | ||
|
|
e2c544b0c9 | ||
|
|
77b39fccf9 | ||
|
|
eaa448f762 | ||
|
|
627522d61c | ||
|
|
201ac84dc9 | ||
|
|
78b1f31053 | ||
|
|
63cf8128c0 | ||
|
|
5d66c7a35f | ||
|
|
0603888393 | ||
|
|
cd50d349f8 | ||
|
|
e478767a60 | ||
|
|
17cb0cd274 | ||
|
|
a3289ddd41 | ||
|
|
ff8986541c | ||
|
|
04d0c126de | ||
|
|
ad43f74d5c | ||
|
|
3c013a3817 | ||
|
|
4392c7e3ff | ||
|
|
97dfbedd1a | ||
|
|
6d13f22a98 | ||
|
|
2c09c87bb6 | ||
|
|
f7f6991ef3 | ||
|
|
73acd4833c | ||
|
|
1c3c4c16a5 | ||
|
|
5d01438dc9 | ||
|
|
9d004410ee | ||
|
|
3a396f3b54 | ||
|
|
e86b970fc8 | ||
|
|
122a0d186a | ||
|
|
7e258f698f | ||
|
|
65ef642315 | ||
|
|
d79f034dbd | ||
|
|
05b7d5e112 | ||
|
|
61779ab102 | ||
|
|
a287c05380 | ||
|
|
ecc41e587e | ||
|
|
166529f9b4 | ||
|
|
189547f9de | ||
|
|
90a42e8a93 | ||
|
|
d28b1d41fb | ||
|
|
b056ef62b0 | ||
|
|
e70cbacbc2 | ||
|
|
fbd4a7490a | ||
|
|
b9b0eb308b | ||
|
|
48e1b89ec8 | ||
|
|
5e02c95b66 | ||
|
|
db8b5c4d6a | ||
|
|
aa214ccad7 | ||
|
|
cdd5524cf3 | ||
|
|
d99cefd2a4 | ||
|
|
1c58fd43c3 | ||
|
|
9226394159 | ||
|
|
9b23b39f32 | ||
|
|
5310fc3ff3 | ||
|
|
9569053f50 | ||
|
|
b08c054b99 | ||
|
|
2e517f2f95 | ||
|
|
7038d375b0 | ||
|
|
d5ea7f7790 | ||
|
|
4eb4b04121 | ||
|
|
24c5b93005 | ||
|
|
80610b9a48 | ||
|
|
9e5551972e | ||
|
|
b784f890f3 | ||
|
|
797a3d61fe | ||
|
|
d2f0bfe83e | ||
|
|
f28ad85c1a | ||
|
|
d7b0826f3f | ||
|
|
dd6008a8aa | ||
|
|
6671fefaaa | ||
|
|
7136f6195c | ||
|
|
2384887620 | ||
|
|
a2778f1552 | ||
|
|
acfda5ed1a | ||
|
|
e08255007a | ||
|
|
41761ea50e | ||
|
|
5c623819ed | ||
|
|
2bd885b1a2 | ||
|
|
88c3842441 | ||
|
|
2c2a4121a8 | ||
|
|
aadd03f14b | ||
|
|
706e94270d | ||
|
|
1dabc375f9 | ||
|
|
0efec46155 | ||
|
|
8bb2c6b65d | ||
|
|
1c0af1a119 | ||
|
|
dd65ee619b | ||
|
|
e790a0e123 | ||
|
|
723e3ca3d1 | ||
|
|
4eb706d33e |
4
.github/workflows/cd.yml
vendored
4
.github/workflows/cd.yml
vendored
@@ -240,10 +240,6 @@ jobs:
|
||||
set -u
|
||||
|
||||
DEPLOY_BUCKET=${STATIC_DEPLOY_BUCKET:-${{ env.PROJECT }}-${{ env.STACK }}}
|
||||
NEW_BUCKET="${PROJECT}-${STACK}-console"
|
||||
if aws s3api head-bucket --bucket "$NEW_BUCKET" 2>/dev/null; then
|
||||
DEPLOY_BUCKET="$NEW_BUCKET"
|
||||
fi
|
||||
|
||||
# this value will come from the dotenv above
|
||||
echo "Deploying to $DEPLOY_BUCKET"
|
||||
|
||||
@@ -22,9 +22,18 @@
|
||||
"appstract/laravel-opcache": "^4.0",
|
||||
"fleetbase/core-api": "^1.6.38",
|
||||
"fleetbase/fleetops-api": "^0.6.38",
|
||||
"fleetbase/registry-bridge": "^0.1.8",
|
||||
"fleetbase/registry-bridge": "^0.1.9",
|
||||
"fleetbase/storefront-api": "^0.4.14",
|
||||
"fleetbase/ledger-api": "^0.0.1",
|
||||
"fleetbase/aws-marketplace": "^0.0.8",
|
||||
"fleetbase/billing-api": "^0.1.21",
|
||||
"fleetbase/customer-portal-api": "^0.0.10",
|
||||
"fleetbase/flespi-integration": "^0.1.16",
|
||||
"fleetbase/internals-api": "^0.0.29",
|
||||
"fleetbase/samsara-api": "^0.0.3",
|
||||
"fleetbase/solid-api": "^0.0.7",
|
||||
"fleetbase/valhalla-api": "^0.0.3",
|
||||
"fleetbase/vroom-api": "^0.0.3",
|
||||
"guzzlehttp/guzzle": "^7.0.1",
|
||||
"laravel/framework": "^10.0",
|
||||
"laravel/octane": "^2.3",
|
||||
@@ -50,6 +59,18 @@
|
||||
"phpunit/phpunit": "^10.0"
|
||||
},
|
||||
"repositories": [
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/fleetbase/aws-marketplace"
|
||||
},
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/fleetbase/internals"
|
||||
},
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/fleetbase/billing"
|
||||
},
|
||||
{
|
||||
"type": "composer",
|
||||
"url": "https://registry.fleetbase.io"
|
||||
|
||||
1562
api/composer.lock
generated
1562
api/composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -1,69 +0,0 @@
|
||||
import Model, { attr, belongsTo } from '@ember-data/model';
|
||||
|
||||
/**
|
||||
* ScheduleException
|
||||
*
|
||||
* Represents a deviation from a driver's recurring schedule — time off requests,
|
||||
* sick leave, holidays, shift swaps, training days, or other exceptions.
|
||||
*
|
||||
* An exception is submitted by a driver or dispatcher, then approved or rejected
|
||||
* by a manager. When approved, all ScheduleItem records that fall within the
|
||||
* exception's date range are automatically cancelled.
|
||||
*
|
||||
* @see core-api ScheduleException model
|
||||
*/
|
||||
export default class ScheduleExceptionModel extends Model {
|
||||
/** @ids */
|
||||
@attr('string') public_id;
|
||||
@attr('string') schedule_uuid;
|
||||
@attr('string') subject_uuid;
|
||||
@attr('string') subject_type;
|
||||
@attr('string') requested_by_uuid;
|
||||
|
||||
/** @attributes */
|
||||
@attr('string', { defaultValue: 'time_off' }) type;
|
||||
@attr('string', { defaultValue: 'pending' }) status;
|
||||
@attr('date') start_at;
|
||||
@attr('date') end_at;
|
||||
@attr('string') reason;
|
||||
@attr('string') notes;
|
||||
@attr('string') rejection_reason;
|
||||
@attr('date') reviewed_at;
|
||||
@attr('string') reviewed_by_uuid;
|
||||
|
||||
/** @meta */
|
||||
@attr('object') meta;
|
||||
|
||||
/** @relationships */
|
||||
@belongsTo('schedule', { async: true }) schedule;
|
||||
|
||||
/** @dates */
|
||||
@attr('date') created_at;
|
||||
@attr('date') updated_at;
|
||||
@attr('date') deleted_at;
|
||||
|
||||
/** @computed */
|
||||
get isPending() {
|
||||
return this.status === 'pending';
|
||||
}
|
||||
|
||||
get isApproved() {
|
||||
return this.status === 'approved';
|
||||
}
|
||||
|
||||
get isRejected() {
|
||||
return this.status === 'rejected';
|
||||
}
|
||||
|
||||
get typeLabel() {
|
||||
const labels = {
|
||||
time_off: 'Time Off',
|
||||
sick_leave: 'Sick Leave',
|
||||
holiday: 'Holiday',
|
||||
swap: 'Shift Swap',
|
||||
training: 'Training',
|
||||
other: 'Other',
|
||||
};
|
||||
return labels[this.type] || this.type;
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,8 @@
|
||||
import Model, { attr, belongsTo } from '@ember-data/model';
|
||||
|
||||
export default class ScheduleItemModel extends Model {
|
||||
/** @ids */
|
||||
@attr('string') public_id;
|
||||
@attr('string') schedule_uuid;
|
||||
@attr('string') schedule_template_uuid;
|
||||
@attr('string') assignee_uuid;
|
||||
@attr('string') assignee_type;
|
||||
@attr('string') resource_uuid;
|
||||
@@ -14,20 +12,10 @@ export default class ScheduleItemModel extends Model {
|
||||
@attr('number') duration;
|
||||
@attr('date') break_start_at;
|
||||
@attr('date') break_end_at;
|
||||
@attr('string') title;
|
||||
@attr('string', { defaultValue: 'scheduled' }) status;
|
||||
@attr('string') notes;
|
||||
|
||||
/** @exception fields */
|
||||
@attr('boolean', { defaultValue: false }) is_exception;
|
||||
@attr('date') exception_for_date;
|
||||
|
||||
/** @meta */
|
||||
@attr('string', { defaultValue: 'pending' }) status;
|
||||
@attr('object') meta;
|
||||
|
||||
/** @relationships */
|
||||
@belongsTo('schedule', { async: true }) schedule;
|
||||
@belongsTo('schedule-template', { async: true }) scheduleTemplate;
|
||||
@belongsTo('schedule') schedule;
|
||||
|
||||
@attr('date') created_at;
|
||||
@attr('date') updated_at;
|
||||
|
||||
@@ -1,51 +1,22 @@
|
||||
import Model, { attr, belongsTo } from '@ember-data/model';
|
||||
|
||||
/**
|
||||
* ScheduleTemplate
|
||||
*
|
||||
* A reusable recurring shift pattern that a manager can apply to one or many
|
||||
* drivers. Stores the RRULE (e.g. FREQ=WEEKLY;BYDAY=MO,TU,TH) plus the
|
||||
* daily start/end times. When applied to a driver's Schedule, the
|
||||
* ScheduleService materialises ScheduleItem records for the rolling horizon.
|
||||
*/
|
||||
export default class ScheduleTemplateModel extends Model {
|
||||
/** @ids */
|
||||
@attr('string') public_id;
|
||||
@attr('string') company_uuid;
|
||||
|
||||
/** @attributes */
|
||||
@attr('string') subject_uuid;
|
||||
@attr('string') subject_type;
|
||||
@attr('string') name;
|
||||
@attr('string') description;
|
||||
@attr('string') start_time; // HH:mm — e.g. "08:00"
|
||||
@attr('string') end_time; // HH:mm — e.g. "16:00"
|
||||
@attr('string') break_start_time; // HH:mm — e.g. "12:00" (optional)
|
||||
@attr('string') break_end_time; // HH:mm — e.g. "13:00" (optional)
|
||||
@attr('number') duration; // computed minutes (end - start)
|
||||
@attr('number') break_duration; // minutes
|
||||
@attr('string') rrule; // RFC 5545 RRULE string
|
||||
@attr('string') color; // hex color for calendar display
|
||||
@attr('string') start_time;
|
||||
@attr('string') end_time;
|
||||
@attr('number') duration;
|
||||
@attr('number') break_duration;
|
||||
@attr('string') rrule;
|
||||
@attr('object') meta;
|
||||
|
||||
/** @relationships */
|
||||
@belongsTo('company', { async: true }) company;
|
||||
@belongsTo('company') company;
|
||||
|
||||
/** @dates */
|
||||
@attr('date') created_at;
|
||||
@attr('date') updated_at;
|
||||
@attr('date') deleted_at;
|
||||
|
||||
/**
|
||||
* Parse the RRULE string and return a human-readable summary.
|
||||
* e.g. "Weekly on Mon, Tue, Thu · 08:00–16:00"
|
||||
*/
|
||||
get recurrenceSummary() {
|
||||
if (!this.rrule) return null;
|
||||
const dayMap = { MO: 'Mon', TU: 'Tue', WE: 'Wed', TH: 'Thu', FR: 'Fri', SA: 'Sat', SU: 'Sun' };
|
||||
const byday = this.rrule.match(/BYDAY=([^;]+)/);
|
||||
const days = byday ? byday[1].split(',').map((d) => dayMap[d] || d).join(', ') : '';
|
||||
const freq = this.rrule.match(/FREQ=(\w+)/);
|
||||
const freqLabel = freq ? freq[1].charAt(0) + freq[1].slice(1).toLowerCase() : '';
|
||||
const times = this.start_time && this.end_time ? ` · ${this.start_time}–${this.end_time}` : '';
|
||||
return `${freqLabel} on ${days}${times}`;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,14 +16,9 @@ export default class ScheduleModel extends Model {
|
||||
@attr('string', { defaultValue: 'draft' }) status;
|
||||
@attr('object') meta;
|
||||
|
||||
/** @materialization tracking */
|
||||
@attr('date') last_materialized_at;
|
||||
@attr('number', { defaultValue: 60 }) materialization_horizon_days;
|
||||
|
||||
/** @relationships */
|
||||
@hasMany('schedule-item', { async: true }) items;
|
||||
@hasMany('schedule-exception', { async: true }) exceptions;
|
||||
@belongsTo('company', { async: true }) company;
|
||||
@hasMany('schedule-item') items;
|
||||
@belongsTo('company') company;
|
||||
|
||||
/** @dates */
|
||||
@attr('date') created_at;
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
API_HOST=
|
||||
API_HOST=https://api.fleetbase.io
|
||||
API_NAMESPACE=int/v1
|
||||
API_SECURE=true
|
||||
SOCKETCLUSTER_PATH=/socketcluster/
|
||||
SOCKETCLUSTER_HOST=
|
||||
SOCKETCLUSTER_HOST=socket.fleetbase.io
|
||||
SOCKETCLUSTER_SECURE=true
|
||||
SOCKETCLUSTER_PORT=38000
|
||||
OSRM_HOST=https://router.project-osrm.org
|
||||
SOCKETCLUSTER_PORT=8000
|
||||
OSRM_HOST=https://router.project-osrm.org
|
||||
DISABLE_RUNTIME_CONFIG=true
|
||||
9
console/environments/.env.qa
Normal file
9
console/environments/.env.qa
Normal file
@@ -0,0 +1,9 @@
|
||||
API_HOST=https://api.qa.fleetbase.io
|
||||
API_NAMESPACE=int/v1
|
||||
API_SECURE=true
|
||||
SOCKETCLUSTER_PATH=/socketcluster/
|
||||
SOCKETCLUSTER_HOST=socket.qa.fleetbase.io
|
||||
SOCKETCLUSTER_SECURE=true
|
||||
SOCKETCLUSTER_PORT=8000
|
||||
OSRM_HOST=https://router.project-osrm.org
|
||||
DISABLE_RUNTIME_CONFIG=true
|
||||
@@ -33,16 +33,25 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@ember/legacy-built-in-components": "^0.4.2",
|
||||
"@fleetbase/aws-marketplace": "^0.0.8",
|
||||
"@fleetbase/billing-engine": "^0.1.21",
|
||||
"@fleetbase/customer-portal-engine": "^0.0.10",
|
||||
"@fleetbase/dev-engine": "^0.2.13",
|
||||
"@fleetbase/ember-core": "^0.3.18",
|
||||
"@fleetbase/ember-ui": "^0.3.25",
|
||||
"@fleetbase/fleetops-data": "^0.1.25",
|
||||
"@fleetbase/fleetops-engine": "^0.6.38",
|
||||
"@fleetbase/iam-engine": "^0.1.8",
|
||||
"@fleetbase/flespi-engine": "^0.1.16",
|
||||
"@fleetbase/internals-engine": "^0.0.29",
|
||||
"@fleetbase/leaflet-routing-machine": "^3.2.17",
|
||||
"@fleetbase/ledger-engine": "^0.0.1",
|
||||
"@fleetbase/registry-bridge-engine": "^0.1.8",
|
||||
"@fleetbase/samsara-engine": "^0.0.3",
|
||||
"@fleetbase/solid-engine": "^0.0.7",
|
||||
"@fleetbase/storefront-engine": "^0.4.14",
|
||||
"@fleetbase/valhalla-engine": "^0.0.3",
|
||||
"@fleetbase/vroom-engine": "^0.0.3",
|
||||
"@fleetbase/ledger-engine": "^0.0.1",
|
||||
"@formatjs/intl-datetimeformat": "^6.18.2",
|
||||
"@formatjs/intl-numberformat": "^8.15.6",
|
||||
"@formatjs/intl-pluralrules": "^5.4.6",
|
||||
|
||||
1777
console/pnpm-lock.yaml
generated
1777
console/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Submodule packages/core-api updated: ed6ee870d1...04ae1ac455
Submodule packages/dev-engine updated: 531e1d460e...64a379ce12
Submodule packages/ember-core updated: cf4374fa90...54a45bbdaa
Submodule packages/ember-ui updated: 95341e08c3...c6694206e9
Submodule packages/fleetbase-extensions-indexer updated: db26b8add3...a6f2b4cde9
Submodule packages/fleetops updated: 4c46b3b41b...09487c1c50
Submodule packages/fleetops-data updated: 332dc428de...08520b3981
Submodule packages/iam-engine updated: 170dca7574...99698152e2
Submodule packages/pallet updated: b343c621f1...9e7592eddb
Submodule packages/storefront updated: b6e25bbc90...b5776acef6
Reference in New Issue
Block a user