diff --git a/Dockerfile b/Dockerfile index ab730d3a8..562b5dc4b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ WORKDIR /app # --- Install + Build in one stage --- FROM base AS builder # CACHE_BUST: change this value to force a full rebuild (busts Docker layer cache) -ARG CACHE_BUST=11 +ARG CACHE_BUST=12 RUN echo "Cache bust: ${CACHE_BUST}" COPY . . RUN pnpm install --no-frozen-lockfile @@ -17,10 +17,16 @@ ARG NEXT_PUBLIC_SITE_URL=https://myeasycms.de ARG NEXT_PUBLIC_SUPABASE_URL=http://localhost:8000 ARG NEXT_PUBLIC_SUPABASE_PUBLIC_KEY ARG NEXT_PUBLIC_DEFAULT_LOCALE=de +ARG NEXT_PUBLIC_ENABLE_FISCHEREI=true +ARG NEXT_PUBLIC_ENABLE_MEETING_PROTOCOLS=true +ARG NEXT_PUBLIC_ENABLE_VERBANDSVERWALTUNG=true ENV NEXT_PUBLIC_SITE_URL=${NEXT_PUBLIC_SITE_URL} ENV NEXT_PUBLIC_SUPABASE_URL=${NEXT_PUBLIC_SUPABASE_URL} ENV NEXT_PUBLIC_SUPABASE_PUBLIC_KEY=${NEXT_PUBLIC_SUPABASE_PUBLIC_KEY} ENV NEXT_PUBLIC_DEFAULT_LOCALE=${NEXT_PUBLIC_DEFAULT_LOCALE} +ENV NEXT_PUBLIC_ENABLE_FISCHEREI=${NEXT_PUBLIC_ENABLE_FISCHEREI} +ENV NEXT_PUBLIC_ENABLE_MEETING_PROTOCOLS=${NEXT_PUBLIC_ENABLE_MEETING_PROTOCOLS} +ENV NEXT_PUBLIC_ENABLE_VERBANDSVERWALTUNG=${NEXT_PUBLIC_ENABLE_VERBANDSVERWALTUNG} RUN pnpm --filter web build # --- Run --- diff --git a/docker-compose.yml b/docker-compose.yml index 9a5306e68..310a601ff 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -335,6 +335,9 @@ services: NEXT_PUBLIC_ENABLE_TEAM_ACCOUNTS_BILLING: "false" NEXT_PUBLIC_ENABLE_PERSONAL_ACCOUNT_BILLING: "false" NEXT_PUBLIC_ENABLE_NOTIFICATIONS: "true" + NEXT_PUBLIC_ENABLE_FISCHEREI: "true" + NEXT_PUBLIC_ENABLE_MEETING_PROTOCOLS: "true" + NEXT_PUBLIC_ENABLE_VERBANDSVERWALTUNG: "true" volumes: supabase-db-data: diff --git a/packages/features/fischerei/src/server/api.ts b/packages/features/fischerei/src/server/api.ts index 9ec9371ca..2bfc17766 100644 --- a/packages/features/fischerei/src/server/api.ts +++ b/packages/features/fischerei/src/server/api.ts @@ -97,18 +97,18 @@ export function createFischereiApi(client: SupabaseClient) { .insert({ account_id: input.accountId, name: input.name, - short_name: input.shortName, + short_name: input.shortName || null, water_type: input.waterType, - description: input.description, + description: input.description || null, surface_area_ha: input.surfaceAreaHa, length_m: input.lengthM, width_m: input.widthM, avg_depth_m: input.avgDepthM, max_depth_m: input.maxDepthM, - outflow: input.outflow, - location: input.location, + outflow: input.outflow || null, + location: input.location || null, classification_order: input.classificationOrder, - county: input.county, + county: input.county || null, geo_lat: input.geoLat, geo_lng: input.geoLng, lfv_number: input.lfvNumber, @@ -290,17 +290,17 @@ export function createFischereiApi(client: SupabaseClient) { .insert({ account_id: input.accountId, name: input.name, - name_latin: input.nameLatin, - name_local: input.nameLocal, + name_latin: input.nameLatin || null, + name_local: input.nameLocal || null, is_active: input.isActive, max_age_years: input.maxAgeYears, max_weight_kg: input.maxWeightKg, max_length_cm: input.maxLengthCm, protected_min_size_cm: input.protectedMinSizeCm, - protection_period_start: input.protectionPeriodStart, - protection_period_end: input.protectionPeriodEnd, - spawning_season_start: input.spawningSeasonStart, - spawning_season_end: input.spawningSeasonEnd, + protection_period_start: input.protectionPeriodStart || null, + protection_period_end: input.protectionPeriodEnd || null, + spawning_season_start: input.spawningSeasonStart || null, + spawning_season_end: input.spawningSeasonEnd || null, has_special_spawning_season: input.hasSpecialSpawningSeason, k_factor_avg: input.kFactorAvg, k_factor_min: input.kFactorMin, @@ -401,8 +401,8 @@ export function createFischereiApi(client: SupabaseClient) { water_id: input.waterId, species_id: input.speciesId, min_size_cm: input.minSizeCm, - protection_period_start: input.protectionPeriodStart, - protection_period_end: input.protectionPeriodEnd, + protection_period_start: input.protectionPeriodStart || null, + protection_period_end: input.protectionPeriodEnd || null, max_catch_per_day: input.maxCatchPerDay, max_catch_per_year: input.maxCatchPerYear, }, @@ -473,13 +473,13 @@ export function createFischereiApi(client: SupabaseClient) { account_id: input.accountId, water_id: input.waterId, species_id: input.speciesId, - stocking_date: input.stockingDate, + stocking_date: input.stockingDate || null, quantity: input.quantity, weight_kg: input.weightKg, age_class: input.ageClass, cost_euros: input.costEuros, supplier_id: input.supplierId, - remarks: input.remarks, + remarks: input.remarks || null, created_by: userId, updated_by: userId, }) @@ -582,11 +582,11 @@ export function createFischereiApi(client: SupabaseClient) { account_id: input.accountId, water_id: input.waterId, lessor_name: input.lessorName, - lessor_address: input.lessorAddress, - lessor_phone: input.lessorPhone, - lessor_email: input.lessorEmail, - start_date: input.startDate, - end_date: input.endDate, + lessor_address: input.lessorAddress || null, + lessor_phone: input.lessorPhone || null, + lessor_email: input.lessorEmail || null, + start_date: input.startDate || null, + end_date: input.endDate || null, duration_years: input.durationYears, initial_amount: input.initialAmount, fixed_annual_increase: input.fixedAnnualIncrease, @@ -721,14 +721,14 @@ export function createFischereiApi(client: SupabaseClient) { member_id: input.memberId, year: input.year, member_name: input.memberName, - member_birth_date: input.memberBirthDate, + member_birth_date: input.memberBirthDate || null, fishing_days_count: input.fishingDaysCount, card_numbers: input.cardNumbers, is_fly_fisher: input.isFlyFisher, is_hejfish: input.isHejfish, is_empty: input.isEmpty, not_fished: input.notFished, - remarks: input.remarks, + remarks: input.remarks || null, created_by: userId, updated_by: userId, }) @@ -852,7 +852,7 @@ export function createFischereiApi(client: SupabaseClient) { species_id: input.speciesId, water_id: input.waterId, member_id: input.memberId, - catch_date: input.catchDate, + catch_date: input.catchDate || null, quantity: input.quantity, length_cm: input.lengthCm, weight_g: input.weightG, @@ -864,7 +864,7 @@ export function createFischereiApi(client: SupabaseClient) { competition_id: input.competitionId, competition_participant_id: input.competitionParticipantId, permit_id: input.permitId, - remarks: input.remarks, + remarks: input.remarks || null, }) .select() .single(); diff --git a/packages/features/sitzungsprotokolle/src/server/api.ts b/packages/features/sitzungsprotokolle/src/server/api.ts index 690dadc27..092b2b3fa 100644 --- a/packages/features/sitzungsprotokolle/src/server/api.ts +++ b/packages/features/sitzungsprotokolle/src/server/api.ts @@ -79,9 +79,9 @@ export function createMeetingsApi(client: SupabaseClient) { .insert({ account_id: input.accountId, title: input.title, - meeting_date: input.meetingDate, + meeting_date: input.meetingDate || null, meeting_type: input.meetingType, - location: input.location, + location: input.location || null, attendees: input.attendees, remarks: input.remarks, is_published: input.isPublished, diff --git a/packages/features/verbandsverwaltung/src/server/api.ts b/packages/features/verbandsverwaltung/src/server/api.ts index ca26cfcda..194faf48c 100644 --- a/packages/features/verbandsverwaltung/src/server/api.ts +++ b/packages/features/verbandsverwaltung/src/server/api.ts @@ -83,19 +83,19 @@ export function createVerbandApi(client: SupabaseClient) { .insert({ account_id: input.accountId, name: input.name, - short_name: input.shortName, + short_name: input.shortName || null, association_type_id: input.associationTypeId, member_count: input.memberCount, founded_year: input.foundedYear, street: input.street, zip: input.zip, city: input.city, - phone: input.phone, - email: input.email, - website: input.website, - iban: input.iban, - bic: input.bic, - account_holder: input.accountHolder, + phone: input.phone || null, + email: input.email || null, + website: input.website || null, + iban: input.iban || null, + bic: input.bic || null, + account_holder: input.accountHolder || null, is_archived: input.isArchived, created_by: userId, updated_by: userId, @@ -206,8 +206,8 @@ export function createVerbandApi(client: SupabaseClient) { first_name: input.firstName, last_name: input.lastName, role: input.role, - phone: input.phone, - email: input.email, + phone: input.phone || null, + email: input.email || null, is_primary: input.isPrimary, }) .select() @@ -265,7 +265,7 @@ export function createVerbandApi(client: SupabaseClient) { .insert({ account_id: input.accountId, name: input.name, - description: input.description, + description: input.description || null, sort_order: input.sortOrder, }) .select() @@ -319,7 +319,7 @@ export function createVerbandApi(client: SupabaseClient) { .insert({ account_id: input.accountId, name: input.name, - description: input.description, + description: input.description || null, sort_order: input.sortOrder, }) .select() @@ -373,7 +373,7 @@ export function createVerbandApi(client: SupabaseClient) { .insert({ account_id: input.accountId, name: input.name, - description: input.description, + description: input.description || null, default_amount: input.defaultAmount, is_active: input.isActive, }) @@ -462,8 +462,8 @@ export function createVerbandApi(client: SupabaseClient) { fee_type_id: input.feeTypeId, year: input.year, amount: input.amount, - due_date: input.dueDate, - paid_date: input.paidDate, + due_date: input.dueDate || null, + paid_date: input.paidDate || null, payment_method: input.paymentMethod, status: input.status, notes: input.notes, @@ -527,7 +527,7 @@ export function createVerbandApi(client: SupabaseClient) { title: input.title, content: input.content, note_type: input.noteType, - due_date: input.dueDate, + due_date: input.dueDate || null, is_completed: input.isCompleted, }) .select()