fix: Update auto schedule creation
All checks were successful
Deploy to Staging / Build Images (pull_request) Successful in 3m29s
Deploy to Staging / Deploy to Staging (pull_request) Successful in 25s
Deploy to Staging / Verify Staging (pull_request) Successful in 8s
Deploy to Staging / Notify Staging Ready (pull_request) Successful in 7s
Deploy to Staging / Notify Staging Failure (pull_request) Has been skipped
All checks were successful
Deploy to Staging / Build Images (pull_request) Successful in 3m29s
Deploy to Staging / Deploy to Staging (pull_request) Successful in 25s
Deploy to Staging / Verify Staging (pull_request) Successful in 8s
Deploy to Staging / Notify Staging Ready (pull_request) Successful in 7s
Deploy to Staging / Notify Staging Failure (pull_request) Has been skipped
This commit is contained in:
@@ -20,10 +20,11 @@ export function useCreateSchedulesFromExtraction() {
|
||||
mutationFn: async ({ vehicleId, items }) => {
|
||||
const results: MaintenanceScheduleResponse[] = [];
|
||||
for (const item of items) {
|
||||
if (item.subtypes.length === 0) continue;
|
||||
const request: CreateScheduleRequest = {
|
||||
vehicleId,
|
||||
category: 'routine_maintenance',
|
||||
subtypes: item.subtypes.length > 0 ? item.subtypes : [],
|
||||
subtypes: item.subtypes,
|
||||
scheduleType: 'interval',
|
||||
intervalMiles: item.intervalMiles ?? undefined,
|
||||
intervalMonths: item.intervalMonths ?? undefined,
|
||||
|
||||
Reference in New Issue
Block a user