refactor: migrate web-app to use shared-code package

Update web-app to use @evidencija-rezija/shared-code for common types
and utilities instead of maintaining duplicate copies.

Changes:
- Add shared-code dependency to package.json
- Update all imports across 35+ files to use @evidencija-rezija/shared-code
- Remove duplicate db-types.ts and shareChecksum.ts files

This ensures type consistency between web-app and email-worker and
reduces maintenance burden.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Knee Cola
2025-12-30 18:30:00 +01:00
parent 625e468951
commit 4bac7f4677
31 changed files with 34 additions and 263 deletions

View File

@@ -1,5 +1,5 @@
import { LocationEditForm } from '@/app/ui/LocationEditForm';
import { YearMonth } from '@/app/lib/db-types';
import { YearMonth } from '@evidencija-rezija/shared-code';
import { getUserSettings } from '@/app/lib/actions/userSettingsActions';
export default async function LocationAddPage({ yearMonth }: { yearMonth:YearMonth }) {

View File

@@ -1,5 +1,5 @@
import { FC } from "react"
import { Bill } from "@/app/lib/db-types"
import { Bill } from "@evidencija-rezija/shared-code"
import { TicketIcon } from "@heroicons/react/24/outline"
export interface BillBadgeProps {

View File

@@ -1,7 +1,7 @@
'use client';
import { FC, useState } from "react";
import { BillingLocation, YearMonth } from "../../../../../lib/db-types";
import { BillingLocation, YearMonth } from "@evidencija-rezija/shared-code";
import { formatYearMonth } from "../../../../../lib/format";
import { useTranslations } from "next-intl";
import { useRouter } from "next/navigation";

View File

@@ -2,7 +2,7 @@
import { InboxStackIcon, Square3Stack3DIcon } from '@heroicons/react/24/outline';
import { useTranslations } from 'next-intl';
import { YearMonth } from '../../../../../lib/db-types';
import { YearMonth } from '@evidencija-rezija/shared-code';
import Link from 'next/link';
export interface MultiBillEditButtonProps {