mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-04 18:04:18 +00:00
fix(tours): one tour type catalogue, and no column nothing writes
tour_types now holds every key the shared contract accepts, all but hike disabled, and create and edit turn a disabled type away with a 400 instead of failing on the foreign key. tours.tour_group_id is dropped: nothing ever wrote or read it. difficulty and wanderer_ref stay for the Wanderer import.
This commit is contained in:
@@ -35,7 +35,6 @@ const tour: TourListItem = {
|
||||
difficulty: null,
|
||||
wanderer_ref: null,
|
||||
match_confidence: null,
|
||||
tour_group_id: null,
|
||||
max_hiking_difficulty: 2,
|
||||
planned: false,
|
||||
caution: false,
|
||||
|
||||
@@ -27,7 +27,6 @@ const tour: TourListItem = {
|
||||
difficulty: null,
|
||||
wanderer_ref: null,
|
||||
match_confidence: null,
|
||||
tour_group_id: null,
|
||||
max_hiking_difficulty: 2,
|
||||
planned: false,
|
||||
caution: false,
|
||||
|
||||
@@ -25,7 +25,6 @@ const tour: TourListItem = {
|
||||
difficulty: null,
|
||||
wanderer_ref: null,
|
||||
match_confidence: 1,
|
||||
tour_group_id: null,
|
||||
max_hiking_difficulty: 2,
|
||||
planned: false,
|
||||
caution: false,
|
||||
|
||||
@@ -40,7 +40,6 @@ const savedTour = {
|
||||
difficulty: null,
|
||||
wanderer_ref: null,
|
||||
match_confidence: 1,
|
||||
tour_group_id: null,
|
||||
max_hiking_difficulty: 2,
|
||||
planned: false,
|
||||
caution: false,
|
||||
|
||||
@@ -21,7 +21,7 @@ vi.mock('better-sqlite3', () => { throw new Error('SQLite imports are forbidden
|
||||
const tour: TourListItem = {
|
||||
place_id: 42, name: 'Ridge walk', tour_type: 'hike', distance: 4,
|
||||
elevation_gain: 100, elevation_loss: 80, duration: 60, difficulty: null,
|
||||
wanderer_ref: null, match_confidence: 1, tour_group_id: null,
|
||||
wanderer_ref: null, match_confidence: 1,
|
||||
max_hiking_difficulty: 2, planned: false, caution: false,
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ vi.mock('../../store/tripStore', () => ({
|
||||
const tour: TourListItem = {
|
||||
place_id: 42, name: 'Ridge walk', tour_type: 'hike', distance: 4,
|
||||
elevation_gain: 100, elevation_loss: 80, duration: 60, difficulty: null,
|
||||
wanderer_ref: null, match_confidence: 1, tour_group_id: null,
|
||||
wanderer_ref: null, match_confidence: 1,
|
||||
max_hiking_difficulty: 2, planned: false, caution: false,
|
||||
}
|
||||
const days = [{ id: 7, trip_id: 1, day_number: 1, title: 'Summit day', date: '2026-05-15' } as Day]
|
||||
|
||||
Reference in New Issue
Block a user